rubygems-update 3.7.2 → 4.0.0.beta2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1431 -1323
- data/CODE_OF_CONDUCT.md +7 -129
- data/Manifest.txt +5 -11
- data/README.md +2 -2
- data/bundler/CHANGELOG.md +1011 -917
- data/bundler/README.md +4 -4
- data/bundler/bundler.gemspec +3 -3
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/capistrano.rb +1 -19
- data/bundler/lib/bundler/cli/cache.rb +1 -11
- data/bundler/lib/bundler/cli/common.rb +20 -3
- data/bundler/lib/bundler/cli/config.rb +1 -2
- data/bundler/lib/bundler/cli/console.rb +5 -0
- data/bundler/lib/bundler/cli/exec.rb +29 -4
- data/bundler/lib/bundler/cli/gem.rb +19 -33
- data/bundler/lib/bundler/cli/install.rb +9 -82
- data/bundler/lib/bundler/cli/issue.rb +2 -2
- data/bundler/lib/bundler/cli/list.rb +33 -2
- data/bundler/lib/bundler/cli/plugin.rb +5 -1
- data/bundler/lib/bundler/cli/show.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +3 -3
- data/bundler/lib/bundler/cli.rb +91 -85
- data/bundler/lib/bundler/compact_index_client.rb +0 -1
- data/bundler/lib/bundler/current_ruby.rb +3 -15
- data/bundler/lib/bundler/definition.rb +65 -36
- data/bundler/lib/bundler/deployment.rb +1 -64
- data/bundler/lib/bundler/digest.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +26 -36
- data/bundler/lib/bundler/endpoint_specification.rb +0 -22
- data/bundler/lib/bundler/environment_preserver.rb +1 -0
- data/bundler/lib/bundler/errors.rb +1 -5
- data/bundler/lib/bundler/feature_flag.rb +0 -33
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -2
- data/bundler/lib/bundler/index.rb +0 -7
- data/bundler/lib/bundler/inline.rb +9 -1
- data/bundler/lib/bundler/installer/gem_installer.rb +0 -11
- data/bundler/lib/bundler/installer.rb +0 -6
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +2 -12
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +3 -6
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
- data/bundler/lib/bundler/man/bundle-cache.1 +2 -14
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +1 -14
- data/bundler/lib/bundler/man/bundle-check.1 +2 -5
- data/bundler/lib/bundler/man/bundle-check.1.ronn +0 -5
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +9 -33
- data/bundler/lib/bundler/man/bundle-config.1.ronn +24 -55
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +2 -5
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -5
- data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +3 -6
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +2 -5
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +14 -57
- data/bundler/lib/bundler/man/bundle-install.1.ronn +25 -105
- data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
- data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +6 -1
- data/bundler/lib/bundler/man/bundle-list.1.ronn +5 -0
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +2 -9
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +2 -8
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -8
- data/bundler/lib/bundler/man/bundle-show.1 +2 -5
- data/bundler/lib/bundler/man/bundle-show.1.ronn +0 -4
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -10
- data/bundler/lib/bundler/man/bundle.1.ronn +0 -9
- data/bundler/lib/bundler/man/gemfile.5 +32 -1
- data/bundler/lib/bundler/man/gemfile.5.ronn +28 -0
- data/bundler/lib/bundler/man/index.txt +0 -2
- data/bundler/lib/bundler/materialization.rb +1 -1
- data/bundler/lib/bundler/plugin/installer.rb +0 -10
- data/bundler/lib/bundler/plugin/source_list.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +1 -1
- data/bundler/lib/bundler/ruby_dsl.rb +2 -0
- data/bundler/lib/bundler/ruby_version.rb +1 -3
- data/bundler/lib/bundler/rubygems_ext.rb +1 -1
- data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -1
- data/bundler/lib/bundler/rubygems_integration.rb +1 -5
- data/bundler/lib/bundler/runtime.rb +5 -1
- data/bundler/lib/bundler/self_manager.rb +1 -1
- data/bundler/lib/bundler/settings.rb +8 -26
- data/bundler/lib/bundler/shared_helpers.rb +12 -20
- data/bundler/lib/bundler/source/git/git_proxy.rb +3 -11
- data/bundler/lib/bundler/source/git.rb +2 -3
- data/bundler/lib/bundler/source/path.rb +3 -7
- data/bundler/lib/bundler/source/rubygems.rb +11 -17
- data/bundler/lib/bundler/source.rb +1 -1
- data/bundler/lib/bundler/source_list.rb +4 -45
- data/bundler/lib/bundler/source_map.rb +2 -5
- data/bundler/lib/bundler/spec_set.rb +6 -15
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +5 -0
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -1
- data/bundler/lib/bundler/ui/shell.rb +10 -6
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/vlad.rb +1 -14
- data/bundler/lib/bundler.rb +6 -28
- data/doc/MAINTAINERS.txt +0 -7
- data/doc/bundler/UPGRADING.md +11 -5
- data/doc/rubygems/CONTRIBUTING.md +1 -1
- data/lib/rubygems/basic_specification.rb +3 -9
- data/lib/rubygems/bundler_version_finder.rb +38 -3
- data/lib/rubygems/command.rb +1 -1
- data/lib/rubygems/command_manager.rb +3 -4
- data/lib/rubygems/commands/build_command.rb +0 -7
- data/lib/rubygems/commands/cert_command.rb +1 -1
- data/lib/rubygems/commands/install_command.rb +1 -5
- data/lib/rubygems/commands/setup_command.rb +5 -3
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/dependency_installer.rb +0 -77
- data/lib/rubygems/dependency_list.rb +1 -2
- data/lib/rubygems/deprecate.rb +74 -72
- data/lib/rubygems/doctor.rb +1 -1
- data/lib/rubygems/errors.rb +1 -1
- data/lib/rubygems/exceptions.rb +2 -3
- data/lib/rubygems/ext/builder.rb +6 -2
- data/lib/rubygems/ext/cargo_builder.rb +2 -2
- data/lib/rubygems/ext/cmake_builder.rb +97 -8
- data/lib/rubygems/ext/configure_builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +6 -2
- data/lib/rubygems/ext/rake_builder.rb +2 -2
- data/lib/rubygems/gem_runner.rb +0 -1
- data/lib/rubygems/install_update_options.rb +1 -2
- data/lib/rubygems/installer.rb +16 -54
- data/lib/rubygems/name_tuple.rb +7 -1
- data/lib/rubygems/package/tar_header.rb +4 -4
- data/lib/rubygems/package/tar_reader.rb +2 -0
- data/lib/rubygems/package/tar_writer.rb +1 -1
- data/lib/rubygems/package.rb +21 -12
- data/lib/rubygems/platform.rb +31 -11
- data/lib/rubygems/remote_fetcher.rb +8 -5
- data/lib/rubygems/resolver/conflict.rb +1 -1
- data/lib/rubygems/resolver.rb +1 -1
- data/lib/rubygems/security/signer.rb +1 -1
- data/lib/rubygems/source.rb +2 -2
- data/lib/rubygems/spec_fetcher.rb +4 -4
- data/lib/rubygems/specification.rb +5 -96
- data/lib/rubygems/specification_policy.rb +0 -36
- data/lib/rubygems/specification_record.rb +1 -1
- data/lib/rubygems/text.rb +1 -1
- data/lib/rubygems/uninstaller.rb +17 -6
- data/lib/rubygems/user_interaction.rb +6 -9
- data/lib/rubygems/util.rb +0 -22
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +25 -9
- data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +2 -2
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -14
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +82 -41
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +1 -1
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +4 -1
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +57 -15
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +34 -21
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +12 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +2 -2
- data/lib/rubygems/version.rb +8 -20
- data/lib/rubygems/win_platform.rb +31 -0
- data/lib/rubygems.rb +12 -40
- data/rubygems-update.gemspec +6 -4
- metadata +10 -18
- data/bundler/lib/bundler/cli/inject.rb +0 -60
- data/bundler/lib/bundler/cli/viz.rb +0 -31
- data/bundler/lib/bundler/graph.rb +0 -152
- data/bundler/lib/bundler/man/bundle-inject.1 +0 -31
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +0 -32
- data/bundler/lib/bundler/man/bundle-viz.1 +0 -30
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +0 -36
- data/bundler/lib/bundler/similarity_detector.rb +0 -63
- data/lib/rubygems/commands/query_command.rb +0 -43
- data/lib/rubygems/compatibility.rb +0 -41
- data/lib/rubygems/install_default_message.rb +0 -13
data/bundler/lib/bundler/cli.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Bundler
|
|
|
11
11
|
|
|
12
12
|
AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean].freeze
|
|
13
13
|
PARSEABLE_COMMANDS = %w[check config help exec platform show version].freeze
|
|
14
|
-
EXTENSIONS = ["c", "rust"].freeze
|
|
14
|
+
EXTENSIONS = ["c", "rust", "go"].freeze
|
|
15
15
|
|
|
16
16
|
COMMAND_ALIASES = {
|
|
17
17
|
"check" => "c",
|
|
@@ -24,7 +24,7 @@ module Bundler
|
|
|
24
24
|
}.freeze
|
|
25
25
|
|
|
26
26
|
def self.start(*)
|
|
27
|
-
|
|
27
|
+
check_invalid_ext_option(ARGV) if ARGV.include?("--ext")
|
|
28
28
|
|
|
29
29
|
super
|
|
30
30
|
ensure
|
|
@@ -59,17 +59,29 @@ module Bundler
|
|
|
59
59
|
def initialize(*args)
|
|
60
60
|
super
|
|
61
61
|
|
|
62
|
+
current_cmd = args.last[:current_command].name
|
|
63
|
+
|
|
62
64
|
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
|
|
63
65
|
if custom_gemfile && !custom_gemfile.empty?
|
|
64
66
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
|
|
65
|
-
|
|
67
|
+
reset_settings = true
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# lock --lockfile works differently than install --lockfile
|
|
71
|
+
unless current_cmd == "lock"
|
|
72
|
+
custom_lockfile = options[:lockfile] || Bundler.settings[:lockfile]
|
|
73
|
+
if custom_lockfile && !custom_lockfile.empty?
|
|
74
|
+
Bundler::SharedHelpers.set_env "BUNDLE_LOCKFILE", File.expand_path(custom_lockfile)
|
|
75
|
+
reset_settings = true
|
|
76
|
+
end
|
|
66
77
|
end
|
|
67
78
|
|
|
79
|
+
Bundler.reset_settings_and_root! if reset_settings
|
|
80
|
+
|
|
68
81
|
Bundler.auto_switch
|
|
69
82
|
|
|
70
83
|
Bundler.settings.set_command_option_if_given :retry, options[:retry]
|
|
71
84
|
|
|
72
|
-
current_cmd = args.last[:current_command].name
|
|
73
85
|
Bundler.auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
|
|
74
86
|
rescue UnknownArgumentError => e
|
|
75
87
|
raise InvalidOption, e.message
|
|
@@ -107,7 +119,22 @@ module Bundler
|
|
|
107
119
|
shell.say
|
|
108
120
|
self.class.send(:class_options_help, shell)
|
|
109
121
|
end
|
|
110
|
-
|
|
122
|
+
|
|
123
|
+
def self.default_command(meth = nil)
|
|
124
|
+
return super if meth
|
|
125
|
+
|
|
126
|
+
default_cli_command = Bundler.settings[:default_cli_command]
|
|
127
|
+
return default_cli_command if default_cli_command
|
|
128
|
+
|
|
129
|
+
Bundler.ui.warn(<<~MSG)
|
|
130
|
+
In the next version of Bundler, running `bundle` without argument will no longer run `bundle install`.
|
|
131
|
+
Instead, the `help` command will be displayed.
|
|
132
|
+
|
|
133
|
+
If you'd like to keep the previous behaviour please run `bundle config set default_cli_command install --global`.
|
|
134
|
+
MSG
|
|
135
|
+
|
|
136
|
+
"install"
|
|
137
|
+
end
|
|
111
138
|
|
|
112
139
|
class_option "no-color", type: :boolean, desc: "Disable colorization in output"
|
|
113
140
|
class_option "retry", type: :numeric, aliases: "-r", banner: "NUM",
|
|
@@ -143,7 +170,7 @@ module Bundler
|
|
|
143
170
|
end
|
|
144
171
|
|
|
145
172
|
def self.handle_no_command_error(command, has_namespace = $thor_runner)
|
|
146
|
-
if Bundler.
|
|
173
|
+
if Bundler.settings[:plugins] && Bundler::Plugin.command?(command)
|
|
147
174
|
return Bundler::Plugin.exec_command(command, ARGV[1..-1])
|
|
148
175
|
end
|
|
149
176
|
|
|
@@ -173,7 +200,7 @@ module Bundler
|
|
|
173
200
|
D
|
|
174
201
|
method_option "dry-run", type: :boolean, default: false, banner: "Lock the Gemfile"
|
|
175
202
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
|
176
|
-
method_option "path", type: :string, banner: "Specify a different path than the system default
|
|
203
|
+
method_option "path", type: :string, banner: "Specify a different path than the system default, namely, $BUNDLE_PATH or $GEM_HOME (removed)"
|
|
177
204
|
def check
|
|
178
205
|
remembered_flag_deprecation("path")
|
|
179
206
|
|
|
@@ -187,12 +214,11 @@ module Bundler
|
|
|
187
214
|
long_desc <<-D
|
|
188
215
|
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
|
|
189
216
|
D
|
|
190
|
-
method_option "install", type: :boolean, banner: "Runs 'bundle install' after removing the gems from the Gemfile"
|
|
217
|
+
method_option "install", type: :boolean, banner: "Runs 'bundle install' after removing the gems from the Gemfile (removed)"
|
|
191
218
|
def remove(*gems)
|
|
192
219
|
if ARGV.include?("--install")
|
|
193
|
-
message = "The `--install` flag has been deprecated. `bundle install` is triggered by default."
|
|
194
220
|
removed_message = "The `--install` flag has been removed. `bundle install` is triggered by default."
|
|
195
|
-
|
|
221
|
+
raise InvalidOption, removed_message
|
|
196
222
|
end
|
|
197
223
|
|
|
198
224
|
require_relative "cli/remove"
|
|
@@ -210,27 +236,29 @@ module Bundler
|
|
|
210
236
|
|
|
211
237
|
If the bundle has already been installed, bundler will tell you so and then exit.
|
|
212
238
|
D
|
|
213
|
-
method_option "binstubs", type: :string, lazy_default: "bin", banner: "Generate bin stubs for bundled gems to ./bin"
|
|
214
|
-
method_option "clean", type: :boolean, banner: "Run bundle clean automatically after install"
|
|
215
|
-
method_option "deployment", type: :boolean, banner: "Install using defaults tuned for deployment environments"
|
|
216
|
-
method_option "frozen", type: :boolean, banner: "Do not allow the Gemfile.lock to be updated after this install"
|
|
239
|
+
method_option "binstubs", type: :string, lazy_default: "bin", banner: "Generate bin stubs for bundled gems to ./bin (removed)"
|
|
240
|
+
method_option "clean", type: :boolean, banner: "Run bundle clean automatically after install (removed)"
|
|
241
|
+
method_option "deployment", type: :boolean, banner: "Install using defaults tuned for deployment environments (removed)"
|
|
242
|
+
method_option "frozen", type: :boolean, banner: "Do not allow the Gemfile.lock to be updated after this install (removed)"
|
|
217
243
|
method_option "full-index", type: :boolean, banner: "Fall back to using the single-file index of all gems"
|
|
218
244
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
|
219
245
|
method_option "jobs", aliases: "-j", type: :numeric, banner: "Specify the number of jobs to run in parallel"
|
|
220
246
|
method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
|
|
247
|
+
method_option "lockfile", type: :string, banner: "Use the specified lockfile instead of the default."
|
|
221
248
|
method_option "prefer-local", type: :boolean, banner: "Only attempt to fetch gems remotely if not present locally, even if newer versions are available remotely"
|
|
222
249
|
method_option "no-cache", type: :boolean, banner: "Don't update the existing gem cache."
|
|
250
|
+
method_option "no-lock", type: :boolean, banner: "Don't create a lockfile."
|
|
223
251
|
method_option "force", type: :boolean, aliases: "--redownload", banner: "Force reinstalling every gem, even if already installed"
|
|
224
|
-
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
|
|
225
|
-
method_option "path", type: :string, banner: "Specify a different path than the system default
|
|
252
|
+
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache (removed)."
|
|
253
|
+
method_option "path", type: :string, banner: "Specify a different path than the system default, namely, $BUNDLE_PATH or $GEM_HOME (removed)."
|
|
226
254
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
|
227
|
-
method_option "shebang", type: :string, banner: "Specify a different shebang executable name than the default
|
|
255
|
+
method_option "shebang", type: :string, banner: "Specify a different shebang executable name than the default, usually 'ruby' (removed)"
|
|
228
256
|
method_option "standalone", type: :array, lazy_default: [], banner: "Make a bundle that can work without the Bundler runtime"
|
|
229
|
-
method_option "system", type: :boolean, banner: "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
|
|
257
|
+
method_option "system", type: :boolean, banner: "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application (removed)"
|
|
230
258
|
method_option "trust-policy", alias: "P", type: :string, banner: "Gem trust policy (like gem install -P). Must be one of #{Bundler.rubygems.security_policy_keys.join("|")}"
|
|
231
259
|
method_option "target-rbconfig", type: :string, banner: "Path to rbconfig.rb for the deployment target platform"
|
|
232
|
-
method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group."
|
|
233
|
-
method_option "with", type: :array, banner: "Include gems that are part of the specified named group."
|
|
260
|
+
method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group (removed)."
|
|
261
|
+
method_option "with", type: :array, banner: "Include gems that are part of the specified named group (removed)."
|
|
234
262
|
def install
|
|
235
263
|
%w[clean deployment frozen no-prune path shebang without with].each do |option|
|
|
236
264
|
remembered_flag_deprecation(option)
|
|
@@ -240,6 +268,11 @@ module Bundler
|
|
|
240
268
|
|
|
241
269
|
remembered_flag_deprecation("deployment", negative: true)
|
|
242
270
|
|
|
271
|
+
if ARGV.include?("--binstubs")
|
|
272
|
+
removed_message = "The --binstubs option has been removed in favor of `bundle binstubs --all`"
|
|
273
|
+
raise InvalidOption, removed_message
|
|
274
|
+
end
|
|
275
|
+
|
|
243
276
|
require_relative "cli/install"
|
|
244
277
|
Bundler.settings.temporary(no_install: false) do
|
|
245
278
|
Install.new(options.dup).run
|
|
@@ -284,12 +317,11 @@ module Bundler
|
|
|
284
317
|
Calling show with [GEM] will list the exact location of that gem on your machine.
|
|
285
318
|
D
|
|
286
319
|
method_option "paths", type: :boolean, banner: "List the paths of all gems that are required by your Gemfile."
|
|
287
|
-
method_option "outdated", type: :boolean, banner: "Show verbose output including whether gems are outdated."
|
|
320
|
+
method_option "outdated", type: :boolean, banner: "Show verbose output including whether gems are outdated (removed)."
|
|
288
321
|
def show(gem_name = nil)
|
|
289
322
|
if ARGV.include?("--outdated")
|
|
290
|
-
message = "the `--outdated` flag to `bundle show` will be removed in favor of `bundle show --verbose`"
|
|
291
323
|
removed_message = "the `--outdated` flag to `bundle show` has been removed in favor of `bundle show --verbose`"
|
|
292
|
-
|
|
324
|
+
raise InvalidOption, removed_message
|
|
293
325
|
end
|
|
294
326
|
require_relative "cli/show"
|
|
295
327
|
Show.new(options, gem_name).run
|
|
@@ -299,6 +331,7 @@ module Bundler
|
|
|
299
331
|
method_option "name-only", type: :boolean, banner: "print only the gem names"
|
|
300
332
|
method_option "only-group", type: :array, default: [], banner: "print gems from a given set of groups"
|
|
301
333
|
method_option "without-group", type: :array, default: [], banner: "print all gems except from a given set of groups"
|
|
334
|
+
method_option "format", type: :string, banner: "format output ('json' is the only supported format)"
|
|
302
335
|
method_option "paths", type: :boolean, banner: "print the path to each gem in the bundle"
|
|
303
336
|
def list
|
|
304
337
|
require_relative "cli/list"
|
|
@@ -322,7 +355,7 @@ module Bundler
|
|
|
322
355
|
will create binstubs for all given gems.
|
|
323
356
|
D
|
|
324
357
|
method_option "force", type: :boolean, default: false, banner: "Overwrite existing binstubs if they exist"
|
|
325
|
-
method_option "path", type: :string, lazy_default: "bin", banner: "Binstub destination directory
|
|
358
|
+
method_option "path", type: :string, lazy_default: "bin", banner: "Binstub destination directory, `bin` by default (removed)"
|
|
326
359
|
method_option "shebang", type: :string, banner: "Specify a different shebang executable name than the default (usually 'ruby')"
|
|
327
360
|
method_option "standalone", type: :boolean, banner: "Make binstubs that can work without the Bundler runtime"
|
|
328
361
|
method_option "all", type: :boolean, banner: "Install binstubs for all gems"
|
|
@@ -395,15 +428,15 @@ module Bundler
|
|
|
395
428
|
end
|
|
396
429
|
|
|
397
430
|
desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
|
|
398
|
-
method_option "all", type: :boolean, default: Bundler.
|
|
431
|
+
method_option "all", type: :boolean, default: Bundler.settings[:cache_all], banner: "Include all sources (including path and git) (removed)."
|
|
399
432
|
method_option "all-platforms", type: :boolean, banner: "Include gems for all platforms present in the lockfile, not only the current one"
|
|
400
433
|
method_option "cache-path", type: :string, banner: "Specify a different cache path than the default (vendor/cache)."
|
|
401
434
|
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
|
402
435
|
method_option "no-install", type: :boolean, banner: "Don't install the gems, only update the cache."
|
|
403
|
-
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
|
|
404
|
-
method_option "path", type: :string, banner: "Specify a different path than the system default
|
|
436
|
+
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache (removed)."
|
|
437
|
+
method_option "path", type: :string, banner: "Specify a different path than the system default, namely, $BUNDLE_PATH or $GEM_HOME (removed)."
|
|
405
438
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
|
406
|
-
method_option "frozen", type: :boolean, banner: "Do not allow the Gemfile.lock to be updated after this bundle cache operation's install"
|
|
439
|
+
method_option "frozen", type: :boolean, banner: "Do not allow the Gemfile.lock to be updated after this bundle cache operation's install (removed)"
|
|
407
440
|
long_desc <<-D
|
|
408
441
|
The cache command will copy the .gem files for every gem in the bundle into the
|
|
409
442
|
directory ./vendor/cache. If you then check that directory into your source
|
|
@@ -419,16 +452,12 @@ module Bundler
|
|
|
419
452
|
end
|
|
420
453
|
|
|
421
454
|
if flag_passed?("--path")
|
|
422
|
-
message =
|
|
423
|
-
"The `--path` flag is deprecated because its semantics are unclear. " \
|
|
424
|
-
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
|
|
425
|
-
"and `bundle config path` to configure the path where your gems are installed, " \
|
|
426
|
-
"and stop using this flag"
|
|
427
455
|
removed_message =
|
|
428
456
|
"The `--path` flag has been removed because its semantics were unclear. " \
|
|
429
457
|
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
|
|
430
|
-
"and `bundle config path` to configure the path where your gems are installed
|
|
431
|
-
|
|
458
|
+
"and `bundle config path` to configure the path where your gems are installed, " \
|
|
459
|
+
"and stop using this flag"
|
|
460
|
+
raise InvalidOption, removed_message
|
|
432
461
|
end
|
|
433
462
|
|
|
434
463
|
require_relative "cli/cache"
|
|
@@ -438,7 +467,7 @@ module Bundler
|
|
|
438
467
|
map aliases_for("cache")
|
|
439
468
|
|
|
440
469
|
desc "exec [OPTIONS]", "Run the command in context of the bundle"
|
|
441
|
-
method_option :keep_file_descriptors, type: :boolean, default: true, banner: "Passes all file descriptors to the new processes. Default is true, and setting it to false is
|
|
470
|
+
method_option :keep_file_descriptors, type: :boolean, default: true, banner: "Passes all file descriptors to the new processes. Default is true, and setting it to false is not permitted (removed)."
|
|
442
471
|
method_option :gemfile, type: :string, required: false, banner: "Use the specified gemfile instead of Gemfile"
|
|
443
472
|
long_desc <<-D
|
|
444
473
|
Exec runs a command, providing it access to the gems in the bundle. While using
|
|
@@ -447,9 +476,8 @@ module Bundler
|
|
|
447
476
|
D
|
|
448
477
|
def exec(*args)
|
|
449
478
|
if ARGV.include?("--no-keep-file-descriptors")
|
|
450
|
-
message = "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to"
|
|
451
479
|
removed_message = "The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to"
|
|
452
|
-
|
|
480
|
+
raise InvalidOption, removed_message
|
|
453
481
|
end
|
|
454
482
|
|
|
455
483
|
require_relative "cli/exec"
|
|
@@ -493,7 +521,7 @@ module Bundler
|
|
|
493
521
|
build_info = " (#{BuildMetadata.timestamp} commit #{BuildMetadata.git_commit_sha})"
|
|
494
522
|
end
|
|
495
523
|
|
|
496
|
-
if !cli_help
|
|
524
|
+
if !cli_help
|
|
497
525
|
Bundler.ui.info "#{Bundler.verbose_version}#{build_info}"
|
|
498
526
|
else
|
|
499
527
|
Bundler.ui.info "Bundler version #{Bundler.verbose_version}#{build_info}"
|
|
@@ -516,23 +544,9 @@ module Bundler
|
|
|
516
544
|
end
|
|
517
545
|
end
|
|
518
546
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
Viz generates a PNG file of the current Gemfile as a dependency graph.
|
|
523
|
-
Viz requires the ruby-graphviz gem (and its dependencies).
|
|
524
|
-
The associated gems must also be installed via 'bundle install'.
|
|
525
|
-
D
|
|
526
|
-
method_option :file, type: :string, default: "gem_graph", aliases: "-f", banner: "The name to use for the generated file. see format option"
|
|
527
|
-
method_option :format, type: :string, default: "png", aliases: "-F", banner: "This is output format option. Supported format is png, jpg, svg, dot ..."
|
|
528
|
-
method_option :requirements, type: :boolean, default: false, aliases: "-R", banner: "Set to show the version of each required dependency."
|
|
529
|
-
method_option :version, type: :boolean, default: false, aliases: "-v", banner: "Set to show each gem version."
|
|
530
|
-
method_option :without, type: :array, default: [], aliases: "-W", banner: "Exclude gems that are part of the specified named group."
|
|
531
|
-
def viz
|
|
532
|
-
SharedHelpers.major_deprecation 2, "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
|
|
533
|
-
require_relative "cli/viz"
|
|
534
|
-
Viz.new(options.dup).run
|
|
535
|
-
end
|
|
547
|
+
desc "viz [OPTIONS]", "Generates a visual dependency graph", hide: true
|
|
548
|
+
def viz
|
|
549
|
+
SharedHelpers.feature_removed! "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
|
|
536
550
|
end
|
|
537
551
|
|
|
538
552
|
desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
|
|
@@ -542,7 +556,7 @@ module Bundler
|
|
|
542
556
|
method_option :ext, type: :string, banner: "Generate the boilerplate for C extension code.", enum: EXTENSIONS
|
|
543
557
|
method_option :git, type: :boolean, default: true, banner: "Initialize a git repo inside your library."
|
|
544
558
|
method_option :mit, type: :boolean, banner: "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
|
|
545
|
-
method_option :rubocop, type: :boolean, banner: "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true
|
|
559
|
+
method_option :rubocop, type: :boolean, banner: "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true` (removed)."
|
|
546
560
|
method_option :changelog, type: :boolean, banner: "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
|
|
547
561
|
method_option :test, type: :string, lazy_default: Bundler.settings["gem.test"] || "", aliases: "-t", banner: "Use the specified test framework for your library", enum: %w[rspec minitest test-unit], desc: "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
|
|
548
562
|
method_option :ci, type: :string, lazy_default: Bundler.settings["gem.ci"] || "", enum: %w[github gitlab circle], banner: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
|
|
@@ -552,6 +566,10 @@ module Bundler
|
|
|
552
566
|
|
|
553
567
|
def gem(name)
|
|
554
568
|
require_relative "cli/gem"
|
|
569
|
+
|
|
570
|
+
raise InvalidOption, "--rubocop has been removed, use --linter=rubocop" if ARGV.include?("--rubocop")
|
|
571
|
+
raise InvalidOption, "--no-rubocop has been removed, use --no-linter" if ARGV.include?("--no-rubocop")
|
|
572
|
+
|
|
555
573
|
cmd_args = args + [self]
|
|
556
574
|
cmd_args.unshift(options)
|
|
557
575
|
|
|
@@ -562,7 +580,7 @@ module Bundler
|
|
|
562
580
|
File.expand_path("templates", __dir__)
|
|
563
581
|
end
|
|
564
582
|
|
|
565
|
-
desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory"
|
|
583
|
+
desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory"
|
|
566
584
|
method_option "dry-run", type: :boolean, default: false, banner: "Only print out changes, do not clean gems"
|
|
567
585
|
method_option "force", type: :boolean, default: false, banner: "Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application."
|
|
568
586
|
def clean
|
|
@@ -578,12 +596,8 @@ module Bundler
|
|
|
578
596
|
end
|
|
579
597
|
|
|
580
598
|
desc "inject GEM VERSION", "Add the named gem, with version requirements, to the resolved Gemfile", hide: true
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
def inject(name, version)
|
|
584
|
-
SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
|
|
585
|
-
require_relative "cli/inject"
|
|
586
|
-
Inject.new(options.dup, name, version).run
|
|
599
|
+
def inject(*)
|
|
600
|
+
SharedHelpers.feature_removed! "The `inject` command has been replaced by the `add` command"
|
|
587
601
|
end
|
|
588
602
|
|
|
589
603
|
desc "lock", "Creates a lockfile without installing"
|
|
@@ -637,7 +651,7 @@ module Bundler
|
|
|
637
651
|
end
|
|
638
652
|
end
|
|
639
653
|
|
|
640
|
-
if Bundler.
|
|
654
|
+
if Bundler.settings[:plugins]
|
|
641
655
|
require_relative "cli/plugin"
|
|
642
656
|
desc "plugin", "Manage the bundler plugins"
|
|
643
657
|
subcommand "plugin", Plugin
|
|
@@ -671,18 +685,15 @@ module Bundler
|
|
|
671
685
|
end
|
|
672
686
|
end
|
|
673
687
|
|
|
674
|
-
def self.
|
|
675
|
-
# when
|
|
676
|
-
|
|
677
|
-
if deprecated_ext_value?(arguments)
|
|
678
|
-
message = "Extensions can now be generated using C or Rust, so `--ext` with no arguments has been deprecated. Please select a language, e.g. `--ext=rust` to generate a Rust extension. This gem will now be generated as if `--ext=c` was used."
|
|
688
|
+
def self.check_invalid_ext_option(arguments)
|
|
689
|
+
# when invalid version of `--ext` is called
|
|
690
|
+
if invalid_ext_value?(arguments)
|
|
679
691
|
removed_message = "Extensions can now be generated using C or Rust, so `--ext` with no arguments has been removed. Please select a language, e.g. `--ext=rust` to generate a Rust extension."
|
|
680
|
-
|
|
681
|
-
arguments[arguments.index("--ext")] = "--ext=c"
|
|
692
|
+
raise InvalidOption, removed_message
|
|
682
693
|
end
|
|
683
694
|
end
|
|
684
695
|
|
|
685
|
-
def self.
|
|
696
|
+
def self.invalid_ext_value?(arguments)
|
|
686
697
|
index = arguments.index("--ext")
|
|
687
698
|
next_argument = arguments[index + 1]
|
|
688
699
|
|
|
@@ -690,15 +701,15 @@ module Bundler
|
|
|
690
701
|
# for example `bundle gem hello --ext c`
|
|
691
702
|
return false if EXTENSIONS.include?(next_argument)
|
|
692
703
|
|
|
693
|
-
#
|
|
704
|
+
# invalid call when --ext is called with no value in last position
|
|
694
705
|
# for example `bundle gem hello_gem --ext`
|
|
695
706
|
return true if next_argument.nil?
|
|
696
707
|
|
|
697
|
-
#
|
|
708
|
+
# invalid call when --ext is followed by other parameter
|
|
698
709
|
# for example `bundle gem --ext --no-ci hello_gem`
|
|
699
710
|
return true if next_argument.start_with?("-")
|
|
700
711
|
|
|
701
|
-
#
|
|
712
|
+
# invalid call when --ext is followed by gem name
|
|
702
713
|
# for example `bundle gem --ext hello_gem`
|
|
703
714
|
return true if next_argument
|
|
704
715
|
|
|
@@ -766,17 +777,12 @@ module Bundler
|
|
|
766
777
|
end
|
|
767
778
|
|
|
768
779
|
def print_remembered_flag_deprecation(flag_name, option_name, option_value)
|
|
769
|
-
message =
|
|
770
|
-
"The `#{flag_name}` flag is deprecated because it relies on being " \
|
|
771
|
-
"remembered across bundler invocations, which bundler will no longer " \
|
|
772
|
-
"do in future versions. Instead please use `bundle config set #{option_name} " \
|
|
773
|
-
"#{option_value}`, and stop using this flag"
|
|
774
780
|
removed_message =
|
|
775
781
|
"The `#{flag_name}` flag has been removed because it relied on being " \
|
|
776
|
-
"remembered across bundler invocations, which bundler
|
|
777
|
-
"
|
|
778
|
-
"
|
|
779
|
-
|
|
782
|
+
"remembered across bundler invocations, which bundler no longer does. " \
|
|
783
|
+
"Instead please use `bundle config set #{option_name} #{option_value}`, " \
|
|
784
|
+
"and stop using this flag"
|
|
785
|
+
raise InvalidOption, removed_message
|
|
780
786
|
end
|
|
781
787
|
|
|
782
788
|
def flag_passed?(name)
|
|
@@ -11,7 +11,7 @@ module Bundler
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
class CurrentRuby
|
|
14
|
-
ALL_RUBY_VERSIONS =
|
|
14
|
+
ALL_RUBY_VERSIONS = [*18..27, *30..34, 40].freeze
|
|
15
15
|
KNOWN_MINOR_VERSIONS = ALL_RUBY_VERSIONS.map {|v| v.digits.reverse.join(".") }.freeze
|
|
16
16
|
KNOWN_MAJOR_VERSIONS = ALL_RUBY_VERSIONS.map {|v| v.digits.last.to_s }.uniq.freeze
|
|
17
17
|
PLATFORM_MAP = {
|
|
@@ -50,19 +50,10 @@ module Bundler
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def maglev?
|
|
53
|
-
message =
|
|
54
|
-
"`CurrentRuby#maglev?` is deprecated with no replacement. Please use the " \
|
|
55
|
-
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
|
56
53
|
removed_message =
|
|
57
54
|
"`CurrentRuby#maglev?` was removed with no replacement. Please use the " \
|
|
58
55
|
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
unless internally_exempted
|
|
62
|
-
SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
RUBY_ENGINE == "maglev"
|
|
56
|
+
SharedHelpers.feature_removed!(removed_message)
|
|
66
57
|
end
|
|
67
58
|
|
|
68
59
|
def truffleruby?
|
|
@@ -90,14 +81,11 @@ module Bundler
|
|
|
90
81
|
end
|
|
91
82
|
|
|
92
83
|
define_method(:"maglev_#{trimmed_version}?") do
|
|
93
|
-
message =
|
|
94
|
-
"`CurrentRuby##{__method__}` is deprecated with no replacement. Please use the " \
|
|
95
|
-
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
|
96
84
|
removed_message =
|
|
97
85
|
"`CurrentRuby##{__method__}` was removed with no replacement. Please use the " \
|
|
98
86
|
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
|
99
87
|
|
|
100
|
-
SharedHelpers.
|
|
88
|
+
SharedHelpers.feature_removed!(removed_message)
|
|
101
89
|
|
|
102
90
|
send(:"maglev?") && send(:"on_#{trimmed_version}?")
|
|
103
91
|
end
|