diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 0955bcd5c2..8a6518bedd 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -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)." diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb index 3fa87ff265..731677b4ec 100644 --- a/lib/bundler/cli/package.rb +++ b/lib/bundler/cli/package.rb @@ -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 diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index a45694dd8e..5e1932e626 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -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? } diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 50cd04aef1..166e494f0e 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -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 diff --git a/spec/bundler/other/cli_dispatch_spec.rb b/spec/bundler/other/cli_dispatch_spec.rb index 548539ac89..0082606d7e 100644 --- a/spec/bundler/other/cli_dispatch_spec.rb +++ b/spec/bundler/other/cli_dispatch_spec.rb @@ -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 diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb index ead30022cc..9db8baa4c0 100644 --- a/spec/bundler/quality_spec.rb +++ b/spec/bundler/quality_spec.rb @@ -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