diff options
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r-- | lib/bundler/definition.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 76440d102b..064c0f5695 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -4,12 +4,12 @@ module Bundler class Definition include GemHelpers - attr_reader :dependencies, :platforms, :sources + attr_reader :dependencies, :platforms, :sources, :folders def self.build(gemfile, lockfile, unlock) unlock ||= {} gemfile = Pathname.new(gemfile).expand_path - + gemfile = gemfile + 'Gemfile' unless gemfile.file? unless gemfile.file? raise GemfileNotFound, "#{gemfile} not found" end @@ -33,11 +33,13 @@ module Bundler @dependencies, @sources, @unlock = dependencies, sources, unlock @remote = false @specs = nil + @folders = [] @lockfile_contents = "" if lockfile && File.exists?(lockfile) @lockfile_contents = Bundler.read_file(lockfile) locked = LockfileParser.new(@lockfile_contents) + @folders << @lockfile_contents.scan(/ folder: (.*)$/).flatten if @lockfile_contents[/ folder: (.*)/,1] @platforms = locked.platforms if unlock != true |