rubygems-update 3.7.2 → 4.0.0.beta1

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 (206) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1413 -1323
  3. data/CODE_OF_CONDUCT.md +7 -129
  4. data/Manifest.txt +5 -11
  5. data/README.md +2 -2
  6. data/bundler/CHANGELOG.md +990 -917
  7. data/bundler/README.md +4 -4
  8. data/bundler/bundler.gemspec +3 -3
  9. data/bundler/lib/bundler/build_metadata.rb +2 -2
  10. data/bundler/lib/bundler/capistrano.rb +1 -19
  11. data/bundler/lib/bundler/cli/cache.rb +1 -11
  12. data/bundler/lib/bundler/cli/common.rb +20 -3
  13. data/bundler/lib/bundler/cli/config.rb +1 -2
  14. data/bundler/lib/bundler/cli/console.rb +5 -0
  15. data/bundler/lib/bundler/cli/exec.rb +29 -4
  16. data/bundler/lib/bundler/cli/gem.rb +19 -33
  17. data/bundler/lib/bundler/cli/install.rb +7 -82
  18. data/bundler/lib/bundler/cli/issue.rb +2 -2
  19. data/bundler/lib/bundler/cli/list.rb +33 -2
  20. data/bundler/lib/bundler/cli/plugin.rb +5 -1
  21. data/bundler/lib/bundler/cli/show.rb +1 -1
  22. data/bundler/lib/bundler/cli/update.rb +3 -3
  23. data/bundler/lib/bundler/cli.rb +75 -83
  24. data/bundler/lib/bundler/compact_index_client.rb +0 -1
  25. data/bundler/lib/bundler/current_ruby.rb +3 -15
  26. data/bundler/lib/bundler/definition.rb +45 -35
  27. data/bundler/lib/bundler/deployment.rb +1 -64
  28. data/bundler/lib/bundler/digest.rb +1 -1
  29. data/bundler/lib/bundler/dsl.rb +13 -35
  30. data/bundler/lib/bundler/endpoint_specification.rb +0 -22
  31. data/bundler/lib/bundler/errors.rb +1 -5
  32. data/bundler/lib/bundler/feature_flag.rb +0 -33
  33. data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
  34. data/bundler/lib/bundler/friendly_errors.rb +2 -2
  35. data/bundler/lib/bundler/index.rb +0 -7
  36. data/bundler/lib/bundler/inline.rb +1 -1
  37. data/bundler/lib/bundler/installer/gem_installer.rb +0 -11
  38. data/bundler/lib/bundler/installer.rb +0 -6
  39. data/bundler/lib/bundler/lockfile_generator.rb +1 -1
  40. data/bundler/lib/bundler/lockfile_parser.rb +2 -12
  41. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-binstubs.1 +3 -6
  43. data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
  44. data/bundler/lib/bundler/man/bundle-cache.1 +2 -14
  45. data/bundler/lib/bundler/man/bundle-cache.1.ronn +1 -14
  46. data/bundler/lib/bundler/man/bundle-check.1 +2 -5
  47. data/bundler/lib/bundler/man/bundle-check.1.ronn +0 -5
  48. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-config.1 +6 -33
  50. data/bundler/lib/bundler/man/bundle-config.1.ronn +20 -55
  51. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  54. data/bundler/lib/bundler/man/bundle-exec.1 +2 -5
  55. data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -5
  56. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-gem.1 +3 -6
  58. data/bundler/lib/bundler/man/bundle-gem.1.ronn +2 -5
  59. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  60. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  61. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  62. data/bundler/lib/bundler/man/bundle-install.1 +8 -59
  63. data/bundler/lib/bundler/man/bundle-install.1.ronn +12 -107
  64. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  66. data/bundler/lib/bundler/man/bundle-list.1 +6 -1
  67. data/bundler/lib/bundler/man/bundle-list.1.ronn +5 -0
  68. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  69. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  70. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  71. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  72. data/bundler/lib/bundler/man/bundle-plugin.1 +2 -9
  73. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +0 -8
  74. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  75. data/bundler/lib/bundler/man/bundle-remove.1 +2 -8
  76. data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -8
  77. data/bundler/lib/bundler/man/bundle-show.1 +2 -5
  78. data/bundler/lib/bundler/man/bundle-show.1.ronn +0 -4
  79. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  80. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  81. data/bundler/lib/bundler/man/bundle.1 +1 -10
  82. data/bundler/lib/bundler/man/bundle.1.ronn +0 -9
  83. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  84. data/bundler/lib/bundler/man/index.txt +0 -2
  85. data/bundler/lib/bundler/materialization.rb +1 -1
  86. data/bundler/lib/bundler/plugin/installer.rb +0 -10
  87. data/bundler/lib/bundler/plugin/source_list.rb +1 -1
  88. data/bundler/lib/bundler/plugin.rb +1 -1
  89. data/bundler/lib/bundler/resolver.rb +1 -1
  90. data/bundler/lib/bundler/ruby_dsl.rb +2 -0
  91. data/bundler/lib/bundler/ruby_version.rb +1 -3
  92. data/bundler/lib/bundler/rubygems_ext.rb +1 -1
  93. data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -1
  94. data/bundler/lib/bundler/rubygems_integration.rb +1 -5
  95. data/bundler/lib/bundler/self_manager.rb +1 -1
  96. data/bundler/lib/bundler/settings.rb +7 -26
  97. data/bundler/lib/bundler/shared_helpers.rb +8 -20
  98. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -11
  99. data/bundler/lib/bundler/source/git.rb +2 -3
  100. data/bundler/lib/bundler/source/path.rb +3 -7
  101. data/bundler/lib/bundler/source/rubygems.rb +11 -17
  102. data/bundler/lib/bundler/source.rb +1 -1
  103. data/bundler/lib/bundler/source_list.rb +4 -45
  104. data/bundler/lib/bundler/source_map.rb +2 -5
  105. data/bundler/lib/bundler/spec_set.rb +6 -15
  106. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
  107. data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  108. data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  109. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
  110. data/bundler/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
  111. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
  112. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
  113. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
  114. data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
  115. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -1
  116. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
  117. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  118. data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
  119. data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
  120. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
  121. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +1 -1
  122. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
  123. data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
  124. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
  125. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
  126. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  127. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
  128. data/bundler/lib/bundler/version.rb +1 -1
  129. data/bundler/lib/bundler/vlad.rb +1 -14
  130. data/bundler/lib/bundler.rb +6 -28
  131. data/doc/MAINTAINERS.txt +0 -7
  132. data/doc/bundler/UPGRADING.md +11 -5
  133. data/doc/rubygems/CONTRIBUTING.md +1 -1
  134. data/lib/rubygems/basic_specification.rb +3 -9
  135. data/lib/rubygems/bundler_version_finder.rb +1 -0
  136. data/lib/rubygems/command.rb +1 -1
  137. data/lib/rubygems/command_manager.rb +3 -4
  138. data/lib/rubygems/commands/build_command.rb +0 -7
  139. data/lib/rubygems/commands/cert_command.rb +1 -1
  140. data/lib/rubygems/commands/install_command.rb +1 -5
  141. data/lib/rubygems/commands/setup_command.rb +5 -3
  142. data/lib/rubygems/config_file.rb +1 -1
  143. data/lib/rubygems/dependency.rb +1 -1
  144. data/lib/rubygems/dependency_installer.rb +0 -77
  145. data/lib/rubygems/dependency_list.rb +1 -2
  146. data/lib/rubygems/deprecate.rb +74 -72
  147. data/lib/rubygems/doctor.rb +1 -1
  148. data/lib/rubygems/errors.rb +1 -1
  149. data/lib/rubygems/exceptions.rb +2 -3
  150. data/lib/rubygems/ext/builder.rb +6 -2
  151. data/lib/rubygems/ext/cargo_builder.rb +2 -2
  152. data/lib/rubygems/ext/cmake_builder.rb +97 -8
  153. data/lib/rubygems/ext/configure_builder.rb +2 -2
  154. data/lib/rubygems/ext/ext_conf_builder.rb +6 -2
  155. data/lib/rubygems/ext/rake_builder.rb +2 -2
  156. data/lib/rubygems/gem_runner.rb +0 -1
  157. data/lib/rubygems/install_update_options.rb +1 -2
  158. data/lib/rubygems/installer.rb +16 -54
  159. data/lib/rubygems/name_tuple.rb +7 -1
  160. data/lib/rubygems/package/tar_header.rb +4 -4
  161. data/lib/rubygems/package/tar_reader.rb +2 -0
  162. data/lib/rubygems/package/tar_writer.rb +1 -1
  163. data/lib/rubygems/package.rb +21 -12
  164. data/lib/rubygems/platform.rb +31 -11
  165. data/lib/rubygems/remote_fetcher.rb +8 -5
  166. data/lib/rubygems/resolver/conflict.rb +1 -1
  167. data/lib/rubygems/resolver.rb +1 -1
  168. data/lib/rubygems/security/signer.rb +1 -1
  169. data/lib/rubygems/source.rb +2 -2
  170. data/lib/rubygems/spec_fetcher.rb +4 -4
  171. data/lib/rubygems/specification.rb +5 -96
  172. data/lib/rubygems/specification_policy.rb +0 -36
  173. data/lib/rubygems/specification_record.rb +1 -1
  174. data/lib/rubygems/text.rb +1 -1
  175. data/lib/rubygems/uninstaller.rb +17 -6
  176. data/lib/rubygems/user_interaction.rb +6 -9
  177. data/lib/rubygems/util.rb +0 -22
  178. data/lib/rubygems/validator.rb +1 -1
  179. data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +25 -9
  180. data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +2 -2
  181. data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -14
  182. data/lib/rubygems/vendor/optparse/lib/optparse.rb +82 -41
  183. data/lib/rubygems/vendor/resolv/lib/resolv.rb +1 -1
  184. data/lib/rubygems/vendor/timeout/lib/timeout.rb +4 -1
  185. data/lib/rubygems/vendor/uri/lib/uri/common.rb +57 -15
  186. data/lib/rubygems/vendor/uri/lib/uri/file.rb +1 -1
  187. data/lib/rubygems/vendor/uri/lib/uri/generic.rb +34 -21
  188. data/lib/rubygems/vendor/uri/lib/uri/http.rb +12 -0
  189. data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  190. data/lib/rubygems/vendor/uri/lib/uri/version.rb +2 -2
  191. data/lib/rubygems/version.rb +2 -17
  192. data/lib/rubygems/win_platform.rb +31 -0
  193. data/lib/rubygems.rb +10 -38
  194. data/rubygems-update.gemspec +4 -4
  195. metadata +10 -18
  196. data/bundler/lib/bundler/cli/inject.rb +0 -60
  197. data/bundler/lib/bundler/cli/viz.rb +0 -31
  198. data/bundler/lib/bundler/graph.rb +0 -152
  199. data/bundler/lib/bundler/man/bundle-inject.1 +0 -31
  200. data/bundler/lib/bundler/man/bundle-inject.1.ronn +0 -32
  201. data/bundler/lib/bundler/man/bundle-viz.1 +0 -30
  202. data/bundler/lib/bundler/man/bundle-viz.1.ronn +0 -36
  203. data/bundler/lib/bundler/similarity_detector.rb +0 -63
  204. data/lib/rubygems/commands/query_command.rb +0 -43
  205. data/lib/rubygems/compatibility.rb +0 -41
  206. data/lib/rubygems/install_default_message.rb +0 -13
