diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-07-26 13:53:08 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-07-27 10:55:01 -0500 |
commit | fd9f977571b3bb2d5e8086224e7a024876a9e548 (patch) | |
tree | e3f21f8c0653beee01db00a88f77942555338d31 /lib/bundler/dsl.rb | |
parent | 92f7781eda8e429a189c1d2ebc642ec4f8febdbf (diff) | |
download | bundler-fd9f977571b3bb2d5e8086224e7a024876a9e548.tar.gz |
[Env] Print all gemfiles that have been evaledseg-env-eval-gemfile
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 49e7ea47f9..679c66e711 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -34,14 +34,16 @@ module Bundler @ruby_version = nil @gemspecs = [] @gemfile = nil + @gemfiles = [] add_git_sources end def eval_gemfile(gemfile, contents = nil) - expanded_gemfile_path = Pathname.new(gemfile).expand_path + expanded_gemfile_path = Pathname.new(gemfile).expand_path(@gemfile && @gemfile.parent) original_gemfile = @gemfile @gemfile = expanded_gemfile_path - contents ||= Bundler.read_file(gemfile.to_s) + @gemfiles << expanded_gemfile_path + contents ||= Bundler.read_file(@gemfile.to_s) instance_eval(contents.dup.untaint, gemfile.to_s, 1) rescue Exception => e message = "There was an error " \ @@ -213,7 +215,7 @@ module Bundler end def to_definition(lockfile, unlock) - Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version, @optional_groups) + Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version, @optional_groups, @gemfiles) end def group(*args, &blk) |