bundler 2.3.26 → 2.4.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +228 -1
  3. data/README.md +3 -6
  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/binstubs.rb +5 -1
  9. data/lib/bundler/cli/check.rb +1 -1
  10. data/lib/bundler/cli/common.rb +1 -0
  11. data/lib/bundler/cli/console.rb +2 -2
  12. data/lib/bundler/cli/doctor.rb +4 -6
  13. data/lib/bundler/cli/gem.rb +62 -40
  14. data/lib/bundler/cli/init.rb +2 -2
  15. data/lib/bundler/cli/install.rb +2 -3
  16. data/lib/bundler/cli/lock.rb +8 -5
  17. data/lib/bundler/cli/open.rb +6 -4
  18. data/lib/bundler/cli/outdated.rb +1 -3
  19. data/lib/bundler/cli/viz.rb +1 -1
  20. data/lib/bundler/cli.rb +45 -2
  21. data/lib/bundler/compact_index_client/cache.rb +1 -1
  22. data/lib/bundler/compact_index_client/updater.rb +40 -39
  23. data/lib/bundler/constants.rb +1 -1
  24. data/lib/bundler/current_ruby.rb +2 -0
  25. data/lib/bundler/definition.rb +99 -51
  26. data/lib/bundler/dependency.rb +13 -12
  27. data/lib/bundler/digest.rb +1 -1
  28. data/lib/bundler/dsl.rb +3 -3
  29. data/lib/bundler/endpoint_specification.rb +0 -4
  30. data/lib/bundler/env.rb +1 -1
  31. data/lib/bundler/environment_preserver.rb +3 -2
  32. data/lib/bundler/errors.rb +1 -11
  33. data/lib/bundler/fetcher/compact_index.rb +9 -11
  34. data/lib/bundler/fetcher/dependency.rb +2 -6
  35. data/lib/bundler/fetcher/downloader.rb +2 -5
  36. data/lib/bundler/fetcher.rb +4 -8
  37. data/lib/bundler/force_platform.rb +18 -0
  38. data/lib/bundler/friendly_errors.rb +0 -3
  39. data/lib/bundler/gem_version_promoter.rb +52 -86
  40. data/lib/bundler/graph.rb +3 -3
  41. data/lib/bundler/index.rb +7 -15
  42. data/lib/bundler/injector.rb +2 -2
  43. data/lib/bundler/inline.rb +8 -10
  44. data/lib/bundler/installer/parallel_installer.rb +3 -33
  45. data/lib/bundler/installer/standalone.rb +12 -8
  46. data/lib/bundler/installer.rb +9 -23
  47. data/lib/bundler/lazy_specification.rb +42 -42
  48. data/lib/bundler/lockfile_generator.rb +1 -1
  49. data/lib/bundler/lockfile_parser.rb +16 -16
  50. data/lib/bundler/man/bundle-add.1 +1 -1
  51. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  52. data/lib/bundler/man/bundle-cache.1 +3 -3
  53. data/lib/bundler/man/bundle-cache.1.ronn +2 -2
  54. data/lib/bundler/man/bundle-check.1 +1 -1
  55. data/lib/bundler/man/bundle-clean.1 +1 -1
  56. data/lib/bundler/man/bundle-config.1 +2 -2
  57. data/lib/bundler/man/bundle-config.1.ronn +1 -1
  58. data/lib/bundler/man/bundle-console.1 +1 -1
  59. data/lib/bundler/man/bundle-doctor.1 +1 -1
  60. data/lib/bundler/man/bundle-exec.1 +5 -5
  61. data/lib/bundler/man/bundle-exec.1.ronn +5 -5
  62. data/lib/bundler/man/bundle-gem.1 +27 -37
  63. data/lib/bundler/man/bundle-gem.1.ronn +5 -5
  64. data/lib/bundler/man/bundle-help.1 +1 -1
  65. data/lib/bundler/man/bundle-info.1 +1 -1
  66. data/lib/bundler/man/bundle-init.1 +5 -1
  67. data/lib/bundler/man/bundle-init.1.ronn +2 -0
  68. data/lib/bundler/man/bundle-inject.1 +1 -1
  69. data/lib/bundler/man/bundle-install.1 +1 -30
  70. data/lib/bundler/man/bundle-install.1.ronn +0 -29
  71. data/lib/bundler/man/bundle-list.1 +1 -1
  72. data/lib/bundler/man/bundle-lock.1 +1 -1
  73. data/lib/bundler/man/bundle-open.1 +22 -2
  74. data/lib/bundler/man/bundle-open.1.ronn +9 -1
  75. data/lib/bundler/man/bundle-outdated.1 +1 -1
  76. data/lib/bundler/man/bundle-platform.1 +2 -2
  77. data/lib/bundler/man/bundle-platform.1.ronn +1 -1
  78. data/lib/bundler/man/bundle-plugin.1 +1 -1
  79. data/lib/bundler/man/bundle-pristine.1 +1 -1
  80. data/lib/bundler/man/bundle-remove.1 +1 -1
  81. data/lib/bundler/man/bundle-show.1 +1 -1
  82. data/lib/bundler/man/bundle-update.1 +1 -1
  83. data/lib/bundler/man/bundle-version.1 +1 -1
  84. data/lib/bundler/man/bundle-viz.1 +1 -1
  85. data/lib/bundler/man/bundle.1 +1 -1
  86. data/lib/bundler/man/gemfile.5 +1 -1
  87. data/lib/bundler/mirror.rb +5 -7
  88. data/lib/bundler/plugin/index.rb +4 -4
  89. data/lib/bundler/plugin/installer/rubygems.rb +0 -4
  90. data/lib/bundler/plugin/installer.rb +5 -2
  91. data/lib/bundler/plugin.rb +1 -1
  92. data/lib/bundler/remote_specification.rb +2 -6
  93. data/lib/bundler/resolver/base.rb +72 -15
  94. data/lib/bundler/resolver/candidate.rb +94 -0
  95. data/lib/bundler/resolver/incompatibility.rb +15 -0
  96. data/lib/bundler/resolver/package.rb +72 -0
  97. data/lib/bundler/resolver/root.rb +25 -0
  98. data/lib/bundler/resolver/spec_group.rb +26 -36
  99. data/lib/bundler/resolver.rb +311 -278
  100. data/lib/bundler/ruby_version.rb +1 -1
  101. data/lib/bundler/rubygems_ext.rb +16 -9
  102. data/lib/bundler/rubygems_gem_installer.rb +4 -2
  103. data/lib/bundler/rubygems_integration.rb +10 -14
  104. data/lib/bundler/runtime.rb +1 -5
  105. data/lib/bundler/safe_marshal.rb +31 -0
  106. data/lib/bundler/settings.rb +1 -7
  107. data/lib/bundler/setup.rb +4 -1
  108. data/lib/bundler/shared_helpers.rb +2 -1
  109. data/lib/bundler/source/git/git_proxy.rb +214 -69
  110. data/lib/bundler/source/git.rb +17 -18
  111. data/lib/bundler/source/metadata.rb +0 -1
  112. data/lib/bundler/source/path/installer.rb +1 -22
  113. data/lib/bundler/source/path.rb +6 -6
  114. data/lib/bundler/source/rubygems.rb +19 -77
  115. data/lib/bundler/source_list.rb +8 -2
  116. data/lib/bundler/spec_set.rb +22 -14
  117. data/lib/bundler/templates/Executable +1 -1
  118. data/lib/bundler/templates/Executable.bundler +5 -10
  119. data/lib/bundler/templates/Executable.standalone +2 -0
  120. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  121. data/lib/bundler/templates/newgem/Gemfile.tt +3 -0
  122. data/lib/bundler/templates/newgem/README.md.tt +6 -4
  123. data/lib/bundler/templates/newgem/Rakefile.tt +12 -1
  124. data/lib/bundler/templates/newgem/bin/console.tt +0 -4
  125. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  126. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  127. data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  128. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  129. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  130. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  131. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +10 -0
  132. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  133. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +8 -0
  134. data/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -2
  135. data/lib/bundler/ui/shell.rb +35 -12
  136. data/lib/bundler/ui/silent.rb +21 -5
  137. data/lib/bundler/uri_normalizer.rb +23 -0
  138. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
  139. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
  140. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
  141. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -408
  142. data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  143. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  144. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  145. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  146. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  147. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  148. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  149. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  150. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  151. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  152. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  153. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +60 -0
  154. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  155. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  156. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  157. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  158. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +243 -0
  159. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  160. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  161. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +1 -1
  162. data/lib/bundler/vendor/uri/lib/uri/common.rb +64 -16
  163. data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
  164. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -1
  165. data/lib/bundler/vendor/uri/lib/uri/generic.rb +27 -7
  166. data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
  167. data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
  168. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  169. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  170. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
  171. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +13 -7
  172. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +10 -5
  173. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  174. data/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
  175. data/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
  176. data/lib/bundler/vendor/uri/lib/uri.rb +3 -2
  177. data/lib/bundler/vendored_persistent.rb +1 -33
  178. data/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
  179. data/lib/bundler/version.rb +5 -1
  180. data/lib/bundler/worker.rb +5 -7
  181. data/lib/bundler.rb +17 -69
  182. metadata +35 -33
  183. data/lib/bundler/templates/gems.rb +0 -5
  184. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
  185. data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  186. data/lib/bundler/vendor/molinillo/LICENSE +0 -9
  187. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  188. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  189. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  190. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  191. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  192. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  193. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  194. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  195. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  196. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  197. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  198. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  199. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  200. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  201. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  202. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  203. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  204. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  205. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  206. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  207. data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  208. data/lib/bundler/vendored_molinillo.rb +0 -4
  209. 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.13".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
