diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rspec | 6 | ||||
-rwxr-xr-x | bin/spinach | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/rspec b/bin/rspec index 6e6709219af..26583242051 100755 --- a/bin/rspec +++ b/bin/rspec @@ -1,4 +1,10 @@ #!/usr/bin/env ruby + +# Remove these two lines below when upgraded to rails 5.0. +# Allow run `rspec` command as `RAILS5=1 rspec ...` instead of `BUNDLE_GEMFILE=Gemfile.rails5 rspec ...` +gemfile = %w[1 true].include?(ENV["RAILS5"]) ? "Gemfile.rails5" : "Gemfile" +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) + begin load File.expand_path('../spring', __FILE__) rescue LoadError => e diff --git a/bin/spinach b/bin/spinach index 474050e29d1..eda81c9ed8a 100755 --- a/bin/spinach +++ b/bin/spinach @@ -1,4 +1,9 @@ #!/usr/bin/env ruby + +# Remove this block when removing rails5? code. +gemfile = %w[1 true].include?(ENV["RAILS5"]) ? "Gemfile.rails5" : "Gemfile" +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) + begin load File.expand_path('../spring', __FILE__) rescue LoadError => e |