bundler 2.3.26 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +110 -1
  3. data/README.md +2 -2
  4. data/bundler.gemspec +2 -2
  5. data/exe/bundle +1 -4
  6. data/lib/bundler/build_metadata.rb +2 -2
  7. data/lib/bundler/cli/add.rb +1 -1
  8. data/lib/bundler/cli/check.rb +1 -1
  9. data/lib/bundler/cli/common.rb +1 -0
  10. data/lib/bundler/cli/console.rb +2 -2
  11. data/lib/bundler/cli/doctor.rb +4 -6
  12. data/lib/bundler/cli/gem.rb +62 -40
  13. data/lib/bundler/cli/install.rb +2 -3
  14. data/lib/bundler/cli/lock.rb +8 -5
  15. data/lib/bundler/cli/open.rb +6 -4
  16. data/lib/bundler/cli/outdated.rb +1 -3
  17. data/lib/bundler/cli/viz.rb +1 -1
  18. data/lib/bundler/cli.rb +44 -2
  19. data/lib/bundler/compact_index_client/cache.rb +1 -1
  20. data/lib/bundler/compact_index_client/updater.rb +40 -39
  21. data/lib/bundler/constants.rb +1 -1
  22. data/lib/bundler/definition.rb +87 -51
  23. data/lib/bundler/dependency.rb +12 -11
  24. data/lib/bundler/digest.rb +1 -1
  25. data/lib/bundler/dsl.rb +3 -3
  26. data/lib/bundler/env.rb +1 -1
  27. data/lib/bundler/environment_preserver.rb +1 -0
  28. data/lib/bundler/errors.rb +1 -11
  29. data/lib/bundler/fetcher/compact_index.rb +9 -11
  30. data/lib/bundler/fetcher/dependency.rb +1 -1
  31. data/lib/bundler/fetcher/downloader.rb +2 -5
  32. data/lib/bundler/fetcher.rb +2 -6
  33. data/lib/bundler/force_platform.rb +18 -0
  34. data/lib/bundler/friendly_errors.rb +0 -3
  35. data/lib/bundler/gem_version_promoter.rb +52 -86
  36. data/lib/bundler/graph.rb +3 -3
  37. data/lib/bundler/index.rb +5 -13
  38. data/lib/bundler/injector.rb +1 -1
  39. data/lib/bundler/inline.rb +2 -2
  40. data/lib/bundler/installer/parallel_installer.rb +0 -31
  41. data/lib/bundler/installer.rb +9 -23
  42. data/lib/bundler/lazy_specification.rb +37 -33
  43. data/lib/bundler/lockfile_parser.rb +5 -5
  44. data/lib/bundler/man/bundle-add.1 +1 -1
  45. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  46. data/lib/bundler/man/bundle-cache.1 +1 -1
  47. data/lib/bundler/man/bundle-check.1 +1 -1
  48. data/lib/bundler/man/bundle-clean.1 +1 -1
  49. data/lib/bundler/man/bundle-config.1 +2 -2
  50. data/lib/bundler/man/bundle-config.1.ronn +1 -1
  51. data/lib/bundler/man/bundle-console.1 +1 -1
  52. data/lib/bundler/man/bundle-doctor.1 +1 -1
  53. data/lib/bundler/man/bundle-exec.1 +5 -5
  54. data/lib/bundler/man/bundle-exec.1.ronn +5 -5
  55. data/lib/bundler/man/bundle-gem.1 +27 -37
  56. data/lib/bundler/man/bundle-gem.1.ronn +5 -5
  57. data/lib/bundler/man/bundle-help.1 +1 -1
  58. data/lib/bundler/man/bundle-info.1 +1 -1
  59. data/lib/bundler/man/bundle-init.1 +1 -1
  60. data/lib/bundler/man/bundle-inject.1 +1 -1
  61. data/lib/bundler/man/bundle-install.1 +1 -30
  62. data/lib/bundler/man/bundle-install.1.ronn +0 -29
  63. data/lib/bundler/man/bundle-list.1 +1 -1
  64. data/lib/bundler/man/bundle-lock.1 +1 -1
  65. data/lib/bundler/man/bundle-open.1 +22 -2
  66. data/lib/bundler/man/bundle-open.1.ronn +9 -1
  67. data/lib/bundler/man/bundle-outdated.1 +1 -1
  68. data/lib/bundler/man/bundle-platform.1 +2 -2
  69. data/lib/bundler/man/bundle-platform.1.ronn +1 -1
  70. data/lib/bundler/man/bundle-plugin.1 +1 -1
  71. data/lib/bundler/man/bundle-pristine.1 +1 -1
  72. data/lib/bundler/man/bundle-remove.1 +1 -1
  73. data/lib/bundler/man/bundle-show.1 +1 -1
  74. data/lib/bundler/man/bundle-update.1 +1 -1
  75. data/lib/bundler/man/bundle-version.1 +1 -1
  76. data/lib/bundler/man/bundle-viz.1 +1 -1
  77. data/lib/bundler/man/bundle.1 +1 -1
  78. data/lib/bundler/man/gemfile.5 +1 -1
  79. data/lib/bundler/mirror.rb +5 -7
  80. data/lib/bundler/plugin/index.rb +4 -4
  81. data/lib/bundler/plugin/installer/rubygems.rb +0 -4
  82. data/lib/bundler/resolver/base.rb +42 -15
  83. data/lib/bundler/resolver/candidate.rb +94 -0
  84. data/lib/bundler/resolver/incompatibility.rb +15 -0
  85. data/lib/bundler/resolver/package.rb +72 -0
  86. data/lib/bundler/resolver/root.rb +25 -0
  87. data/lib/bundler/resolver/spec_group.rb +26 -36
  88. data/lib/bundler/resolver.rb +314 -278
  89. data/lib/bundler/rubygems_ext.rb +11 -6
  90. data/lib/bundler/rubygems_gem_installer.rb +4 -2
  91. data/lib/bundler/rubygems_integration.rb +1 -9
  92. data/lib/bundler/runtime.rb +1 -5
  93. data/lib/bundler/settings.rb +0 -6
  94. data/lib/bundler/shared_helpers.rb +1 -0
  95. data/lib/bundler/source/git/git_proxy.rb +193 -67
  96. data/lib/bundler/source/git.rb +15 -17
  97. data/lib/bundler/source/metadata.rb +0 -1
  98. data/lib/bundler/source/path/installer.rb +1 -22
  99. data/lib/bundler/source/path.rb +5 -5
  100. data/lib/bundler/source/rubygems.rb +14 -68
  101. data/lib/bundler/source_list.rb +8 -2
  102. data/lib/bundler/spec_set.rb +7 -9
  103. data/lib/bundler/templates/Executable +1 -1
  104. data/lib/bundler/templates/Executable.bundler +4 -9
  105. data/lib/bundler/templates/Executable.standalone +2 -0
  106. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  107. data/lib/bundler/templates/newgem/Gemfile.tt +3 -0
  108. data/lib/bundler/templates/newgem/README.md.tt +6 -4
  109. data/lib/bundler/templates/newgem/Rakefile.tt +2 -1
  110. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  111. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  112. data/lib/bundler/templates/newgem/ext/newgem/{extconf.rb.tt → extconf-c.rb.tt} +0 -0
  113. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  114. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  115. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +10 -0
  116. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  117. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +8 -0
  118. data/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -2
  119. data/lib/bundler/ui/shell.rb +35 -12
  120. data/lib/bundler/ui/silent.rb +21 -5
  121. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
  122. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
  123. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
  124. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -408
  125. data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  126. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  127. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  128. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  129. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  130. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  131. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +151 -0
  132. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  133. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  134. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  135. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  136. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +53 -0
  137. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  138. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  139. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +128 -0
  140. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +409 -0
  141. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +240 -0
  142. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  143. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  144. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +1 -1
  145. data/lib/bundler/vendor/uri/lib/uri/common.rb +64 -16
  146. data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
  147. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -1
  148. data/lib/bundler/vendor/uri/lib/uri/generic.rb +27 -7
  149. data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
  150. data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
  151. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  152. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  153. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
  154. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +13 -7
  155. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +10 -5
  156. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  157. data/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
  158. data/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
  159. data/lib/bundler/vendor/uri/lib/uri.rb +3 -2
  160. data/lib/bundler/vendored_persistent.rb +1 -33
  161. data/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
  162. data/lib/bundler/version.rb +5 -1
  163. data/lib/bundler/worker.rb +5 -7
  164. data/lib/bundler.rb +20 -64
  165. metadata +33 -32
  166. data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  167. data/lib/bundler/vendor/molinillo/LICENSE +0 -9
  168. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  169. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  170. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  171. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  172. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  173. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  174. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  175. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  176. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  177. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  178. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  179. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  180. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  181. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  182. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  183. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  184. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  185. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  186. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  187. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  188. data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  189. data/lib/bundler/vendored_molinillo.rb +0 -4
  190. data/lib/bundler/version_ranges.rb +0 -122
