diff options
author | Dimitris Zorbas <zorbash@skroutz.gr> | 2015-10-03 13:25:00 +0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 15:11:19 -0300 |
commit | 54d620bd797abc50423d958c141ad95a4db2974d (patch) | |
tree | a279cd27ca0aff6b7a0f380e0ccbfcd442951ade | |
parent | 4cfc5a8a34745829a160fa94b41134ab4f88e8a1 (diff) | |
download | bundler-54d620bd797abc50423d958c141ad95a4db2974d.tar.gz |
Show deprecation warning when using console command
-rw-r--r-- | lib/bundler/cli/console.rb | 4 | ||||
-rw-r--r-- | spec/commands/console_spec.rb | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb index 5e72cdbf0f..9b43e94ab3 100644 --- a/lib/bundler/cli/console.rb +++ b/lib/bundler/cli/console.rb @@ -8,6 +8,10 @@ module Bundler end def run + Bundler.ui.deprecate "bundle console is deprecated and will be replaced " \ + "by `bin/console` generated by `bundle gem <name>` " \ + "in Bundler 2.0.", true + group ? Bundler.require(:default, *(group.split.map!(&:to_sym))) : Bundler.require ARGV.clear diff --git a/spec/commands/console_spec.rb b/spec/commands/console_spec.rb index b60ac2c9f6..6bf09f243b 100644 --- a/spec/commands/console_spec.rb +++ b/spec/commands/console_spec.rb @@ -11,6 +11,14 @@ describe "bundle console" do G end + it "prints a deprecation warning" do + bundle "console" + + expect(err).to include("bundle console is deprecated and will be replaced " \ + "by `bin/console` generated by `bundle gem <name>` " \ + "in Bundler 2.0.") + end + it "starts IRB with the default group loaded" do bundle "console" do |input, _, _| input.puts("puts RACK") |