Re-generate Spring binstubs for updated version of Spring

Prevents output like this:

    Array values in the parameter are deprecated. Please use a String or nil.
    An Array was passed in from bin/rspec:3:in `load'
This commit is contained in:
Robert Speicher 2016-04-22 12:36:47 -04:00
parent 80893cad67
commit fdc8b05ab1
6 changed files with 30 additions and 10 deletions

View file

@ -1,4 +1,9 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../../config/application', __FILE__) APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot' require_relative '../config/boot'
require 'rails/commands' require 'rails/commands'

View file

@ -1,4 +1,9 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
require_relative '../config/boot' require_relative '../config/boot'
require 'rake' require 'rake'
Rake.application.run Rake.application.run

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin begin
load File.expand_path("../spring", __FILE__) load File.expand_path('../spring', __FILE__)
rescue LoadError rescue LoadError => e
raise unless e.message.include?('spring')
end end
require 'bundler/setup' require 'bundler/setup'
load Gem.bin_path('rspec-core', 'rspec') load Gem.bin_path('rspec-core', 'rspec')

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin begin
load File.expand_path("../spring", __FILE__) load File.expand_path('../spring', __FILE__)
rescue LoadError rescue LoadError => e
raise unless e.message.include?('spring')
end end
require 'bundler/setup' require 'bundler/setup'
load Gem.bin_path('spinach', 'spinach') load Gem.bin_path('spinach', 'spinach')

View file

@ -4,12 +4,12 @@
# 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))
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
gem "spring", match[1] gem 'spring', match[1]
require "spring/binstub" require 'spring/binstub'
end end
end end

8
bin/teaspoon Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
require 'bundler/setup'
load Gem.bin_path('teaspoon', 'teaspoon')