rubygems-update 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/bundler/CHANGELOG.md +16 -0
- data/bundler/lib/bundler/build_metadata.rb +1 -1
- data/bundler/lib/bundler/cli/config.rb +8 -3
- data/bundler/lib/bundler/cli.rb +12 -12
- data/bundler/lib/bundler/compact_index_client/parser.rb +4 -1
- data/bundler/lib/bundler/definition.rb +26 -4
- data/bundler/lib/bundler/lockfile_parser.rb +15 -0
- data/bundler/lib/bundler/source/path.rb +3 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +10 -0
- data/lib/rubygems/bundler_version_finder.rb +6 -2
- data/lib/rubygems/win_platform.rb +0 -1
- data/lib/rubygems.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d207eaa8ea0c17596ba6919cee2053ab7044e1a33c1928e61887a06b2a74700
|
|
4
|
+
data.tar.gz: 83258ebcc931736a81fc787b12ea9e8f6ecbc20973230ac542326dff6c8e1ae6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fde24bf1c702d73c532d60c5bedff3e8876b6bf6200779abbdf0a959e96570fb9c8b0c3db27dbd4899a3b1db5f3d011c9255d9ab2c6df4c212a020a2290dcf45
|
|
7
|
+
data.tar.gz: 669918da9e6e3552a74057002a34f54a73c5aef7b0043f510578ae46ec6fb4ae40060a437aaed13c7de0e47f2fdc5ab9432315f0954a5c429ffff7381f1f93ee
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.12 / 2026-05-20
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Remove cygwin from WIN_PATTERNS. Pull request [#9527](https://github.com/ruby/rubygems/pull/9527) by fd00
|
|
8
|
+
* Installs bundler 4.0.12 as a default gem.
|
|
9
|
+
|
|
10
|
+
### Bug fixes:
|
|
11
|
+
|
|
12
|
+
* Fall back to lockfile version when `BUNDLE_VERSION` is "lockfile". Pull request [#9545](https://github.com/ruby/rubygems/pull/9545) by hsbt
|
|
13
|
+
* Read `BUNDLE_VERSION` env var in `BundlerVersionFinder`. Pull request [#9538](https://github.com/ruby/rubygems/pull/9538) by hsbt
|
|
14
|
+
|
|
3
15
|
## 4.0.11 / 2026-04-30
|
|
4
16
|
|
|
5
17
|
### Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.12 / 2026-05-20
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Make `bundle config get` return status 1 when the value is not set. Pull request [#9505](https://github.com/ruby/rubygems/pull/9505) by willnet
|
|
8
|
+
* Use Pathname#absolute?. Pull request [#9529](https://github.com/ruby/rubygems/pull/9529) by nobu
|
|
9
|
+
* Deprecate parsing non-lockfile content in LockfileParser. Pull request [#9502](https://github.com/ruby/rubygems/pull/9502) by kurotaky
|
|
10
|
+
* Print a warning for a potential confusion from the indirect dependencies. Pull request [#5029](https://github.com/ruby/rubygems/pull/5029) by junaruga
|
|
11
|
+
* Respect Gemfile bundler setting in `Bundler.setup`. Pull request [#4892](https://github.com/ruby/rubygems/pull/4892) by godfat
|
|
12
|
+
|
|
13
|
+
### Bug fixes:
|
|
14
|
+
|
|
15
|
+
* Gracefully handle missing checksums in Compact Index. Pull request [#9492](https://github.com/ruby/rubygems/pull/9492) by jneen
|
|
16
|
+
* Skip git source exclusion when lockfile cannot backfill. Pull request [#9544](https://github.com/ruby/rubygems/pull/9544) by yahonda
|
|
17
|
+
* Fix bundle config gemfile unset behavior. Pull request [#9514](https://github.com/ruby/rubygems/pull/9514) by afurm
|
|
18
|
+
|
|
3
19
|
## 4.0.11 / 2026-04-30
|
|
4
20
|
|
|
5
21
|
### Enhancements:
|
|
@@ -87,16 +87,21 @@ module Bundler
|
|
|
87
87
|
|
|
88
88
|
if value.nil?
|
|
89
89
|
warn_unused_scope "Ignoring --#{scope} since no value to set was given"
|
|
90
|
+
current_value = Bundler.settings[name]
|
|
90
91
|
|
|
91
92
|
if options[:parseable]
|
|
92
93
|
if value = Bundler.settings[name]
|
|
93
94
|
Bundler.ui.info("#{name}=#{value}")
|
|
94
95
|
end
|
|
95
|
-
|
|
96
|
+
else
|
|
97
|
+
confirm(name)
|
|
96
98
|
end
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
if current_value.nil?
|
|
101
|
+
exit 1
|
|
102
|
+
else
|
|
103
|
+
return
|
|
104
|
+
end
|
|
100
105
|
end
|
|
101
106
|
|
|
102
107
|
Bundler.ui.info(message) if message
|
data/bundler/lib/bundler/cli.rb
CHANGED
|
@@ -61,18 +61,18 @@ module Bundler
|
|
|
61
61
|
|
|
62
62
|
current_cmd = args.last[:current_command].name
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
# `bundle config` manages stored settings, so avoid promoting settings
|
|
65
|
+
# like `gemfile` or `lockfile` to environment variables before it runs.
|
|
66
|
+
unless current_cmd == "config"
|
|
67
|
+
Bundler.configure_custom_gemfile(options[:gemfile])
|
|
68
|
+
|
|
69
|
+
# lock --lockfile works differently than install --lockfile
|
|
70
|
+
unless current_cmd == "lock"
|
|
71
|
+
custom_lockfile = options[:lockfile] || ENV["BUNDLE_LOCKFILE"] || Bundler.settings[:lockfile]
|
|
72
|
+
if custom_lockfile && !custom_lockfile.empty?
|
|
73
|
+
Bundler::SharedHelpers.set_env "BUNDLE_LOCKFILE", File.expand_path(custom_lockfile)
|
|
74
|
+
reset_settings = true
|
|
75
|
+
end
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -71,7 +71,10 @@ module Bundler
|
|
|
71
71
|
# This method gets called at least once for every gem when parsing versions.
|
|
72
72
|
def parse_version_checksum(line, checksums)
|
|
73
73
|
return unless (name_end = line.index(" ")) # Artifactory bug causes blank lines in artifactor index files
|
|
74
|
-
|
|
74
|
+
checksum_start = line.index(" ", name_end + 1)
|
|
75
|
+
return unless checksum_start
|
|
76
|
+
checksum_start += 1
|
|
77
|
+
|
|
75
78
|
checksum_end = line.size - checksum_start
|
|
76
79
|
|
|
77
80
|
line.freeze # allows slicing into the string to not allocate a copy of the line
|
|
@@ -783,7 +783,25 @@ module Bundler
|
|
|
783
783
|
end
|
|
784
784
|
|
|
785
785
|
def precompute_source_requirements_for_indirect_dependencies?
|
|
786
|
-
sources.non_global_rubygems_sources.all?(&:dependency_api_available?)
|
|
786
|
+
if sources.non_global_rubygems_sources.all?(&:dependency_api_available?)
|
|
787
|
+
true
|
|
788
|
+
else
|
|
789
|
+
non_dependency_api_warning
|
|
790
|
+
false
|
|
791
|
+
end
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
def non_dependency_api_warning
|
|
795
|
+
non_api_sources = sources.non_global_rubygems_sources.reject(&:dependency_api_available?)
|
|
796
|
+
non_api_source_names = non_api_sources.map {|d| " * #{d}" }.join("\n")
|
|
797
|
+
|
|
798
|
+
msg = String.new
|
|
799
|
+
msg << "Your Gemfile contains scoped sources that don't implement a dependency API, namely:\n\n"
|
|
800
|
+
msg << non_api_source_names
|
|
801
|
+
msg << "\n\nUsing the above gem servers may result in installing unexpected gems. " \
|
|
802
|
+
"To resolve this warning, make sure you use gem servers that implement dependency APIs, " \
|
|
803
|
+
"such as gemstash or geminabox gem servers."
|
|
804
|
+
Bundler.ui.warn msg
|
|
787
805
|
end
|
|
788
806
|
|
|
789
807
|
def current_platform_locked?
|
|
@@ -1159,16 +1177,20 @@ module Bundler
|
|
|
1159
1177
|
def find_source_requirements
|
|
1160
1178
|
preload_git_sources
|
|
1161
1179
|
|
|
1180
|
+
# Only safe to exclude when locked_requirements (merged below) backfills the gap.
|
|
1181
|
+
nothing_changed = nothing_changed?
|
|
1182
|
+
excluded = nothing_changed ? excluded_git_sources : []
|
|
1183
|
+
|
|
1162
1184
|
# Record the specs available in each gem's source, so that those
|
|
1163
1185
|
# specs will be available later when the resolver knows where to
|
|
1164
1186
|
# look for that gemspec (or its dependencies)
|
|
1165
1187
|
source_requirements = if precompute_source_requirements_for_indirect_dependencies?
|
|
1166
|
-
all_requirements = source_map.all_requirements(
|
|
1188
|
+
all_requirements = source_map.all_requirements(excluded)
|
|
1167
1189
|
{ default: default_source }.merge(all_requirements)
|
|
1168
1190
|
else
|
|
1169
|
-
{ default: Source::RubygemsAggregate.new(sources, source_map,
|
|
1191
|
+
{ default: Source::RubygemsAggregate.new(sources, source_map, excluded) }.merge(source_map.direct_requirements)
|
|
1170
1192
|
end
|
|
1171
|
-
source_requirements.merge!(source_map.locked_requirements) if nothing_changed
|
|
1193
|
+
source_requirements.merge!(source_map.locked_requirements) if nothing_changed
|
|
1172
1194
|
metadata_dependencies.each do |dep|
|
|
1173
1195
|
source_requirements[dep.name] = sources.metadata_source
|
|
1174
1196
|
end
|
|
@@ -115,6 +115,17 @@ module Bundler
|
|
|
115
115
|
"Run `git checkout HEAD -- #{@lockfile_path}` first to get a clean lock."
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
@valid = lockfile.strip.empty? ||
|
|
119
|
+
lockfile.split(/(?:\r?\n)+/).any? {|l| KNOWN_SECTIONS.include?(l) }
|
|
120
|
+
|
|
121
|
+
unless @valid
|
|
122
|
+
SharedHelpers.feature_deprecated!(
|
|
123
|
+
"Your #{@lockfile_path} does not appear to be a valid lockfile. " \
|
|
124
|
+
"Run `rm #{@lockfile_path}` and then `bundle install` to generate a new lockfile. " \
|
|
125
|
+
"This will raise a LockfileError in a future version of Bundler."
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
118
129
|
lockfile.split(/((?:\r?\n)+)/) do |line|
|
|
119
130
|
# split alternates between the line and the following whitespace
|
|
120
131
|
next @pos.advance!(line) if line.match?(/^\s*$/)
|
|
@@ -164,6 +175,10 @@ module Bundler
|
|
|
164
175
|
bundler_version.nil? || bundler_version < Gem::Version.new("1.16.2")
|
|
165
176
|
end
|
|
166
177
|
|
|
178
|
+
def valid?
|
|
179
|
+
@valid
|
|
180
|
+
end
|
|
181
|
+
|
|
167
182
|
private
|
|
168
183
|
|
|
169
184
|
TYPES = {
|
|
@@ -220,10 +220,11 @@ module Bundler
|
|
|
220
220
|
# Some gem authors put absolute paths in their gemspec
|
|
221
221
|
# and we have to save them from themselves
|
|
222
222
|
spec.files = spec.files.filter_map do |path|
|
|
223
|
-
|
|
223
|
+
pathname = Pathname.new(path)
|
|
224
|
+
next path unless pathname.absolute?
|
|
224
225
|
next if File.directory?(path)
|
|
225
226
|
begin
|
|
226
|
-
|
|
227
|
+
pathname.relative_path_from(gem_dir).to_s
|
|
227
228
|
rescue ArgumentError
|
|
228
229
|
path
|
|
229
230
|
end
|
data/bundler/lib/bundler.rb
CHANGED
|
@@ -156,6 +156,7 @@ module Bundler
|
|
|
156
156
|
# Return if all groups are already loaded
|
|
157
157
|
return @setup if defined?(@setup) && @setup
|
|
158
158
|
|
|
159
|
+
configure_custom_gemfile
|
|
159
160
|
definition.validate_runtime!
|
|
160
161
|
|
|
161
162
|
SharedHelpers.print_major_deprecations!
|
|
@@ -586,6 +587,15 @@ module Bundler
|
|
|
586
587
|
Bundler.rubygems.clear_paths
|
|
587
588
|
end
|
|
588
589
|
|
|
590
|
+
def configure_custom_gemfile(custom_gemfile = nil)
|
|
591
|
+
custom_gemfile ||= Bundler.settings[:gemfile]
|
|
592
|
+
|
|
593
|
+
if custom_gemfile && !custom_gemfile.empty?
|
|
594
|
+
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
|
|
595
|
+
reset_settings_and_root!
|
|
596
|
+
end
|
|
597
|
+
end
|
|
598
|
+
|
|
589
599
|
def self_manager
|
|
590
600
|
@self_manager ||= begin
|
|
591
601
|
require_relative "bundler/self_manager"
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Gem::BundlerVersionFinder
|
|
4
4
|
def self.bundler_version
|
|
5
|
-
|
|
5
|
+
bcv = bundle_config_version
|
|
6
|
+
return if bcv == "system"
|
|
6
7
|
|
|
7
8
|
v = ENV["BUNDLER_VERSION"]
|
|
8
9
|
v = nil if v&.empty?
|
|
@@ -10,7 +11,7 @@ module Gem::BundlerVersionFinder
|
|
|
10
11
|
v ||= bundle_update_bundler_version
|
|
11
12
|
return if v == true
|
|
12
13
|
|
|
13
|
-
v ||=
|
|
14
|
+
v ||= bcv unless bcv == "lockfile"
|
|
14
15
|
|
|
15
16
|
v ||= lockfile_version
|
|
16
17
|
return unless v
|
|
@@ -70,6 +71,9 @@ module Gem::BundlerVersionFinder
|
|
|
70
71
|
private_class_method :lockfile_contents
|
|
71
72
|
|
|
72
73
|
def self.bundle_config_version
|
|
74
|
+
env_version = ENV["BUNDLE_VERSION"]
|
|
75
|
+
return env_version if env_version && !env_version.empty?
|
|
76
|
+
|
|
73
77
|
version = nil
|
|
74
78
|
|
|
75
79
|
[bundler_local_config_file, bundler_global_config_file].each do |config_file|
|
data/lib/rubygems.rb
CHANGED
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: 4.0.
|
|
4
|
+
version: 4.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jim Weirich
|
|
@@ -724,7 +724,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
724
724
|
- !ruby/object:Gem::Version
|
|
725
725
|
version: '0'
|
|
726
726
|
requirements: []
|
|
727
|
-
rubygems_version: 4.0.
|
|
727
|
+
rubygems_version: 4.0.10
|
|
728
728
|
specification_version: 4
|
|
729
729
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|
|
730
730
|
and installed by `gem update --system`, so that the `gem` CLI can update itself.
|