bundler 2.5.21 → 2.5.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/add.rb +2 -0
  5. data/lib/bundler/cli/check.rb +2 -2
  6. data/lib/bundler/cli.rb +1 -0
  7. data/lib/bundler/definition.rb +10 -16
  8. data/lib/bundler/dsl.rb +38 -22
  9. data/lib/bundler/inline.rb +12 -8
  10. data/lib/bundler/installer.rb +1 -1
  11. data/lib/bundler/lazy_specification.rb +9 -2
  12. data/lib/bundler/lockfile_generator.rb +1 -1
  13. data/lib/bundler/man/bundle-add.1 +5 -2
  14. data/lib/bundler/man/bundle-add.1.ronn +4 -1
  15. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  16. data/lib/bundler/man/bundle-cache.1 +1 -1
  17. data/lib/bundler/man/bundle-check.1 +1 -1
  18. data/lib/bundler/man/bundle-clean.1 +1 -1
  19. data/lib/bundler/man/bundle-config.1 +1 -5
  20. data/lib/bundler/man/bundle-config.1.ronn +0 -7
  21. data/lib/bundler/man/bundle-console.1 +1 -1
  22. data/lib/bundler/man/bundle-doctor.1 +1 -1
  23. data/lib/bundler/man/bundle-exec.1 +1 -1
  24. data/lib/bundler/man/bundle-gem.1 +1 -1
  25. data/lib/bundler/man/bundle-help.1 +1 -1
  26. data/lib/bundler/man/bundle-info.1 +1 -1
  27. data/lib/bundler/man/bundle-init.1 +1 -1
  28. data/lib/bundler/man/bundle-inject.1 +1 -1
  29. data/lib/bundler/man/bundle-install.1 +2 -2
  30. data/lib/bundler/man/bundle-install.1.ronn +1 -2
  31. data/lib/bundler/man/bundle-list.1 +1 -1
  32. data/lib/bundler/man/bundle-lock.1 +1 -1
  33. data/lib/bundler/man/bundle-open.1 +1 -1
  34. data/lib/bundler/man/bundle-outdated.1 +1 -1
  35. data/lib/bundler/man/bundle-platform.1 +1 -1
  36. data/lib/bundler/man/bundle-plugin.1 +1 -1
  37. data/lib/bundler/man/bundle-pristine.1 +1 -1
  38. data/lib/bundler/man/bundle-remove.1 +1 -1
  39. data/lib/bundler/man/bundle-show.1 +1 -1
  40. data/lib/bundler/man/bundle-update.1 +1 -1
  41. data/lib/bundler/man/bundle-version.1 +1 -1
  42. data/lib/bundler/man/bundle-viz.1 +1 -1
  43. data/lib/bundler/man/bundle.1 +1 -1
  44. data/lib/bundler/man/gemfile.5 +1 -1
  45. data/lib/bundler/plugin/api/source.rb +1 -1
  46. data/lib/bundler/plugin.rb +20 -1
  47. data/lib/bundler/process_lock.rb +10 -14
  48. data/lib/bundler/resolver/base.rb +4 -0
  49. data/lib/bundler/rubygems_ext.rb +35 -3
  50. data/lib/bundler/rubygems_gem_installer.rb +3 -1
  51. data/lib/bundler/rubygems_integration.rb +2 -51
  52. data/lib/bundler/settings.rb +5 -1
  53. data/lib/bundler/shared_helpers.rb +27 -15
  54. data/lib/bundler/source/git.rb +2 -2
  55. data/lib/bundler/source/metadata.rb +2 -3
  56. data/lib/bundler/source/path.rb +1 -1
  57. data/lib/bundler/source/rubygems.rb +1 -4
  58. data/lib/bundler/stub_specification.rb +11 -0
  59. data/lib/bundler/templates/newgem/Gemfile.tt +0 -3
  60. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
  61. data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
  62. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +46 -8
  63. data/lib/bundler/vendor/uri/lib/uri/common.rb +2 -0
  64. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  65. data/lib/bundler/version.rb +1 -1
  66. data/lib/bundler.rb +1 -1
  67. metadata +3 -3
@@ -68,6 +68,8 @@ autoload :OpenSSL, 'openssl'
68
68
  # #verify_callback :: For server certificate verification
69
69
  # #verify_depth :: Depth of certificate verification
70
70
  # #verify_mode :: How connections should be verified
71
+ # #verify_hostname :: Use hostname verification for server certificate
72
+ # during the handshake
71
73
  #
72
74
  # == Proxies
73
75
  #
@@ -174,7 +176,7 @@ class Gem::Net::HTTP::Persistent
174
176
  ##
175
177
  # The version of Gem::Net::HTTP::Persistent you are using
176
178
 
177
- VERSION = '4.0.2'
179
+ VERSION = '4.0.4'
178
180
 
179
181
  ##
180
182
  # Error class for errors raised by Gem::Net::HTTP::Persistent. Various
@@ -449,6 +451,21 @@ class Gem::Net::HTTP::Persistent
449
451
 