@@ -30,7 +30,7 @@
30
30
  # class RSYNC < Generic
31
31
  # DEFAULT_PORT = 873
32
32
  # end
33
- # @@schemes['RSYNC'] = RSYNC
33
+ # register_scheme 'RSYNC', RSYNC
34
34
  # end
35
35
  # #=> Bundler::URI::RSYNC
36
36
  #
@@ -70,7 +70,6 @@
70
70
  # - Bundler::URI::REGEXP - (in uri/common.rb)
71
71
  # - Bundler::URI::REGEXP::PATTERN - (in uri/common.rb)
72
72
  # - Bundler::URI::Util - (in uri/common.rb)
73
- # - Bundler::URI::Escape - (in uri/common.rb)
74
73
  # - Bundler::URI::Error - (in uri/common.rb)
75
74
  # - Bundler::URI::InvalidURIError - (in uri/common.rb)
76
75
  # - Bundler::URI::InvalidComponentError - (in uri/common.rb)
@@ -101,3 +100,5 @@ require_relative 'uri/https'
101
100
  require_relative 'uri/ldap'
102
101
  require_relative 'uri/ldaps'
103
102
  require_relative 'uri/mailto'
103
+ require_relative 'uri/ws'
104
+ require_relative 'uri/wss'
@@ -11,37 +11,5 @@ end
11
11
  require_relative "vendor/net-http-persistent/lib/net/http/persistent"
