Skip to content

Commit

Permalink
@gemfile.load in File should look for BUNDLE_GEMFILE first
Browse files Browse the repository at this point in the history
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
radar committed Feb 15, 2012
1 parent adec57d commit e41fdfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/appraisal/file.rb
Expand Up @@ -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

Expand Down

0 comments on commit e41fdfc

Please sign in to comment.