450
452
  attr_reader :verify_mode
451
453
 
454
+ ##
455
+ # HTTPS verify_hostname.
456
+ #
457
+ # If a client sets this to true and enables SNI with SSLSocket#hostname=,
458
+ # the hostname verification on the server certificate is performed
459
+ # automatically during the handshake using
460
+ # OpenSSL::SSL.verify_certificate_identity().
461
+ #
462
+ # You can set +verify_hostname+ as true to use hostname verification
463
+ # during the handshake.
464
+ #
465
+ # NOTE: This works with Ruby > 3.0.
466
+
467
+ attr_reader :verify_hostname
468
+
452
469
  ##
453
470
  # Creates a new Gem::Net::HTTP::Persistent.
454
471
  #
@@ -508,6 +525,7 @@ class Gem::Net::HTTP::Persistent
508
525
  @verify_callback = nil
509
526
  @verify_depth = nil
510
527
  @verify_mode = nil
528
+ @verify_hostname = nil
511
529
  @cert_store = nil
512
530
 
513
531
  @generation = 0 # incremented when proxy Gem::URI changes
@@ -607,13 +625,23 @@ class Gem::Net::HTTP::Persistent
607
625
 
608
626
  return yield connection
609
627
  rescue Errno::ECONNREFUSED
610
- address = http.proxy_address || http.address
611
- port = http.proxy_port || http.port
628
+ if http.proxy?
629
+ address = http.proxy_address
630
+ port = http.proxy_port
631
+ else
632
+ address = http.address
633
+ port = http.port
634
+ end
612
635
 
613
636
  raise Error, "connection refused: #{address}:#{port}"
614
637
  rescue Errno::EHOSTDOWN
615
- address = http.proxy_address || http.address
616
- port = http.proxy_port || http.port
638
+ if http.proxy?
639
+ address = http.proxy_address
640
+ port = http.proxy_port
641
+ else
642
+ address = http.address
643
+ port = http.port
644
+ end
617
645
 
618
646
  raise Error, "host down: #{address}:#{port}"
619
647
  ensure
@@ -948,8 +976,10 @@ class Gem::Net::HTTP::Persistent
948
976
  connection.min_version = @min_version if @min_version
949
977
  connection.max_version = @max_version if @max_version
950
978
 
951
- connection.verify_depth = @verify_depth
952
- connection.verify_mode = @verify_mode
979
+ connection.verify_depth = @verify_depth
980
+ connection.verify_mode = @verify_mode
981
+ connection.verify_hostname = @verify_hostname if
982
+ @verify_hostname != nil && connection.respond_to?(:verify_hostname=)
953
983
 
954
984
  if OpenSSL::SSL::VERIFY_PEER == OpenSSL::SSL::VERIFY_NONE and
955
985
  not Object.const_defined?(:I_KNOW_THAT_OPENSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG) then
@@ -1058,6 +1088,15 @@ application:
1058
1088
  reconnect_ssl
1059
1089
  end
1060
1090
 
1091
+ ##
1092
+ # Sets the HTTPS verify_hostname.
1093
+
1094
+ def verify_hostname= verify_hostname
1095
+ @verify_hostname = verify_hostname
1096
+
1097
+ reconnect_ssl
1098
+ end
1099
+
1061
1100
  ##
1062
1101
  # SSL verification callback.
1063
1102
 
@@ -1070,4 +1109,3 @@ end
1070
1109
 
1071
1110
  require_relative 'persistent/connection'
1072
1111
  require_relative 'persistent/pool'
1073
-
@@ -19,6 +19,8 @@ module Bundler::URI
19
19
  Parser = RFC2396_Parser
20
20
  RFC3986_PARSER = RFC3986_Parser.new
21
21
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
22
+ RFC2396_PARSER = RFC2396_Parser.new
23
+ Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
22
24
 
23
25
  # Bundler::URI::Parser.new
24
26
  DEFAULT_PARSER = Parser.new
@@ -1,6 +1,6 @@
1
1
  module Bundler::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '001300'.freeze
3
+ VERSION_CODE = '001301'.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.5.21".freeze
4
+ VERSION = "2.5.23".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler.rb CHANGED
@@ -492,7 +492,7 @@ module Bundler
492
492
  end
493
493
 
494
494
  def mkdir_p(path)
495
- SharedHelpers.filesystem_access(path, :write) do |p|
495
+ SharedHelpers.filesystem_access(path, :create) do |p|
496
496
  FileUtils.mkdir_p(p)
497
497
  end
498
498
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.21
4
+ version: 2.5.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2024-10-03 00:00:00.000000000 Z
25
+ date: 2024-11-05 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -405,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
405
405
  - !ruby/object:Gem::Version
406
406
  version: 3.2.3
407
407
  requirements: []
408
- rubygems_version: 3.5.21
408
+ rubygems_version: 3.5.23
409
409
  signing_key:
410
410
  specification_version: 4
411
411
  summary: The best way to manage your application's dependencies