12
12
 
13
13
  module Bundler
14
- class PersistentHTTP < Persistent::Net::HTTP::Persistent
15
- def connection_for(uri)
16
- super(uri) do |connection|
17
- result = yield connection
18
- warn_old_tls_version_rubygems_connection(uri, connection)
19
- result
20
- end
21
- end
22
-
23
- def warn_old_tls_version_rubygems_connection(uri, connection)
24
- return unless connection.http.use_ssl?
25
- return unless (uri.host || "").end_with?("rubygems.org")
26
-
27
- socket = connection.instance_variable_get(:@socket)
28
- return unless socket
29
- socket_io = socket.io
30
- return unless socket_io.respond_to?(:ssl_version)
31
- ssl_version = socket_io.ssl_version
32
-
33
- case ssl_version
34
- when /TLSv([\d\.]+)/
35
- version = Gem::Version.new($1)
36
- if version < Gem::Version.new("1.2")
37
- Bundler.ui.warn \
38
- "Warning: Your Ruby version is compiled against a copy of OpenSSL that is very old. " \
39
- "Starting in January 2018, RubyGems.org will refuse connection requests from these " \
40
- "very old versions of OpenSSL. If you will need to continue installing gems after " \
41
- "January 2018, please follow this guide to upgrade: http://ruby.to/tls-outdated.",
42
- :wrap => true
43
- end
44
- end
45
- end
46
- end
14
+ PersistentHTTP = Persistent::Net::HTTP::Persistent
47
15
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bundler; end
4
- require_relative "vendor/tmpdir/lib/tmpdir"
4
+ require_relative "vendor/pub_grub/lib/pub_grub"
@@ -1,9 +1,13 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.26".freeze
4
+ VERSION = "2.4.5".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
8
8
  end
9
+
10
+ def self.gem_version
11
+ @gem_version ||= Gem::Version.create(VERSION)
12
+ end
9
13
  end
@@ -87,14 +87,12 @@ module Bundler
87
87
  creation_errors = []
88
88
 
89
89
  @threads = Array.new(@size) do |i|
