rubygems-update 3.4.15 → 3.4.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 +18 -0
- data/bundler/CHANGELOG.md +22 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/definition.rb +4 -3
- data/bundler/lib/bundler/feature_flag.rb +0 -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 -4
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -3
- 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 +1 -1
- 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 +2 -2
- data/bundler/lib/bundler/man/gemfile.5.ronn +1 -1
- data/bundler/lib/bundler/settings.rb +0 -1
- data/bundler/lib/bundler/source/git/git_proxy.rb +31 -13
- data/bundler/lib/bundler/source/git.rb +33 -14
- data/bundler/lib/bundler/source/rubygems.rb +1 -0
- data/bundler/lib/bundler/source.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/resolver/installer_set.rb +3 -1
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_dependency_installer.rb +34 -0
- data/test/rubygems/test_gem_request.rb +9 -4
- 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: 1dce699162c0d7d3dcb1a7e343a35614d1e4a0e872a86e3633aeeb67e4bd6cfd
|
4
|
+
data.tar.gz: 9a2b166b3a6e8b305be3a8b0de810e42b76f863276076febcad876320178add0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01516f536a455a206fdcafcf3f6122d59329afbe037aca75e1caf46ea806ed51e20b6b18c6cbd23753ad9e416d30941dfd5db44aed9bbe58bfa29e8b6ad6cbaf
|
7
|
+
data.tar.gz: a602c953644e0484737428608fdf934d4cae92e3861cf107c71aae59446d82f719d2babe14eb14d0495ff4e4ab49bc39751160808a9a65440fd5aafc66e649b9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
# 3.4.17 / 2023-07-14
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Installs bundler 2.4.17 as a default gem.
|
6
|
+
|
7
|
+
## Performance:
|
8
|
+
|
9
|
+
* Avoid unnecessary work for private local gem installation. Pull request
|
10
|
+
[#6810](https://github.com/rubygems/rubygems/pull/6810) by
|
11
|
+
deivid-rodriguez
|
12
|
+
|
13
|
+
# 3.4.16 / 2023-07-10
|
14
|
+
|
15
|
+
## Enhancements:
|
16
|
+
|
17
|
+
* Installs bundler 2.4.16 as a default gem.
|
18
|
+
|
1
19
|
# 3.4.15 / 2023-06-29
|
2
20
|
|
3
21
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
# 2.4.17 (July 14, 2023)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Avoid printing "Using ..." messages when version has not changed [#6804](https://github.com/rubygems/rubygems/pull/6804)
|
6
|
+
|
7
|
+
## Bug fixes:
|
8
|
+
|
9
|
+
- Fix `bundler/setup` unintendedly writing to the filesystem [#6814](https://github.com/rubygems/rubygems/pull/6814)
|
10
|
+
|
11
|
+
# 2.4.16 (July 10, 2023)
|
12
|
+
|
13
|
+
## Bug fixes:
|
14
|
+
|
15
|
+
- Exclude Bundler from missing locked dependencies check [#6792](https://github.com/rubygems/rubygems/pull/6792)
|
16
|
+
- Fix another incorrect removal of "ruby" platform from lockfile when changing path sources [#6784](https://github.com/rubygems/rubygems/pull/6784)
|
17
|
+
- Fix git source lockfile instability [#6786](https://github.com/rubygems/rubygems/pull/6786)
|
18
|
+
|
19
|
+
## Documentation:
|
20
|
+
|
21
|
+
- `gemfile.5`: Code format the default glob to escape Markdown [#6790](https://github.com/rubygems/rubygems/pull/6790)
|
22
|
+
|
1
23
|
# 2.4.15 (June 29, 2023)
|
2
24
|
|
3
25
|
## 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-07-14".freeze
|
8
|
+
@git_commit_sha = "36ea2bc283".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -394,8 +394,8 @@ module Bundler
|
|
394
394
|
lock_source = lock_dep.source || sources.default_source
|
395
395
|
next if lock_source.include?(gemfile_source)
|
396
396
|
|
397
|
-
gemfile_source_name = dep.source ? gemfile_source.
|
398
|
-
lockfile_source_name = lock_dep.source ? lock_source.
|
397
|
+
gemfile_source_name = dep.source ? gemfile_source.to_gemfile : "no specified source"
|
398
|
+
lockfile_source_name = lock_dep.source ? lock_source.to_gemfile : "no specified source"
|
399
399
|
changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
|
400
400
|
end
|
401
401
|
|
@@ -700,7 +700,7 @@ module Bundler
|
|
700
700
|
return if @dependency_changes
|
701
701
|
|
702
702
|
current_dependencies.find do |d|
|
703
|
-
@locked_specs[d.name].empty?
|
703
|
+
@locked_specs[d.name].empty? && d.name != "bundler"
|
704
704
|
end&.name
|
705
705
|
end
|
706
706
|
|
@@ -941,6 +941,7 @@ module Bundler
|
|
941
941
|
Bundler.local_platform == Gem::Platform::RUBY ||
|
942
942
|
!platforms.include?(Gem::Platform::RUBY) ||
|
943
943
|
(@new_platform && platforms.last == Gem::Platform::RUBY) ||
|
944
|
+
@path_changes ||
|
944
945
|
@dependency_changes ||
|
945
946
|
!@originally_locked_specs.incomplete_ruby_specs?(dependencies)
|
946
947
|
|
@@ -37,7 +37,6 @@ module Bundler
|
|
37
37
|
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
|
38
38
|
settings_flag(:print_only_version_number) { bundler_3_mode? }
|
39
39
|
settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
|
40
|
-
settings_flag(:suppress_install_using_messages) { bundler_3_mode? }
|
41
40
|
settings_flag(:update_requires_all_flag) { bundler_4_mode? }
|
42
41
|
|
43
42
|
settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
|
@@ -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" "July 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" "July 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" "July 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\-CONFIG" "1" "
|
4
|
+
.TH "BUNDLE\-CONFIG" "1" "July 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-config\fR \- Set bundler configuration options
|
@@ -284,9 +284,6 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
284
284
|
\fBssl_verify_mode\fR (\fBBUNDLE_SSL_VERIFY_MODE\fR): The SSL verification mode Bundler uses when making HTTPS requests\. Defaults to verify peer\.
|
285
285
|
.
|
286
286
|
.IP "\(bu" 4
|
287
|
-
\fBsuppress_install_using_messages\fR (\fBBUNDLE_SUPPRESS_INSTALL_USING_MESSAGES\fR): Avoid printing \fBUsing \.\.\.\fR messages during installation when the version of a gem has not changed\.
|
288
|
-
.
|
289
|
-
.IP "\(bu" 4
|
290
287
|
\fBsystem_bindir\fR (\fBBUNDLE_SYSTEM_BINDIR\fR): The location where RubyGems installs binstubs\. Defaults to \fBGem\.bindir\fR\.
|
291
288
|
.
|
292
289
|
.IP "\(bu" 4
|
@@ -265,9 +265,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
|
|
265
265
|
* `ssl_verify_mode` (`BUNDLE_SSL_VERIFY_MODE`):
|
266
266
|
The SSL verification mode Bundler uses when making HTTPS requests.
|
267
267
|
Defaults to verify peer.
|
268
|
-
* `suppress_install_using_messages` (`BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES`):
|
269
|
-
Avoid printing `Using ...` messages during installation when the version of
|
270
|
-
a gem has not changed.
|
271
268
|
* `system_bindir` (`BUNDLE_SYSTEM_BINDIR`):
|
272
269
|
The location where RubyGems installs binstubs. Defaults to `Gem.bindir`.
|
273
270
|
* `timeout` (`BUNDLE_TIMEOUT`):
|
@@ -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" "July 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\-INIT" "1" "
|
4
|
+
.TH "BUNDLE\-INIT" "1" "July 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working 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\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "July 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" "July 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" "July 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" "July 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" "July 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" "July 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" "July 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" "July 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 "GEMFILE" "5" "
|
4
|
+
.TH "GEMFILE" "5" "July 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
@@ -702,7 +702,7 @@ If you wish to use Bundler to help install dependencies for a gem while it is be
|
|
702
702
|
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
|
703
703
|
.
|
704
704
|
.P
|
705
|
-
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to:
|
705
|
+
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
|
706
706
|
.
|
707
707
|
.P
|
708
708
|
When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
|
@@ -514,7 +514,7 @@ paths.
|
|
514
514
|
|
515
515
|
The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
|
516
516
|
options, which control where bundler looks for the `.gemspec`, the glob it uses to look
|
517
|
-
for the gemspec (defaults to:
|
517
|
+
for the gemspec (defaults to: `{,*,*/*}.gemspec`), what named `.gemspec` it uses
|
518
518
|
(if more than one is present), and which group development dependencies are included in.
|
519
519
|
|
520
520
|
When a `gemspec` dependency encounters version conflicts during resolution, the
|
@@ -67,8 +67,8 @@ module Bundler
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def current_branch
|
70
|
-
@current_branch ||=
|
71
|
-
|
70
|
+
@current_branch ||= with_path do
|
71
|
+
git_local("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -84,7 +84,7 @@ module Bundler
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def full_version
|
87
|
-
@full_version ||=
|
87
|
+
@full_version ||= git_local("--version").sub(/git version\s*/, "").strip
|
88
88
|
end
|
89
89
|
|
90
90
|
def checkout
|
@@ -253,15 +253,15 @@ module Bundler
|
|
253
253
|
end
|
254
254
|
|
255
255
|
def git(*command, dir: nil)
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, err) unless status.success?
|
261
|
-
|
262
|
-
Bundler.ui.warn err unless err.empty?
|
256
|
+
run_command(*command, :dir => dir) do |unredacted_command|
|
257
|
+
check_allowed(unredacted_command)
|
258
|
+
end
|
259
|
+
end
|
263
260
|
|
264
|
-
|
261
|
+
def git_local(*command, dir: nil)
|
262
|
+
run_command(*command, :dir => dir) do |unredacted_command|
|
263
|
+
redact_and_check_presence(unredacted_command)
|
264
|
+
end
|
265
265
|
end
|
266
266
|
|
267
267
|
def has_revision_cached?
|
@@ -330,12 +330,30 @@ module Bundler
|
|
330
330
|
end
|
331
331
|
|
332
332
|
def check_allowed(command)
|
333
|
-
|
334
|
-
command_with_no_credentials = URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
|
333
|
+
command_with_no_credentials = redact_and_check_presence(command)
|
335
334
|
raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
|
336
335
|
command_with_no_credentials
|
337
336
|
end
|
338
337
|
|
338
|
+
def redact_and_check_presence(command)
|
339
|
+
raise GitNotInstalledError.new unless Bundler.git_present?
|
340
|
+
|
341
|
+
require "shellwords"
|
342
|
+
URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
|
343
|
+
end
|
344
|
+
|
345
|
+
def run_command(*command, dir: nil)
|
346
|
+
command_with_no_credentials = yield(command)
|
347
|
+
|
348
|
+
out, err, status = capture(command, dir)
|
349
|
+
|
350
|
+
raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, err) unless status.success?
|
351
|
+
|
352
|
+
Bundler.ui.warn err unless err.empty?
|
353
|
+
|
354
|
+
out
|
355
|
+
end
|
356
|
+
|
339
357
|
def capture(cmd, dir, ignore_err: false)
|
340
358
|
SharedHelpers.with_clean_git_env do
|
341
359
|
require "open3"
|
@@ -46,6 +46,14 @@ module Bundler
|
|
46
46
|
out << " specs:\n"
|
47
47
|
end
|
48
48
|
|
49
|
+
def to_gemfile
|
50
|
+
specifiers = %w[ref branch tag submodules glob].map do |opt|
|
51
|
+
"#{opt}: #{options[opt]}" if options[opt]
|
52
|
+
end
|
53
|
+
|
54
|
+
uri_with_specifiers(specifiers)
|
55
|
+
end
|
56
|
+
|
49
57
|
def hash
|
50
58
|
[self.class, uri, ref, branch, name, version, glob, submodules].hash
|
51
59
|
end
|
@@ -61,26 +69,23 @@ module Bundler
|
|
61
69
|
|
62
70
|
def to_s
|
63
71
|
begin
|
64
|
-
at =
|
65
|
-
path
|
66
|
-
elsif user_ref = options["ref"]
|
67
|
-
if /\A[a-z0-9]{4,}\z/i.match?(ref)
|
68
|
-
shortref_for_display(user_ref)
|
69
|
-
else
|
70
|
-
user_ref
|
71
|
-
end
|
72
|
-
elsif ref
|
73
|
-
ref
|
74
|
-
else
|
75
|
-
current_branch
|
76
|
-
end
|
72
|
+
at = humanized_ref || current_branch
|
77
73
|
|
78
74
|
rev = "at #{at}@#{shortref_for_display(revision)}"
|
79
75
|
rescue GitError
|
80
76
|
""
|
81
77
|
end
|
82
78
|
|
83
|
-
|
79
|
+
uri_with_specifiers([rev, glob_for_display])
|
80
|
+
end
|
81
|
+
|
82
|
+
def identifier
|
83
|
+
uri_with_specifiers([humanized_ref, cached_revision, glob_for_display])
|
84
|
+
end
|
85
|
+
|
86
|
+
def uri_with_specifiers(specifiers)
|
87
|
+
specifiers.compact!
|
88
|
+
|
84
89
|
suffix =
|
85
90
|
if specifiers.any?
|
86
91
|
" (#{specifiers.join(", ")})"
|
@@ -243,6 +248,20 @@ module Bundler
|
|
243
248
|
|
244
249
|
private
|
245
250
|
|
251
|
+
def humanized_ref
|
252
|
+
if local?
|
253
|
+
path
|
254
|
+
elsif user_ref = options["ref"]
|
255
|
+
if /\A[a-z0-9]{4,}\z/i.match?(ref)
|
256
|
+
shortref_for_display(user_ref)
|
257
|
+
else
|
258
|
+
user_ref
|
259
|
+
end
|
260
|
+
elsif ref
|
261
|
+
ref
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
246
265
|
def serialize_gemspecs_in(destination)
|
247
266
|
destination = destination.expand_path(Bundler.root) if destination.relative?
|
248
267
|
Dir["#{destination}/#{@glob}"].each do |spec_path|
|
@@ -100,7 +100,7 @@ module Bundler
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def print_using_message(message)
|
103
|
-
if !message.include?("(was ")
|
103
|
+
if !message.include?("(was ")
|
104
104
|
Bundler.ui.debug message
|
105
105
|
else
|
106
106
|
Bundler.ui.info message
|
@@ -147,6 +147,8 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
147
147
|
res << Gem::Resolver::InstalledSpecification.new(self, gemspec)
|
148
148
|
end unless @ignore_installed
|
149
149
|
|
150
|
+
matching_local = []
|
151
|
+
|
150
152
|
if consider_local?
|
151
153
|
matching_local = @local.values.select do |spec, _|
|
152
154
|
req.match? spec
|
@@ -167,7 +169,7 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
167
169
|
end
|
168
170
|
end
|
169
171
|
|
170
|
-
res.concat @remote_set.find_all req if consider_remote?
|
172
|
+
res.concat @remote_set.find_all req if consider_remote? && matching_local.empty?
|
171
173
|
|
172
174
|
res
|
173
175
|
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.17"
|
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
|
|
@@ -475,6 +475,40 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
475
475
|
assert_equal %w[b-1], inst.installed_gems.map {|s| s.full_name }
|
476
476
|
end
|
477
477
|
|
478
|
+
def test_install_local_dependency_no_network_for_target_gem
|
479
|
+
a1, a1_gem = util_gem "a", "1"
|
480
|
+
_, b1_gem = util_gem "b", "1" do |s|
|
481
|
+
s.add_dependency "a"
|
482
|
+
end
|
483
|
+
|
484
|
+
util_setup_spec_fetcher(a1)
|
485
|
+
|
486
|
+
a1_data = Gem.read_binary(a1_gem)
|
487
|
+
@fetcher.data["http://gems.example.com/gems/a-1.gem"] = a1_data
|
488
|
+
|
489
|
+
# compact index is available
|
490
|
+
compact_index_response = Net::HTTPResponse.new "1.1", 200, "OK"
|
491
|
+
compact_index_response.uri = URI("http://gems.example.com")
|
492
|
+
@fetcher.data["http://gems.example.com/"] = compact_index_response
|
493
|
+
|
494
|
+
# but private local gem not present there
|
495
|
+
@fetcher.data["http://gems.example.com/info/b"] =
|
496
|
+
proc do
|
497
|
+
raise "should not happen"
|
498
|
+
end
|
499
|
+
|
500
|
+
FileUtils.mv b1_gem, @tempdir
|
501
|
+
|
502
|
+
inst = nil
|
503
|
+
|
504
|
+
Dir.chdir @tempdir do
|
505
|
+
inst = Gem::DependencyInstaller.new
|
506
|
+
inst.install "b-1.gem"
|
507
|
+
end
|
508
|
+
|
509
|
+
assert_equal %w[a-1 b-1], inst.installed_gems.map(&:full_name)
|
510
|
+
end
|
511
|
+
|
478
512
|
def test_install_local_subdir
|
479
513
|
util_setup_gems
|
480
514
|
|
@@ -2,7 +2,6 @@
|
|
2
2
|
require_relative "helper"
|
3
3
|
require "rubygems/request"
|
4
4
|
require "ostruct"
|
5
|
-
require "base64"
|
6
5
|
|
7
6
|
unless Gem::HAVE_OPENSSL
|
8
7
|
warn "Skipping Gem::Request tests. openssl not found."
|
@@ -20,6 +19,12 @@ class TestGemRequest < Gem::TestCase
|
|
20
19
|
Gem::Request.create_with_proxy uri, request_class, last_modified, proxy
|
21
20
|
end
|
22
21
|
|
22
|
+
# This method is same code as Base64.encode64
|
23
|
+
# We should not use Base64.encode64 because we need to avoid gem activation.
|
24
|
+
def base64_encode64(bin)
|
25
|
+
[bin].pack("m")
|
26
|
+
end
|
27
|
+
|
23
28
|
def setup
|
24
29
|
@proxies = %w[http_proxy https_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
|
25
30
|
@old_proxies = @proxies.map {|k| ENV[k] }
|
@@ -208,7 +213,7 @@ class TestGemRequest < Gem::TestCase
|
|
208
213
|
end
|
209
214
|
|
210
215
|
auth_header = conn.payload["Authorization"]
|
211
|
-
assert_equal "Basic #{
|
216
|
+
assert_equal "Basic #{base64_encode64('user:pass')}".strip, auth_header
|
212
217
|
assert_includes @ui.output, "GET https://user:REDACTED@example.rubygems/specs.#{Gem.marshal_version}"
|
213
218
|
end
|
214
219
|
|
@@ -225,7 +230,7 @@ class TestGemRequest < Gem::TestCase
|
|
225
230
|
end
|
226
231
|
|
227
232
|
auth_header = conn.payload["Authorization"]
|
228
|
-
assert_equal "Basic #{
|
233
|
+
assert_equal "Basic #{base64_encode64('user:{DEScede}pass')}".strip, auth_header
|
229
234
|
assert_includes @ui.output, "GET https://user:REDACTED@example.rubygems/specs.#{Gem.marshal_version}"
|
230
235
|
end
|
231
236
|
|
@@ -242,7 +247,7 @@ class TestGemRequest < Gem::TestCase
|
|
242
247
|
end
|
243
248
|
|
244
249
|
auth_header = conn.payload["Authorization"]
|
245
|
-
assert_equal "Basic #{
|
250
|
+
assert_equal "Basic #{base64_encode64('{DEScede}pass:x-oauth-basic')}".strip, auth_header
|
246
251
|
assert_includes @ui.output, "GET https://REDACTED:x-oauth-basic@example.rubygems/specs.#{Gem.marshal_version}"
|
247
252
|
end
|
248
253
|
|
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.17
|
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-07-14 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
|
@@ -843,7 +843,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
843
843
|
- !ruby/object:Gem::Version
|
844
844
|
version: '0'
|
845
845
|
requirements: []
|
846
|
-
rubygems_version: 3.4.
|
846
|
+
rubygems_version: 3.4.17
|
847
847
|
signing_key:
|
848
848
|
specification_version: 4
|
849
849
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|