rubygems-update 3.2.5 → 3.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +50 -0
- data/Manifest.txt +2 -0
- data/Rakefile +15 -14
- data/bundler/CHANGELOG.md +73 -0
- data/bundler/lib/bundler.rb +1 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -0
- data/bundler/lib/bundler/cli/cache.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +12 -0
- data/bundler/lib/bundler/definition.rb +66 -56
- data/bundler/lib/bundler/dep_proxy.rb +15 -8
- data/bundler/lib/bundler/dsl.rb +38 -25
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher.rb +0 -1
- data/bundler/lib/bundler/gem_helper.rb +8 -6
- data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
- data/bundler/lib/bundler/index.rb +6 -5
- data/bundler/lib/bundler/inline.rb +1 -0
- data/bundler/lib/bundler/installer.rb +0 -17
- data/bundler/lib/bundler/installer/standalone.rb +15 -0
- data/bundler/lib/bundler/lazy_specification.rb +9 -18
- data/bundler/lib/bundler/lockfile_parser.rb +12 -8
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +6 -12
- data/bundler/lib/bundler/man/bundle-config.1.ronn +11 -18
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin.rb +1 -0
- data/bundler/lib/bundler/plugin/installer.rb +8 -9
- data/bundler/lib/bundler/resolver.rb +110 -80
- data/bundler/lib/bundler/resolver/spec_group.rb +56 -44
- data/bundler/lib/bundler/rubygems_ext.rb +16 -0
- data/bundler/lib/bundler/settings.rb +1 -2
- data/bundler/lib/bundler/shared_helpers.rb +2 -2
- data/bundler/lib/bundler/source/git.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +10 -2
- data/bundler/lib/bundler/source_list.rb +34 -25
- data/bundler/lib/bundler/spec_set.rb +5 -4
- data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +2 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +11 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +5 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +3 -3
- data/lib/rubygems/command.rb +1 -0
- data/lib/rubygems/dependency.rb +5 -1
- data/lib/rubygems/ext/builder.rb +2 -1
- data/lib/rubygems/installer_uninstaller_utils.rb +6 -1
- data/lib/rubygems/platform.rb +0 -4
- data/lib/rubygems/requirement.rb +1 -1
- data/lib/rubygems/resolver/index_specification.rb +4 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +2 -2
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +11 -7
- data/lib/rubygems/specification.rb +13 -11
- data/lib/rubygems/test_case.rb +5 -6
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
- data/test/rubygems/test_gem.rb +85 -8
- data/test/rubygems/test_gem_commands_outdated_command.rb +18 -0
- data/test/rubygems/test_gem_dependency_installer.rb +27 -18
- data/test/rubygems/test_gem_ext_builder.rb +24 -0
- data/test/rubygems/test_gem_installer.rb +2 -0
- data/test/rubygems/test_gem_platform.rb +8 -0
- data/test/rubygems/test_gem_requirement.rb +35 -1
- data/test/rubygems/test_gem_specification.rb +10 -15
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_util.rb +4 -4
- metadata +5 -3
@@ -4,19 +4,18 @@ module Bundler
|
|
4
4
|
class DepProxy
|
5
5
|
attr_reader :__platform, :dep
|
6
6
|
|
7
|
+
@proxies = {}
|
8
|
+
|
9
|
+
def self.get_proxy(dep, platform)
|
10
|
+
@proxies[[dep, platform]] ||= new(dep, platform).freeze
|
11
|
+
end
|
12
|
+
|
7
13
|
def initialize(dep, platform)
|
8
14
|
@dep = dep
|
9
15
|
@__platform = platform
|
10
16
|
end
|
11
17
|
|
12
|
-
|
13
|
-
@hash ||= [dep, __platform].hash
|
14
|
-
end
|
15
|
-
|
16
|
-
def ==(other)
|
17
|
-
return false if other.class != self.class
|
18
|
-
dep == other.dep && __platform == other.__platform
|
19
|
-
end
|
18
|
+
private_class_method :new
|
20
19
|
|
21
20
|
alias_method :eql?, :==
|
22
21
|
|
@@ -39,6 +38,14 @@ module Bundler
|
|
39
38
|
s
|
40
39
|
end
|
41
40
|
|
41
|
+
def dup
|
42
|
+
raise NoMethodError.new("DepProxy cannot be duplicated")
|
43
|
+
end
|
44
|
+
|
45
|
+
def clone
|
46
|
+
raise NoMethodError.new("DepProxy cannot be cloned")
|
47
|
+
end
|
48
|
+
|
42
49
|
private
|
43
50
|
|
44
51
|
def method_missing(*args, &blk)
|
data/bundler/lib/bundler/dsl.rb
CHANGED
@@ -24,6 +24,9 @@ module Bundler
|
|
24
24
|
def initialize
|
25
25
|
@source = nil
|
26
26
|
@sources = SourceList.new
|
27
|
+
|
28
|
+
@global_rubygems_sources = []
|
29
|
+
|
27
30
|
@git_sources = {}
|
28
31
|
@dependencies = []
|
29
32
|
@groups = []
|
@@ -45,6 +48,7 @@ module Bundler
|
|
45
48
|
@gemfiles << expanded_gemfile_path
|
46
49
|
contents ||= Bundler.read_file(@gemfile.to_s)
|
47
50
|
instance_eval(contents.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
|
51
|
+
check_primary_source_safety
|
48
52
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
49
53
|
message = "There was an error " \
|
50
54
|
"#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
|
@@ -164,8 +168,7 @@ module Bundler
|
|
164
168
|
elsif block_given?
|
165
169
|
with_source(@sources.add_rubygems_source("remotes" => source), &blk)
|
166
170
|
else
|
167
|
-
|
168
|
-
@sources.global_rubygems_source = source
|
171
|
+
@global_rubygems_sources << source
|
169
172
|
end
|
170
173
|
end
|
171
174
|
|
@@ -183,24 +186,14 @@ module Bundler
|
|
183
186
|
end
|
184
187
|
|
185
188
|
def path(path, options = {}, &blk)
|
186
|
-
unless block_given?
|
187
|
-
msg = "You can no longer specify a path source by itself. Instead, \n" \
|
188
|
-
"either use the :path option on a gem, or specify the gems that \n" \
|
189
|
-
"bundler should find in the path source by passing a block to \n" \
|
190
|
-
"the path method, like: \n\n" \
|
191
|
-
" path 'dir/containing/rails' do\n" \
|
192
|
-
" gem 'rails'\n" \
|
193
|
-
" end\n\n"
|
194
|
-
|
195
|
-
raise DeprecatedError, msg if Bundler.feature_flag.disable_multisource?
|
196
|
-
SharedHelpers.major_deprecation(2, msg.strip)
|
197
|
-
end
|
198
|
-
|
199
189
|
source_options = normalize_hash(options).merge(
|
200
190
|
"path" => Pathname.new(path),
|
201
191
|
"root_path" => gemfile_root,
|
202
192
|
"gemspec" => gemspecs.find {|g| g.name == options["name"] }
|
203
193
|
)
|
194
|
+
|
195
|
+
source_options["global"] = true unless block_given?
|
196
|
+
|
204
197
|
source = @sources.add_path_source(source_options)
|
205
198
|
with_source(source, &blk)
|
206
199
|
end
|
@@ -279,6 +272,11 @@ module Bundler
|
|
279
272
|
raise GemfileError, "Undefined local variable or method `#{name}' for Gemfile"
|
280
273
|
end
|
281
274
|
|
275
|
+
def check_primary_source_safety
|
276
|
+
check_path_source_safety
|
277
|
+
check_rubygems_source_safety
|
278
|
+
end
|
279
|
+
|
282
280
|
private
|
283
281
|
|
284
282
|
def add_git_sources
|
@@ -440,25 +438,40 @@ repo_name ||= user_name
|
|
440
438
|
end
|
441
439
|
end
|
442
440
|
|
443
|
-
def
|
444
|
-
return if
|
441
|
+
def check_path_source_safety
|
442
|
+
return if @sources.global_path_source.nil?
|
443
|
+
|
444
|
+
msg = "You can no longer specify a path source by itself. Instead, \n" \
|
445
|
+
"either use the :path option on a gem, or specify the gems that \n" \
|
446
|
+
"bundler should find in the path source by passing a block to \n" \
|
447
|
+
"the path method, like: \n\n" \
|
448
|
+
" path 'dir/containing/rails' do\n" \
|
449
|
+
" gem 'rails'\n" \
|
450
|
+
" end\n\n"
|
445
451
|
|
446
|
-
|
452
|
+
SharedHelpers.major_deprecation(2, msg.strip)
|
453
|
+
end
|
454
|
+
|
455
|
+
def check_rubygems_source_safety
|
456
|
+
if @global_rubygems_sources.size <= 1
|
457
|
+
@sources.global_rubygems_source = @global_rubygems_sources.first
|
458
|
+
return
|
459
|
+
end
|
460
|
+
|
461
|
+
@global_rubygems_sources.each do |source|
|
462
|
+
@sources.add_rubygems_remote(source)
|
463
|
+
end
|
464
|
+
|
465
|
+
if Bundler.feature_flag.bundler_3_mode?
|
447
466
|
msg = "This Gemfile contains multiple primary sources. " \
|
448
467
|
"Each source after the first must include a block to indicate which gems " \
|
449
468
|
"should come from that source"
|
450
|
-
unless Bundler.feature_flag.bundler_2_mode?
|
451
|
-
msg += ". To downgrade this error to a warning, run " \
|
452
|
-
"`bundle config unset disable_multisource`"
|
453
|
-
end
|
454
469
|
raise GemfileEvalError, msg
|
455
470
|
else
|
456
471
|
Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple primary sources. " \
|
457
472
|
"Using `source` more than once without a block is a security risk, and " \
|
458
473
|
"may result in installing unexpected gems. To resolve this warning, use " \
|
459
|
-
"a block to indicate which gems should come from the secondary source.
|
460
|
-
"To upgrade this warning to an error, run `bundle config set --local " \
|
461
|
-
"disable_multisource true`."
|
474
|
+
"a block to indicate which gems should come from the secondary source."
|
462
475
|
end
|
463
476
|
end
|
464
477
|
|
@@ -27,13 +27,11 @@ module Bundler
|
|
27
27
|
|
28
28
|
(1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } }
|
29
29
|
|
30
|
-
settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? }
|
31
30
|
settings_flag(:allow_offline_install) { bundler_3_mode? }
|
32
31
|
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
|
33
32
|
settings_flag(:cache_all) { bundler_3_mode? }
|
34
33
|
settings_flag(:default_install_uses_path) { bundler_3_mode? }
|
35
34
|
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
|
36
|
-
settings_flag(:disable_multisource) { bundler_3_mode? }
|
37
35
|
settings_flag(:forget_cli_options) { bundler_3_mode? }
|
38
36
|
settings_flag(:global_gem_cache) { bundler_3_mode? }
|
39
37
|
settings_flag(:only_update_to_newer_versions) { bundler_3_mode? }
|
@@ -116,19 +116,21 @@ module Bundler
|
|
116
116
|
|
117
117
|
def git_push(remote = nil)
|
118
118
|
remote ||= default_remote
|
119
|
-
perform_git_push remote
|
119
|
+
perform_git_push "#{remote} refs/heads/#{current_branch}"
|
120
120
|
perform_git_push "#{remote} refs/tags/#{version_tag}"
|
121
121
|
Bundler.ui.confirm "Pushed git commits and release tag."
|
122
122
|
end
|
123
123
|
|
124
124
|
def default_remote
|
125
|
-
|
126
|
-
|
125
|
+
remote_for_branch, status = sh_with_status(%W[git config --get branch.#{current_branch}.remote])
|
126
|
+
return "origin" unless status.success?
|
127
127
|
|
128
|
-
remote_for_branch
|
129
|
-
|
128
|
+
remote_for_branch.strip
|
129
|
+
end
|
130
130
|
|
131
|
-
|
131
|
+
def current_branch
|
132
|
+
# We can replace this with `git branch --show-current` once we drop support for git < 2.22.0
|
133
|
+
sh(%w[git rev-parse --abbrev-ref HEAD]).gsub(%r{\Aheads/}, "").strip
|
132
134
|
end
|
133
135
|
|
134
136
|
def allowed_push_host
|
@@ -81,8 +81,8 @@ module Bundler
|
|
81
81
|
sort_dep_specs(spec_groups, locked_spec)
|
82
82
|
end.tap do |specs|
|
83
83
|
if DEBUG
|
84
|
-
|
85
|
-
|
84
|
+
puts before_result
|
85
|
+
puts " after sort_versions: #{debug_format_result(dep, specs).inspect}"
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "set"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class Index
|
7
5
|
include Enumerable
|
@@ -65,11 +63,14 @@ module Bundler
|
|
65
63
|
def unsorted_search(query, base)
|
66
64
|
results = local_search(query, base)
|
67
65
|
|
68
|
-
seen = results.map(&:full_name).
|
66
|
+
seen = results.map(&:full_name).uniq unless @sources.empty?
|
69
67
|
|
70
68
|
@sources.each do |source|
|
71
69
|
source.unsorted_search(query, base).each do |spec|
|
72
|
-
|
70
|
+
next if seen.include?(spec.full_name)
|
71
|
+
|
72
|
+
seen << spec.full_name
|
73
|
+
results << spec
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
@@ -170,7 +171,7 @@ module Bundler
|
|
170
171
|
def dependencies_eql?(spec, other_spec)
|
171
172
|
deps = spec.dependencies.select {|d| d.type != :development }
|
172
173
|
other_deps = other_spec.dependencies.select {|d| d.type != :development }
|
173
|
-
|
174
|
+
deps.sort == other_deps.sort
|
174
175
|
end
|
175
176
|
|
176
177
|
def add_source(index)
|
@@ -50,6 +50,7 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
50
50
|
Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
|
51
51
|
builder = Bundler::Dsl.new
|
52
52
|
builder.instance_eval(&gemfile)
|
53
|
+
builder.check_primary_source_safety
|
53
54
|
|
54
55
|
Bundler.settings.temporary(:frozen => false) do
|
55
56
|
definition = builder.to_definition(nil, true)
|
@@ -82,7 +82,6 @@ module Bundler
|
|
82
82
|
|
83
83
|
if resolve_if_needed(options)
|
84
84
|
ensure_specs_are_compatible!
|
85
|
-
warn_on_incompatible_bundler_deps
|
86
85
|
load_plugins
|
87
86
|
options.delete(:jobs)
|
88
87
|
else
|
@@ -265,22 +264,6 @@ module Bundler
|
|
265
264
|
end
|
266
265
|
end
|
267
266
|
|
268
|
-
def warn_on_incompatible_bundler_deps
|
269
|
-
bundler_version = Gem::Version.create(Bundler::VERSION)
|
270
|
-
@definition.specs.each do |spec|
|
271
|
-
spec.dependencies.each do |dep|
|
272
|
-
next if dep.type == :development
|
273
|
-
next unless dep.name == "bundler".freeze
|
274
|
-
next if dep.requirement.satisfied_by?(bundler_version)
|
275
|
-
|
276
|
-
Bundler.ui.warn "#{spec.name} (#{spec.version}) has dependency" \
|
277
|
-
" #{SharedHelpers.pretty_dependency(dep)}" \
|
278
|
-
", which is unsatisfied by the current bundler version #{VERSION}" \
|
279
|
-
", so the dependency is being ignored"
|
280
|
-
end
|
281
|
-
end
|
282
|
-
end
|
283
|
-
|
284
267
|
def install_in_parallel(size, standalone, force = false)
|
285
268
|
spec_installations = ParallelInstaller.call(self, @definition.specs, size, standalone, force)
|
286
269
|
spec_installations.each do |installation|
|
@@ -15,6 +15,7 @@ module Bundler
|
|
15
15
|
file.puts "ruby_engine = RUBY_ENGINE"
|
16
16
|
file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
|
17
17
|
file.puts "path = File.expand_path('..', __FILE__)"
|
18
|
+
file.puts reverse_rubygems_kernel_mixin
|
18
19
|
paths.each do |path|
|
19
20
|
file.puts %($:.unshift File.expand_path("\#{path}/#{path}"))
|
20
21
|
end
|
@@ -48,5 +49,19 @@ module Bundler
|
|
48
49
|
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
49
50
|
raise Gem::InvalidSpecificationException.new(error_message)
|
50
51
|
end
|
52
|
+
|
53
|
+
def reverse_rubygems_kernel_mixin
|
54
|
+
<<~END
|
55
|
+
kernel = (class << ::Kernel; self; end)
|
56
|
+
[kernel, ::Kernel].each do |k|
|
57
|
+
if k.private_method_defined?(:gem_original_require)
|
58
|
+
private_require = k.private_method_defined?(:require)
|
59
|
+
k.send(:remove_method, :require)
|
60
|
+
k.send(:define_method, :require, k.instance_method(:gem_original_require))
|
61
|
+
k.send(:private, :require) if private_require
|
62
|
+
end
|
63
|
+
end
|
64
|
+
END
|
65
|
+
end
|
51
66
|
end
|
52
67
|
end
|
@@ -4,22 +4,6 @@ require_relative "match_platform"
|
|
4
4
|
|
5
5
|
module Bundler
|
6
6
|
class LazySpecification
|
7
|
-
Identifier = Struct.new(:name, :version, :platform)
|
8
|
-
class Identifier
|
9
|
-
include Comparable
|
10
|
-
def <=>(other)
|
11
|
-
return unless other.is_a?(Identifier)
|
12
|
-
[name, version, platform_string] <=> [other.name, other.version, other.platform_string]
|
13
|
-
end
|
14
|
-
|
15
|
-
protected
|
16
|
-
|
17
|
-
def platform_string
|
18
|
-
platform_string = platform.to_s
|
19
|
-
platform_string == Index::RUBY ? Index::NULL : platform_string
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
7
|
include MatchPlatform
|
24
8
|
|
25
9
|
attr_reader :name, :version, :dependencies, :platform
|
@@ -108,7 +92,7 @@ module Bundler
|
|
108
92
|
end
|
109
93
|
|
110
94
|
def identifier
|
111
|
-
@__identifier ||=
|
95
|
+
@__identifier ||= [name, version, platform_string]
|
112
96
|
end
|
113
97
|
|
114
98
|
def git_version
|
@@ -116,6 +100,13 @@ module Bundler
|
|
116
100
|
" #{source.revision[0..6]}"
|
117
101
|
end
|
118
102
|
|
103
|
+
protected
|
104
|
+
|
105
|
+
def platform_string
|
106
|
+
platform_string = platform.to_s
|
107
|
+
platform_string == Index::RUBY ? Index::NULL : platform_string
|
108
|
+
end
|
109
|
+
|
119
110
|
private
|
120
111
|
|
121
112
|
def to_ary
|
@@ -140,7 +131,7 @@ module Bundler
|
|
140
131
|
# explicitly add a more specific platform.
|
141
132
|
#
|
142
133
|
def ruby_platform_materializes_to_ruby_platform?
|
143
|
-
!Bundler.most_specific_locked_platform?(Gem::Platform::RUBY)
|
134
|
+
!Bundler.most_specific_locked_platform?(Gem::Platform::RUBY) || Bundler.settings[:force_ruby_platform]
|
144
135
|
end
|
145
136
|
end
|
146
137
|
end
|
@@ -64,8 +64,6 @@ module Bundler
|
|
64
64
|
@state = nil
|
65
65
|
@specs = {}
|
66
66
|
|
67
|
-
@rubygems_aggregate = Source::Rubygems.new
|
68
|
-
|
69
67
|
if lockfile.match(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
|
70
68
|
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
|
71
69
|
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
|
@@ -89,7 +87,6 @@ module Bundler
|
|
89
87
|
send("parse_#{@state}", line)
|
90
88
|
end
|
91
89
|
end
|
92
|
-
@sources << @rubygems_aggregate unless Bundler.feature_flag.disable_multisource?
|
93
90
|
@specs = @specs.values.sort_by(&:identifier)
|
94
91
|
warn_for_outdated_bundler_version
|
95
92
|
rescue ArgumentError => e
|
@@ -134,16 +131,19 @@ module Bundler
|
|
134
131
|
@sources << @current_source
|
135
132
|
end
|
136
133
|
when GEM
|
137
|
-
|
134
|
+
source_remotes = Array(@opts["remote"])
|
135
|
+
|
136
|
+
if source_remotes.size == 1
|
138
137
|
@opts["remotes"] = @opts.delete("remote")
|
139
138
|
@current_source = TYPES[@type].from_lock(@opts)
|
140
|
-
@sources << @current_source
|
141
139
|
else
|
142
|
-
|
143
|
-
|
140
|
+
source_remotes.each do |url|
|
141
|
+
rubygems_aggregate.add_remote(url)
|
144
142
|
end
|
145
|
-
@current_source =
|
143
|
+
@current_source = rubygems_aggregate
|
146
144
|
end
|
145
|
+
|
146
|
+
@sources << @current_source
|
147
147
|
when PLUGIN
|
148
148
|
@current_source = Plugin.source_from_lock(@opts)
|
149
149
|
@sources << @current_source
|
@@ -245,5 +245,9 @@ module Bundler
|
|
245
245
|
def parse_ruby(line)
|
246
246
|
@ruby_version = line.strip
|
247
247
|
end
|
248
|
+
|
249
|
+
def rubygems_aggregate
|
250
|
+
@rubygems_aggregate ||= Source::Rubygems.new
|
251
|
+
end
|
248
252
|
end
|
249
253
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
4
|
+
.TH "BUNDLE\-BINSTUBS" "1" "January 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|