@@ -1,69 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "shared_helpers"
4
- Bundler::SharedHelpers.major_deprecation 2, "Bundler no longer integrates with " \
4
+ Bundler::SharedHelpers.feature_removed! "Bundler no longer integrates with " \
5
5
  "Capistrano, but Capistrano provides its own integration with " \
6
6
  "Bundler via the capistrano-bundler gem. Use it instead."
7
-
8
- module Bundler
9
- class Deployment
10
- def self.define_task(context, task_method = :task, opts = {})
11
- if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
12
- context_name = "capistrano"
13
- role_default = "{:except => {:no_release => true}}"
14
- error_type = ::Capistrano::CommandError
15
- else
16
- context_name = "vlad"
17
- role_default = "[:app]"
18
- error_type = ::Rake::CommandFailedError
19
- end
20
-
21
- roles = context.fetch(:bundle_roles, false)
22
- opts[:roles] = roles if roles
23
-
24
- context.send :namespace, :bundle do
25
- send :desc, <<-DESC
26
- Install the current Bundler environment. By default, gems will be \
27
- installed to the shared/bundle path. Gems in the development and \
28
- test group will not be installed. The install command is executed \
29
- with the --deployment and --quiet flags. If the bundle cmd cannot \
30
- be found then you can override the bundle_cmd variable to specify \
31
- which one it should use. The base path to the app is fetched from \
32
- the :latest_release variable. Set it for custom deploy layouts.
33
-
34
- You can override any of these defaults by setting the variables shown below.
35
-
36
- N.B. bundle_roles must be defined before you require 'bundler/#{context_name}' \
37
- in your deploy.rb file.
38
-
39
- set :bundle_gemfile, "Gemfile"
40
- set :bundle_dir, File.join(fetch(:shared_path), 'bundle')
41
- set :bundle_flags, "--deployment --quiet"
42
- set :bundle_without, [:development, :test]
43
- set :bundle_with, [:mysql]
44
- set :bundle_cmd, "bundle" # e.g. "/opt/ruby/bin/bundle"
45
- set :bundle_roles, #{role_default} # e.g. [:app, :batch]
46
- DESC
47
- send task_method, :install, opts do
48
- bundle_cmd = context.fetch(:bundle_cmd, "bundle")
49
- bundle_flags = context.fetch(:bundle_flags, "--deployment --quiet")
50
- bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), "bundle"))
51
- bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
52
- bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
53
- bundle_with = [*context.fetch(:bundle_with, [])].compact
54
- app_path = context.fetch(:latest_release)
55
- if app_path.to_s.empty?
56
- raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
57
- end
58
- args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"]
59
- args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
60
- args << bundle_flags.to_s
61
- args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
62
- args << "--with #{bundle_with.join(" ")}" unless bundle_with.empty?
63
-
64
- run "cd #{app_path} && #{bundle_cmd} install #{args.join(" ")}"
65
- end
66
- end
67
- end
68
- end
69
- end
@@ -26,7 +26,7 @@ module Bundler
26
26
  end
