rubygems-update 3.6.5 → 3.6.6

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/bundler/CHANGELOG.md +27 -0
  4. data/bundler/lib/bundler/build_metadata.rb +2 -2
  5. data/bundler/lib/bundler/checksum.rb +1 -1
  6. data/bundler/lib/bundler/cli/doctor.rb +14 -14
  7. data/bundler/lib/bundler/cli/inject.rb +2 -2
  8. data/bundler/lib/bundler/cli/lock.rb +2 -1
  9. data/bundler/lib/bundler/compact_index_client/updater.rb +2 -1
  10. data/bundler/lib/bundler/definition.rb +58 -47
  11. data/bundler/lib/bundler/errors.rb +18 -0
  12. data/bundler/lib/bundler/injector.rb +9 -9
  13. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  14. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  15. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  16. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  17. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  18. data/bundler/lib/bundler/man/bundle-config.1 +6 -6
  19. data/bundler/lib/bundler/man/bundle-config.1.ronn +9 -4
  20. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  21. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  23. data/bundler/lib/bundler/man/bundle-exec.1 +3 -3
  24. data/bundler/lib/bundler/man/bundle-exec.1.ronn +2 -2
  25. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  46. data/bundler/lib/bundler/man/bundle.1 +1 -1
  47. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  48. data/bundler/lib/bundler/plugin/index.rb +1 -1
  49. data/bundler/lib/bundler/resolver/candidate.rb +11 -8
  50. data/bundler/lib/bundler/shared_helpers.rb +4 -0
  51. data/bundler/lib/bundler/source/git/git_proxy.rb +6 -0
  52. data/bundler/lib/bundler/source/git.rb +5 -1
  53. data/bundler/lib/bundler/source/rubygems/remote.rb +11 -3
  54. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +7 -3
  55. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +12 -11
  56. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
  57. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  58. data/bundler/lib/bundler/version.rb +1 -1
  59. data/lib/rubygems/local_remote_options.rb +2 -2
  60. data/lib/rubygems/rdoc.rb +8 -4
  61. data/lib/rubygems/vendor/uri/lib/uri/common.rb +7 -3
  62. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +12 -11
  63. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
  64. data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
  65. data/lib/rubygems.rb +1 -1
  66. data/rubygems-update.gemspec +1 -1
  67. metadata +3 -3
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INIT" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INIT" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INJECT" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INJECT" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INSTALL" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ISSUE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-ISSUE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-issue\fR \- Get help reporting Bundler issues
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LICENSES" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LICENSES" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-licenses\fR \- Print the license of all gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LIST" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LIST" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LOCK" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LOCK" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OPEN" "1" "January 2025" ""
3
+ .TH "BUNDLE\-OPEN" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OUTDATED" "1" "January 2025" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLATFORM" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLUGIN" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PRISTINE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-REMOVE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-SHOW" "1" "January 2025" ""
3
+ .TH "BUNDLE\-SHOW" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-UPDATE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VERSION" "1" "January 2025" ""
3
+ .TH "BUNDLE\-VERSION" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VIZ" "1" "January 2025" ""
3
+ .TH "BUNDLE\-VIZ" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE" "1" "January 2025" ""
3
+ .TH "BUNDLE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "GEMFILE" "5" "January 2025" ""
3
+ .TH "GEMFILE" "5" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -31,7 +31,7 @@ module Bundler
31
31
 
32
32
  begin
33
33
  load_index(global_index_file, true)
34
- rescue GenericSystemCallError
34
+ rescue PermissionError
35
35
  # no need to fail when on a read-only FS, for example
36
36
  nil
37
37
  rescue ArgumentError => e
@@ -48,35 +48,38 @@ module Bundler
48
48
  @version.segments
49
49
  end
50
50
 
51
- def sort_obj
52
- [@version, @priority]
53
- end
54
-
55
51
  def <=>(other)
56
52
  return unless other.is_a?(self.class)
57
53
 
58
- sort_obj <=> other.sort_obj
54
+ version_comparison = version <=> other.version
55
+ return version_comparison unless version_comparison.zero?
56
+
57
+ priority <=> other.priority
59
58
  end