@@ -75,11 +75,12 @@ module Bundler
75
75
  autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
76
76
  autoload :UI, File.expand_path("bundler/ui", __dir__)
77
77
  autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
78
- autoload :VersionRanges, File.expand_path("bundler/version_ranges", __dir__)
78
+ autoload :URINormalizer, File.expand_path("bundler/uri_normalizer", __dir__)
79
+ autoload :SafeMarshal, File.expand_path("bundler/safe_marshal", __dir__)
79
80
 
80
81
  class << self
81
82
  def configure
82
- @configured ||= configure_gem_home_and_path
83
+ @configure ||= configure_gem_home_and_path
83
84
  end
84
85
 
85
86
  def ui
@@ -454,7 +455,7 @@ EOF
454
455
  end
455
456
 
456
457
  def local_platform
457
- return Gem::Platform::RUBY if settings[:force_ruby_platform] || Gem.platforms == [Gem::Platform::RUBY]
458
+ return Gem::Platform::RUBY if settings[:force_ruby_platform]
458
459
  Gem::Platform.local
459
460
  end
460
461
 
@@ -487,41 +488,9 @@ EOF
487
488
  configured_bundle_path.use_system_gems?
488
489
  end
489
490
 
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
491
  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
492
+ SharedHelpers.filesystem_access(path, :write) do |p|
493
+ FileUtils.mkdir_p(p)
525
494
  end
