lib/spring/configuration.rb in spring-3.0.0 vs lib/spring/configuration.rb in spring-3.1.0
- old
+ new
@@ -3,13 +3,24 @@
module Spring
class << self
attr_accessor :application_root, :quiet
def gemfile
+ require "bundler"
+
if /\s1.9.[0-9]/ === Bundler.ruby_scope.gsub(/[\/\s]+/,'')
- ENV["BUNDLE_GEMFILE"] || "Gemfile"
+ Pathname.new(ENV["BUNDLE_GEMFILE"] || "Gemfile").expand_path
else
Bundler.default_gemfile
+ end
+ end
+
+ def gemfile_lock
+ case gemfile.to_s
+ when /\bgems\.rb\z/
+ gemfile.sub_ext('.locked')
+ else
+ gemfile.sub_ext('.lock')
end
end
def after_fork_callbacks
@after_fork_callbacks ||= []