rubygems-update 3.6.7 → 3.6.9

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.
@@ -92,7 +92,8 @@ The push command will use ~/.gem/credentials to authenticate to a server, but yo
92
92
  private
93
93
 
94
94
  def send_push_request(name, args)
95
- rubygems_api_request(*args, scope: get_push_scope) do |request|
95
+ scope = get_push_scope
96
+ rubygems_api_request(*args, scope: scope) do |request|
96
97
  body = Gem.read_binary name
97
98
  if options[:attestations].any?
98
99
  request.set_form([
@@ -7,7 +7,6 @@
7
7
  #++
8
8
 
9
9
  require_relative "../user_interaction"
10
- require_relative "../shellwords"
11
10
 
12
11
  class Gem::Ext::Builder
13
12
  include Gem::UserInteraction
@@ -29,7 +28,7 @@ class Gem::Ext::Builder
29
28
  target_rbconfig["configure_args"] =~ /with-make-prog\=(\w+)/
30
29
  make_program_name = ENV["MAKE"] || ENV["make"] || $1
31
30
  make_program_name ||= RUBY_PLATFORM.include?("mswin") ? "nmake" : "make"
32
- make_program = Shellwords.split(make_program_name)
31
+ make_program = shellsplit(make_program_name)
33
32
 
34
33
  # The installation of the bundled gems is failed when DESTDIR is empty in mswin platform.
35
34
  destdir = /\bnmake/i !~ make_program_name || ENV["DESTDIR"] && ENV["DESTDIR"] != "" ? format("DESTDIR=%s", ENV["DESTDIR"]) : ""
@@ -58,7 +57,7 @@ class Gem::Ext::Builder
58
57
 
59
58
  def self.ruby
60
59
  # Gem.ruby is quoted if it contains whitespace
61
- cmd = Shellwords.split(Gem.ruby)
60
+ cmd = shellsplit(Gem.ruby)
62
61
 
63
62
  # This load_path is only needed when running rubygems test without a proper installation.
64
63
  # Prepending it in a normal installation will cause problem with order of $LOAD_PATH.
@@ -83,7 +82,7 @@ class Gem::Ext::Builder
83
82
  p(command)
84
83
  end
85
84
  results << "current directory: #{dir}"
86
- results << Shellwords.join(command)
85
+ results << shelljoin(command)
87
86
 
88
87
  require "open3"
89
88
  # Set $SOURCE_DATE_EPOCH for the subprocess.
@@ -127,6 +126,18 @@ class Gem::Ext::Builder
127
126
  end
128
127
  end
129
128
 
129
+ def self.shellsplit(command)
130
+ require "shellwords"
131
+
132
+ Shellwords.split(command)
133
+ end
134
+
135
+ def self.shelljoin(command)
136
+ require "shellwords"
137
+
138
+ Shellwords.join(command)
139
+ end
140
+
130
141
  ##
131
142
  # Creates a new extension builder for +spec+. If the +spec+ does not yet
132
143
  # have build arguments, saved, set +build_args+ which is an ARGV-style
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../shellwords"
4
-
5
3
  # This class is used by rubygems to build Rust extensions. It is a thin-wrapper
6
4
  # over the `cargo rustc` command which takes care of building Rust code in a way
7
5
  # that Ruby can use.
@@ -159,7 +157,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
159
157
  # We want to use the same linker that Ruby uses, so that the linker flags from
160
158
  # mkmf work properly.
161
159
  def linker_args
162
- cc_flag = Shellwords.split(makefile_config("CC"))
160
+ cc_flag = self.class.shellsplit(makefile_config("CC"))
163
161
  linker = cc_flag.shift
164
162
  link_args = cc_flag.flat_map {|a| ["-C", "link-arg=#{a}"] }
165
163
 
@@ -178,7 +176,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
178
176
 
179
177
  def libruby_args(dest_dir)
180
178
  libs = makefile_config(ruby_static? ? "LIBRUBYARG_STATIC" : "LIBRUBYARG_SHARED")
181
- raw_libs = Shellwords.split(libs)
179
+ raw_libs = self.class.shellsplit(libs)
182
180
  raw_libs.flat_map {|l| ldflag_to_link_modifier(l) }
183
181
  end
184
182
 
@@ -261,7 +259,7 @@ EOF
261
259
  end
262
260
 
263
261
  def split_flags(var)
264
- Shellwords.split(RbConfig::CONFIG.fetch(var, ""))
262
+ self.class.shellsplit(RbConfig::CONFIG.fetch(var, ""))
265
263
  end
266
264
 
267
265
  def ldflag_to_link_modifier(arg)
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../shellwords"
4
-
5
3
  #--
6
4
  # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
7
5
  # All rights reserved.
@@ -22,7 +20,7 @@ class Gem::Ext::RakeBuilder < Gem::Ext::Builder
22
20
  rake = ENV["rake"]
23
21
 
24
22
  if rake
25
- rake = Shellwords.split(rake)
23
+ rake = shellsplit(rake)
26
24
  else
27
25
  begin
28
26
  rake = ruby << "-rrubygems" << Gem.bin_path("rake", "rake")
@@ -263,7 +263,10 @@ module Gem::GemcutterUtilities
263
263
  port = server.addr[1].to_s
264
264
 
265
265
  url_with_port = "#{webauthn_url}?port=#{port}"
266
- say "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device. If you can't verify using WebAuthn but have OTP enabled, you can re-run the gem signin command with the `--otp [your_code]` option."
266
+ say "You have enabled multi-factor authentication. Please visit the following URL to authenticate via security device. If you can't verify using WebAuthn but have OTP enabled, you can re-run the gem signin command with the `--otp [your_code]` option."
267
+ say ""
268
+ say url_with_port
269
+ say ""
267
270
 
268
271
  threads = [WebauthnListener.listener_thread(host, server), WebauthnPoller.poll_thread(options, host, webauthn_url, credentials)]
269
272
  otp_thread = wait_for_otp_thread(*threads)
@@ -95,10 +95,11 @@ class Gem::Package::TarWriter
95
95
  end
96
96
 
97
97
  ##
98
- # Adds file +name+ with permissions +mode+, and yields an IO for writing the
99
- # file to
98
+ # Adds file +name+ with permissions +mode+ and mtime +mtime+ (sets
99
+ # Gem.source_date_epoch if not specified), and yields an IO for
100
+ # writing the file to
100
101
 
101
- def add_file(name, mode) # :yields: io
102
+ def add_file(name, mode, mtime=nil) # :yields: io
102
103
  check_closed
103
104
 
104
105
  name, prefix = split_name name
@@ -118,7 +119,7 @@ class Gem::Package::TarWriter
118
119
 
119
120
  header = Gem::Package::TarHeader.new name: name, mode: mode,
120
121
  size: size, prefix: prefix,
121
- mtime: Gem.source_date_epoch
122
+ mtime: mtime || Gem.source_date_epoch
122
123
 
123
124
  @io.write header
124
125
  @io.pos = final_pos
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.6.7"
12
+ VERSION = "3.6.9"
13
13
  end
14
14
 
15
15
  # 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.6.7"
5
+ s.version = "3.6.9"
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
 
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.6.7
4
+ version: 3.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -111,6 +111,8 @@ files:
111
111
  - bundler/lib/bundler/cli/config.rb
112
112
  - bundler/lib/bundler/cli/console.rb
113
113
  - bundler/lib/bundler/cli/doctor.rb
114
+ - bundler/lib/bundler/cli/doctor/diagnose.rb
115
+ - bundler/lib/bundler/cli/doctor/ssl.rb
114
116
  - bundler/lib/bundler/cli/exec.rb
115
117
  - bundler/lib/bundler/cli/fund.rb
116
118
  - bundler/lib/bundler/cli/gem.rb
@@ -603,7 +605,6 @@ files:
603
605
  - lib/rubygems/security/signer.rb
604
606
  - lib/rubygems/security/trust_dir.rb
605
607
  - lib/rubygems/security_option.rb
606
- - lib/rubygems/shellwords.rb
607
608
  - lib/rubygems/source.rb
608
609
  - lib/rubygems/source/git.rb
609
610
  - lib/rubygems/source/installed.rb
@@ -747,7 +748,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
747
748
  - !ruby/object:Gem::Version
748
749
  version: '0'
749
750
  requirements: []
750
- rubygems_version: 3.6.7
751
+ rubygems_version: 3.6.9
751
752
  specification_version: 4
752
753
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded
753
754
  and installed by `gem update --system`, so that the `gem` CLI can update itself.
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- autoload :Shellwords, "shellwords"