60
59
 
61
60
  def ==(other)
62
61
  return unless other.is_a?(self.class)
63
62
 
64
- sort_obj == other.sort_obj
63
+ version == other.version && priority == other.priority
65
64
  end
66
65
 
67
66
  def eql?(other)
68
67
  return unless other.is_a?(self.class)
69
68
 
70
- sort_obj.eql?(other.sort_obj)
69
+ version.eql?(other.version) && priority.eql?(other.priority)
71
70
  end
72
71
 
73
72
  def hash
74
- sort_obj.hash
73
+ [@version, @priority].hash
75
74
  end
76
75
 
77
76
  def to_s
78
77
  @version.to_s
79
78
  end
79
+
80
+ protected
81
+
82
+ attr_reader :priority
80
83
  end
81
84
  end
82
85
  end
@@ -115,6 +115,10 @@ module Bundler
115
115
  raise NoSpaceOnDeviceError.new(path, action)
116
116
  rescue Errno::ENOTSUP
117
117
  raise OperationNotSupportedError.new(path, action)
118
+ rescue Errno::EPERM
119
+ raise OperationNotPermittedError.new(path, action)
120
+ rescue Errno::EROFS
121
+ raise ReadOnlyFileSystemError.new(path, action)
118
122
  rescue Errno::EEXIST, Errno::ENOENT
119
123
  raise
120
124
  rescue SystemCallError => e
@@ -147,6 +147,12 @@ module Bundler
147
147
  end
148
148
  end
149
149
 
150
+ def installed_to?(destination)
151
+ # if copy_to is interrupted, it may leave a partially installed directory that
152
+ # contains .git but no other files -- consider this not to be installed
153
+ Dir.exist?(destination) && (Dir.children(destination) - [".git"]).any?
154
+ end
155
+
150
156
  private
151
157
 
152
158
  def git_remote_fetch(args)
@@ -360,7 +360,11 @@ module Bundler
360
360
  end
361
361
 
362
362
  def locked_revision_checked_out?
363
- locked_revision && locked_revision == revision && install_path.exist?
363
+ locked_revision && locked_revision == revision && installed?
364
+ end
365
+
366
+ def installed?
367
+ git_proxy.installed_to?(install_path)
364
368
  end
365
369
 
366
370
  def base_name
@@ -16,6 +16,9 @@ module Bundler
16
16
  @anonymized_uri = remove_auth(@uri).freeze
17
17
  end
18
18
 
19
+ MAX_CACHE_SLUG_HOST_SIZE = 255 - 1 - 32 # 255 minus dot minus MD5 length
20
+ private_constant :MAX_CACHE_SLUG_HOST_SIZE
21
+
19
22
  # @return [String] A slug suitable for use as a cache key for this
20
23
  # remote.
21
24
  #
@@ -28,10 +31,15 @@ module Bundler
28
31
  host = cache_uri.to_s.start_with?("file://") ? nil : cache_uri.host
29
32
 
30
33
  uri_parts = [host, cache_uri.user, cache_uri.port, cache_uri.path]
31
- uri_digest = SharedHelpers.digest(:MD5).hexdigest(uri_parts.compact.join("."))
34
+ uri_parts.compact!
35
+ uri_digest = SharedHelpers.digest(:MD5).hexdigest(uri_parts.join("."))
36
+
37
+ uri_parts.pop
38
+ host_parts = uri_parts.join(".")
39
+ return uri_digest if host_parts.empty?
32
40
 
33
- uri_parts[-1] = uri_digest
34
- uri_parts.compact.join(".")
41
+ shortened_host_parts = host_parts[0...MAX_CACHE_SLUG_HOST_SIZE]
42
+ [shortened_host_parts, uri_digest].join(".")
35
43
  end
36
44
  end
37
45
 
@@ -13,15 +13,19 @@ require_relative "rfc2396_parser"
13
13
  require_relative "rfc3986_parser"
14
14
 
15
15
  module Bundler::URI
16
+ # The default parser instance for RFC 2396.
16
17
  RFC2396_PARSER = RFC2396_Parser.new
17
18
  Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
18
19
 