27
27
  a, b, c, d, e = *words
28
28
  (16..79).each do |i|
29
- w[i] = SHA1_MASK & rotate((w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]), 1)
29
+ w[i] = SHA1_MASK & rotate(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1)
30
30
  end
31
31
  0.upto(79) do |i|
32
32
  case i
@@ -411,7 +411,13 @@ module Bundler
411
411
  next if VALID_PLATFORMS.include?(p)
412
412
  raise GemfileError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
413
413
  end
414
- deprecate_legacy_windows_platforms(platforms)
414
+
415
+ windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
416
+ if windows_platforms.any?
417
+ windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
418
+ removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
419
+ Bundler::SharedHelpers.feature_removed! removed_message
420
+ end
415
421
 
416
422
  # Save sources passed in a key
417
423
  if opts.key?("source")
@@ -477,14 +483,10 @@ module Bundler
477
483
  def normalize_source(source)
478
484
  case source
479
485
  when :gemcutter, :rubygems, :rubyforge
480
- message =
481
- "The source :#{source} is deprecated because HTTP requests are insecure.\n" \
482
- "Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not."
483
486
  removed_message =
484
487
  "The source :#{source} is disallowed because HTTP requests are insecure.\n" \
485
488
  "Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not."
486
- Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
487
- "http://rubygems.org"
489
+ Bundler::SharedHelpers.feature_removed! removed_message
488
490
  when String
