Permalink
Browse files

@gemfile.load in File should look for BUNDLE_GEMFILE first

This is because this could *potentially* be set to something other than Gemfile.

For example, in Spree, we have a dummy application that lives at spec/dummy inside each engine component. Each engine component has a Gemfile at the root of its directory. The dummy applications contain no Gemfile, and so their config/boot.rb sets the ENV['BUNDLE_GEMFILE'] path to go back up to the root's Gemfile.

Appraisal doesn't acknowledge this environment variable, but should.
  • Loading branch information...
1 parent adec57d commit e41fdfc5872c9a2dbc1a3d4deb06cc99f27802fe @radar radar committed Feb 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/appraisal/file.rb
View
@@ -13,7 +13,7 @@ def self.each(&block)
def initialize
@appraisals = []
@gemfile = Gemfile.new
- @gemfile.load('Gemfile')
+ @gemfile.load(ENV['BUNDLE_GEMFILE'] || 'Gemfile')
run(IO.read(path)) if ::File.exists?(path)
end

0 comments on commit e41fdfc

Please sign in to comment.