20
+ # The default parser instance for RFC 3986.
19
21
  RFC3986_PARSER = RFC3986_Parser.new
20
22
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
21
23
 
24
+ # The default parser instance.
22
25
  DEFAULT_PARSER = RFC3986_PARSER
23
26
  Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
24
27
 
28
+ # Set the default parser instance.
25
29
  def self.parser=(parser = RFC3986_PARSER)
26
30
  remove_const(:Parser) if defined?(::Bundler::URI::Parser)
27
31
  const_set("Parser", parser.class)
@@ -40,7 +44,7 @@ module Bundler::URI
40
44
  end
41
45
  self.parser = RFC3986_PARSER
42
46
 
43
- def self.const_missing(const)
47
+ def self.const_missing(const) # :nodoc:
44
48
  if const == :REGEXP
45
49
  warn "Bundler::URI::REGEXP is obsolete. Use Bundler::URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
46
50
  Bundler::URI::RFC2396_REGEXP
@@ -87,7 +91,7 @@ module Bundler::URI
87
91
  module_function :make_components_hash
88
92
  end
89
93
 
90
- module Schemes
94
+ module Schemes # :nodoc:
91
95
  end
92
96
  private_constant :Schemes
93
97
 
@@ -305,7 +309,7 @@ module Bundler::URI
305
309
  256.times do |i|
306
310
  TBLENCWWWCOMP_[-i.chr] = -('%%%02X' % i)
307
311
  end
308
- TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
312
+ TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze # :nodoc:
309
313
  TBLENCWWWCOMP_[' '] = '+'
310
314
  TBLENCWWWCOMP_.freeze
311
315
  TBLDECWWWCOMP_ = {} # :nodoc:
@@ -737,12 +737,12 @@ module Bundler::URI
737
737
  end
738
738
  private :check_registry
739
739
 
740
- def set_registry(v) #:nodoc:
740
+ def set_registry(v) # :nodoc:
741
741
  raise InvalidURIError, "cannot set registry"
742
742
  end
743
743
  protected :set_registry
744
744
 
745
- def registry=(v)
745
+ def registry=(v) # :nodoc:
746
746
  raise InvalidURIError, "cannot set registry"
747
747
  end
748
748
 
@@ -1133,17 +1133,16 @@ module Bundler::URI
1133
1133
  base.fragment=(nil)
1134
1134
 
1135
1135
  # RFC2396, Section 5.2, 4)
1136
- if !authority
1137
- base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path
1138
- else
1139
- # RFC2396, Section 5.2, 4)
1140
- base.set_path(rel.path) if rel.path
1136
+ if authority
1137
+ base.set_userinfo(rel.userinfo)
1138
+ base.set_host(rel.host)
1139
+ base.set_port(rel.port || base.default_port)
1140
+ base.set_path(rel.path)
1141
+ elsif base.path && rel.path
1142
+ base.set_path(merge_path(base.path, rel.path))
1141
1143
  end
1142
1144
 
1143
1145
  # RFC2396, Section 5.2, 7)
1144
- base.set_userinfo(rel.userinfo) if rel.userinfo
1145
- base.set_host(rel.host) if rel.host
1146
- base.set_port(rel.port) if rel.port
1147
1146
  base.query = rel.query if rel.query
1148
1147
  base.fragment=(rel.fragment) if rel.fragment
1149
1148
 
@@ -1392,10 +1391,12 @@ module Bundler::URI
1392
1391
  end
1393
1392
  end
1394
1393
 
1394
+ # Returns the hash value.
1395
1395
  def hash
1396
1396
  self.component_ary.hash
1397
1397
  end
1398
1398
 
1399
+ # Compares with _oth_ for Hash.
1399
1400
  def eql?(oth)
1400
1401
  self.class == oth.class &&
1401
1402
  parser == oth.parser &&
@@ -1438,7 +1439,7 @@ module Bundler::URI
1438
1439
  end
1439
1440
  end
1440
1441
 
1441
- def inspect
1442
+ def inspect # :nodoc:
1442
1443
  "#<#{self.class} #{self}>"
1443
1444
  end
1444
1445
 