489
491
  source
490
492
  else
@@ -492,16 +494,6 @@ module Bundler
492
494
  end
493
495
  end
494
496
 
495
- def deprecate_legacy_windows_platforms(platforms)
496
- windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
497
- return if windows_platforms.empty?
498
-
499
- windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
500
- message = "Platform #{windows_platforms} is deprecated. Please use platform :windows instead."
501
- removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
502
- Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
503
- end
504
-
505
497
  def check_path_source_safety
506
498
  return if @sources.global_path_source.nil?
507
499
 
@@ -513,7 +505,7 @@ module Bundler
513
505
  " gem 'rails'\n" \
514
506
  " end\n\n"
515
507
 
516
- SharedHelpers.major_deprecation(2, msg.strip)
508
+ SharedHelpers.feature_removed! msg.strip
517
509
  end
518
510
 
519
511
  def check_rubygems_source_safety
@@ -521,24 +513,10 @@ module Bundler
521
513
  end
522
514
 
523
515
  def multiple_global_source_warning
524
- if Bundler.feature_flag.bundler_4_mode?
525
- msg = "This Gemfile contains multiple global sources. " \
526
- "Each source after the first must include a block to indicate which gems " \
527
- "should come from that source"
528
- raise GemfileEvalError, msg
529
- else
530
- message =
531
- "Your Gemfile contains multiple global sources. " \
532
- "Using `source` more than once without a block is a security risk, and " \
533
- "may result in installing unexpected gems. To resolve this warning, use " \
534
- "a block to indicate which gems should come from the secondary source."
535
- removed_message =
536
- "Your Gemfile contains multiple global sources. " \
537
- "Using `source` more than once without a block is a security risk, and " \
538
- "may result in installing unexpected gems. To resolve this error, use " \
539
- "a block to indicate which gems should come from the secondary source."
540
- Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
541
- end
516
+ msg = "This Gemfile contains multiple global sources. " \
517
+ "Each source after the first must include a block to indicate which gems " \
518
+ "should come from that source"
519
+ raise GemfileEvalError, msg
542
520
  end
