bundler 2.5.3 → 2.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/compact_index_client/updater.rb +4 -4
- data/lib/bundler/definition.rb +7 -5
- data/lib/bundler/dsl.rb +7 -7
- data/lib/bundler/man/bundle-config.1 +2 -2
- data/lib/bundler/man/bundle-config.1.ronn +2 -2
- data/lib/bundler/spec_set.rb +51 -30
- 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: aaaf17b908dc3f0037d6da507f2177ef2cc21e023691c98f608d5ab3699431c2
|
4
|
+
data.tar.gz: 64233d285e149e70f795b71cef8c92cff52360f9e86be7be3318067450c1da53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3033d4bad54a516fc1ef08d38f9de79aa79ea0a4f7c944e3c9f770808aa82f571b6caf8af6545281d3eca71022caeab475f478831a37fd78ed93b2627104a09b
|
7
|
+
data.tar.gz: d0035deab10246f235ec44b910a7a4552b725a5f4372a9eee20119f1e073eac9d355cda044bb56ad50390a3f879ee161b29783847d9dad92d107b75013b7f88d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# 2.5.5 (January 18, 2024)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Fix development dependency not being added if introduced by two gemspecs [#7358](https://github.com/rubygems/rubygems/pull/7358)
|
6
|
+
- Fix ETag quoting regression in If-None-Match header of compact index request [#7352](https://github.com/rubygems/rubygems/pull/7352)
|
7
|
+
|
8
|
+
## Documentation:
|
9
|
+
|
10
|
+
- Refer to underscores as underscores [#7364](https://github.com/rubygems/rubygems/pull/7364)
|
11
|
+
|
12
|
+
# 2.5.4 (January 4, 2024)
|
13
|
+
|
14
|
+
## Bug fixes:
|
15
|
+
|
16
|
+
- Fix resolution when different platform specific gems have different dependencies [#7324](https://github.com/rubygems/rubygems/pull/7324)
|
17
|
+
|
1
18
|
# 2.5.3 (December 22, 2023)
|
2
19
|
|
3
20
|
## Bug fixes:
|
@@ -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 = "
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-01-18".freeze
|
8
|
+
@git_commit_sha = "2efa8cec93".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -42,7 +42,7 @@ module Bundler
|
|
42
42
|
else
|
43
43
|
file.write(response.body)
|
44
44
|
end
|
45
|
-
CacheFile.write(etag_path,
|
45
|
+
CacheFile.write(etag_path, etag_from_response(response))
|
46
46
|
true
|
47
47
|
end
|
48
48
|
end
|
@@ -53,13 +53,13 @@ module Bundler
|
|
53
53
|
response = @fetcher.call(remote_path, request_headers(etag))
|
54
54
|
return true if response.is_a?(Gem::Net::HTTPNotModified)
|
55
55
|
CacheFile.write(local_path, response.body, parse_digests(response))
|
56
|
-
CacheFile.write(etag_path,
|
56
|
+
CacheFile.write(etag_path, etag_from_response(response))
|
57
57
|
end
|
58
58
|
|
59
59
|
def request_headers(etag, range_start = nil)
|
60
60
|
headers = {}
|
61
61
|
headers["Range"] = "bytes=#{range_start}-" if range_start
|
62
|
-
headers["If-None-Match"] = etag if etag
|
62
|
+
headers["If-None-Match"] = %("#{etag}") if etag
|
63
63
|
headers
|
64
64
|
end
|
65
65
|
|
@@ -77,7 +77,7 @@ module Bundler
|
|
77
77
|
etag
|
78
78
|
end
|
79
79
|
|
80
|
-
def
|
80
|
+
def etag_from_response(response)
|
81
81
|
return unless response["ETag"]
|
82
82
|
etag = response["ETag"].delete_prefix("W/")
|
83
83
|
return if etag.delete_prefix!('"') && !etag.delete_suffix!('"')
|
data/lib/bundler/definition.rb
CHANGED
@@ -312,10 +312,6 @@ module Bundler
|
|
312
312
|
end
|
313
313
|
end
|
314
314
|
|
315
|
-
def should_complete_platforms?
|
316
|
-
!lockfile_exists? && generic_local_platform_is_ruby? && !Bundler.settings[:force_ruby_platform]
|
317
|
-
end
|
318
|
-
|
319
315
|
def spec_git_paths
|
320
316
|
sources.git_sources.map {|s| File.realpath(s.path) if File.exist?(s.path) }.compact
|
321
317
|
end
|
@@ -517,6 +513,10 @@ module Bundler
|
|
517
513
|
|
518
514
|
private
|
519
515
|
|
516
|
+
def should_add_extra_platforms?
|
517
|
+
!lockfile_exists? && generic_local_platform_is_ruby? && !Bundler.settings[:force_ruby_platform]
|
518
|
+
end
|
519
|
+
|
520
520
|
def lockfile_exists?
|
521
521
|
lockfile && File.exist?(lockfile)
|
522
522
|
end
|
@@ -600,7 +600,9 @@ module Bundler
|
|
600
600
|
result = SpecSet.new(resolver.start)
|
601
601
|
|
602
602
|
@resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
|
603
|
-
@platforms = result.
|
603
|
+
@platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
|
604
|
+
|
605
|
+
result.complete_platforms!(platforms)
|
604
606
|
|
605
607
|
SpecSet.new(result.for(dependencies, false, @platforms))
|
606
608
|
end
|
data/lib/bundler/dsl.rb
CHANGED
@@ -102,9 +102,6 @@ module Bundler
|
|
102
102
|
|
103
103
|
# if there's already a dependency with this name we try to prefer one
|
104
104
|
if current = @dependencies.find {|d| d.name == dep.name }
|
105
|
-
# Always prefer the dependency from the Gemfile
|
106
|
-
@dependencies.delete(current) if current.gemspec_dev_dep?
|
107
|
-
|
108
105
|
if current.requirement != dep.requirement
|
109
106
|
current_requirement_open = current.requirements_list.include?(">= 0")
|
110
107
|
|
@@ -116,8 +113,6 @@ module Bundler
|
|
116
113
|
Bundler.ui.warn "A gemspec development dependency (#{gemspec_dep.name}, #{gemspec_dep.requirement}) is being overridden by a Gemfile dependency (#{gemfile_dep.name}, #{gemfile_dep.requirement}).\n" \
|
117
114
|
"This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n"
|
118
115
|
end
|
119
|
-
|
120
|
-
return if dep.gemspec_dev_dep?
|
121
116
|
else
|
122
117
|
update_prompt = ""
|
123
118
|
|
@@ -135,8 +130,13 @@ module Bundler
|
|
135
130
|
"You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
|
136
131
|
"#{update_prompt}"
|
137
132
|
end
|
138
|
-
|
139
|
-
|
133
|
+
end
|
134
|
+
|
135
|
+
# Always prefer the dependency from the Gemfile
|
136
|
+
if current.gemspec_dev_dep?
|
137
|
+
@dependencies.delete(current)
|
138
|
+
elsif dep.gemspec_dev_dep?
|
139
|
+
return
|
140
140
|
elsif current.source != dep.source
|
141
141
|
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
|
142
142
|
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
|
@@ -302,9 +302,9 @@ Note that any configured credentials will be redacted by informative commands su
|
|
302
302
|
.P
|
303
303
|
Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
|
304
304
|
.IP "\(bu" 4
|
305
|
-
Any \fB\-\fR characters in a host name are mapped to a triple
|
305
|
+
Any \fB\-\fR characters in a host name are mapped to a triple underscore (\fB___\fR) in the corresponding environment variable\.
|
306
306
|
.IP "\(bu" 4
|
307
|
-
Any \fB\.\fR characters in a host name are mapped to a double
|
307
|
+
Any \fB\.\fR characters in a host name are mapped to a double underscore (\fB__\fR) in the corresponding environment variable\.
|
308
308
|
.IP "" 0
|
309
309
|
.P
|
310
310
|
This means that if you have a gem server named \fBmy\.gem\-host\.com\fR, you'll need to use the \fBBUNDLE_MY__GEM___HOST__COM\fR variable to configure credentials for it through ENV\.
|
@@ -388,10 +388,10 @@ copy-pasting bundler output.
|
|
388
388
|
Also note that to guarantee a sane mapping between valid environment variable
|
389
389
|
names and valid host names, bundler makes the following transformations:
|
390
390
|
|
391
|
-
* Any `-` characters in a host name are mapped to a triple
|
391
|
+
* Any `-` characters in a host name are mapped to a triple underscore (`___`) in the
|
392
392
|
corresponding environment variable.
|
393
393
|
|
394
|
-
* Any `.` characters in a host name are mapped to a double
|
394
|
+
* Any `.` characters in a host name are mapped to a double underscore (`__`) in the
|
395
395
|
corresponding environment variable.
|
396
396
|
|
397
397
|
This means that if you have a gem server named `my.gem-host.com`, you'll need to
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -52,32 +52,14 @@ module Bundler
|
|
52
52
|
specs.uniq
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def add_extra_platforms!(platforms)
|
56
56
|
return platforms.concat([Gem::Platform::RUBY]).uniq if @specs.empty?
|
57
57
|
|
58
|
-
new_platforms =
|
58
|
+
new_platforms = all_platforms.select do |platform|
|
59
59
|
next if platforms.include?(platform)
|
60
60
|
next unless GemHelpers.generic(platform) == Gem::Platform::RUBY
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
valid_platform = lookup.all? do |_, specs|
|
65
|
-
spec = specs.first
|
66
|
-
matching_specs = spec.source.specs.search([spec.name, spec.version])
|
67
|
-
platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
|
68
|
-
s.matches_current_metadata? && valid_dependencies?(s)
|
69
|
-
end
|
70
|
-
|
71
|
-
if platform_spec
|
72
|
-
new_specs << LazySpecification.from_spec(platform_spec)
|
73
|
-
true
|
74
|
-
else
|
75
|
-
false
|
76
|
-
end
|
77
|
-
end
|
78
|
-
next unless valid_platform
|
79
|
-
|
80
|
-
@specs.concat(new_specs.uniq)
|
62
|
+
complete_platform(platform)
|
81
63
|
end
|
82
64
|
return platforms if new_platforms.empty?
|
83
65
|
|
@@ -86,12 +68,15 @@ module Bundler
|
|
86
68
|
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && platform === Bundler.local_platform }
|
87
69
|
platforms.delete(Bundler.local_platform) if less_specific_platform
|
88
70
|
|
89
|
-
@sorted = nil
|
90
|
-
@lookup = nil
|
91
|
-
|
92
71
|
platforms
|
93
72
|
end
|
94
73
|
|
74
|
+
def complete_platforms!(platforms)
|
75
|
+
platforms.each do |platform|
|
76
|
+
complete_platform(platform)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
95
80
|
def validate_deps(s)
|
96
81
|
s.runtime_dependencies.each do |dep|
|
97
82
|
next if dep.name == "bundler"
|
@@ -110,14 +95,14 @@ module Bundler
|
|
110
95
|
|
111
96
|
def []=(key, value)
|
112
97
|
@specs << value
|
113
|
-
|
114
|
-
|
98
|
+
|
99
|
+
reset!
|
115
100
|
end
|
116
101
|
|
117
102
|
def delete(specs)
|
118
103
|
specs.each {|spec| @specs.delete(spec) }
|
119
|
-
|
120
|
-
|
104
|
+
|
105
|
+
reset!
|
121
106
|
end
|
122
107
|
|
123
108
|
def sort!
|
@@ -175,8 +160,8 @@ module Bundler
|
|
175
160
|
|
176
161
|
def delete_by_name(name)
|
177
162
|
@specs.reject! {|spec| spec.name == name }
|
178
|
-
|
179
|
-
|
163
|
+
|
164
|
+
reset!
|
180
165
|
end
|
181
166
|
|
182
167
|
def what_required(spec)
|
@@ -212,6 +197,42 @@ module Bundler
|
|
212
197
|
|
213
198
|
private
|
214
199
|
|
200
|
+
def reset!
|
201
|
+
@sorted = nil
|
202
|
+
@lookup = nil
|
203
|
+
end
|
204
|
+
|
205
|
+
def complete_platform(platform)
|
206
|
+
new_specs = []
|
207
|
+
|
208
|
+
valid_platform = lookup.all? do |_, specs|
|
209
|
+
spec = specs.first
|
210
|
+
matching_specs = spec.source.specs.search([spec.name, spec.version])
|
211
|
+
platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
|
212
|
+
s.matches_current_metadata? && valid_dependencies?(s)
|
213
|
+
end
|
214
|
+
|
215
|
+
if platform_spec
|
216
|
+
new_specs << LazySpecification.from_spec(platform_spec) unless specs.include?(platform_spec)
|
217
|
+
true
|
218
|
+
else
|
219
|
+
false
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
if valid_platform && new_specs.any?
|
224
|
+
@specs.concat(new_specs)
|
225
|
+
|
226
|
+
reset!
|
227
|
+
end
|
228
|
+
|
229
|
+
valid_platform
|
230
|
+
end
|
231
|
+
|
232
|
+
def all_platforms
|
233
|
+
@specs.flat_map {|spec| spec.source.specs.search([spec.name, spec.version]).map(&:platform) }.uniq
|
234
|
+
end
|
235
|
+
|
215
236
|
def valid_dependencies?(s)
|
216
237
|
validate_deps(s) == :valid
|
217
238
|
end
|
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.5.
|
4
|
+
version: 2.5.5
|
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:
|
25
|
+
date: 2024-01-18 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
|
@@ -398,7 +398,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
398
|
- !ruby/object:Gem::Version
|
399
399
|
version: 3.2.3
|
400
400
|
requirements: []
|
401
|
-
rubygems_version: 3.5.
|
401
|
+
rubygems_version: 3.5.5
|
402
402
|
signing_key:
|
403
403
|
specification_version: 4
|
404
404
|
summary: The best way to manage your application's dependencies
|