90
- begin
91
- Thread.start { process_queue(i) }.tap do |thread|
92
- thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
93
- end
94
- rescue ThreadError => e
95
- creation_errors << e
96
- nil
90
+ Thread.start { process_queue(i) }.tap do |thread|
91
+ thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
97
92
  end
93
+ rescue ThreadError => e
94
+ creation_errors << e
95
+ nil
98
96
  end.compact
99
97
 
100
98
  add_interrupt_handler unless @threads.empty?
data/lib/bundler.rb CHANGED
@@ -39,6 +39,16 @@ module Bundler
39
39
  environment_preserver.replace_with_backup
40
40
  SUDO_MUTEX = Thread::Mutex.new
41
41
 
42
+ SAFE_MARSHAL_CLASSES = [Symbol, TrueClass, String, Array, Hash].freeze
43
+ SAFE_MARSHAL_ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed.".freeze
44
+ SAFE_MARSHAL_PROC = proc do |object|
45
+ object.tap do
46
+ unless SAFE_MARSHAL_CLASSES.include?(object.class)
47
+ raise TypeError, format(SAFE_MARSHAL_ERROR, object.class, SAFE_MARSHAL_CLASSES.join(", "))
48
+ end
49
+ end
50
+ end
51
+
42
52
  autoload :Definition, File.expand_path("bundler/definition", __dir__)
43
53
  autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
44
54
  autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
@@ -75,7 +85,6 @@ module Bundler
75
85
  autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
76
86
  autoload :UI, File.expand_path("bundler/ui", __dir__)
77
87
  autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
78
- autoload :VersionRanges, File.expand_path("bundler/version_ranges", __dir__)
79
88
 
80
89
  class << self
81
90
  def configure
@@ -454,7 +463,7 @@ EOF
454
463
  end
455
464
 
456
465
  def local_platform
457
- return Gem::Platform::RUBY if settings[:force_ruby_platform] || Gem.platforms == [Gem::Platform::RUBY]
466
+ return Gem::Platform::RUBY if settings[:force_ruby_platform]
458
467
  Gem::Platform.local
459
468
  end
460
469
 
@@ -487,41 +496,9 @@ EOF
487
496
  configured_bundle_path.use_system_gems?
488
497
  end
489
498
 
490
- def requires_sudo?
491
- return @requires_sudo if defined?(@requires_sudo_ran)
492
-
493
- sudo_present = which "sudo" if settings.allow_sudo?
494
-
495
- if sudo_present
496
- # the bundle path and subdirectories need to be writable for RubyGems
497
- # to be able to unpack and install gems without exploding
498
- path = bundle_path
499
- path = path.parent until path.exist?
500
-
501
- # bins are written to a different location on OS X
502
- bin_dir = Pathname.new(Bundler.system_bindir)
503
- bin_dir = bin_dir.parent until bin_dir.exist?
504
-
505
- # if any directory is not writable, we need sudo
506
- files = [path, bin_dir] | Dir[bundle_path.join("build_info/*").to_s] | Dir[bundle_path.join("*").to_s]
507
- unwritable_files = files.reject {|f| File.writable?(f) }
508
- sudo_needed = !unwritable_files.empty?
509
- if sudo_needed
510
- Bundler.ui.warn "Following files may not be writable, so sudo is needed:\n #{unwritable_files.map(&:to_s).sort.join("\n ")}"
511
- end
512
- end
513
-
514
- @requires_sudo_ran = true
515
- @requires_sudo = settings.allow_sudo? && sudo_present && sudo_needed
516
- end
517
-
518
499
  def mkdir_p(path, options = {})
519
- if requires_sudo? && !options[:no_sudo]
520
- sudo "mkdir -p '#{path}'" unless File.exist?(path)
521
- else
522
- SharedHelpers.filesystem_access(path, :write) do |p|
523
- FileUtils.mkdir_p(p)
524
- end
500
+ SharedHelpers.filesystem_access(path, :write) do |p|
501
+ FileUtils.mkdir_p(p)
525
502
  end
526
503
  end
527
504
 
@@ -538,39 +515,18 @@ EOF
538
515
  end
539
516
  end
540
517
 