526
495
  end
527
496
 
@@ -529,7 +498,7 @@ EOF
529
498
  if File.file?(executable) && File.executable?(executable)
530
499
  executable
531
500
  elsif paths = ENV["PATH"]
532
- quote = '"'.freeze
501
+ quote = '"'
533
502
  paths.split(File::PATH_SEPARATOR).find do |path|
534
503
  path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote)
535
504
  executable_path = File.expand_path(executable, path)
@@ -538,41 +507,14 @@ EOF
538
507
  end
539
508
  end
540
509
 
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
510
  def read_file(file)
567
511
  SharedHelpers.filesystem_access(file, :read) do
568
512
  File.open(file, "r:UTF-8", &:read)
569
513
  end
570
514
  end
571
515
 
572
- def load_marshal(data)
573
- Marshal.load(data)
574
- rescue TypeError => e
575
- raise MarshalError, "#{e.class}: #{e.message}"
516
+ def safe_load_marshal(data)
517
+ load_marshal(data, :marshal_proc => SafeMarshal.proc)
576
518
  end
577
519
 
578
520
  def load_gemspec(file, validate = false)
@@ -608,7 +550,7 @@ EOF
608
550
 
609
551
  def git_present?
610
552
  return @git_present if defined?(@git_present)
611
- @git_present = Bundler.which("git") || Bundler.which("git.exe")
553
+ @git_present = Bundler.which("git#{RbConfig::CONFIG["EXEEXT"]}")
612
554
  end
613
555
 
614
556
  def feature_flag
@@ -630,7 +572,7 @@ EOF
630
572
  @bin_path = nil
631
573
  @bundler_major_version = nil
632
574
  @bundle_path = nil
633
- @configured = nil
575
+ @configure = nil
634
576
  @configured_bundle_path = nil
635
577
  @definition = nil
636
578
  @load = nil
@@ -663,6 +605,12 @@ EOF
663
605
 
664
606
  private
665
607
 
608
+ def load_marshal(data, marshal_proc: nil)
609
+ Marshal.load(data, marshal_proc)
610
+ rescue TypeError => e
611
+ raise MarshalError, "#{e.class}: #{e.message}"
612
+ end
613
+
666
614
  def eval_yaml_gemspec(path, contents)
