mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Remove cache_command_is_package
feature flag
So that we handle the removal of `bundle cache` just like we'll handle the removal of `bundle show` and `bundle console`. https://github.com/bundler/bundler/commit/ff1a669efb
This commit is contained in:
parent
f73020d493
commit
4f5e1b6ebf
6 changed files with 4 additions and 16 deletions
|
@ -69,7 +69,7 @@ module Bundler
|
|||
Bundler.ui.info "\n"
|
||||
|
||||
primary_commands = ["install", "update",
|
||||
Bundler.feature_flag.cache_command_is_package? ? "cache" : "package",
|
||||
Bundler.feature_flag.bundler_3_mode? ? "cache" : "package",
|
||||
"exec", "config", "help"]
|
||||
|
||||
list = self.class.printable_commands(true)
|
||||
|
@ -410,7 +410,7 @@ module Bundler
|
|||
Outdated.new(options, gems).run
|
||||
end
|
||||
|
||||
if Bundler.feature_flag.cache_command_is_package?
|
||||
if Bundler.feature_flag.bundler_3_mode?
|
||||
map %w[cache] => :package
|
||||
else
|
||||
desc "cache [OPTIONS]", "Cache all the gems to vendor/cache", :hide => true
|
||||
|
@ -424,7 +424,7 @@ module Bundler
|
|||
end
|
||||
end
|
||||
|
||||
desc "#{Bundler.feature_flag.cache_command_is_package? ? :cache : :package} [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
|
||||
desc "#{Bundler.feature_flag.bundler_3_mode? ? :cache : :package} [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
|
||||
method_option "all", :type => :boolean,
|
||||
:default => Bundler.feature_flag.cache_all?,
|
||||
:banner => "Include all sources (including path and git)."
|
||||
|
|
|
@ -34,7 +34,7 @@ module Bundler
|
|||
end
|
||||
|
||||
def setup_cache_all
|
||||
all = options.fetch(:all, Bundler.feature_flag.cache_command_is_package? || nil)
|
||||
all = options.fetch(:all, Bundler.feature_flag.bundler_3_mode? || nil)
|
||||
|
||||
Bundler.settings.set_command_option_if_given :cache_all, all
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ module Bundler
|
|||
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
|
||||
settings_flag(:auto_config_jobs) { bundler_3_mode? }
|
||||
settings_flag(:cache_all) { bundler_3_mode? }
|
||||
settings_flag(:cache_command_is_package) { bundler_3_mode? }
|
||||
settings_flag(:default_install_uses_path) { bundler_3_mode? }
|
||||
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
|
||||
settings_flag(:disable_multisource) { bundler_3_mode? }
|
||||
|
|
|
@ -17,7 +17,6 @@ module Bundler
|
|||
auto_config_jobs
|
||||
cache_all
|
||||
cache_all_platforms
|
||||
cache_command_is_package
|
||||
default_install_uses_path
|
||||
deployment
|
||||
deployment_means_frozen
|
||||
|
|
|
@ -17,13 +17,4 @@ RSpec.describe "bundle command names" do
|
|||
bundle "in"
|
||||
expect(err).to eq("Ambiguous command in matches [info, init, inject, install]")
|
||||
end
|
||||
|
||||
context "when cache_command_is_package is set" do
|
||||
before { bundle! "config set cache_command_is_package true" }
|
||||
|
||||
it "dispatches `bundle cache` to the package command" do
|
||||
bundle "cache --verbose"
|
||||
expect(out).to start_with "Running `bundle package --verbose`"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -162,7 +162,6 @@ RSpec.describe "The library itself" do
|
|||
it "documents all used settings" do
|
||||
exemptions = %w[
|
||||
auto_config_jobs
|
||||
cache_command_is_package
|
||||
deployment_means_frozen
|
||||
forget_cli_options
|
||||
gem.coc
|
||||
|
|
Loading…
Reference in a new issue