541
- def sudo(str)
542
- SUDO_MUTEX.synchronize do
543
- prompt = "\n\n" + <<-PROMPT.gsub(/^ {6}/, "").strip + " "
544
- Your user account isn't allowed to install to the system RubyGems.
545
- You can cancel this installation and run:
546
-
547
- bundle config set --local path 'vendor/bundle'
548
- bundle install
549
-
550
- to install the gems into ./vendor/bundle/, or you can enter your password
551
- and install the bundled gems to RubyGems using sudo.
552
-
553
- Password:
554
- PROMPT
555
-
556
- unless @prompted_for_sudo ||= system(%(sudo -k -p "#{prompt}" true))
557
- raise SudoNotPermittedError,
558
- "Bundler requires sudo access to install at the moment. " \
559
- "Try installing again, granting Bundler sudo access when prompted, or installing into a different path."
560
- end
561
-
562
- `sudo -p "#{prompt}" #{str}`
563
- end
564
- end
565
-
566
518
  def read_file(file)
567
519
  SharedHelpers.filesystem_access(file, :read) do
568
520
  File.open(file, "r:UTF-8", &:read)
569
521
  end
570
522
  end
571
523
 
572
- def load_marshal(data)
573
- Marshal.load(data)
524
+ def safe_load_marshal(data)
525
+ load_marshal(data, :marshal_proc => SAFE_MARSHAL_PROC)
526
+ end
527
+
528
+ def load_marshal(data, marshal_proc: nil)
529
+ Marshal.load(data, marshal_proc)
574
530
  rescue TypeError => e
575
531
  raise MarshalError, "#{e.class}: #{e.message}"
576
532
  end
@@ -608,7 +564,7 @@ EOF
608
564
 
609
565
  def git_present?
610
566
  return @git_present if defined?(@git_present)
611
- @git_present = Bundler.which("git") || Bundler.which("git.exe")
567
+ @git_present = Bundler.which("git#{RbConfig::CONFIG["EXEEXT"]}")
612
568
  end
613
569
 
614
570
  def feature_flag
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.3.26
4
+ version: 2.4.5
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: 2022-11-17 00:00:00.000000000 Z
25
+ date: 2023-01-21 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
@@ -96,6 +96,7 @@ files:
96
96
  - lib/bundler/fetcher/dependency.rb
97
97
  - lib/bundler/fetcher/downloader.rb
98
98
  - lib/bundler/fetcher/index.rb
99
+ - lib/bundler/force_platform.rb
99
100
  - lib/bundler/friendly_errors.rb
100
101
  - lib/bundler/gem_helper.rb
101
102
  - lib/bundler/gem_helpers.rb
@@ -190,6 +191,10 @@ files:
190
191
  - lib/bundler/remote_specification.rb
191
192
  - lib/bundler/resolver.rb
192
193
  - lib/bundler/resolver/base.rb
194
+ - lib/bundler/resolver/candidate.rb
195
+ - lib/bundler/resolver/incompatibility.rb
196
+ - lib/bundler/resolver/package.rb
197
+ - lib/bundler/resolver/root.rb
193
198
  - lib/bundler/resolver/spec_group.rb
194
199
  - lib/bundler/retry.rb
195
200
  - lib/bundler/ruby_dsl.rb
@@ -226,6 +231,7 @@ files:
226
231
  - lib/bundler/templates/gems.rb
227
232
  - lib/bundler/templates/newgem/CHANGELOG.md.tt
228
233
  - lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
234
+ - lib/bundler/templates/newgem/Cargo.toml.tt
229
235
  - lib/bundler/templates/newgem/Gemfile.tt
230
236
  - lib/bundler/templates/newgem/LICENSE.txt.tt
231
237
  - lib/bundler/templates/newgem/README.md.tt
@@ -234,9 +240,12 @@ files:
234
240
  - lib/bundler/templates/newgem/bin/setup.tt
235
241
  - lib/bundler/templates/newgem/circleci/config.yml.tt
236
242
  - lib/bundler/templates/newgem/exe/newgem.tt
237
- - lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
243
+ - lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt
244
+ - lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt
245
+ - lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt
238
246
  - lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
239
247
  - lib/bundler/templates/newgem/ext/newgem/newgem.h.tt
248
+ - lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt
240
249
  - lib/bundler/templates/newgem/github/workflows/main.yml.tt
241
250
  - lib/bundler/templates/newgem/gitignore.tt
