Add rspec spring command

This commit is contained in:
Lars Henrik Mai 2016-02-18 07:14:53 +01:00
parent 85167bc563
commit 79e7ea61d3
4 changed files with 15 additions and 7 deletions

View file

@ -39,6 +39,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc
group :development do
gem 'spring'
gem 'spring-commands-rspec'
gem 'quiet_assets'
gem 'awesome_print'
end

View file

@ -205,6 +205,8 @@ GEM
slim (~> 3.0)
slop (3.6.0)
spring (1.3.4)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.0.2)
rack (~> 1.0)
sprockets-rails (2.2.4)
@ -260,6 +262,7 @@ DEPENDENCIES
simplecov
slim-rails
spring
spring-commands-rspec
sqlite3
turbolinks
uglifier

7
bin/rspec Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
require 'bundler/setup'
load Gem.bin_path('rspec-core', 'rspec')

View file

@ -1,17 +1,14 @@
#!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast
# It gets overwritten when you run the `spring binstub` command
# This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
require "rubygems"
require "bundler"
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
ENV["GEM_HOME"] = ""
Gem.paths = ENV
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem "spring", match[1]
require "spring/binstub"
end