@@ -321,14 +321,14 @@ module Bundler::URI
321
321
  str.gsub(escaped) { [$&[1, 2]].pack('H2').force_encoding(enc) }
322
322
  end
323
323
 
324
- @@to_s = Kernel.instance_method(:to_s)
325
- if @@to_s.respond_to?(:bind_call)
326
- def inspect
327
- @@to_s.bind_call(self)
324
+ TO_S = Kernel.instance_method(:to_s) # :nodoc:
325
+ if TO_S.respond_to?(:bind_call)
326
+ def inspect # :nodoc:
327
+ TO_S.bind_call(self)
328
328
  end
329
329
  else
330
- def inspect
331
- @@to_s.bind(self).call
330
+ def inspect # :nodoc:
331
+ TO_S.bind(self).call
332
332
  end
333
333
  end
334
334
 
@@ -1,6 +1,6 @@
1
1
  module Bundler::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '010002'.freeze
3
+ VERSION_CODE = '010003'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.6.5".freeze
4
+ VERSION = "2.6.6".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -134,13 +134,13 @@ module Gem::LocalRemoteOptions
134
134
  # Is local fetching enabled?
135
135
 
136
136
  def local?
137
- options[:domain] == :local || options[:domain] == :both
137
+ [:local, :both].include?(options[:domain])
138
138
  end
139
139
 
140
140
  ##
141
141
  # Is remote fetching enabled?
142
142
 
143
143
  def remote?
144
- options[:domain] == :remote || options[:domain] == :both
144
+ [:remote, :both].include?(options[:domain])
145
145
  end
146
146
  end
data/lib/rubygems/rdoc.rb CHANGED
@@ -5,8 +5,6 @@ require_relative "../rubygems"
5
5
  begin
6
6
  require "rdoc/rubygems_hook"
7
7
  module Gem
8
- RDoc = ::RDoc::RubygemsHook
9
-
10
8
  ##
11
9
  # Returns whether RDoc defines its own install hooks through a RubyGems
12
10
  # plugin. This and whatever is guarded by it can be removed once no
@@ -15,8 +13,14 @@ begin
15
13
  def self.rdoc_hooks_defined_via_plugin?
16
14
  Gem::Version.new(::RDoc::VERSION) >= Gem::Version.new("6.9.0")
17
15
  end
18
- end
19
16
 
20
- Gem.done_installing(&Gem::RDoc.method(:generation_hook)) unless Gem.rdoc_hooks_defined_via_plugin?
17
+ if rdoc_hooks_defined_via_plugin?
18
+ RDoc = ::RDoc::RubyGemsHook
19
+ else
20
+ RDoc = ::RDoc::RubygemsHook
21
+
22
+ Gem.done_installing(&Gem::RDoc.method(:generation_hook))
23
+ end
24
+ end
21
25
  rescue LoadError
22
26
  end
@@ -13,15 +13,19 @@ require_relative "rfc2396_parser"
13
13
  require_relative "rfc3986_parser"
14
14
 
15
15
  module Gem::URI
16
+ # The default parser instance for RFC 2396.
16
17
  RFC2396_PARSER = RFC2396_Parser.new
17
18
  Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
18
19
 
20
+ # The default parser instance for RFC 3986.
19
21
  RFC3986_PARSER = RFC3986_Parser.new
20
22
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
21
23
 
24
+ # The default parser instance.
22
25
  DEFAULT_PARSER = RFC3986_PARSER
23
26
  Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
24
27
 
28
+ # Set the default parser instance.
25
29
  def self.parser=(parser = RFC3986_PARSER)
26
30
  remove_const(:Parser) if defined?(::Gem::URI::Parser)
27
31
  const_set("Parser", parser.class)
@@ -40,7 +44,7 @@ module Gem::URI
40
44
  end
41
45
  self.parser = RFC3986_PARSER
42
46
 
43
- def self.const_missing(const)
47
+ def self.const_missing(const) # :nodoc:
44
48
  if const == :REGEXP
45
49
  warn "Gem::URI::REGEXP is obsolete. Use Gem::URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
46
50
  Gem::URI::RFC2396_REGEXP
@@ -87,7 +91,7 @@ module Gem::URI
87
91
  module_function :make_components_hash
