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 group :development do
gem 'spring' gem 'spring'
gem 'spring-commands-rspec'
gem 'quiet_assets' gem 'quiet_assets'
gem 'awesome_print' gem 'awesome_print'
end end

View file

@ -205,6 +205,8 @@ GEM
slim (~> 3.0) slim (~> 3.0)
slop (3.6.0) slop (3.6.0)
spring (1.3.4) spring (1.3.4)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.0.2) sprockets (3.0.2)
rack (~> 1.0) rack (~> 1.0)
sprockets-rails (2.2.4) sprockets-rails (2.2.4)
@ -260,6 +262,7 @@ DEPENDENCIES
simplecov simplecov
slim-rails slim-rails
spring spring
spring-commands-rspec
sqlite3 sqlite3
turbolinks turbolinks
uglifier 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 #!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast # This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command # It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring) unless defined?(Spring)
require "rubygems" require "rubygems"
require "bundler" require "bundler"
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
ENV["GEM_HOME"] = ""
Gem.paths = ENV
gem "spring", match[1] gem "spring", match[1]
require "spring/binstub" require "spring/binstub"
end end