rubygems-update 3.3.25 → 3.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/bundler/CHANGELOG.md +10 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -1
- data/bundler/lib/bundler/index.rb +5 -0
- data/bundler/lib/bundler/lazy_specification.rb +33 -33
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/bundler/lib/bundler/rubygems_ext.rb +22 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/ext/cargo_builder.rb +4 -0
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +4 -4
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder.rb +1 -0
- 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: 408d9d522251e2fb954bfdf84102ada35c4e3566cd6f6bc4601258de20aaa289
|
4
|
+
data.tar.gz: 757b2eebebe6a052bcbc0c29d5b720501024af1f2127a588b3b19acfc0bdf2f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d44e28517679d5a93af05db7a4886510a86e0a286bcce642d582427abfad81123ac551003f3076731ec8034909e68adc9068194ff4429f74788bf2e06a76f6d
|
7
|
+
data.tar.gz: f0b21ecf2a8bb7e34c5f25d38d27dc47b1e1b94255c616b3bf29e28d6f9fd4eb45794ff80d1f7ae91c45e40ca0542f6e5c52ca1b62c9e3893829da1bce841457
|
data/CHANGELOG.md
CHANGED
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 2.3.26 (November 16, 2022)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Map 'universal' to the real arch in Bundler for prebuilt gem selection [#5978](https://github.com/rubygems/rubygems/pull/5978)
|
6
|
+
|
7
|
+
## Documentation:
|
8
|
+
|
9
|
+
- Fix '--force' option documentation of 'bundle clean' [#6050](https://github.com/rubygems/rubygems/pull/6050)
|
10
|
+
|
1
11
|
# 2.3.25 (November 2, 2022)
|
2
12
|
|
3
13
|
## 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 = "2023-11-10".freeze
|
8
|
+
@git_commit_sha = "d1204e84f1".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -620,7 +620,7 @@ module Bundler
|
|
620
620
|
method_option "dry-run", :type => :boolean, :default => false, :banner =>
|
621
621
|
"Only print out changes, do not clean gems"
|
622
622
|
method_option "force", :type => :boolean, :default => false, :banner =>
|
623
|
-
"Forces
|
623
|
+
"Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application."
|
624
624
|
def clean
|
625
625
|
require_relative "cli/clean"
|
626
626
|
Clean.new(options.dup).run
|
@@ -71,6 +71,7 @@ module Bundler
|
|
71
71
|
when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
|
72
72
|
when String then specs_by_name(query)
|
73
73
|
when Gem::Dependency then search_by_dependency(query)
|
74
|
+
when Array then search_by_name_and_version(*query)
|
74
75
|
else
|
75
76
|
raise "You can't search for a #{query.inspect}."
|
76
77
|
end
|
@@ -173,6 +174,10 @@ module Bundler
|
|
173
174
|
end
|
174
175
|
end
|
175
176
|
|
177
|
+
def search_by_name_and_version(name, version)
|
178
|
+
specs_by_name(name).select {|spec| spec.version == version }
|
179
|
+
end
|
180
|
+
|
176
181
|
EMPTY_SEARCH = [].freeze
|
177
182
|
|
178
183
|
def search_by_spec(spec)
|
@@ -13,7 +13,6 @@ module Bundler
|
|
13
13
|
@dependencies = []
|
14
14
|
@platform = platform || Gem::Platform::RUBY
|
15
15
|
@source = source
|
16
|
-
@specification = nil
|
17
16
|
end
|
18
17
|
|
19
18
|
def full_name
|
@@ -76,37 +75,46 @@ module Bundler
|
|
76
75
|
def materialize_for_installation
|
77
76
|
source.local!
|
78
77
|
|
79
|
-
|
80
|
-
|
78
|
+
matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])
|
79
|
+
return self if matching_specs.empty?
|
81
80
|
|
82
|
-
|
81
|
+
candidates = if use_exact_resolved_specifications?
|
82
|
+
matching_specs
|
83
83
|
else
|
84
|
-
|
85
|
-
end
|
84
|
+
target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
|
86
85
|
|
87
|
-
|
86
|
+
installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
|
88
87
|
|
89
|
-
|
90
|
-
|
88
|
+
specification = __materialize__(installable_candidates, :fallback_to_non_installable => false)
|
89
|
+
return specification unless specification.nil?
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
search = candidates.reverse.find do |spec|
|
95
|
-
spec.is_a?(StubSpecification) ||
|
96
|
-
(spec.matches_current_ruby? &&
|
97
|
-
spec.matches_current_rubygems?)
|
98
|
-
end
|
99
|
-
if search.nil? && Bundler.frozen_bundle?
|
100
|
-
search = candidates.last
|
101
|
-
else
|
102
|
-
search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
91
|
+
if target_platform != platform
|
92
|
+
installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
|
103
93
|
end
|
104
|
-
|
94
|
+
|
95
|
+
installable_candidates
|
105
96
|
end
|
97
|
+
|
98
|
+
__materialize__(candidates)
|
106
99
|
end
|
107
100
|
|
108
|
-
|
109
|
-
|
101
|
+
# If in frozen mode, we fallback to a non-installable candidate because by
|
102
|
+
# doing this we avoid re-resolving and potentially end up changing the
|
103
|
+
# lock file, which is not allowed. In that case, we will give a proper error
|
104
|
+
# about the mismatch higher up the stack, right before trying to install the
|
105
|
+
# bad gem.
|
106
|
+
def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
|
107
|
+
search = candidates.reverse.find do |spec|
|
108
|
+
spec.is_a?(StubSpecification) ||
|
109
|
+
(spec.matches_current_ruby? &&
|
110
|
+
spec.matches_current_rubygems?)
|
111
|
+
end
|
112
|
+
if search.nil? && fallback_to_non_installable
|
113
|
+
search = candidates.last
|
114
|
+
else
|
115
|
+
search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
116
|
+
end
|
117
|
+
search
|
110
118
|
end
|
111
119
|
|
112
120
|
def to_s
|
@@ -128,16 +136,8 @@ module Bundler
|
|
128
136
|
|
129
137
|
private
|
130
138
|
|
131
|
-
def
|
132
|
-
|
133
|
-
end
|
134
|
-
|
135
|
-
def method_missing(method, *args, &blk)
|
136
|
-
raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
|
137
|
-
|
138
|
-
return super unless respond_to?(method)
|
139
|
-
|
140
|
-
@specification.send(method, *args, &blk)
|
139
|
+
def use_exact_resolved_specifications?
|
140
|
+
@use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
|
141
141
|
end
|
142
142
|
|
143
143
|
#
|
@@ -20,5 +20,5 @@ Print the changes, but do not clean the unused gems\.
|
|
20
20
|
.
|
21
21
|
.TP
|
22
22
|
\fB\-\-force\fR
|
23
|
-
|
23
|
+
Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\.
|
24
24
|
|
@@ -15,4 +15,4 @@ useful when you have made many changes to your gem dependencies.
|
|
15
15
|
* `--dry-run`:
|
16
16
|
Print the changes, but do not clean the unused gems.
|
17
17
|
* `--force`:
|
18
|
-
|
18
|
+
Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application.
|
@@ -308,6 +308,28 @@ module Gem
|
|
308
308
|
end
|
309
309
|
end
|
310
310
|
|
311
|
+
# On universal Rubies, resolve the "universal" arch to the real CPU arch, without changing the extension directory.
|
312
|
+
class Specification
|
313
|
+
if /^universal\.(?<arch>.*?)-/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
|
314
|
+
local_platform = Platform.local
|
315
|
+
if local_platform.cpu == "universal"
|
316
|
+
ORIGINAL_LOCAL_PLATFORM = local_platform.to_s.freeze
|
317
|
+
|
318
|
+
local_platform.cpu = if arch == "arm64e" # arm64e is only permitted for Apple system binaries
|
319
|
+
"arm64"
|
320
|
+
else
|
321
|
+
arch
|
322
|
+
end
|
323
|
+
|
324
|
+
def extensions_dir
|
325
|
+
Gem.default_ext_dir_for(base_dir) ||
|
326
|
+
File.join(base_dir, "extensions", ORIGINAL_LOCAL_PLATFORM,
|
327
|
+
Gem.extension_api_version)
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
311
333
|
require "rubygems/util"
|
312
334
|
|
313
335
|
Util.singleton_class.module_eval do
|
@@ -37,6 +37,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
|
|
37
37
|
def build_env
|
38
38
|
build_env = rb_config_env
|
39
39
|
build_env["RUBY_STATIC"] = "true" if ruby_static? && ENV.key?("RUBY_STATIC")
|
40
|
+
build_env["RUSTFLAGS"] = "#{ENV["RUSTFLAGS"]} --cfg=rb_sys_gem".strip
|
40
41
|
build_env
|
41
42
|
end
|
42
43
|
|
@@ -92,6 +93,9 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
|
|
92
93
|
# run on one that isn't the missing libraries will cause the extension
|
93
94
|
# to fail on start.
|
94
95
|
flags += ["-C", "link-arg=-static-libgcc"]
|
96
|
+
elsif darwin_target?
|
97
|
+
# Ventura does not always have this flag enabled
|
98
|
+
flags += ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
|
95
99
|
end
|
96
100
|
|
97
101
|
flags
|
data/lib/rubygems.rb
CHANGED
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.3.
|
5
|
+
s.version = "3.3.27"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
@@ -160,18 +160,18 @@ dependencies = [
|
|
160
160
|
|
161
161
|
[[package]]
|
162
162
|
name = "rb-sys"
|
163
|
-
version = "0.9.
|
163
|
+
version = "0.9.37"
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
165
|
-
checksum = "
|
165
|
+
checksum = "5ba942b6777ea18ded013b267023a9c98994557e6539e43740de9e75084cb124"
|
166
166
|
dependencies = [
|
167
167
|
"rb-sys-build",
|
168
168
|
]
|
169
169
|
|
170
170
|
[[package]]
|
171
171
|
name = "rb-sys-build"
|
172
|
-
version = "0.9.
|
172
|
+
version = "0.9.37"
|
173
173
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
174
|
-
checksum = "
|
174
|
+
checksum = "d35109e1a11ef8d1a988db242ab2ba2e80170f9f5a28f88ab30184a2cea8e09b"
|
175
175
|
dependencies = [
|
176
176
|
"bindgen",
|
177
177
|
"linkify",
|
@@ -153,18 +153,18 @@ dependencies = [
|
|
153
153
|
|
154
154
|
[[package]]
|
155
155
|
name = "rb-sys"
|
156
|
-
version = "0.9.
|
156
|
+
version = "0.9.37"
|
157
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
158
|
-
checksum = "
|
158
|
+
checksum = "5ba942b6777ea18ded013b267023a9c98994557e6539e43740de9e75084cb124"
|
159
159
|
dependencies = [
|
160
160
|
"rb-sys-build",
|
161
161
|
]
|
162
162
|
|
163
163
|
[[package]]
|
164
164
|
name = "rb-sys-build"
|
165
|
-
version = "0.9.
|
165
|
+
version = "0.9.37"
|
166
166
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
167
|
-
checksum = "
|
167
|
+
checksum = "d35109e1a11ef8d1a988db242ab2ba2e80170f9f5a28f88ab30184a2cea8e09b"
|
168
168
|
dependencies = [
|
169
169
|
"bindgen",
|
170
170
|
"linkify",
|
@@ -164,6 +164,7 @@ class TestGemExtCargoBuilder < Gem::TestCase
|
|
164
164
|
def skip_unsupported_platforms!
|
165
165
|
pend "jruby not supported" if java_platform?
|
166
166
|
pend "truffleruby not supported (yet)" if RUBY_ENGINE == "truffleruby"
|
167
|
+
pend "mingw platform failed in 2023" if /mingw/ =~ RUBY_PLATFORM && ENV.key?("GITHUB_ACTIONS")
|
167
168
|
pend "mswin not supported (yet)" if /mswin/ =~ RUBY_PLATFORM && ENV.key?("GITHUB_ACTIONS")
|
168
169
|
system(@rust_envs, "cargo", "-V", out: IO::NULL, err: [:child, :out])
|
169
170
|
pend "cargo not present" unless $?.success?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date:
|
19
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -831,7 +831,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
831
831
|
- !ruby/object:Gem::Version
|
832
832
|
version: '0'
|
833
833
|
requirements: []
|
834
|
-
rubygems_version: 3.
|
834
|
+
rubygems_version: 3.5.0.dev
|
835
835
|
signing_key:
|
836
836
|
specification_version: 4
|
837
837
|
summary: RubyGems is a package management framework for Ruby.
|