diff options
author | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-30 14:09:30 +0200 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 15:11:19 -0300 |
commit | 3ea9aa894003076509cbab1d2a62017a35c086f6 (patch) | |
tree | 891c7a03c7b68462eef26eeb93c720a1e7df51e9 | |
parent | cc3abfc62c959b567c768a87f505999ceee49c1f (diff) | |
download | bundler-3ea9aa894003076509cbab1d2a62017a35c086f6.tar.gz |
Deprecate `bundle list`
Refs. #3972.
-rw-r--r-- | lib/bundler/cli.rb | 3 | ||||
-rw-r--r-- | man/bundle.ronn | 4 | ||||
-rw-r--r-- | spec/deprecation_spec.rb | 14 |
3 files changed, 18 insertions, 3 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index fd3401eaf9..a054aff28c 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -224,6 +224,9 @@ module Bundler method_option "outdated", :type => :boolean, :banner => "Show verbose output including whether gems are outdated." def show(gem_name = nil) + # TODO: 2.0 remove `bundle list` + Bundler.ui.deprecate("`bundle list` is deprecated and will be removed in " \ + "Bundler 2.0. Use `bundle show` instead.", true) if ARGV[0] == "list" require "bundler/cli/show" Show.new(options, gem_name).run end diff --git a/man/bundle.ronn b/man/bundle.ronn index bd01276ff0..55e2c4afe8 100644 --- a/man/bundle.ronn +++ b/man/bundle.ronn @@ -52,9 +52,6 @@ We divide `bundle` subcommands into primary commands and utilities. Determine whether the requirements for your application are installed and available to bundler -* `bundle list(1)`: - Show all of the gems in the current bundle - * `bundle show(1)`: Show the source location of a particular gem in the bundle @@ -96,3 +93,4 @@ and execute it, passing down any extra arguments to it. These commands are obsolete and should no longer be used * `bundle cache(1)` +* `bundle list(1)` diff --git a/spec/deprecation_spec.rb b/spec/deprecation_spec.rb index 959f6bec00..a009d164ee 100644 --- a/spec/deprecation_spec.rb +++ b/spec/deprecation_spec.rb @@ -128,4 +128,18 @@ describe "Bundler version 1.99" do end end end + + context "bundle list" do + it "prints a deprecation warning" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + + bundle :list + + expect(err).to include("DEPRECATION: `bundle list` is deprecated") + expect(err).to include("Use `bundle show`") + end + end end |