543
521
 
544
522
  class DSLError < GemfileError
@@ -60,28 +60,6 @@ module Bundler
60
60
  end
61
61
  end
62
62
 
63
- # needed for binstubs
64
- def executables
65
- if @remote_specification
66
- @remote_specification.executables
67
- elsif _local_specification
68
- _local_specification.executables
69
- else
70
- super
71
- end
72
- end
73
-
74
- # needed for bundle clean
75
- def bindir
76
- if @remote_specification
77
- @remote_specification.bindir
78
- elsif _local_specification
79
- _local_specification.bindir
80
- else
81
- super
82
- end
83
- end
84
-
85
63
  # needed for post_install_messages during install
86
64
  def post_install_message
87
65
  if @remote_specification
@@ -25,6 +25,7 @@ module Bundler
25
25
 
26
26
  class GemNotFound < BundlerError; status_code(7); end
27
27
  class InstallHookError < BundlerError; status_code(8); end
28
+ class RemovedError < BundlerError; status_code(9); end
28
29
  class GemfileNotFound < BundlerError; status_code(10); end
29
30
  class GitError < BundlerError; status_code(11); end
30
31
  class DeprecatedError < BundlerError; status_code(12); end
@@ -76,11 +77,6 @@ module Bundler
76
77
  def mismatch_resolution_instructions
77
78
  removable, remote = [@existing, @checksum].partition(&:removable?)
78
79
  case removable.size
79
- when 0
80
- msg = +"Mismatched checksums each have an authoritative source:\n"
81
- msg << " 1. #{@existing.sources.reject(&:removable?).map(&:to_s).join(" and ")}\n"
82
- msg << " 2. #{@checksum.sources.reject(&:removable?).map(&:to_s).join(" and ")}\n"
83
- msg << "You may need to alter your Gemfile sources to resolve this issue.\n"
84
80
  when 1
85
81
  msg = +"If you trust #{remote.first.sources.first}, to resolve this issue you can:\n"
86
82
  msg << removable.first.removal_instructions
@@ -2,41 +2,8 @@
2
2
 
3
3
  module Bundler
4
4
  class FeatureFlag
5
- def self.settings_flag(flag, &default)
6
- unless Bundler::Settings::BOOL_KEYS.include?(flag.to_s)
7
- raise "Cannot use `#{flag}` as a settings feature flag since it isn't a bool key"
8
- end
9
-
10
- settings_method("#{flag}?", flag, &default)
11
- end
12
- private_class_method :settings_flag
13
-
14
- def self.settings_option(key, &default)
15
- settings_method(key, key, &default)
16
- end
17
- private_class_method :settings_option
18
-
19
- def self.settings_method(name, key, &default)
20
- define_method(name) do
21
- value = Bundler.settings[key]
22
- value = instance_eval(&default) if value.nil?
23
- value
24
- end
25
- end
26
- private_class_method :settings_method
27
-
28
5
  (1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }
29
6
 
30
- settings_flag(:allow_offline_install) { bundler_4_mode? }
31
- settings_flag(:cache_all) { bundler_4_mode? }
32
- settings_flag(:forget_cli_options) { bundler_4_mode? }
33
- settings_flag(:global_gem_cache) { bundler_5_mode? }
34
- settings_flag(:lockfile_checksums) { bundler_4_mode? }
35
- settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
36
- settings_flag(:update_requires_all_flag) { bundler_5_mode? }
37
-
38
- settings_option(:default_cli_command) { bundler_4_mode? ? :cli_help : :install }
39
-
40
7
  def removed_major?(target_major_version)