242
251
  - lib/bundler/templates/newgem/gitlab-ci.yml.tt
@@ -253,7 +262,6 @@ files:
253
262
  - lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
254
263
  - lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
255
264
  - lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
256
- - lib/bundler/templates/newgem/travis.yml.tt
257
265
  - lib/bundler/ui.rb
258
266
  - lib/bundler/ui/rg_proxy.rb
259
267
  - lib/bundler/ui/shell.rb
@@ -267,32 +275,28 @@ files:
267
275
  - lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
268
276
  - lib/bundler/vendor/fileutils/LICENSE.txt
269
277
  - lib/bundler/vendor/fileutils/lib/fileutils.rb
270
- - lib/bundler/vendor/molinillo/LICENSE
271
- - lib/bundler/vendor/molinillo/lib/molinillo.rb
272
- - lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
273
- - lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
274
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
275
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
276
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
277
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
278
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
279
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
280
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
281
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
282
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
283
- - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
284
- - lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
285
- - lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
286
- - lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
287
- - lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
288
- - lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
289
- - lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
290
- - lib/bundler/vendor/molinillo/lib/molinillo/state.rb
291
278
  - lib/bundler/vendor/net-http-persistent/README.rdoc
292
279
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
293
280
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
294
281
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
295
282
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
283
+ - lib/bundler/vendor/pub_grub/LICENSE.txt
284
+ - lib/bundler/vendor/pub_grub/lib/pub_grub.rb
285
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
286
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
287
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
288
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
289
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
290
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
291
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
292
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
293
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
294
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
295
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
296
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
297
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
298
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
299
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
296
300
  - lib/bundler/vendor/thor/LICENSE.md
297
301
  - lib/bundler/vendor/thor/lib/thor.rb
298
302
  - lib/bundler/vendor/thor/lib/thor/actions.rb
@@ -325,7 +329,6 @@ files:
325
329
  - lib/bundler/vendor/thor/lib/thor/shell/html.rb
326
330
  - lib/bundler/vendor/thor/lib/thor/util.rb
327
331
  - lib/bundler/vendor/thor/lib/thor/version.rb
328
- - lib/bundler/vendor/tmpdir/lib/tmpdir.rb
329
332
  - lib/bundler/vendor/tsort/LICENSE.txt
330
333
  - lib/bundler/vendor/tsort/lib/tsort.rb
331
334
  - lib/bundler/vendor/uri/LICENSE.txt
@@ -345,14 +348,12 @@ files:
345
348
  - lib/bundler/vendor/uri/lib/uri/ws.rb
346
349
  - lib/bundler/vendor/uri/lib/uri/wss.rb
347
350
  - lib/bundler/vendored_fileutils.rb
348
- - lib/bundler/vendored_molinillo.rb
349
351
  - lib/bundler/vendored_persistent.rb
352
+ - lib/bundler/vendored_pub_grub.rb
350
353
  - lib/bundler/vendored_thor.rb
351
- - lib/bundler/vendored_tmpdir.rb
352
354
  - lib/bundler/vendored_tsort.rb
353
355
  - lib/bundler/vendored_uri.rb
354
356
  - lib/bundler/version.rb
355
- - lib/bundler/version_ranges.rb
356
357
  - lib/bundler/vlad.rb
357
358
  - lib/bundler/worker.rb
358
359
  - lib/bundler/yaml_serializer.rb
@@ -372,14 +373,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
372
373
  requirements:
373
374
  - - ">="
374
375
  - !ruby/object:Gem::Version
375
- version: 2.3.0
376
+ version: 2.6.0
376
377
  required_rubygems_version: !ruby/object:Gem::Requirement
377
378
  requirements:
378
379
  - - ">="
379
380
  - !ruby/object:Gem::Version
380
- version: 2.5.2
381
+ version: 3.0.1
381
382
  requirements: []
382
- rubygems_version: 3.3.26
383
+ rubygems_version: 3.4.5
383
384
  signing_key:
384
385
  specification_version: 4