88
92
  end
89
93
 
90
- module Schemes
94
+ module Schemes # :nodoc:
91
95
  end
92
96
  private_constant :Schemes
93
97
 
@@ -305,7 +309,7 @@ module Gem::URI
305
309
  256.times do |i|
306
310
  TBLENCWWWCOMP_[-i.chr] = -('%%%02X' % i)
307
311
  end
308
- TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
312
+ TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze # :nodoc:
309
313
  TBLENCWWWCOMP_[' '] = '+'
310
314
  TBLENCWWWCOMP_.freeze
311
315
  TBLDECWWWCOMP_ = {} # :nodoc:
@@ -737,12 +737,12 @@ module Gem::URI
737
737
  end
738
738
  private :check_registry
739
739
 
740
- def set_registry(v) #:nodoc:
740
+ def set_registry(v) # :nodoc:
741
741
  raise InvalidURIError, "cannot set registry"
742
742
  end
743
743
  protected :set_registry
744
744
 
745
- def registry=(v)
745
+ def registry=(v) # :nodoc:
746
746
  raise InvalidURIError, "cannot set registry"
747
747
  end
748
748
 
@@ -1133,17 +1133,16 @@ module Gem::URI
1133
1133
  base.fragment=(nil)
1134
1134
 
1135
1135
  # RFC2396, Section 5.2, 4)
1136
- if !authority
1137
- base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path
1138
- else
1139
- # RFC2396, Section 5.2, 4)
1140
- base.set_path(rel.path) if rel.path
1136
+ if authority
1137
+ base.set_userinfo(rel.userinfo)
1138
+ base.set_host(rel.host)
1139
+ base.set_port(rel.port || base.default_port)
1140
+ base.set_path(rel.path)
1141
+ elsif base.path && rel.path
1142
+ base.set_path(merge_path(base.path, rel.path))
1141
1143
  end
1142
1144
 
1143
1145
  # RFC2396, Section 5.2, 7)
1144
- base.set_userinfo(rel.userinfo) if rel.userinfo
1145
- base.set_host(rel.host) if rel.host
1146
- base.set_port(rel.port) if rel.port
1147
1146
  base.query = rel.query if rel.query
1148
1147
  base.fragment=(rel.fragment) if rel.fragment
1149
1148
 
@@ -1392,10 +1391,12 @@ module Gem::URI
1392
1391
  end
1393
1392
  end
1394
1393
 
1394
+ # Returns the hash value.
1395
1395
  def hash
1396
1396
  self.component_ary.hash
1397
1397
  end
1398
1398
 
1399
+ # Compares with _oth_ for Hash.
1399
1400
  def eql?(oth)
1400
1401
  self.class == oth.class &&
1401
1402
  parser == oth.parser &&
@@ -1438,7 +1439,7 @@ module Gem::URI
1438
1439
  end
1439
1440
  end
1440
1441
 
1441
- def inspect
1442
+ def inspect # :nodoc:
1442
1443
  "#<#{self.class} #{self}>"
1443
1444
  end
1444
1445
 
@@ -321,14 +321,14 @@ module Gem::URI
321
321
  str.gsub(escaped) { [$&[1, 2]].pack('H2').force_encoding(enc) }
322
322
  end
323
323
 
324
- @@to_s = Kernel.instance_method(:to_s)
325
- if @@to_s.respond_to?(:bind_call)
326
- def inspect
327
- @@to_s.bind_call(self)
324
+ TO_S = Kernel.instance_method(:to_s) # :nodoc:
325
+ if TO_S.respond_to?(:bind_call)
326
+ def inspect # :nodoc:
327
+ TO_S.bind_call(self)
328
328
  end
329
329
  else
330
- def inspect
331
- @@to_s.bind(self).call
330
+ def inspect # :nodoc:
331
+ TO_S.bind(self).call
332
332
  end
333
333
  end
334
334
 
@@ -1,6 +1,6 @@
1
1
  module Gem::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '010002'.freeze
3
+ VERSION_CODE = '010003'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.6.5"
12
+ VERSION = "3.6.6"
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.5"
5
+ s.version = "3.6.6"
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