41
8
  @major_version > target_major_version
42
9
  end
@@ -110,7 +110,7 @@ module Bundler
110
110
  def call(path, headers)
111
111
  fetcher.downloader.fetch(fetcher.fetch_uri + path, headers)
112
112
  rescue NetworkDownError => e
113
- raise unless Bundler.feature_flag.allow_offline_install? && headers["If-None-Match"]
113
+ raise unless headers["If-None-Match"]
114
114
  ui.warn "Using the cached data for the new index because of a network error: #{e}"
115
115
  Gem::Net::HTTPNotModified.new(nil, nil, nil)
116
116
  end
@@ -104,12 +104,12 @@ module Bundler
104
104
  message = message.split("-").first if exception.is_a?(Errno)
105
105
  require "cgi/escape"
106
106
  require "cgi/util" unless defined?(CGI::EscapeExt)
107
- "https://github.com/rubygems/rubygems/search?q=" \
107
+ "https://github.com/ruby/rubygems/search?q=" \
108
108
  "#{CGI.escape(message)}&type=Issues"
109
109
  end
110
110
 
111
111
  def new_issue_url
112
- "https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
112
+ "https://github.com/ruby/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
113
113
  end
114
114
  end
115
115
 
@@ -46,13 +46,6 @@ module Bundler
46
46
  true
47
47
  end
48
48
 
49
- def search_all(name, &blk)
50
- return enum_for(:search_all, name) unless blk
51
- specs_by_name(name).each(&blk)
52
- @duplicates[name]&.each(&blk)
53
- @sources.each {|source| source.search_all(name, &blk) }
54
- end
55
-
56
49
  # Search this index's specs, and any source indexes that this index knows
57
50
  # about, returning all of the results.
58
51
  def search(query)
@@ -51,7 +51,7 @@ def gemfile(force_latest_compatible = false, options = {}, &gemfile)
51
51
  Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
52
52
  Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
53
53
 
54
- Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
54
+ Bundler::Plugin.gemfile_install(&gemfile) if Bundler.settings[:plugins]
55
55
  builder = Bundler::Dsl.new
56
56
  builder.instance_eval(&gemfile)
57
57
 
@@ -16,7 +16,6 @@ module Bundler
16
16
  def install_from_spec
17
17
  post_install_message = install
18
18
  Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
19
- generate_executable_stubs
20
19
  [true, post_install_message]
21
20
  rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError, Bundler::InsecureInstallPathError
22
21
  raise
@@ -71,15 +70,5 @@ module Bundler
71
70
  def out_of_space_message
72
71
  "#{install_error_message}\nYour disk is out of space. Free some space to be able to install your bundle."
73
72
  end
74
-
75
- def generate_executable_stubs
76
- return if Bundler.feature_flag.forget_cli_options?
77
- return if Bundler.settings[:inline]
78
- if Bundler.settings[:bin] && standalone
79
- installer.generate_standalone_bundler_executable_stubs(spec)
80
- elsif Bundler.settings[:bin]
81
- installer.generate_bundler_executable_stubs(spec, force: true)
82
- end
83
- end
84
73
  end
85
74
  end
@@ -7,12 +7,6 @@ require_relative "installer/gem_installer"
7
7
 
8
8
  module Bundler
9
9
  class Installer
10
- class << self
11
- attr_accessor :ambiguous_gems
12
-
13
- Installer.ambiguous_gems = []
14
- end
15
-
16
10
  attr_reader :post_install_messages, :definition
17
11
 
18
12
  # Begins the installation process for Bundler.
@@ -95,7 +95,7 @@ module Bundler
95
95
  out << " #{key}: #{val}\n"
96
96
  end
97
97
  when String
98
- out << " #{value}\n"
98
+ out << " #{value}\n"
99
99
  else
100
100
  raise ArgumentError, "#{value.inspect} can't be serialized in a lockfile"
101
101
  end
@@ -141,18 +141,8 @@ module Bundler
141
141
  @pos.advance!(line)
142
142
  end
143
143
 