385
386
  summary: The best way to manage your application's dependencies
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - <%= RUBY_VERSION %>
6
- before_install: gem install bundler -v <%= Bundler::VERSION %>
@@ -1,9 +0,0 @@
1
- This project is licensed under the MIT license.
2
-
3
- Copyright (c) 2014 Samuel E. Giddins segiddins@segiddins.me
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler::Molinillo
4
- # @!visibility private
5
- module Delegates
6
- # Delegates all {Bundler::Molinillo::ResolutionState} methods to a `#state` property.
7
- module ResolutionState
8
- # (see Bundler::Molinillo::ResolutionState#name)
9
- def name
10
- current_state = state || Bundler::Molinillo::ResolutionState.empty
11
- current_state.name
12
- end
13
-
14
- # (see Bundler::Molinillo::ResolutionState#requirements)
15
- def requirements
16
- current_state = state || Bundler::Molinillo::ResolutionState.empty
17
- current_state.requirements
18
- end
19
-
20
- # (see Bundler::Molinillo::ResolutionState#activated)
21
- def activated
22
- current_state = state || Bundler::Molinillo::ResolutionState.empty
23
- current_state.activated
24
- end
25
-
26
- # (see Bundler::Molinillo::ResolutionState#requirement)
27
- def requirement
28
- current_state = state || Bundler::Molinillo::ResolutionState.empty
29
- current_state.requirement
30
- end
31
-
32
- # (see Bundler::Molinillo::ResolutionState#possibilities)
33
- def possibilities
34
- current_state = state || Bundler::Molinillo::ResolutionState.empty
35
- current_state.possibilities
36
- end
37
-
38
- # (see Bundler::Molinillo::ResolutionState#depth)
39
- def depth
40
- current_state = state || Bundler::Molinillo::ResolutionState.empty
41
- current_state.depth
42
- end
43
-
44
- # (see Bundler::Molinillo::ResolutionState#conflicts)
45
- def conflicts
46
- current_state = state || Bundler::Molinillo::ResolutionState.empty
47
- current_state.conflicts
48
- end
49
-
50
- # (see Bundler::Molinillo::ResolutionState#unused_unwind_options)
51
- def unused_unwind_options
52
- current_state = state || Bundler::Molinillo::ResolutionState.empty
53
- current_state.unused_unwind_options
54
- end
55
- end
56
- end
57
- end
@@ -1,88 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler::Molinillo
4
- module Delegates
5
- # Delegates all {Bundler::Molinillo::SpecificationProvider} methods to a
6
- # `#specification_provider` property.
7
- module SpecificationProvider
8
- # (see Bundler::Molinillo::SpecificationProvider#search_for)
9
- def search_for(dependency)
10
- with_no_such_dependency_error_handling do
11
- specification_provider.search_for(dependency)
12
- end
13
- end
14
-
15
- # (see Bundler::Molinillo::SpecificationProvider#dependencies_for)
16
- def dependencies_for(specification)
17
- with_no_such_dependency_error_handling do
18
- specification_provider.dependencies_for(specification)
19
- end
20
- end
21
-
22
- # (see Bundler::Molinillo::SpecificationProvider#requirement_satisfied_by?)
23
- def requirement_satisfied_by?(requirement, activated, spec)
24
- with_no_such_dependency_error_handling do
25
- specification_provider.requirement_satisfied_by?(requirement, activated, spec)
26
- end
27
- end
28
-
29
- # (see Bundler::Molinillo::SpecificationProvider#dependencies_equal?)
30
- def dependencies_equal?(dependencies, other_dependencies)
31
- with_no_such_dependency_error_handling do
32
- specification_provider.dependencies_equal?(dependencies, other_dependencies)
33
- end
34
- end
35
-
36
- # (see Bundler::Molinillo::SpecificationProvider#name_for)
37
- def name_for(dependency)
38
- with_no_such_dependency_error_handling do
39
- specification_provider.name_for(dependency)
40
- end
41
- end
42
-
43
- # (see Bundler::Molinillo::SpecificationProvider#name_for_explicit_dependency_source)
44
- def name_for_explicit_dependency_source
45
- with_no_such_dependency_error_handling do
46
- specification_provider.name_for_explicit_dependency_source
47
- end
48
- end
49
-
50
- # (see Bundler::Molinillo::SpecificationProvider#name_for_locking_dependency_source)
51
- def name_for_locking_dependency_source
52
- with_no_such_dependency_error_handling do
53
- specification_provider.name_for_locking_dependency_source
54
- end
55
- end
56
-
57
- # (see Bundler::Molinillo::SpecificationProvider#sort_dependencies)
58
- def sort_dependencies(dependencies, activated, conflicts)
59
- with_no_such_dependency_error_handling do
60
- specification_provider.sort_dependencies(dependencies, activated, conflicts)
61
- end
62
- end
63
-
64
- # (see Bundler::Molinillo::SpecificationProvider#allow_missing?)
65
- def allow_missing?(dependency)
66
- with_no_such_dependency_error_handling do
67
- specification_provider.allow_missing?(dependency)
68
- end
69
- end
70
-
71
- private
72
-
73
- # Ensures any raised {NoSuchDependencyError} has its
74
- # {NoSuchDependencyError#required_by} set.
75
- # @yield
76
- def with_no_such_dependency_error_handling
77
- yield
78
- rescue NoSuchDependencyError => error
79
- if state
80
- vertex = activated.vertex_named(name_for(error.dependency))
81
- error.required_by += vertex.incoming_edges.map { |e| e.origin.name }
82
- error.required_by << name_for_explicit_dependency_source unless vertex.explicit_requirements.empty?
83
- end
84
- raise
85
- end
86
- end
87
- end
88
- end
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler::Molinillo
4
- class DependencyGraph
5
- # An action that modifies a {DependencyGraph} that is reversible.
6
- # @abstract
7
- class Action
8
- # rubocop:disable Lint/UnusedMethodArgument
9
-
10
- # @return [Symbol] The name of the action.
11
- def self.action_name
12
- raise 'Abstract'
13
- end
14
-
15
- # Performs the action on the given graph.
16
- # @param [DependencyGraph] graph the graph to perform the action on.
17
- # @return [Void]
18
- def up(graph)
19
- raise 'Abstract'
20
- end
21
-
22
- # Reverses the action on the given graph.
23
- # @param [DependencyGraph] graph the graph to reverse the action on.
24
- # @return [Void]
25
- def down(graph)
26
- raise 'Abstract'
27
- end
28
-
29
- # @return [Action,Nil] The previous action
30
- attr_accessor :previous
31
-
32
- # @return [Action,Nil] The next action
33
- attr_accessor :next
34
- end
35
- end
36
- end
@@ -1,66 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'action'
4
- module Bundler::Molinillo
5
- class DependencyGraph
6
- # @!visibility private
7
- # (see DependencyGraph#add_edge_no_circular)
8
- class AddEdgeNoCircular < Action
9
- # @!group Action
10
-
11
- # (see Action.action_name)
12
- def self.action_name
13
- :add_vertex
14
- end
15
-
16
- # (see Action#up)
17
- def up(graph)
18
- edge = make_edge(graph)
19
- edge.origin.outgoing_edges << edge
20
- edge.destination.incoming_edges << edge
21
- edge
22
- end
23
-
24
- # (see Action#down)
25
- def down(graph)
26
- edge = make_edge(graph)
27
- delete_first(edge.origin.outgoing_edges, edge)
28
- delete_first(edge.destination.incoming_edges, edge)
29
- end
30
-
31
- # @!group AddEdgeNoCircular
32
-
33
- # @return [String] the name of the origin of the edge
34
- attr_reader :origin
35
-
36
- # @return [String] the name of the destination of the edge
37
- attr_reader :destination
38
-
39
- # @return [Object] the requirement that the edge represents
40
- attr_reader :requirement
41
-
42
- # @param [DependencyGraph] graph the graph to find vertices from
43
- # @return [Edge] The edge this action adds
44
- def make_edge(graph)
45
- Edge.new(graph.vertex_named(origin), graph.vertex_named(destination), requirement)
46
- end
47
-
48
- # Initialize an action to add an edge to a dependency graph
49
- # @param [String] origin the name of the origin of the edge
50
- # @param [String] destination the name of the destination of the edge
51
- # @param [Object] requirement the requirement that the edge represents
52
- def initialize(origin, destination, requirement)
53
- @origin = origin
54
- @destination = destination
55
- @requirement = requirement
56
- end
57
-
58
- private
59
-
60
- def delete_first(array, item)
61
- return unless index = array.index(item)
62
- array.delete_at(index)
63
- end
64
- end
65
- end
66
- end