[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:
David Rodríguez 2019-07-15 19:17:11 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель f73020d493
Коммит 4f5e1b6ebf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F9CF13417264FAC2
6 изменённых файлов: 4 добавлений и 16 удалений

Просмотреть файл

@ -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