144
- if !Bundler.frozen_bundle? && @platforms.include?(Gem::Platform::X64_MINGW_LEGACY)
145
- if @platforms.include?(Gem::Platform::X64_MINGW)
146
- @platforms.delete(Gem::Platform::X64_MINGW_LEGACY)
147
- SharedHelpers.major_deprecation(2,
148
- "Found x64-mingw32 in lockfile, which is deprecated. Removing it. Support for x64-mingw32 will be removed in Bundler 4.0.",
149
- removed_message: "Found x64-mingw32 in lockfile, which is no longer supported as of Bundler 4.0.")
150
- else
151
- @platforms[@platforms.index(Gem::Platform::X64_MINGW_LEGACY)] = Gem::Platform::X64_MINGW
152
- SharedHelpers.major_deprecation(2,
153
- "Found x64-mingw32 in lockfile, which is deprecated. Using x64-mingw-ucrt, the replacement for x64-mingw32 in modern rubies, instead. Support for x64-mingw32 will be removed in Bundler 4.0.",
154
- removed_message: "Found x64-mingw32 in lockfile, which is no longer supported as of Bundler 4.0.")
155
- end
144
+ if @platforms.include?(Gem::Platform::X64_MINGW_LEGACY)
145
+ SharedHelpers.feature_deprecated!("Found x64-mingw32 in lockfile, which is deprecated and will be removed in the future.")
156
146
  end
157
147
 
158
148
  @most_specific_locked_platform = @platforms.min_by do |bundle_platform|
@@ -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\-ADD" "1" "August 2025" ""
3
+ .TH "BUNDLE\-ADD" "1" "September 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,24 +1,21 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "August 2025" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "September 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
7
- \fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone] [\-\-all\-platforms]
7
+ \fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-standalone] [\-\-all\-platforms]
8
8
  .SH "DESCRIPTION"
9
9
  Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \fBbin/\fR\. Binstubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
10
10
  .P
11
11
  For example, if you run \fBbundle binstubs rspec\-core\fR, Bundler will create the file \fBbin/rspec\fR\. That file will contain enough code to load Bundler, tell it to load the bundled gems, and then run rspec\.
12
12
  .P
13
- This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the \fB\-\-path\fR directory if one has been set\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
13
+ This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the directory specified by \fBbin\fR setting if it has been configured\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
14
14
  .SH "OPTIONS"
15
15
  .TP
16
16
  \fB\-\-force\fR
17
17
  Overwrite existing binstubs if they exist\.
18
18
  .TP
19
- \fB\-\-path[=PATH]\fR
20
- The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
21
- .TP
22
19
  \fB\-\-standalone\fR
23
20
  Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
24
21
  .TP