667
615
  Kernel.require "psych"
668
616
 
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.13
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-05-10 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
@@ -198,6 +203,7 @@ files:
198
203
  - lib/bundler/rubygems_gem_installer.rb
199
204
  - lib/bundler/rubygems_integration.rb
200
205
  - lib/bundler/runtime.rb
206
+ - lib/bundler/safe_marshal.rb
201
207
  - lib/bundler/self_manager.rb
202
208
  - lib/bundler/settings.rb
203
209
  - lib/bundler/settings/validator.rb
@@ -223,9 +229,9 @@ files:
223
229
  - lib/bundler/templates/Executable.bundler
224
230
  - lib/bundler/templates/Executable.standalone
225
231
  - lib/bundler/templates/Gemfile
226
- - 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,12 +262,12 @@ 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
260
268
  - lib/bundler/ui/silent.rb
261
269
  - lib/bundler/uri_credentials_filter.rb
270
+ - lib/bundler/uri_normalizer.rb
262
271
  - lib/bundler/vendor/.document
263
272
  - lib/bundler/vendor/connection_pool/LICENSE
264
273
  - lib/bundler/vendor/connection_pool/lib/connection_pool.rb
@@ -267,32 +276,28 @@ files:
267
276
  - lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
268
277
  - lib/bundler/vendor/fileutils/LICENSE.txt
269
278
  - 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
279
  - lib/bundler/vendor/net-http-persistent/README.rdoc
292
280
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
293
281
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
294
282
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
295
283
  - lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
284
+ - lib/bundler/vendor/pub_grub/LICENSE.txt
285
+ - lib/bundler/vendor/pub_grub/lib/pub_grub.rb
286
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
287
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
288
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
289
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
290
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
291
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
292
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
293
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
294
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
295
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
296
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
297
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
298
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
299
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
300
+ - lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
296
301
  - lib/bundler/vendor/thor/LICENSE.md
297
302
  - lib/bundler/vendor/thor/lib/thor.rb
298
303
  - lib/bundler/vendor/thor/lib/thor/actions.rb
@@ -325,7 +330,6 @@ files:
325
330
  - lib/bundler/vendor/thor/lib/thor/shell/html.rb
326
331
  - lib/bundler/vendor/thor/lib/thor/util.rb
327
332
  - lib/bundler/vendor/thor/lib/thor/version.rb
328
- - lib/bundler/vendor/tmpdir/lib/tmpdir.rb
329
333
  - lib/bundler/vendor/tsort/LICENSE.txt
330
334
  - lib/bundler/vendor/tsort/lib/tsort.rb
331
335
  - lib/bundler/vendor/uri/LICENSE.txt
@@ -345,14 +349,12 @@ files:
345
349
  - lib/bundler/vendor/uri/lib/uri/ws.rb
346
350
  - lib/bundler/vendor/uri/lib/uri/wss.rb
347
351
  - lib/bundler/vendored_fileutils.rb
348
- - lib/bundler/vendored_molinillo.rb
349
352
  - lib/bundler/vendored_persistent.rb
353
+ - lib/bundler/vendored_pub_grub.rb
350
354
  - lib/bundler/vendored_thor.rb
351
- - lib/bundler/vendored_tmpdir.rb
352
355
  - lib/bundler/vendored_tsort.rb
353
356
  - lib/bundler/vendored_uri.rb
354
357
  - lib/bundler/version.rb
355
- - lib/bundler/version_ranges.rb
356
358
  - lib/bundler/vlad.rb
357
359
  - lib/bundler/worker.rb
358
360
  - lib/bundler/yaml_serializer.rb
@@ -372,14 +374,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
372
374
  requirements:
373
375
  - - ">="
374
376
  - !ruby/object:Gem::Version
375
- version: 2.3.0
377
+ version: 2.6.0
376
378
  required_rubygems_version: !ruby/object:Gem::Requirement
377
379
  requirements:
378
380
  - - ">="
379
381
  - !ruby/object:Gem::Version
380
- version: 2.5.2
382
+ version: 3.0.1
381
383
  requirements: []
382
- rubygems_version: 3.3.26
384
+ rubygems_version: 3.4.13
383
385
  signing_key:
384
386
  specification_version: 4
385
387
  summary: The best way to manage your application's dependencies
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # gem "rails"
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "mkmf"
4
-
5
- create_makefile(<%= config[:makefile_path].inspect %>)
@@ -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