bundler 2.2.23 → 2.2.24
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 +13 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +1 -0
- data/lib/bundler/definition.rb +27 -32
- data/lib/bundler/dsl.rb +26 -25
- data/lib/bundler/installer/standalone.rb +1 -1
- data/lib/bundler/plugin.rb +2 -0
- data/lib/bundler/plugin/index.rb +4 -1
- data/lib/bundler/runtime.rb +1 -3
- data/lib/bundler/spec_set.rb +3 -4
- data/lib/bundler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bc6a3aafe599f19f103462212788c65ebd7558c7c0ba8208730b58f06a07d2a
|
4
|
+
data.tar.gz: 36328d242818c34ef2a7477ea918941cbbd9469d3e747eed35eacbc178709a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bbd69e10ba06b85eba9d4d282c0ca7337b2d97c614418dfa036883ae9cf0ff34eb50ecfb025a7555abf65026d64359b061ade7fdb76a57558d3f9b025ffff8e
|
7
|
+
data.tar.gz: affea641347f4d123b2d24b39ea6b2eb0f0a97fb8377b9d3a52812dab08faa7c0a134f41a33cf785fc498ba3cf32162f5d213a33f825d24bcdd053ed90332b20
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# 2.2.24 (July 15, 2021)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Fix development gem unintentionally removed on an edge case [#4751](https://github.com/rubygems/rubygems/pull/4751)
|
6
|
+
- Fix dangling empty plugin hooks [#4755](https://github.com/rubygems/rubygems/pull/4755)
|
7
|
+
- Fix `bundle plugin install --help` showing `bundle install`'s help [#4756](https://github.com/rubygems/rubygems/pull/4756)
|
8
|
+
- Make sure `bundle check` shows uniq missing gems [#4749](https://github.com/rubygems/rubygems/pull/4749)
|
9
|
+
|
10
|
+
## Performance:
|
11
|
+
|
12
|
+
- Slightly speed up `bundler/setup` [#4750](https://github.com/rubygems/rubygems/pull/4750)
|
13
|
+
|
1
14
|
# 2.2.23 (July 9, 2021)
|
2
15
|
|
3
16
|
## Enhancements:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2021-07-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2021-07-15".freeze
|
8
|
+
@git_commit_sha = "d78b1ee235".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/cli.rb
CHANGED
data/lib/bundler/definition.rb
CHANGED
@@ -133,7 +133,7 @@ module Bundler
|
|
133
133
|
@unlock[:gems] ||= @dependencies.map(&:name)
|
134
134
|
else
|
135
135
|
eager_unlock = expand_dependencies(@unlock[:gems] || [], true)
|
136
|
-
@unlock[:gems] = @locked_specs.for(eager_unlock,
|
136
|
+
@unlock[:gems] = @locked_specs.for(eager_unlock, false, false, false).map(&:name)
|
137
137
|
end
|
138
138
|
|
139
139
|
@dependency_changes = converge_dependencies
|
@@ -185,25 +185,15 @@ module Bundler
|
|
185
185
|
#
|
186
186
|
# @return [Bundler::SpecSet]
|
187
187
|
def specs
|
188
|
-
@specs ||=
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
"You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
|
198
|
-
"removed in order to install."
|
199
|
-
end
|
200
|
-
unless specs["bundler"].any?
|
201
|
-
bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
|
202
|
-
specs["bundler"] = bundler
|
203
|
-
end
|
204
|
-
|
205
|
-
specs
|
206
|
-
end
|
188
|
+
@specs ||= add_bundler_to(resolve.materialize(requested_dependencies))
|
189
|
+
rescue GemNotFound => e # Handle yanked gem
|
190
|
+
gem_name, gem_version = extract_gem_info(e)
|
191
|
+
locked_gem = @locked_specs[gem_name].last
|
192
|
+
raise if locked_gem.nil? || locked_gem.version.to_s != gem_version || !@remote
|
193
|
+
raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
|
194
|
+
"no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
|
195
|
+
"You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
|
196
|
+
"removed in order to install."
|
207
197
|
end
|
208
198
|
|
209
199
|
def new_specs
|
@@ -235,17 +225,11 @@ module Bundler
|
|
235
225
|
end
|
236
226
|
|
237
227
|
def requested_specs
|
238
|
-
|
239
|
-
groups = requested_groups
|
240
|
-
groups.map!(&:to_sym)
|
241
|
-
specs_for(groups)
|
242
|
-
end
|
228
|
+
specs_for(requested_groups)
|
243
229
|
end
|
244
230
|
|
245
231
|
def requested_dependencies
|
246
|
-
|
247
|
-
groups.map!(&:to_sym)
|
248
|
-
dependencies_for(groups)
|
232
|
+
dependencies_for(requested_groups)
|
249
233
|
end
|
250
234
|
|
251
235
|
def current_dependencies
|
@@ -255,11 +239,13 @@ module Bundler
|
|
255
239
|
end
|
256
240
|
|
257
241
|
def specs_for(groups)
|
242
|
+
groups = requested_groups if groups.empty?
|
258
243
|
deps = dependencies_for(groups)
|
259
|
-
|
244
|
+
add_bundler_to(resolve.materialize(expand_dependencies(deps)))
|
260
245
|
end
|
261
246
|
|
262
247
|
def dependencies_for(groups)
|
248
|
+
groups.map!(&:to_sym)
|
263
249
|
current_dependencies.reject do |d|
|
264
250
|
(d.groups & groups).empty?
|
265
251
|
end
|
@@ -507,6 +493,15 @@ module Bundler
|
|
507
493
|
|
508
494
|
private
|
509
495
|
|
496
|
+
def add_bundler_to(specs)
|
497
|
+
unless specs["bundler"].any?
|
498
|
+
bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
|
499
|
+
specs["bundler"] = bundler
|
500
|
+
end
|
501
|
+
|
502
|
+
specs
|
503
|
+
end
|
504
|
+
|
510
505
|
def precompute_source_requirements_for_indirect_dependencies?
|
511
506
|
sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
|
512
507
|
end
|
@@ -735,7 +730,7 @@ module Bundler
|
|
735
730
|
# if we won't need the source (according to the lockfile),
|
736
731
|
# don't error if the path/git source isn't available
|
737
732
|
next if @locked_specs.
|
738
|
-
for(requested_dependencies,
|
733
|
+
for(requested_dependencies, false, true, false).
|
739
734
|
none? {|locked_spec| locked_spec.source == s.source }
|
740
735
|
|
741
736
|
raise
|
@@ -754,8 +749,8 @@ module Bundler
|
|
754
749
|
end
|
755
750
|
|
756
751
|
resolve = SpecSet.new(converged)
|
757
|
-
@locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(requested_dependencies & deps),
|
758
|
-
resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true),
|
752
|
+
@locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(requested_dependencies & deps), true, true)
|
753
|
+
resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), false, false, false).reject{|s| @unlock[:gems].include?(s.name) })
|
759
754
|
diff = nil
|
760
755
|
|
761
756
|
# Now, we unlock any sources that do not have anymore gems pinned to it
|
data/lib/bundler/dsl.rb
CHANGED
@@ -102,38 +102,39 @@ module Bundler
|
|
102
102
|
# if there's already a dependency with this name we try to prefer one
|
103
103
|
if current = @dependencies.find {|d| d.name == dep.name }
|
104
104
|
deleted_dep = @dependencies.delete(current) if current.type == :development
|
105
|
-
return if deleted_dep
|
106
105
|
|
107
|
-
|
108
|
-
|
106
|
+
unless deleted_dep
|
107
|
+
if current.requirement != dep.requirement
|
108
|
+
return if dep.type == :development
|
109
109
|
|
110
|
-
|
110
|
+
update_prompt = ""
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
112
|
+
if File.basename(@gemfile) == Injector::INJECTED_GEMS
|
113
|
+
if dep.requirements_list.include?(">= 0") && !current.requirements_list.include?(">= 0")
|
114
|
+
update_prompt = ". Gem already added"
|
115
|
+
else
|
116
|
+
update_prompt = ". If you want to update the gem version, run `bundle update #{current.name}`"
|
117
117
|
|
118
|
-
|
118
|
+
update_prompt += ". You may also need to change the version requirement specified in the Gemfile if it's too restrictive." unless current.requirements_list.include?(">= 0")
|
119
|
+
end
|
119
120
|
end
|
120
|
-
end
|
121
121
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
122
|
+
raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
|
123
|
+
"You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
|
124
|
+
"#{update_prompt}"
|
125
|
+
else
|
126
|
+
Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
|
127
|
+
"You should probably keep only one of them.\n" \
|
128
|
+
"Remove any duplicate entries and specify the gem only once.\n" \
|
129
|
+
"While it's not a problem now, it could cause errors if you change the version of one of them later."
|
130
|
+
end
|
131
131
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
132
|
+
if current.source != dep.source
|
133
|
+
return if dep.type == :development
|
134
|
+
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
|
135
|
+
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
|
136
|
+
"#{current.source || "an unspecified source"} and #{dep.source}\n"
|
137
|
+
end
|
137
138
|
end
|
138
139
|
end
|
139
140
|
|
data/lib/bundler/plugin.rb
CHANGED
@@ -309,6 +309,8 @@ module Bundler
|
|
309
309
|
#
|
310
310
|
# @param [String] name of the plugin
|
311
311
|
def load_plugin(name)
|
312
|
+
return unless name && !name.empty?
|
313
|
+
|
312
314
|
# Need to ensure before this that plugin root where the rest of gems
|
313
315
|
# are installed to be on load path to support plugin deps. Currently not
|
314
316
|
# done to avoid conflicts
|
data/lib/bundler/plugin/index.rb
CHANGED
@@ -74,7 +74,10 @@ module Bundler
|
|
74
74
|
def unregister_plugin(name)
|
75
75
|
@commands.delete_if {|_, v| v == name }
|
76
76
|
@sources.delete_if {|_, v| v == name }
|
77
|
-
@hooks.each
|
77
|
+
@hooks.each do |hook, names|
|
78
|
+
names.delete(name)
|
79
|
+
@hooks.delete(hook) if names.empty?
|
80
|
+
end
|
78
81
|
@plugin_paths.delete(name)
|
79
82
|
@load_paths.delete(name)
|
80
83
|
save_index
|
data/lib/bundler/runtime.rb
CHANGED
@@ -12,12 +12,10 @@ module Bundler
|
|
12
12
|
def setup(*groups)
|
13
13
|
@definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen_bundle?
|
14
14
|
|
15
|
-
groups.map!(&:to_sym)
|
16
|
-
|
17
15
|
# Has to happen first
|
18
16
|
clean_load_path
|
19
17
|
|
20
|
-
specs =
|
18
|
+
specs = @definition.specs_for(groups)
|
21
19
|
|
22
20
|
SharedHelpers.set_bundle_environment
|
23
21
|
Bundler.rubygems.replace_entrypoints(specs)
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -11,15 +11,14 @@ module Bundler
|
|
11
11
|
@specs = specs
|
12
12
|
end
|
13
13
|
|
14
|
-
def for(dependencies,
|
14
|
+
def for(dependencies, check = false, match_current_platform = false, raise_on_missing = true)
|
15
15
|
handled = []
|
16
16
|
deps = dependencies.dup
|
17
17
|
specs = []
|
18
|
-
skip += ["bundler"]
|
19
18
|
|
20
19
|
loop do
|
21
20
|
break unless dep = deps.shift
|
22
|
-
next if handled.
|
21
|
+
next if handled.any?{|d| d.name == dep.name && (match_current_platform || d.__platform == dep.__platform) } || dep.name == "bundler"
|
23
22
|
|
24
23
|
handled << dep
|
25
24
|
|
@@ -73,7 +72,7 @@ module Bundler
|
|
73
72
|
end
|
74
73
|
|
75
74
|
def materialize(deps, missing_specs = nil)
|
76
|
-
materialized = self.for(deps,
|
75
|
+
materialized = self.for(deps, false, true, !missing_specs)
|
77
76
|
|
78
77
|
materialized.group_by(&:source).each do |source, specs|
|
79
78
|
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
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.24
|
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-07-
|
25
|
+
date: 2021-07-15 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
|
@@ -354,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
354
354
|
- !ruby/object:Gem::Version
|
355
355
|
version: 2.5.2
|
356
356
|
requirements: []
|
357
|
-
rubygems_version: 3.2.
|
357
|
+
rubygems_version: 3.2.24
|
358
358
|
signing_key:
|
359
359
|
specification_version: 4
|
360
360
|
summary: The best way to manage your application's dependencies
|