rubygems-update 3.4.6 → 3.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Manifest.txt +0 -1
- data/bundler/CHANGELOG.md +17 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/init.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -0
- data/bundler/lib/bundler/current_ruby.rb +2 -0
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/installer/parallel_installer.rb +16 -2
- data/bundler/lib/bundler/installer/standalone.rb +1 -1
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +5 -1
- data/bundler/lib/bundler/man/bundle-init.1.ronn +2 -0
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/source/git/git_proxy.rb +6 -4
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +6 -2
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +8 -1
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +5 -4
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +4 -2
- data/bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +4 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/deprecate.rb +2 -2
- data/lib/rubygems/package/tar_reader/entry.rb +6 -4
- data/lib/rubygems/specification_policy.rb +5 -0
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_command_manager.rb +25 -0
- 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_package_tar_reader_entry.rb +60 -2
- data/test/rubygems/test_gem_specification.rb +17 -0
- metadata +3 -4
- data/bundler/lib/bundler/templates/gems.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce0db157a5beb6c516383463604a7bcfd5f69f6314b44a07428b8e2ef0ce7466
|
4
|
+
data.tar.gz: a0ed37a3997da0b7f7e21a239482830023eefcf60fe0e70e793f07ebeb36aefa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f601f949d72477e06ec2e6ceb7eb12ef189370e49da57430fc7bdf3937f74f24f678f411e0e791cf7a22fb8911f61ac25f7d8f3f922a587150a54fd431fe726
|
7
|
+
data.tar.gz: 761cba346c2cb4bf07c552396c10d8aecda68888768a146afdc4a9cf2393ee67b32427b26c3fdc9e93d1f78875abe02e7aec0d8604b33b5cd5794b151d66ce64
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# 3.4.7 / 2023-02-15
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Warn on self referencing gemspec dependency. Pull request
|
6
|
+
[#6335](https://github.com/rubygems/rubygems/pull/6335) by simi
|
7
|
+
* Installs bundler 2.4.7 as a default gem.
|
8
|
+
|
9
|
+
## Bug fixes:
|
10
|
+
|
11
|
+
* Fix inconsistent behavior of zero byte files in archive. Pull request
|
12
|
+
[#6329](https://github.com/rubygems/rubygems/pull/6329) by martinemde
|
13
|
+
|
1
14
|
# 3.4.6 / 2023-01-31
|
2
15
|
|
3
16
|
## Enhancements:
|
data/Manifest.txt
CHANGED
@@ -205,7 +205,6 @@ bundler/lib/bundler/templates/Executable
|
|
205
205
|
bundler/lib/bundler/templates/Executable.bundler
|
206
206
|
bundler/lib/bundler/templates/Executable.standalone
|
207
207
|
bundler/lib/bundler/templates/Gemfile
|
208
|
-
bundler/lib/bundler/templates/gems.rb
|
209
208
|
bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
|
210
209
|
bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
|
211
210
|
bundler/lib/bundler/templates/newgem/Cargo.toml.tt
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# 2.4.7 (February 15, 2023)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Add `--gemfile` flag to `bundle init` to configure gemfile name to generate [#6046](https://github.com/rubygems/rubygems/pull/6046)
|
6
|
+
- Improve solve failure explanations by using better wording [#6366](https://github.com/rubygems/rubygems/pull/6366)
|
7
|
+
- Restore better error message when locked ref does not exist [#6356](https://github.com/rubygems/rubygems/pull/6356)
|
8
|
+
- Avoid crashing when installing from a corrupted lockfile [#6355](https://github.com/rubygems/rubygems/pull/6355)
|
9
|
+
- Improve wording of unmet dependencies warning [#6357](https://github.com/rubygems/rubygems/pull/6357)
|
10
|
+
- Add Ruby 3.2 and 3.3 platforms to Gemfile DSL [#6346](https://github.com/rubygems/rubygems/pull/6346)
|
11
|
+
|
12
|
+
## Bug fixes:
|
13
|
+
|
14
|
+
- Fix crash in pub grub involving empty ranges [#6365](https://github.com/rubygems/rubygems/pull/6365)
|
15
|
+
- Make gemspec file generated by `bundle gem` properly exclude itself from packaged gem [#6339](https://github.com/rubygems/rubygems/pull/6339)
|
16
|
+
- Preserve relative path sources in standalone setup [#6327](https://github.com/rubygems/rubygems/pull/6327)
|
17
|
+
|
1
18
|
# 2.4.6 (January 31, 2023)
|
2
19
|
|
3
20
|
## 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 = "2023-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2023-02-15".freeze
|
8
|
+
@git_commit_sha = "5d717a27e0".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -32,7 +32,7 @@ module Bundler
|
|
32
32
|
file << spec.to_gemfile
|
33
33
|
end
|
34
34
|
else
|
35
|
-
File.open(File.expand_path("../templates
|
35
|
+
File.open(File.expand_path("../templates/Gemfile", __dir__), "r") do |template|
|
36
36
|
File.open(gemfile, "wb") do |destination|
|
37
37
|
IO.copy_stream(template, destination)
|
38
38
|
end
|
@@ -45,7 +45,7 @@ module Bundler
|
|
45
45
|
private
|
46
46
|
|
47
47
|
def gemfile
|
48
|
-
@gemfile ||= Bundler.preferred_gemfile_name
|
48
|
+
@gemfile ||= options[:gemfile] || Bundler.preferred_gemfile_name
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -156,6 +156,7 @@ module Bundler
|
|
156
156
|
dependency listed in the gemspec file to the newly created Gemfile.
|
157
157
|
D
|
158
158
|
method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
|
159
|
+
method_option "gemfile", :type => :string, :banner => "Use the specified name for the gemfile instead of 'Gemfile'"
|
159
160
|
def init
|
160
161
|
require_relative "cli/init"
|
161
162
|
Init.new(options.dup).run
|
@@ -9,7 +9,7 @@ module Bundler
|
|
9
9
|
attr_reader :autorequire
|
10
10
|
attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref
|
11
11
|
|
12
|
-
ALL_RUBY_VERSIONS = ((18..27).to_a + (30..
|
12
|
+
ALL_RUBY_VERSIONS = ((18..27).to_a + (30..33).to_a).freeze
|
13
13
|
PLATFORM_MAP = {
|
14
14
|
:ruby => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
|
15
15
|
:mri => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
|
@@ -47,6 +47,13 @@ module Bundler
|
|
47
47
|
dependencies.all? {|d| installed_specs.include? d.name }
|
48
48
|
end
|
49
49
|
|
50
|
+
# Check whether spec's dependencies are missing, which can indicate a
|
51
|
+
# corrupted lockfile
|
52
|
+
def dependencies_missing?(all_specs)
|
53
|
+
spec_names = all_specs.map(&:name)
|
54
|
+
dependencies.any? {|d| !spec_names.include? d.name }
|
55
|
+
end
|
56
|
+
|
50
57
|
# Represents only the non-development dependencies, the ones that are
|
51
58
|
# itself and are in the total list.
|
52
59
|
def dependencies
|
@@ -110,12 +117,17 @@ module Bundler
|
|
110
117
|
|
111
118
|
warning = []
|
112
119
|
warning << "Your lockfile doesn't include a valid resolution."
|
113
|
-
warning << "You can fix this by regenerating your lockfile or
|
120
|
+
warning << "You can fix this by regenerating your lockfile or manually editing the bad locked gems to a version that satisfies all dependencies."
|
114
121
|
warning << "The unmet dependencies are:"
|
115
122
|
|
116
123
|
unmet_dependencies.each do |spec, unmet_spec_dependencies|
|
117
124
|
unmet_spec_dependencies.each do |unmet_spec_dependency|
|
118
|
-
|
125
|
+
found = @specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }
|
126
|
+
if found
|
127
|
+
warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}"
|
128
|
+
else
|
129
|
+
warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name} but missing from lockfile"
|
130
|
+
end
|
119
131
|
end
|
120
132
|
end
|
121
133
|
|
@@ -212,6 +224,8 @@ module Bundler
|
|
212
224
|
if spec.dependencies_installed? @specs
|
213
225
|
spec.state = :enqueued
|
214
226
|
worker_pool.enq spec
|
227
|
+
elsif spec.dependencies_missing? @specs
|
228
|
+
spec.state = :failed
|
215
229
|
end
|
216
230
|
end
|
217
231
|
end
|
@@ -52,7 +52,7 @@ module Bundler
|
|
52
52
|
|
53
53
|
def gem_path(path, spec)
|
54
54
|
full_path = Pathname.new(path).absolute? ? path : File.join(spec.full_gem_path, path)
|
55
|
-
if spec.source.instance_of?(Source::Path)
|
55
|
+
if spec.source.instance_of?(Source::Path) && spec.source.path.absolute?
|
56
56
|
full_path
|
57
57
|
else
|
58
58
|
Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
4
|
+
.TH "BUNDLE\-BINSTUBS" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CLEAN" "1" "
|
4
|
+
.TH "BUNDLE\-CLEAN" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CONSOLE" "1" "
|
4
|
+
.TH "BUNDLE\-CONSOLE" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INFO" "1" "
|
4
|
+
.TH "BUNDLE\-INFO" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-info\fR \- Show information for the given gem in your bundle
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INIT" "1" "
|
4
|
+
.TH "BUNDLE\-INIT" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
@@ -18,6 +18,10 @@ Init generates a default [\fBGemfile(5)\fR][Gemfile(5)] in the current working d
|
|
18
18
|
\fB\-\-gemspec\fR
|
19
19
|
Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
|
20
20
|
.
|
21
|
+
.TP
|
22
|
+
\fB\-\-gemfile\fR
|
23
|
+
Use the specified name for the gemfile instead of \fBGemfile\fR
|
24
|
+
.
|
21
25
|
.SH "FILES"
|
22
26
|
Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
|
23
27
|
.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OPEN" "1" "
|
4
|
+
.TH "BUNDLE\-OPEN" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
4
|
+
.TH "BUNDLE\-PLATFORM" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-VIZ" "1" "
|
4
|
+
.TH "BUNDLE\-VIZ" "1" "February 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
@@ -139,8 +139,8 @@ module Bundler
|
|
139
139
|
out, err, status = capture(command, path)
|
140
140
|
return out if status.success?
|
141
141
|
|
142
|
-
if err.include?("couldn't find remote ref")
|
143
|
-
raise MissingGitRevisionError.new(command_with_no_credentials, path, explicit_ref, credential_filtered_uri)
|
142
|
+
if err.include?("couldn't find remote ref") || err.include?("not our ref")
|
143
|
+
raise MissingGitRevisionError.new(command_with_no_credentials, path, commit || explicit_ref, credential_filtered_uri)
|
144
144
|
else
|
145
145
|
raise GitCommandError.new(command_with_no_credentials, path, err)
|
146
146
|
end
|
@@ -186,8 +186,6 @@ module Bundler
|
|
186
186
|
end
|
187
187
|
|
188
188
|
def refspec
|
189
|
-
commit = pinned_to_full_sha? ? ref : @revision
|
190
|
-
|
191
189
|
if commit
|
192
190
|
@commit_ref = "refs/#{commit}-sha"
|
193
191
|
return "#{commit}:#{@commit_ref}"
|
@@ -206,6 +204,10 @@ module Bundler
|
|
206
204
|
"#{reference}:#{reference}"
|
207
205
|
end
|
208
206
|
|
207
|
+
def commit
|
208
|
+
@commit ||= pinned_to_full_sha? ? ref : @revision
|
209
|
+
end
|
210
|
+
|
209
211
|
def fully_qualified_ref
|
210
212
|
if branch
|
211
213
|
"refs/heads/#{branch}"
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
30
|
spec.files = Dir.chdir(__dir__) do
|
31
31
|
`git ls-files -z`.split("\x0").reject do |f|
|
32
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
32
|
+
(File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
33
33
|
end
|
34
34
|
end
|
35
35
|
spec.bindir = "exe"
|
@@ -76,9 +76,13 @@ module Bundler::PubGrub
|
|
76
76
|
elsif terms.length == 1
|
77
77
|
term = terms[0]
|
78
78
|
if term.positive?
|
79
|
-
|
79
|
+
if term.constraint.any?
|
80
|
+
"#{term.package} cannot be used"
|
81
|
+
else
|
82
|
+
"#{term.to_s(allow_every: true)} cannot be used"
|
83
|
+
end
|
80
84
|
else
|
81
|
-
"#{
|
85
|
+
"#{term.invert} is required"
|
82
86
|
end
|
83
87
|
else
|
84
88
|
if terms.all?(&:positive?)
|
@@ -19,7 +19,14 @@ module Bundler::PubGrub
|
|
19
19
|
version = Gem::Version.new(version)
|
20
20
|
@packages[name] ||= {}
|
21
21
|
raise ArgumentError, "#{name} #{version} declared twice" if @packages[name].key?(version)
|
22
|
-
@packages[name][version] = deps
|
22
|
+
@packages[name][version] = clean_deps(name, version, deps)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
# Exclude redundant self-referencing dependencies
|
28
|
+
def clean_deps(name, version, deps)
|
29
|
+
deps.reject {|dep_name, req| name == dep_name && Bundler::PubGrub::RubyGems.parse_range(req).include?(version) }
|
23
30
|
end
|
24
31
|
end
|
25
32
|
|
@@ -15,15 +15,16 @@ module Bundler::PubGrub
|
|
15
15
|
package.hash ^ range.hash
|
16
16
|
end
|
17
17
|
|
18
|
+
def ==(other)
|
19
|
+
package == other.package &&
|
20
|
+
range == other.range
|
21
|
+
end
|
22
|
+
|
18
23
|
def eql?(other)
|
19
24
|
package.eql?(other.package) &&
|
20
25
|
range.eql?(other.range)
|
21
26
|
end
|
22
27
|
|
23
|
-
def ==(other)
|
24
|
-
package == other.package && range == other.range
|
25
|
-
end
|
26
|
-
|
27
28
|
class << self
|
28
29
|
def exact(package, version)
|
29
30
|
range = VersionRange.new(min: version, max: version, include_min: true, include_max: true)
|
@@ -19,7 +19,7 @@ module Bundler::PubGrub
|
|
19
19
|
true
|
20
20
|
end
|
21
21
|
|
22
|
-
def eql?
|
22
|
+
def eql?(other)
|
23
23
|
other.empty?
|
24
24
|
end
|
25
25
|
|
@@ -65,6 +65,7 @@ module Bundler::PubGrub
|
|
65
65
|
end
|
66
66
|
|
67
67
|
EMPTY = Empty.new
|
68
|
+
Empty.singleton_class.undef_method(:new)
|
68
69
|
|
69
70
|
def self.empty
|
70
71
|
EMPTY
|
@@ -88,7 +89,8 @@ module Bundler::PubGrub
|
|
88
89
|
|
89
90
|
def eql?(other)
|
90
91
|
if other.is_a?(VersionRange)
|
91
|
-
|
92
|
+
!other.empty? &&
|
93
|
+
min.eql?(other.min) &&
|
92
94
|
max.eql?(other.max) &&
|
93
95
|
include_min.eql?(other.include_min) &&
|
94
96
|
include_max.eql?(other.include_max)
|
@@ -125,6 +125,7 @@ module Bundler::PubGrub
|
|
125
125
|
package = next_package_to_try
|
126
126
|
unsatisfied_term = solution.unsatisfied.find { |t| t.package == package }
|
127
127
|
version = source.versions_for(package, unsatisfied_term.constraint.range).first
|
128
|
+
logger.debug { "attempting #{package} #{version}" }
|
128
129
|
|
129
130
|
if version.nil?
|
130
131
|
add_incompatibility source.no_versions_incompatibility_for(package, unsatisfied_term)
|
@@ -148,9 +149,11 @@ module Bundler::PubGrub
|
|
148
149
|
end
|
149
150
|
|
150
151
|
unless conflict
|
151
|
-
logger.info { "
|
152
|
+
logger.info { "selected #{package} #{version}" }
|
152
153
|
|
153
154
|
solution.decide(package, version)
|
155
|
+
else
|
156
|
+
logger.info { "conflict: #{conflict.inspect}" }
|
154
157
|
end
|
155
158
|
|
156
159
|
package
|
data/lib/rubygems/deprecate.rb
CHANGED
@@ -143,7 +143,7 @@ module Gem::Deprecate
|
|
143
143
|
end
|
144
144
|
|
145
145
|
# Deprecation method to deprecate Rubygems commands
|
146
|
-
def rubygems_deprecate_command
|
146
|
+
def rubygems_deprecate_command(version = Gem::Deprecate.next_rubygems_major_version)
|
147
147
|
class_eval do
|
148
148
|
define_method "deprecated?" do
|
149
149
|
true
|
@@ -151,7 +151,7 @@ module Gem::Deprecate
|
|
151
151
|
|
152
152
|
define_method "deprecation_warning" do
|
153
153
|
msg = [ "#{self.command} command is deprecated",
|
154
|
-
". It will be removed in Rubygems #{
|
154
|
+
". It will be removed in Rubygems #{version}.\n",
|
155
155
|
]
|
156
156
|
|
157
157
|
alert_warning "#{msg.join}" unless Gem::Deprecate.skip
|
@@ -130,9 +130,10 @@ class Gem::Package::TarReader::Entry
|
|
130
130
|
def read(len = nil)
|
131
131
|
check_closed
|
132
132
|
|
133
|
-
return nil if @read >= @header.size
|
134
|
-
|
135
133
|
len ||= @header.size - @read
|
134
|
+
|
135
|
+
return nil if len > 0 && @read >= @header.size
|
136
|
+
|
136
137
|
max_read = [len, @header.size - @read].min
|
137
138
|
|
138
139
|
ret = @io.read max_read
|
@@ -144,9 +145,10 @@ class Gem::Package::TarReader::Entry
|
|
144
145
|
def readpartial(maxlen = nil, outbuf = "".b)
|
145
146
|
check_closed
|
146
147
|
|
147
|
-
raise EOFError if @read >= @header.size
|
148
|
-
|
149
148
|
maxlen ||= @header.size - @read
|
149
|
+
|
150
|
+
raise EOFError if maxlen > 0 && @read >= @header.size
|
151
|
+
|
150
152
|
max_read = [maxlen, @header.size - @read].min
|
151
153
|
|
152
154
|
@io.readpartial(max_read, outbuf)
|
@@ -173,6 +173,7 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use:
|
|
173
173
|
end
|
174
174
|
|
175
175
|
##
|
176
|
+
# Checks that the gem does not depend on itself.
|
176
177
|
# Checks that dependencies use requirements as we recommend. Warnings are
|
177
178
|
# issued when dependencies are open-ended or overly strict for semantic
|
178
179
|
# versioning.
|
@@ -180,6 +181,10 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use:
|
|
180
181
|
def validate_dependencies # :nodoc:
|
181
182
|
warning_messages = []
|
182
183
|
@specification.dependencies.each do |dep|
|
184
|
+
if dep.name == @specification.name # warn on self reference
|
185
|
+
warning_messages << "Self referencing dependency is unnecessary and strongly discouraged."
|
186
|
+
end
|
187
|
+
|
183
188
|
prerelease_dep = dep.requirements_list.any? do |req|
|
184
189
|
Gem::Requirement.new(req).prerelease?
|
185
190
|
end
|
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.4.
|
5
|
+
s.version = "3.4.7"
|
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
|
|
@@ -371,4 +371,29 @@ class TestGemCommandManager < Gem::TestCase
|
|
371
371
|
ensure
|
372
372
|
Gem::Commands.send(:remove_const, :FooCommand)
|
373
373
|
end
|
374
|
+
|
375
|
+
def test_deprecated_command_with_version
|
376
|
+
require "rubygems/command"
|
377
|
+
foo_command = Class.new(Gem::Command) do
|
378
|
+
extend Gem::Deprecate
|
379
|
+
|
380
|
+
rubygems_deprecate_command("9.9.9")
|
381
|
+
|
382
|
+
def execute
|
383
|
+
say "pew pew!"
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
Gem::Commands.send(:const_set, :FooCommand, foo_command)
|
388
|
+
@command_manager.register_command(:foo, foo_command.new("foo"))
|
389
|
+
|
390
|
+
use_ui @ui do
|
391
|
+
@command_manager.process_args(%w[foo])
|
392
|
+
end
|
393
|
+
|
394
|
+
assert_equal "pew pew!\n", @ui.output
|
395
|
+
assert_match(/WARNING: foo command is deprecated. It will be removed in Rubygems 9.9.9/, @ui.error)
|
396
|
+
ensure
|
397
|
+
Gem::Commands.send(:remove_const, :FooCommand)
|
398
|
+
end
|
374
399
|
end
|
@@ -144,18 +144,18 @@ dependencies = [
|
|
144
144
|
|
145
145
|
[[package]]
|
146
146
|
name = "rb-sys"
|
147
|
-
version = "0.9.
|
147
|
+
version = "0.9.64"
|
148
148
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
149
|
-
checksum = "
|
149
|
+
checksum = "cc8945662df8083245deda89e236647173cc7ad750f481ddcd7bbfd3afe3fa5e"
|
150
150
|
dependencies = [
|
151
151
|
"rb-sys-build",
|
152
152
|
]
|
153
153
|
|
154
154
|
[[package]]
|
155
155
|
name = "rb-sys-build"
|
156
|
-
version = "0.9.
|
156
|
+
version = "0.9.64"
|
157
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
158
|
-
checksum = "
|
158
|
+
checksum = "ae8c3cdf9edc3908ee1555b7a1bca58ee1b499439b32cd1c1ec3e66736a8df48"
|
159
159
|
dependencies = [
|
160
160
|
"bindgen",
|
161
161
|
"regex",
|
@@ -125,6 +125,18 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|
125
125
|
assert_equal @contents, @entry.read
|
126
126
|
end
|
127
127
|
|
128
|
+
def test_consecutive_read
|
129
|
+
expected = StringIO.new(@contents)
|
130
|
+
assert_equal expected.read, @entry.read
|
131
|
+
assert_equal expected.read, @entry.read
|
132
|
+
end
|
133
|
+
|
134
|
+
def test_consecutive_read_bytes_past_eof
|
135
|
+
expected = StringIO.new(@contents)
|
136
|
+
assert_equal expected.read, @entry.read
|
137
|
+
assert_equal expected.read(1), @entry.read(1)
|
138
|
+
end
|
139
|
+
|
128
140
|
def test_read_big
|
129
141
|
assert_equal @contents, @entry.read(@contents.size * 2)
|
130
142
|
end
|
@@ -133,9 +145,24 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|
133
145
|
assert_equal @contents[0...100], @entry.read(100)
|
134
146
|
end
|
135
147
|
|
136
|
-
def
|
148
|
+
def test_read_remaining
|
149
|
+
@entry.read(100)
|
150
|
+
assert_equal @contents[100..-1], @entry.read
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_read_partial
|
154
|
+
assert_equal @contents[0...100], @entry.readpartial(100)
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_read_partial_buffer
|
158
|
+
buffer = "".b
|
159
|
+
@entry.readpartial(100, buffer)
|
160
|
+
assert_equal @contents[0...100], buffer
|
161
|
+
end
|
162
|
+
|
163
|
+
def test_readpartial_past_eof
|
164
|
+
@entry.readpartial(@contents.size)
|
137
165
|
assert_raise(EOFError) do
|
138
|
-
@entry.read(@contents.size)
|
139
166
|
@entry.readpartial(1)
|
140
167
|
end
|
141
168
|
end
|
@@ -149,4 +176,35 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|
149
176
|
|
150
177
|
assert_equal char, @entry.getc
|
151
178
|
end
|
179
|
+
|
180
|
+
def test_read_zero
|
181
|
+
expected = StringIO.new("")
|
182
|
+
assert_equal expected.read(0), @entry.read(0)
|
183
|
+
end
|
184
|
+
|
185
|
+
def test_readpartial_zero
|
186
|
+
expected = StringIO.new("")
|
187
|
+
assert_equal expected.readpartial(0), @entry.readpartial(0)
|
188
|
+
end
|
189
|
+
|
190
|
+
def util_zero_byte_entry
|
191
|
+
tar = String.new
|
192
|
+
tar << tar_file_header("lib/empty", "", 0, 0, Time.now)
|
193
|
+
tar << "\0" * (512 - (tar.size % 512))
|
194
|
+
util_entry tar
|
195
|
+
end
|
196
|
+
|
197
|
+
def test_zero_byte_file_read
|
198
|
+
zero_entry = util_zero_byte_entry
|
199
|
+
expected = StringIO.new("")
|
200
|
+
|
201
|
+
assert_equal expected.read, zero_entry.read
|
202
|
+
end
|
203
|
+
|
204
|
+
def test_zero_byte_file_readpartial
|
205
|
+
zero_entry = util_zero_byte_entry
|
206
|
+
expected = StringIO.new("")
|
207
|
+
|
208
|
+
assert_equal expected.readpartial(0), zero_entry.readpartial(0)
|
209
|
+
end
|
152
210
|
end
|
@@ -2677,6 +2677,23 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
|
|
2677
2677
|
end
|
2678
2678
|
end
|
2679
2679
|
|
2680
|
+
def test_validate_self_referencing_dependencies
|
2681
|
+
util_setup_validate
|
2682
|
+
|
2683
|
+
Dir.chdir @tempdir do
|
2684
|
+
@a1.add_runtime_dependency @a1.name, "1"
|
2685
|
+
|
2686
|
+
use_ui @ui do
|
2687
|
+
@a1.validate
|
2688
|
+
end
|
2689
|
+
|
2690
|
+
assert_equal <<-EXPECTED, @ui.error
|
2691
|
+
#{w}: Self referencing dependency is unnecessary and strongly discouraged.
|
2692
|
+
#{w}: See https://guides.rubygems.org/specification-reference/ for help
|
2693
|
+
EXPECTED
|
2694
|
+
end
|
2695
|
+
end
|
2696
|
+
|
2680
2697
|
def test_validate_rake_extension_have_rake_dependency_warning
|
2681
2698
|
util_setup_validate
|
2682
2699
|
|
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.4.
|
4
|
+
version: 3.4.7
|
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: 2023-
|
19
|
+
date: 2023-02-15 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
|
@@ -261,7 +261,6 @@ files:
|
|
261
261
|
- bundler/lib/bundler/templates/Executable.bundler
|
262
262
|
- bundler/lib/bundler/templates/Executable.standalone
|
263
263
|
- bundler/lib/bundler/templates/Gemfile
|
264
|
-
- bundler/lib/bundler/templates/gems.rb
|
265
264
|
- bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
|
266
265
|
- bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
|
267
266
|
- bundler/lib/bundler/templates/newgem/Cargo.toml.tt
|
@@ -834,7 +833,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
834
833
|
- !ruby/object:Gem::Version
|
835
834
|
version: '0'
|
836
835
|
requirements: []
|
837
|
-
rubygems_version: 3.4.
|
836
|
+
rubygems_version: 3.4.7
|
838
837
|
signing_key:
|
839
838
|
specification_version: 4
|
840
839
|
summary: RubyGems is a package management framework for Ruby.
|