rubygems-update 3.4.16 → 3.4.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be48b13a32b3121b742f3e75a1875f23a0c96137968ffef4f1473f4b95f786d3
4
- data.tar.gz: 9cad526787941e6a6d773b964245a3303f392eee8850dfa0f8de69c33f1fc191
3
+ metadata.gz: 1dce699162c0d7d3dcb1a7e343a35614d1e4a0e872a86e3633aeeb67e4bd6cfd
4
+ data.tar.gz: 9a2b166b3a6e8b305be3a8b0de810e42b76f863276076febcad876320178add0
5
5
  SHA512:
6
- metadata.gz: fbc3f7cfd6a239b7acdef9cc4557a62a3552357b0f87f5125f8348a4f2092201700d573089ed7de7cee44f556b9b3ca672b958e36757303e4605cbca66adae8e
7
- data.tar.gz: 5fb7a1868602b74e427a48059d9d1aba9e11ab145f1d2e707f5303efc3468b76a5b9e9d05912dac17c46c32d752bd8ea61e13fa25f9bf2f8a5c10ca93f3e8fc0
6
+ metadata.gz: 01516f536a455a206fdcafcf3f6122d59329afbe037aca75e1caf46ea806ed51e20b6b18c6cbd23753ad9e416d30941dfd5db44aed9bbe58bfa29e8b6ad6cbaf
7
+ data.tar.gz: a602c953644e0484737428608fdf934d4cae92e3861cf107c71aae59446d82f719d2babe14eb14d0495ff4e4ab49bc39751160808a9a65440fd5aafc66e649b9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
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
+
1
13
  # 3.4.16 / 2023-07-10
2
14
 
3
15
  ## Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
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
+
1
11
  # 2.4.16 (July 10, 2023)
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 = "2023-07-10".freeze
8
- @git_commit_sha = "bd573c7f8b".freeze
7
+ @built_at = "2023-07-14".freeze
8
+ @git_commit_sha = "36ea2bc283".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -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 }
@@ -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`):
@@ -43,7 +43,6 @@ module Bundler
43
43
  setup_makes_kernel_gem_public
44
44
  silence_deprecations
45
45
  silence_root_warning
46
- suppress_install_using_messages
47
46
  update_requires_all_flag
48
47
  ].freeze
49
48
 
@@ -69,19 +69,7 @@ module Bundler
69
69
 
70
70
  def to_s
71
71
  begin
72
- at = if local?
73
- path
74
- elsif user_ref = options["ref"]
75
- if /\A[a-z0-9]{4,}\z/i.match?(ref)
76
- shortref_for_display(user_ref)
77
- else
78
- user_ref
79
- end
80
- elsif ref
81
- ref
82
- else
83
- current_branch
84
- end
72
+ at = humanized_ref || current_branch
85
73
 
86
74
  rev = "at #{at}@#{shortref_for_display(revision)}"
87
75
  rescue GitError
@@ -91,6 +79,10 @@ module Bundler
91
79
  uri_with_specifiers([rev, glob_for_display])
92
80
  end
93
81
 
82
+ def identifier
83
+ uri_with_specifiers([humanized_ref, cached_revision, glob_for_display])
84
+ end
85
+
94
86
  def uri_with_specifiers(specifiers)
95
87
  specifiers.compact!
96
88
 
@@ -256,6 +248,20 @@ module Bundler
256
248
 
257
249
  private
258
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
+
259
265
  def serialize_gemspecs_in(destination)
260
266
  destination = destination.expand_path(Bundler.root) if destination.relative?
261
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 ") && Bundler.feature_flag.suppress_install_using_messages?
103
+ if !message.include?("(was ")
104
104
  Bundler.ui.debug message
105
105
  else
106
106
  Bundler.ui.info message
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.4.16".freeze
4
+ VERSION = "2.4.17".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -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
@@ -8,7 +8,7 @@
8
8
  require "rbconfig"
9
9
 
10
10
  module Gem
11
- VERSION = "3.4.16"
11
+ VERSION = "3.4.17"
12
12
  end
13
13
 
14
14
  # Must be first since it unloads the prelude from 1.9.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.4.16"
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 #{Base64.encode64('user:pass')}".strip, auth_header
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 #{Base64.encode64('user:{DEScede}pass')}".strip, auth_header
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 #{Base64.encode64('{DEScede}pass:x-oauth-basic')}".strip, auth_header
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.16
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-07-10 00:00:00.000000000 Z
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.16
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