diff options
author | Samuel E. Giddins <segiddins@segiddins.me> | 2015-11-03 09:23:38 -0600 |
---|---|---|
committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-11-03 09:23:38 -0600 |
commit | c1cd3c8779668cdaf42820954a07f63309d2fde4 (patch) | |
tree | 020366bc202d8fd9c9fe390472882344f4bf7b0e | |
parent | 79fbef40df95e323591d824e62918957c29bee2b (diff) | |
parent | 9b4e43524cbfb4112dfa49c94b08111f64ae063a (diff) | |
download | bundler-c1cd3c8779668cdaf42820954a07f63309d2fde4.tar.gz |
Merge pull request #4085 from bundler/deprecate-bundle-list
Deprecate `bundle list`
-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 |