summaryrefslogtreecommitdiff
path: root/lib/bundler/lockfile_parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/lockfile_parser.rb')
-rw-r--r--lib/bundler/lockfile_parser.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index dbf8926690..ff706fca1d 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -90,7 +90,7 @@ module Bundler
send("parse_#{@state}", line)
end
end
- @sources << @rubygems_aggregate
+ @sources << @rubygems_aggregate unless Bundler.feature_flag.lockfile_uses_separate_rubygems_sources?
@specs = @specs.values.sort_by(&:identifier)
warn_for_outdated_bundler_version
rescue ArgumentError => e
@@ -141,10 +141,16 @@ module Bundler
@sources << @current_source
end
when GEM
- Array(@opts["remote"]).each do |url|
- @rubygems_aggregate.add_remote(url)
+ if Bundler.feature_flag.lockfile_uses_separate_rubygems_sources?
+ @opts["remotes"] = @opts.delete("remote")
+ @current_source = TYPES[@type].from_lock(@opts)
+ @sources << @current_source
+ else
+ Array(@opts["remote"]).each do |url|
+ @rubygems_aggregate.add_remote(url)
+ end
+ @current_source = @rubygems_aggregate
end
- @current_source = @rubygems_aggregate
when PLUGIN
@current_source = Plugin.source_from_lock(@opts)
@sources << @current_source