summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-15 19:17:11 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-15 20:43:14 +0200
commitff1a669efb74d79fdbc5fc1bf15e44853048b9a5 (patch)
tree60dc2d2dfa05f4f5248a17627526232767ea095c
parenteca1757792c2ef7821d96e60ada7b30107f6d73b (diff)
downloadbundler-ff1a669efb74d79fdbc5fc1bf15e44853048b9a5.tar.gz
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`.
-rw-r--r--lib/bundler/cli.rb6
-rw-r--r--lib/bundler/cli/package.rb2
-rw-r--r--lib/bundler/feature_flag.rb1
-rw-r--r--lib/bundler/settings.rb1
-rw-r--r--spec/other/cli_dispatch_spec.rb9
-rw-r--r--spec/quality_spec.rb1
6 files changed, 4 insertions, 16 deletions
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/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb
index 548539ac89..0082606d7e 100644
--- a/spec/other/cli_dispatch_spec.rb
+++ b/spec/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/quality_spec.rb b/spec/quality_spec.rb
index b8f2d6ed1b..e9a49ba09e 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -168,7 +168,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