bundler 2.2.14 → 2.2.19
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +81 -5
- data/bundler.gemspec +2 -3
- data/lib/bundler.rb +1 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +16 -35
- data/lib/bundler/cli/common.rb +15 -2
- data/lib/bundler/cli/gem.rb +9 -1
- data/lib/bundler/cli/outdated.rb +8 -11
- data/lib/bundler/compact_index_client/updater.rb +9 -5
- data/lib/bundler/current_ruby.rb +1 -0
- data/lib/bundler/definition.rb +21 -84
- data/lib/bundler/feature_flag.rb +0 -2
- data/lib/bundler/fetcher.rb +2 -1
- data/lib/bundler/fetcher/downloader.rb +8 -4
- data/lib/bundler/friendly_errors.rb +1 -1
- data/lib/bundler/gem_helper.rb +16 -0
- data/lib/bundler/index.rb +1 -2
- data/lib/bundler/injector.rb +2 -2
- data/lib/bundler/inline.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +30 -7
- data/lib/bundler/lazy_specification.rb +6 -1
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +21 -10
- data/lib/bundler/man/bundle-config.1.ronn +21 -11
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/plugin.rb +2 -2
- data/lib/bundler/plugin/api/source.rb +14 -0
- data/lib/bundler/resolver.rb +13 -96
- data/lib/bundler/resolver/spec_group.rb +0 -24
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +2 -2
- data/lib/bundler/settings.rb +74 -12
- data/lib/bundler/source.rb +9 -0
- data/lib/bundler/source/path.rb +3 -1
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/rubygems.rb +17 -10
- data/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/lib/bundler/source_list.rb +29 -10
- data/lib/bundler/source_map.rb +58 -0
- data/lib/bundler/spec_set.rb +18 -7
- data/lib/bundler/templates/Gemfile +1 -1
- data/lib/bundler/templates/gems.rb +1 -1
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +1 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +9 -4
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class SourceMap
|
5
|
+
attr_reader :sources, :dependencies
|
6
|
+
|
7
|
+
def initialize(sources, dependencies)
|
8
|
+
@sources = sources
|
9
|
+
@dependencies = dependencies
|
10
|
+
end
|
11
|
+
|
12
|
+
def pinned_spec_names(skip = nil)
|
13
|
+
direct_requirements.reject {|_, source| source == skip }.keys
|
14
|
+
end
|
15
|
+
|
16
|
+
def all_requirements
|
17
|
+
requirements = direct_requirements.dup
|
18
|
+
|
19
|
+
unmet_deps = sources.non_default_explicit_sources.map do |source|
|
20
|
+
(source.spec_names - pinned_spec_names).each do |indirect_dependency_name|
|
21
|
+
previous_source = requirements[indirect_dependency_name]
|
22
|
+
if previous_source.nil?
|
23
|
+
requirements[indirect_dependency_name] = source
|
24
|
+
else
|
25
|
+
no_ambiguous_sources = Bundler.feature_flag.bundler_3_mode?
|
26
|
+
|
27
|
+
msg = ["The gem '#{indirect_dependency_name}' was found in multiple relevant sources."]
|
28
|
+
msg.concat [previous_source, source].map {|s| " * #{s}" }.sort
|
29
|
+
msg << "You #{no_ambiguous_sources ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
|
30
|
+
msg = msg.join("\n")
|
31
|
+
|
32
|
+
raise SecurityError, msg if no_ambiguous_sources
|
33
|
+
Bundler.ui.warn "Warning: #{msg}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
source.unmet_deps
|
38
|
+
end
|
39
|
+
|
40
|
+
sources.default_source.add_dependency_names(unmet_deps.flatten - requirements.keys)
|
41
|
+
|
42
|
+
requirements
|
43
|
+
end
|
44
|
+
|
45
|
+
def direct_requirements
|
46
|
+
@direct_requirements ||= begin
|
47
|
+
requirements = {}
|
48
|
+
default = sources.default_source
|
49
|
+
dependencies.each do |dep|
|
50
|
+
dep_source = dep.source || default
|
51
|
+
dep_source.add_dependency_names(dep.name)
|
52
|
+
requirements[dep.name] = dep_source
|
53
|
+
end
|
54
|
+
requirements
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -78,11 +78,17 @@ module Bundler
|
|
78
78
|
|
79
79
|
def materialize(deps, missing_specs = nil)
|
80
80
|
materialized = self.for(deps, [], false, true, !missing_specs).to_a
|
81
|
-
|
81
|
+
|
82
|
+
materialized.group_by(&:source).each do |source, specs|
|
83
|
+
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
84
|
+
|
85
|
+
source.local!
|
86
|
+
names = -> { specs.map(&:name).uniq }
|
87
|
+
source.double_check_for(names)
|
88
|
+
end
|
89
|
+
|
82
90
|
materialized.map! do |s|
|
83
91
|
next s unless s.is_a?(LazySpecification)
|
84
|
-
s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=)
|
85
|
-
s.source.local!
|
86
92
|
spec = s.__materialize__
|
87
93
|
unless spec
|
88
94
|
unless missing_specs
|
@@ -99,12 +105,17 @@ module Bundler
|
|
99
105
|
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
100
106
|
# @return [Array<Gem::Specification>]
|
101
107
|
def materialized_for_all_platforms
|
102
|
-
|
108
|
+
@specs.group_by(&:source).each do |source, specs|
|
109
|
+
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
110
|
+
|
111
|
+
source.local!
|
112
|
+
source.remote!
|
113
|
+
names = -> { specs.map(&:name).uniq }
|
114
|
+
source.double_check_for(names)
|
115
|
+
end
|
116
|
+
|
103
117
|
@specs.map do |s|
|
104
118
|
next s unless s.is_a?(LazySpecification)
|
105
|
-
s.source.dependency_names = names if s.source.respond_to?(:dependency_names=)
|
106
|
-
s.source.local!
|
107
|
-
s.source.remote!
|
108
119
|
spec = s.__materialize__
|
109
120
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
110
121
|
spec
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
<%- if config[:mit] -%>
|
15
15
|
spec.license = "MIT"
|
16
16
|
<%- end -%>
|
17
|
-
spec.required_ruby_version =
|
17
|
+
spec.required_ruby_version = ">= <%= config[:required_ruby_version] %>"
|
18
18
|
|
19
19
|
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20
20
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Bundler::Molinillo
|
4
|
-
# Provides information about
|
4
|
+
# Provides information about specifications and dependencies to the resolver,
|
5
5
|
# allowing the {Resolver} class to remain generic while still providing power
|
6
6
|
# and flexibility.
|
7
7
|
#
|
@@ -252,7 +252,7 @@ class Bundler::Thor
|
|
252
252
|
# flag<Regexp|String>:: the regexp or string to be replaced
|
253
253
|
# replacement<String>:: the replacement, can be also given as a block
|
254
254
|
# config<Hash>:: give :verbose => false to not log the status, and
|
255
|
-
# :force => true, to force the replacement
|
255
|
+
# :force => true, to force the replacement regardless of runner behavior.
|
256
256
|
#
|
257
257
|
# ==== Example
|
258
258
|
#
|
@@ -115,7 +115,7 @@ class Bundler::Dir < Dir
|
|
115
115
|
Bundler::Dir.tmpdir
|
116
116
|
end
|
117
117
|
|
118
|
-
UNUSABLE_CHARS =
|
118
|
+
UNUSABLE_CHARS = "^,-.0-9A-Z_a-z~"
|
119
119
|
|
120
120
|
class << (RANDOM = Random.new)
|
121
121
|
MAX = 36**6 # < 0x100000000
|
data/lib/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -22,7 +22,7 @@ authors:
|
|
22
22
|
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date: 2021-
|
25
|
+
date: 2021-05-31 00:00:00.000000000 Z
|
26
26
|
dependencies: []
|
27
27
|
description: Bundler manages an application's dependencies through its entire life,
|
28
28
|
across many machines, systematically and repeatably
|
@@ -32,7 +32,10 @@ executables:
|
|
32
32
|
- bundle
|
33
33
|
- bundler
|
34
34
|
extensions: []
|
35
|
-
extra_rdoc_files:
|
35
|
+
extra_rdoc_files:
|
36
|
+
- CHANGELOG.md
|
37
|
+
- LICENSE.md
|
38
|
+
- README.md
|
36
39
|
files:
|
37
40
|
- CHANGELOG.md
|
38
41
|
- LICENSE.md
|
@@ -202,7 +205,9 @@ files:
|
|
202
205
|
- lib/bundler/source/path/installer.rb
|
203
206
|
- lib/bundler/source/rubygems.rb
|
204
207
|
- lib/bundler/source/rubygems/remote.rb
|
208
|
+
- lib/bundler/source/rubygems_aggregate.rb
|
205
209
|
- lib/bundler/source_list.rb
|
210
|
+
- lib/bundler/source_map.rb
|
206
211
|
- lib/bundler/spec_set.rb
|
207
212
|
- lib/bundler/stub_specification.rb
|
208
213
|
- lib/bundler/templates/.document
|
@@ -352,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
357
|
- !ruby/object:Gem::Version
|
353
358
|
version: 2.5.2
|
354
359
|
requirements: []
|
355
|
-
rubygems_version: 3.2.
|
360
|
+
rubygems_version: 3.2.19
|
356
361
|
signing_key:
|
357
362
|
specification_version: 4
|
358
363
|
summary: The best way to manage your application's dependencies
|