bundler 2.3.16 → 2.3.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/install.rb +2 -0
- data/lib/bundler/cli.rb +6 -2
- data/lib/bundler/current_ruby.rb +1 -1
- data/lib/bundler/dependency.rb +1 -1
- data/lib/bundler/friendly_errors.rb +5 -2
- data/lib/bundler/gem_helpers.rb +1 -0
- data/lib/bundler/index.rb +1 -5
- data/lib/bundler/installer/standalone.rb +29 -2
- data/lib/bundler/lazy_specification.rb +2 -2
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-add.1.ronn +1 -1
- data/lib/bundler/match_platform.rb +0 -1
- data/lib/bundler/resolver.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +6 -5
- data/lib/bundler/source/rubygems.rb +2 -0
- data/lib/bundler/spec_set.rb +11 -8
- 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: 364d4bc2c2c1f342aa034417b9e30074317878931bf34e90ddf6c42d3ae539c2
|
4
|
+
data.tar.gz: dad782afd5246e703b67d004c7282a89132f0ebe699d8e8306387fb8db179193
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463cc7534f4164ae4d2e4c67d1ed57dcc9a40494c496f0b06e11ac8f2b3599ea0dbc74be8772a98abb2d09c119db2da8f1d85cde6bafe83319051de3e24a46f2
|
7
|
+
data.tar.gz: 61b997e77634dc3a7d812adb805f899bb8bbae48bd25aad2884906c818d21853e76fd0db8bfbd95ee79689c25567e346e9c468fbe1321768c2614518f0e78356
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
# 2.3.17 (June 29, 2022)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Add support for platform `:x64_mingw` to correctly lookup "x64-mingw-ucrt" [#5649](https://github.com/rubygems/rubygems/pull/5649)
|
6
|
+
- Fix some errors being printed twice in `--verbose` mode [#5654](https://github.com/rubygems/rubygems/pull/5654)
|
7
|
+
- Fix extension paths in generated standalone script [#5632](https://github.com/rubygems/rubygems/pull/5632)
|
8
|
+
|
9
|
+
## Bug fixes:
|
10
|
+
|
11
|
+
- Raise if ruby platform is forced and there are no ruby variants [#5495](https://github.com/rubygems/rubygems/pull/5495)
|
12
|
+
- Fix `bundle package --no-install` no longer skipping install [#5639](https://github.com/rubygems/rubygems/pull/5639)
|
13
|
+
|
14
|
+
## Performance:
|
15
|
+
|
16
|
+
- Improve performance of `Bundler::SpecSet#for` by using hash lookup of handled deps [#5537](https://github.com/rubygems/rubygems/pull/5537)
|
17
|
+
|
18
|
+
## Documentation:
|
19
|
+
|
20
|
+
- Fix formatting issue in `bundle add` man page [#5642](https://github.com/rubygems/rubygems/pull/5642)
|
21
|
+
|
1
22
|
# 2.3.16 (June 15, 2022)
|
2
23
|
|
3
24
|
## Performance:
|
@@ -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 = "2022-06-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2022-06-29".freeze
|
8
|
+
@git_commit_sha = "539b20c172".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/cli/cache.rb
CHANGED
@@ -14,7 +14,7 @@ module Bundler
|
|
14
14
|
Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
|
15
15
|
|
16
16
|
setup_cache_all
|
17
|
-
install
|
17
|
+
install
|
18
18
|
|
19
19
|
# TODO: move cache contents here now that all bundles are locked
|
20
20
|
custom_path = Bundler.settings[:path] if options[:path]
|
data/lib/bundler/cli/install.rb
CHANGED
@@ -161,6 +161,8 @@ module Bundler
|
|
161
161
|
|
162
162
|
Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]
|
163
163
|
|
164
|
+
Bundler.settings.set_command_option_if_given :no_install, options["no-install"]
|
165
|
+
|
164
166
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
165
167
|
|
166
168
|
normalize_groups if options[:without] || options[:with]
|
data/lib/bundler/cli.rb
CHANGED
@@ -251,7 +251,9 @@ module Bundler
|
|
251
251
|
remembered_negative_flag_deprecation("no-deployment")
|
252
252
|
|
253
253
|
require_relative "cli/install"
|
254
|
-
|
254
|
+
Bundler.settings.temporary(:no_install => false) do
|
255
|
+
Install.new(options.dup).run
|
256
|
+
end
|
255
257
|
end
|
256
258
|
|
257
259
|
map aliases_for("install")
|
@@ -297,7 +299,9 @@ module Bundler
|
|
297
299
|
def update(*gems)
|
298
300
|
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
299
301
|
require_relative "cli/update"
|
300
|
-
|
302
|
+
Bundler.settings.temporary(:no_install => false) do
|
303
|
+
Update.new(options, gems).run
|
304
|
+
end
|
301
305
|
end
|
302
306
|
|
303
307
|
desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
|
data/lib/bundler/current_ruby.rb
CHANGED
@@ -78,7 +78,7 @@ module Bundler
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def x64_mingw?
|
81
|
-
Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os
|
81
|
+
Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os.start_with?("mingw") && Bundler.local_platform.cpu == "x64"
|
82
82
|
end
|
83
83
|
|
84
84
|
(KNOWN_MINOR_VERSIONS + KNOWN_MAJOR_VERSIONS).each do |version|
|
data/lib/bundler/dependency.rb
CHANGED
@@ -122,7 +122,7 @@ module Bundler
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def expanded_platforms
|
125
|
-
@expanded_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.uniq
|
125
|
+
@expanded_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.flatten.uniq
|
126
126
|
end
|
127
127
|
|
128
128
|
def should_include?
|
@@ -29,8 +29,11 @@ module Bundler
|
|
29
29
|
Bundler.ui.error error.message
|
30
30
|
Bundler.ui.trace error.orig_exception
|
31
31
|
when BundlerError
|
32
|
-
Bundler.ui.
|
33
|
-
|
32
|
+
if Bundler.ui.debug?
|
33
|
+
Bundler.ui.trace error
|
34
|
+
else
|
35
|
+
Bundler.ui.error error.message, :wrap => true
|
36
|
+
end
|
34
37
|
when Thor::Error
|
35
38
|
Bundler.ui.error error.message
|
36
39
|
when LoadError
|
data/lib/bundler/gem_helpers.rb
CHANGED
@@ -10,6 +10,7 @@ module Bundler
|
|
10
10
|
[Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
|
11
11
|
[Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw32")],
|
12
12
|
[Gem::Platform.new("x86_64-mingw32"), Gem::Platform.new("x64-mingw32")],
|
13
|
+
[Gem::Platform.new("x64-mingw-ucrt"), Gem::Platform.new("x64-mingw-ucrt")],
|
13
14
|
[Gem::Platform.new("mingw32"), Gem::Platform.new("x86-mingw32")],
|
14
15
|
].freeze
|
15
16
|
|
data/lib/bundler/index.rb
CHANGED
@@ -192,11 +192,7 @@ module Bundler
|
|
192
192
|
specs += base if base
|
193
193
|
found = specs.select do |spec|
|
194
194
|
next true if spec.source.is_a?(Source::Gemspec)
|
195
|
-
|
196
|
-
dependency.matches_spec?(spec)
|
197
|
-
else
|
198
|
-
dependency.matches_spec?(spec) && Gem::Platform.match_spec?(spec)
|
199
|
-
end
|
195
|
+
dependency.matches_spec?(spec)
|
200
196
|
end
|
201
197
|
|
202
198
|
found
|
@@ -12,6 +12,7 @@ module Bundler
|
|
12
12
|
end
|
13
13
|
File.open File.join(bundler_path, "setup.rb"), "w" do |file|
|
14
14
|
file.puts "require 'rbconfig'"
|
15
|
+
file.puts define_path_helpers
|
15
16
|
file.puts reverse_rubygems_kernel_mixin
|
16
17
|
paths.each do |path|
|
17
18
|
if Pathname.new(path).absolute?
|
@@ -29,14 +30,20 @@ module Bundler
|
|
29
30
|
@specs.map do |spec|
|
30
31
|
next if spec.name == "bundler"
|
31
32
|
Array(spec.require_paths).map do |path|
|
32
|
-
gem_path(path, spec).
|
33
|
+
gem_path(path, spec).
|
34
|
+
sub(version_dir, '#{RUBY_ENGINE}/#{Gem.ruby_api_version}').
|
35
|
+
sub(extensions_dir, 'extensions/\k<platform>/#{Gem.extension_api_version}')
|
33
36
|
# This is a static string intentionally. It's interpolated at a later time.
|
34
37
|
end
|
35
38
|
end.flatten.compact
|
36
39
|
end
|
37
40
|
|
38
41
|
def version_dir
|
39
|
-
"#{RUBY_ENGINE}/#{
|
42
|
+
"#{RUBY_ENGINE}/#{Gem.ruby_api_version}"
|
43
|
+
end
|
44
|
+
|
45
|
+
def extensions_dir
|
46
|
+
%r{extensions/(?<platform>[^/]+)/#{Regexp.escape(Gem.extension_api_version)}}
|
40
47
|
end
|
41
48
|
|
42
49
|
def bundler_path
|
@@ -55,6 +62,26 @@ module Bundler
|
|
55
62
|
raise Gem::InvalidSpecificationException.new(error_message)
|
56
63
|
end
|
57
64
|
|
65
|
+
def define_path_helpers
|
66
|
+
<<~'END'
|
67
|
+
unless defined?(Gem)
|
68
|
+
module Gem
|
69
|
+
def self.ruby_api_version
|
70
|
+
RbConfig::CONFIG["ruby_version"]
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.extension_api_version
|
74
|
+
if 'no' == RbConfig::CONFIG['ENABLE_SHARED']
|
75
|
+
"#{ruby_api_version}-static"
|
76
|
+
else
|
77
|
+
ruby_api_version
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
END
|
83
|
+
end
|
84
|
+
|
58
85
|
def reverse_rubygems_kernel_mixin
|
59
86
|
<<~END
|
60
87
|
kernel = (class << ::Kernel; self; end)
|
@@ -84,7 +84,7 @@ module Bundler
|
|
84
84
|
else
|
85
85
|
ruby_platform_materializes_to_ruby_platform? ? self : Dependency.new(name, version)
|
86
86
|
end
|
87
|
-
platform_object = Gem::Platform.new(platform)
|
87
|
+
platform_object = ruby_platform_materializes_to_ruby_platform? ? Gem::Platform.new(platform) : Gem::Platform.local
|
88
88
|
candidates = source.specs.search(search_object)
|
89
89
|
same_platform_candidates = candidates.select do |spec|
|
90
90
|
MatchPlatform.platforms_match?(spec.platform, platform_object)
|
@@ -152,7 +152,7 @@ module Bundler
|
|
152
152
|
# explicitly add a more specific platform.
|
153
153
|
#
|
154
154
|
def ruby_platform_materializes_to_ruby_platform?
|
155
|
-
!Bundler.most_specific_locked_platform?(
|
155
|
+
!Bundler.most_specific_locked_platform?(generic_local_platform) || Bundler.settings[:force_ruby_platform]
|
156
156
|
end
|
157
157
|
end
|
158
158
|
end
|
@@ -41,7 +41,7 @@ Specify version requirements(s) for the added gem\.
|
|
41
41
|
Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
|
42
42
|
.
|
43
43
|
.TP
|
44
|
-
\fB\-\-source\fR,
|
44
|
+
\fB\-\-source\fR, \fB\-s\fR
|
45
45
|
Specify the source for the added gem\.
|
46
46
|
.
|
47
47
|
.TP
|
@@ -27,7 +27,7 @@ bundle add rails --group "development, test"
|
|
27
27
|
* `--group`, `-g`:
|
28
28
|
Specify the group(s) for the added gem. Multiple groups should be separated by commas.
|
29
29
|
|
30
|
-
* `--source`,
|
30
|
+
* `--source`, `-s`:
|
31
31
|
Specify the source for the added gem.
|
32
32
|
|
33
33
|
* `--require`, `-r`:
|
@@ -15,7 +15,6 @@ module Bundler
|
|
15
15
|
return true if Gem::Platform::RUBY == gemspec_platform
|
16
16
|
return true if local_platform == gemspec_platform
|
17
17
|
gemspec_platform = Gem::Platform.new(gemspec_platform)
|
18
|
-
return true if GemHelpers.generic(gemspec_platform) === local_platform
|
19
18
|
return true if gemspec_platform === local_platform
|
20
19
|
|
21
20
|
false
|
data/lib/bundler/resolver.rb
CHANGED
@@ -284,7 +284,7 @@ module Bundler
|
|
284
284
|
if specs_matching_requirement.any?
|
285
285
|
specs = specs_matching_requirement
|
286
286
|
matching_part = requirement_label
|
287
|
-
requirement_label = "#{requirement_label} #{requirement.__platform}"
|
287
|
+
requirement_label = "#{requirement_label}' with platform '#{requirement.__platform}"
|
288
288
|
end
|
289
289
|
|
290
290
|
message = String.new("Could not find gem '#{requirement_label}'#{extra_message} in #{source}#{cache_message}.\n")
|
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -216,11 +216,12 @@ module Gem
|
|
216
216
|
require "rubygems/platform"
|
217
217
|
|
218
218
|
class Platform
|
219
|
-
JAVA = Gem::Platform.new("java")
|
220
|
-
MSWIN = Gem::Platform.new("mswin32")
|
221
|
-
MSWIN64 = Gem::Platform.new("mswin64")
|
222
|
-
MINGW = Gem::Platform.new("x86-mingw32")
|
223
|
-
X64_MINGW = Gem::Platform.new("x64-mingw32")
|
219
|
+
JAVA = Gem::Platform.new("java")
|
220
|
+
MSWIN = Gem::Platform.new("mswin32")
|
221
|
+
MSWIN64 = Gem::Platform.new("mswin64")
|
222
|
+
MINGW = Gem::Platform.new("x86-mingw32")
|
223
|
+
X64_MINGW = [Gem::Platform.new("x64-mingw32"),
|
224
|
+
Gem::Platform.new("x64-mingw-ucrt")].freeze
|
224
225
|
end
|
225
226
|
|
226
227
|
Platform.singleton_class.module_eval do
|
@@ -160,6 +160,8 @@ module Bundler
|
|
160
160
|
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
161
161
|
end
|
162
162
|
|
163
|
+
return if Bundler.settings[:no_install]
|
164
|
+
|
163
165
|
if requires_sudo?
|
164
166
|
install_path = Bundler.tmp(spec.full_name)
|
165
167
|
bin_path = install_path.join("bin")
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -12,17 +12,19 @@ module Bundler
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def for(dependencies, check = false, match_current_platform = false)
|
15
|
-
|
15
|
+
# dep.name => [list, of, deps]
|
16
|
+
handled = Hash.new {|h, k| h[k] = [] }
|
16
17
|
deps = dependencies.dup
|
17
18
|
specs = []
|
18
19
|
|
19
20
|
loop do
|
20
21
|
break unless dep = deps.shift
|
21
|
-
next if handled.any? {|d|
|
22
|
+
next if handled[dep.name].any? {|d| match_current_platform || d.__platform == dep.__platform } || dep.name == "bundler"
|
22
23
|
|
23
|
-
|
24
|
+
# use a hash here to ensure constant lookup time in the `any?` call above
|
25
|
+
handled[dep.name] << dep
|
24
26
|
|
25
|
-
specs_for_dep =
|
27
|
+
specs_for_dep = specs_for_dependency(dep, match_current_platform)
|
26
28
|
if specs_for_dep.any?
|
27
29
|
specs.concat(specs_for_dep)
|
28
30
|
|
@@ -171,12 +173,13 @@ module Bundler
|
|
171
173
|
@specs.sort_by(&:name).each {|s| yield s }
|
172
174
|
end
|
173
175
|
|
174
|
-
def
|
175
|
-
|
176
|
+
def specs_for_dependency(dep, match_current_platform)
|
177
|
+
specs_for_name = lookup[dep.name]
|
176
178
|
if match_current_platform
|
177
|
-
GemHelpers.select_best_platform_match(
|
179
|
+
GemHelpers.select_best_platform_match(specs_for_name.select {|s| Gem::Platform.match_spec?(s) }, Bundler.local_platform)
|
178
180
|
else
|
179
|
-
GemHelpers.select_best_platform_match(
|
181
|
+
specs_for_name_and_platform = GemHelpers.select_best_platform_match(specs_for_name, dep.__platform)
|
182
|
+
specs_for_name_and_platform.any? ? specs_for_name_and_platform : specs_for_name
|
180
183
|
end
|
181
184
|
end
|
182
185
|
|
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.3.
|
4
|
+
version: 2.3.17
|
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: 2022-06-
|
25
|
+
date: 2022-06-29 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
|
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
369
|
- !ruby/object:Gem::Version
|
370
370
|
version: 2.5.2
|
371
371
|
requirements: []
|
372
|
-
rubygems_version: 3.3.
|
372
|
+
rubygems_version: 3.3.17
|
373
373
|
signing_key:
|
374
374
|
specification_version: 4
|
375
375
|
summary: The best way to manage your application's dependencies
|