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
@@ -3,28 +3,37 @@
|
|
3
3
|
module Bundler
|
4
4
|
class Resolver
|
5
5
|
class SpecGroup
|
6
|
-
include GemHelpers
|
7
|
-
|
8
6
|
attr_accessor :name, :version, :source
|
9
|
-
attr_accessor :
|
7
|
+
attr_accessor :activated_platforms
|
8
|
+
|
9
|
+
def self.create_for(specs, all_platforms, specific_platform)
|
10
|
+
specific_platform_specs = specs[specific_platform]
|
11
|
+
return unless specific_platform_specs.any?
|
12
|
+
|
13
|
+
platforms = all_platforms.select {|p| specs[p].any? }
|
14
|
+
|
15
|
+
new(specific_platform_specs.first, specs, platforms)
|
16
|
+
end
|
10
17
|
|
11
|
-
def initialize(
|
12
|
-
@
|
13
|
-
raise ArgumentError, "cannot initialize with an empty value" unless exemplary_spec = all_specs.first
|
18
|
+
def initialize(exemplary_spec, specs, relevant_platforms)
|
19
|
+
@exemplary_spec = exemplary_spec
|
14
20
|
@name = exemplary_spec.name
|
15
21
|
@version = exemplary_spec.version
|
16
22
|
@source = exemplary_spec.source
|
17
23
|
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@
|
21
|
-
|
24
|
+
@all_platforms = relevant_platforms
|
25
|
+
@activated_platforms = relevant_platforms
|
26
|
+
@dependencies = Hash.new do |dependencies, platforms|
|
27
|
+
dependencies[platforms] = dependencies_for(platforms)
|
22
28
|
end
|
23
|
-
@
|
29
|
+
@partitioned_dependency_names = Hash.new do |partitioned_dependency_names, platforms|
|
30
|
+
partitioned_dependency_names[platforms] = partitioned_dependency_names_for(platforms)
|
31
|
+
end
|
32
|
+
@specs = specs
|
24
33
|
end
|
25
34
|
|
26
35
|
def to_specs
|
27
|
-
|
36
|
+
activated_platforms.map do |p|
|
28
37
|
specs = @specs[p]
|
29
38
|
next unless specs.any?
|
30
39
|
|
@@ -36,18 +45,12 @@ module Bundler
|
|
36
45
|
end.flatten.compact.uniq
|
37
46
|
end
|
38
47
|
|
39
|
-
def
|
40
|
-
|
41
|
-
return unless platforms.any?
|
42
|
-
|
43
|
-
copied_sg = self.class.new(@all_specs)
|
44
|
-
copied_sg.ignores_bundler_dependencies = @ignores_bundler_dependencies
|
45
|
-
copied_sg.activated_platforms = platforms
|
46
|
-
copied_sg
|
48
|
+
def activate_platform!(platform)
|
49
|
+
self.activated_platforms = [platform]
|
47
50
|
end
|
48
51
|
|
49
|
-
def
|
50
|
-
@
|
52
|
+
def activate_all_platforms!
|
53
|
+
self.activated_platforms = @all_platforms
|
51
54
|
end
|
52
55
|
|
53
56
|
def to_s
|
@@ -56,11 +59,11 @@ module Bundler
|
|
56
59
|
end
|
57
60
|
|
58
61
|
def dependencies_for_activated_platforms
|
59
|
-
dependencies
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
62
|
+
@dependencies[activated_platforms]
|
63
|
+
end
|
64
|
+
|
65
|
+
def partitioned_dependency_names_for_activated_platforms
|
66
|
+
@partitioned_dependency_names[activated_platforms]
|
64
67
|
end
|
65
68
|
|
66
69
|
def ==(other)
|
@@ -86,34 +89,43 @@ module Bundler
|
|
86
89
|
protected
|
87
90
|
|
88
91
|
def sorted_activated_platforms
|
89
|
-
|
92
|
+
activated_platforms.sort_by(&:to_s)
|
90
93
|
end
|
91
94
|
|
92
95
|
private
|
93
96
|
|
94
|
-
def
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
97
|
+
def dependencies_for(platforms)
|
98
|
+
platforms.map do |platform|
|
99
|
+
__dependencies(platform) + metadata_dependencies(platform)
|
100
|
+
end.flatten
|
101
|
+
end
|
102
|
+
|
103
|
+
def partitioned_dependency_names_for(platforms)
|
104
|
+
return @dependencies[platforms].map(&:name), [] if platforms.size == 1
|
105
|
+
|
106
|
+
@dependencies[platforms].partition do |dep_proxy|
|
107
|
+
@dependencies[platforms].count {|dp| dp.dep == dep_proxy.dep } == platforms.size
|
108
|
+
end.map {|deps| deps.map(&:name) }
|
109
|
+
end
|
110
|
+
|
111
|
+
def __dependencies(platform)
|
112
|
+
dependencies = []
|
113
|
+
@specs[platform].first.dependencies.each do |dep|
|
114
|
+
next if dep.type == :development
|
115
|
+
dependencies << DepProxy.get_proxy(dep, platform)
|
106
116
|
end
|
117
|
+
dependencies
|
107
118
|
end
|
108
119
|
|
109
|
-
def metadata_dependencies(
|
110
|
-
|
120
|
+
def metadata_dependencies(platform)
|
121
|
+
spec = @specs[platform].first
|
122
|
+
return [] unless spec.is_a?(Gem::Specification)
|
111
123
|
dependencies = []
|
112
124
|
if !spec.required_ruby_version.nil? && !spec.required_ruby_version.none?
|
113
|
-
dependencies << DepProxy.
|
125
|
+
dependencies << DepProxy.get_proxy(Gem::Dependency.new("Ruby\0", spec.required_ruby_version), platform)
|
114
126
|
end
|
115
127
|
if !spec.required_rubygems_version.nil? && !spec.required_rubygems_version.none?
|
116
|
-
dependencies << DepProxy.
|
128
|
+
dependencies << DepProxy.get_proxy(Gem::Dependency.new("RubyGems\0", spec.required_rubygems_version), platform)
|
117
129
|
end
|
118
130
|
dependencies
|
119
131
|
end
|
@@ -158,6 +158,22 @@ module Gem
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
+
if Gem::Requirement.new("~> 2.0").hash == Gem::Requirement.new("~> 2.0.0").hash
|
162
|
+
class Requirement
|
163
|
+
module CorrectHashForLambdaOperator
|
164
|
+
def hash
|
165
|
+
if requirements.any? {|r| r.first == "~>" }
|
166
|
+
requirements.map {|r| r.first == "~>" ? [r[0], r[1].to_s] : r }.sort.hash
|
167
|
+
else
|
168
|
+
super
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
prepend CorrectHashForLambdaOperator
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
161
177
|
class Platform
|
162
178
|
JAVA = Gem::Platform.new("java") unless defined?(JAVA)
|
163
179
|
MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN)
|
@@ -7,7 +7,6 @@ module Bundler
|
|
7
7
|
autoload :Validator, File.expand_path("settings/validator", __dir__)
|
8
8
|
|
9
9
|
BOOL_KEYS = %w[
|
10
|
-
allow_bundler_dependency_conflicts
|
11
10
|
allow_deployment_source_credential_changes
|
12
11
|
allow_offline_install
|
13
12
|
auto_clean_without_path
|
@@ -20,7 +19,7 @@ module Bundler
|
|
20
19
|
disable_checksum_validation
|
21
20
|
disable_exec_load
|
22
21
|
disable_local_branch_check
|
23
|
-
|
22
|
+
disable_local_revision_check
|
24
23
|
disable_shared_gems
|
25
24
|
disable_version_check
|
26
25
|
force_ruby_platform
|
@@ -194,11 +194,11 @@ module Bundler
|
|
194
194
|
return @md5_available if defined?(@md5_available)
|
195
195
|
@md5_available = begin
|
196
196
|
require "openssl"
|
197
|
-
OpenSSL::Digest.digest("MD5", "")
|
197
|
+
::OpenSSL::Digest.digest("MD5", "")
|
198
198
|
true
|
199
199
|
rescue LoadError
|
200
200
|
true
|
201
|
-
rescue OpenSSL::Digest::DigestError
|
201
|
+
rescue ::OpenSSL::Digest::DigestError
|
202
202
|
false
|
203
203
|
end
|
204
204
|
end
|
@@ -148,7 +148,7 @@ module Bundler
|
|
148
148
|
|
149
149
|
changed = cached_revision && cached_revision != git_proxy.revision
|
150
150
|
|
151
|
-
if changed && !@unlocked && !git_proxy.contains?(cached_revision)
|
151
|
+
if !Bundler.settings[:disable_local_revision_check] && changed && !@unlocked && !git_proxy.contains?(cached_revision)
|
152
152
|
raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(cached_revision)} " \
|
153
153
|
"but the current branch in your local override for #{name} does not contain such commit. " \
|
154
154
|
"Please make sure your branch is up to date."
|
@@ -21,6 +21,7 @@ module Bundler
|
|
21
21
|
@allow_remote = false
|
22
22
|
@allow_cached = false
|
23
23
|
@caches = [cache_path, *Bundler.rubygems.gem_cache]
|
24
|
+
@disable_multisource = true
|
24
25
|
|
25
26
|
Array(options["remotes"] || []).reverse_each {|r| add_remote(r) }
|
26
27
|
end
|
@@ -49,8 +50,16 @@ module Bundler
|
|
49
50
|
o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
|
50
51
|
end
|
51
52
|
|
53
|
+
def disable_multisource?
|
54
|
+
@disable_multisource
|
55
|
+
end
|
56
|
+
|
57
|
+
def allow_multisource!
|
58
|
+
@disable_multisource = false
|
59
|
+
end
|
60
|
+
|
52
61
|
def can_lock?(spec)
|
53
|
-
return super if
|
62
|
+
return super if disable_multisource?
|
54
63
|
spec.source.is_a?(Rubygems)
|
55
64
|
end
|
56
65
|
|
@@ -353,7 +362,6 @@ module Bundler
|
|
353
362
|
def installed_specs
|
354
363
|
@installed_specs ||= Index.build do |idx|
|
355
364
|
Bundler.rubygems.all_specs.reverse_each do |spec|
|
356
|
-
next if spec.name == "bundler"
|
357
365
|
spec.source = self
|
358
366
|
if Bundler.rubygems.spec_missing_extensions?(spec, false)
|
359
367
|
Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions"
|
@@ -1,30 +1,45 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "set"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class SourceList
|
7
5
|
attr_reader :path_sources,
|
8
6
|
:git_sources,
|
9
7
|
:plugin_sources,
|
10
|
-
:
|
11
|
-
:metadata_source
|
8
|
+
:global_path_source,
|
9
|
+
:metadata_source,
|
10
|
+
:disable_multisource
|
11
|
+
|
12
|
+
def global_rubygems_source
|
13
|
+
@global_rubygems_source ||= rubygems_aggregate_class.new
|
14
|
+
end
|
12
15
|
|
13
16
|
def initialize
|
14
17
|
@path_sources = []
|
15
18
|
@git_sources = []
|
16
19
|
@plugin_sources = []
|
17
20
|
@global_rubygems_source = nil
|
18
|
-
@
|
21
|
+
@global_path_source = nil
|
19
22
|
@rubygems_sources = []
|
20
23
|
@metadata_source = Source::Metadata.new
|
24
|
+
@disable_multisource = true
|
25
|
+
end
|
26
|
+
|
27
|
+
def disable_multisource?
|
28
|
+
@disable_multisource
|
29
|
+
end
|
30
|
+
|
31
|
+
def allow_multisource!
|
32
|
+
rubygems_sources.map(&:allow_multisource!)
|
33
|
+
@disable_multisource = false
|
21
34
|
end
|
22
35
|
|
23
36
|
def add_path_source(options = {})
|
24
37
|
if options["gemspec"]
|
25
38
|
add_source_to_list Source::Gemspec.new(options), path_sources
|
26
39
|
else
|
27
|
-
add_source_to_list Source::Path.new(options), path_sources
|
40
|
+
path_source = add_source_to_list Source::Path.new(options), path_sources
|
41
|
+
@global_path_source ||= path_source if options["global"]
|
42
|
+
path_source
|
28
43
|
end
|
29
44
|
end
|
30
45
|
|
@@ -43,24 +58,20 @@ module Bundler
|
|
43
58
|
end
|
44
59
|
|
45
60
|
def global_rubygems_source=(uri)
|
46
|
-
|
47
|
-
@global_rubygems_source ||= rubygems_aggregate_class.new("remotes" => uri)
|
48
|
-
end
|
49
|
-
add_rubygems_remote(uri)
|
61
|
+
@global_rubygems_source ||= rubygems_aggregate_class.new("remotes" => uri)
|
50
62
|
end
|
51
63
|
|
52
64
|
def add_rubygems_remote(uri)
|
53
|
-
|
54
|
-
|
55
|
-
@rubygems_aggregate
|
65
|
+
global_rubygems_source.add_remote(uri)
|
66
|
+
global_rubygems_source
|
56
67
|
end
|
57
68
|
|
58
69
|
def default_source
|
59
|
-
|
70
|
+
global_path_source || global_rubygems_source
|
60
71
|
end
|
61
72
|
|
62
73
|
def rubygems_sources
|
63
|
-
@rubygems_sources + [
|
74
|
+
@rubygems_sources + [global_rubygems_source]
|
64
75
|
end
|
65
76
|
|
66
77
|
def rubygems_remotes
|
@@ -77,7 +88,7 @@ module Bundler
|
|
77
88
|
|
78
89
|
def lock_sources
|
79
90
|
lock_sources = (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
|
80
|
-
if
|
91
|
+
if disable_multisource?
|
81
92
|
lock_sources + rubygems_sources.sort_by(&:to_s)
|
82
93
|
else
|
83
94
|
lock_sources << combine_rubygems_sources
|
@@ -94,12 +105,12 @@ module Bundler
|
|
94
105
|
end
|
95
106
|
end
|
96
107
|
|
97
|
-
replacement_rubygems = !
|
108
|
+
replacement_rubygems = !disable_multisource? &&
|
98
109
|
replacement_sources.detect {|s| s.is_a?(Source::Rubygems) }
|
99
|
-
@
|
110
|
+
@global_rubygems_source = replacement_rubygems if replacement_rubygems
|
100
111
|
|
101
112
|
return true if !equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
|
102
|
-
return true if replacement_rubygems && rubygems_remotes.
|
113
|
+
return true if replacement_rubygems && rubygems_remotes.sort_by(&:to_s) != replacement_rubygems.remotes.sort_by(&:to_s)
|
103
114
|
|
104
115
|
false
|
105
116
|
end
|
@@ -112,10 +123,6 @@ module Bundler
|
|
112
123
|
all_sources.each(&:remote!)
|
113
124
|
end
|
114
125
|
|
115
|
-
def rubygems_primary_remotes
|
116
|
-
@rubygems_aggregate.remotes
|
117
|
-
end
|
118
|
-
|
119
126
|
private
|
120
127
|
|
121
128
|
def rubygems_aggregate_class
|
@@ -138,7 +145,9 @@ module Bundler
|
|
138
145
|
end
|
139
146
|
|
140
147
|
def combine_rubygems_sources
|
141
|
-
Source::Rubygems.new("remotes" => rubygems_remotes)
|
148
|
+
aggregate_source = Source::Rubygems.new("remotes" => rubygems_remotes)
|
149
|
+
aggregate_source.allow_multisource! unless disable_multisource?
|
150
|
+
aggregate_source
|
142
151
|
end
|
143
152
|
|
144
153
|
def warn_on_git_protocol(source)
|
@@ -153,7 +162,7 @@ module Bundler
|
|
153
162
|
end
|
154
163
|
|
155
164
|
def equal_sources?(lock_sources, replacement_sources)
|
156
|
-
lock_sources.
|
165
|
+
lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s)
|
157
166
|
end
|
158
167
|
|
159
168
|
def equal_source?(source, other_source)
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "tsort"
|
4
|
-
require "set"
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class SpecSet
|
@@ -13,14 +12,16 @@ module Bundler
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true)
|
16
|
-
handled =
|
15
|
+
handled = []
|
17
16
|
deps = dependencies.dup
|
18
17
|
specs = []
|
19
18
|
skip += ["bundler"]
|
20
19
|
|
21
20
|
loop do
|
22
21
|
break unless dep = deps.shift
|
23
|
-
next if
|
22
|
+
next if handled.include?(dep) || skip.include?(dep.name)
|
23
|
+
|
24
|
+
handled << dep
|
24
25
|
|
25
26
|
specs_for_dep = spec_for_dependency(dep, match_current_platform)
|
26
27
|
if specs_for_dep.any?
|
@@ -28,7 +29,7 @@ module Bundler
|
|
28
29
|
|
29
30
|
specs_for_dep.first.dependencies.each do |d|
|
30
31
|
next if d.type == :development
|
31
|
-
d = DepProxy.
|
32
|
+
d = DepProxy.get_proxy(d, dep.__platform) unless match_current_platform
|
32
33
|
deps << d
|
33
34
|
end
|
34
35
|
elsif check
|
@@ -26,6 +26,13 @@ module Bundler::Molinillo
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
# (see Bundler::Molinillo::SpecificationProvider#dependencies_equal?)
|
30
|
+
def dependencies_equal?(dependencies, other_dependencies)
|
31
|
+
with_no_such_dependency_error_handling do
|
32
|
+
specification_provider.dependencies_equal?(dependencies, other_dependencies)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
29
36
|
# (see Bundler::Molinillo::SpecificationProvider#name_for)
|
30
37
|
def name_for(dependency)
|
31
38
|
with_no_such_dependency_error_handling do
|