diff options
author | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-30 14:09:30 +0200 |
---|---|---|
committer | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-30 14:57:35 +0200 |
commit | 9b4e43524cbfb4112dfa49c94b08111f64ae063a (patch) | |
tree | 0e45df168a06dbe3f7e911a4eae7c2e9fbd22833 | |
parent | 3ffb50e06095c9e321589ecefc634036437176af (diff) | |
download | bundler-deprecate-bundle-list.tar.gz |
Deprecate `bundle list`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 d889c32bf4..ca07591bc9 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -198,6 +198,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 f7b9e94fd4..9a445c061f 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 8bd036c4b1..5c2534b0d9 100644 --- a/spec/deprecation_spec.rb +++ b/spec/deprecation_spec.rb @@ -127,4 +127,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 |