@@ -3,7 +3,7 @@ bundle-binstubs(1) -- Install the binstubs of the listed gems
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle binstubs` <GEM_NAME> [--force] [--path PATH] [--standalone] [--all-platforms]
6
+ `bundle binstubs` <GEM_NAME> [--force] [--standalone] [--all-platforms]
7
7
 
8
8
  ## DESCRIPTION
9
9
 
@@ -19,17 +19,15 @@ the file `bin/rspec`. That file will contain enough code to load Bundler,
19
19
  tell it to load the bundled gems, and then run rspec.
20
20
 
21
21
  This command generates binstubs for executables in `GEM_NAME`.
22
- Binstubs are put into `bin`, or the `--path` directory if one has been set.
23
- Calling binstubs with [GEM [GEM]] will create binstubs for all given gems.
22
+ Binstubs are put into `bin`, or the directory specified by `bin` setting if it
23
+ has been configured. Calling binstubs with [GEM [GEM]] will create binstubs for
24
+ all given gems.
24
25
 
25
26
  ## OPTIONS
26
27
 
27
28
  * `--force`:
28
29
  Overwrite existing binstubs if they exist.
29
30
 
30
- * `--path[=PATH]`:
31
- The location to install the specified binstubs to. This defaults to `bin`.
32
-
33
31
  * `--standalone`:
34
32
  Makes binstubs that can work without depending on Rubygems or Bundler at
35
33
  runtime.
@@ -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\-CACHE" "1" "August 2025" ""
3
+ .TH "BUNDLE\-CACHE" "1" "September 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -11,9 +11,6 @@ alias: \fBpackage\fR, \fBpack\fR
11
11
  Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
12
12
  .SH "OPTIONS"
13
13
  .TP
14
- \fB\-\-all\fR
15
- Include all sources (including path and git)\.
16
- .TP
17
14
  \fB\-\-all\-platforms\fR
18
15
  Include gems for all platforms present in the lockfile, not only the current one\.
19
16
  .TP
@@ -26,19 +23,10 @@ Use the specified gemfile instead of Gemfile\.
26
23
  \fB\-\-no\-install\fR
27
24
  Don't install the gems, only update the cache\.
28
25
  .TP
29
- \fB\-\-no\-prune\fR
30
- Don't remove stale gems from the cache\.
31
- .TP
32
- \fB\-\-path=PATH\fR
33
- Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)\.
34
- .TP
35
26
  \fB\-\-quiet\fR
36
27
  Only output warnings and errors\.
37
- .TP
38
- \fB\-\-frozen\fR
39
- Do not allow the Gemfile\.lock to be updated after this bundle cache operation's install\.
40
28
  .SH "GIT AND PATH GEMS"
41
- The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
29
+ The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This can be disabled setting \fBcache_all\fR to false\.
42
30
  .SH "SUPPORT FOR MULTIPLE PLATFORMS"
43
31
  When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
44
32
  .SH "REMOTE FETCHING"
@@ -15,9 +15,6 @@ use the gems in the cache in preference to the ones on `rubygems.org`.
15
15
 
16
16
  ## OPTIONS
17
17
 
18
- * `--all`:
19
- Include all sources (including path and git).
20
-
21
18
  * `--all-platforms`:
22
19
  Include gems for all platforms present in the lockfile, not only the current one.
23
20
 
@@ -30,23 +27,13 @@ use the gems in the cache in preference to the ones on `rubygems.org`.
30
27
  * `--no-install`:
31
28
  Don't install the gems, only update the cache.
32
29
 
33
- * `--no-prune`:
34
- Don't remove stale gems from the cache.
35
-
36
- * `--path=PATH`:
37
- Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).
38
-
39
30
  * `--quiet`:
40
31
  Only output warnings and errors.
41
32
 
42
- * `--frozen`:
43
- Do not allow the Gemfile.lock to be updated after this bundle cache operation's install.
44
-
45
33
  ## GIT AND PATH GEMS
46
34
 
47
35
  The `bundle cache` command can also package `:git` and `:path` dependencies
48
- besides .gem files. This needs to be explicitly enabled via the `--all` option.
49
- Once used, the `--all` option will be remembered.
36
+ besides .gem files. This can be disabled setting `cache_all` to false.
50
37
 
51
38
  ## SUPPORT FOR MULTIPLE PLATFORMS
52
39
 
@@ -1,10 +1,10 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CHECK" "1" "August 2025" ""
3
+ .TH "BUNDLE\-CHECK" "1" "September 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
7
- \fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE] [\-\-path=PATH]
7
+ \fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE]
8
8
  .SH "DESCRIPTION"
9
9
  \fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a status of 0\.
10
10
  .P
@@ -18,7 +18,4 @@ Locks the [\fBGemfile(5)\fR][Gemfile(5)] before running the command\.
18
18
  .TP
19
19
  \fB\-\-gemfile=GEMFILE\fR
20
20
  Use the specified gemfile instead of the [\fBGemfile(5)\fR][Gemfile(5)]\.
21
- .TP
22
- \fB\-\-path=PATH\fR
23
- Specify a different path than the system default (\fB$BUNDLE_PATH\fR or \fB$GEM_HOME\fR)\. Bundler will remember this value for future installs on this machine\.
24
21
 
@@ -5,7 +5,6 @@ bundle-check(1) -- Verifies if dependencies are satisfied by installed gems
5
5
 
6
6
  `bundle check` [--dry-run]
7
7
  [--gemfile=FILE]
8
- [--path=PATH]
9
8
 
10
9
  ## DESCRIPTION
11
10
 
@@ -25,7 +24,3 @@ installed on the local machine, if they satisfy the requirements.
25
24
 
26
25
  * `--gemfile=GEMFILE`:
27
26
  Use the specified gemfile instead of the [`Gemfile(5)`][Gemfile(5)].
28
-
29
- * `--path=PATH`:
30
- Specify a different path than the system default (`$BUNDLE_PATH` or `$GEM_HOME`).
31
- Bundler will remember this value for future installs on this machine.
@@ -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\-CLEAN" "1" "August 2025" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "September 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"