diff options
author | Andre Arko <andre@arko.net> | 2015-01-24 20:19:14 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-01-25 23:30:18 -0800 |
commit | 748d8ec27db1722e0880c9c4aed50c4bca78a77f (patch) | |
tree | 776323dd819667fe66b96cd6421480928521e62b | |
parent | 3f4a1ffd717dd62399cf9cd338856ee3aee4b754 (diff) | |
download | bundler-748d8ec27db1722e0880c9c4aed50c4bca78a77f.tar.gz |
Revert .consolerc (sorry, @andremediros :grimace:)
Rather than adding .consolerc and seeing the surface area of things that
Bundler supports continue to grow endlessly, Bundler 2.0 will deprecate
the `bundle console` command, and instead add a script to each generated
gem that loads `bundler/setup` and then loads the gem. Anyone can then
edit that file to run the REPL they want, load the fixtures they want,
and everything else, without anything specific to Bundler at all.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/bundler/cli/console.rb | 1 | ||||
-rw-r--r-- | lib/bundler/cli/gem.rb | 1 | ||||
-rw-r--r-- | lib/bundler/templates/newgem/consolerc.tt | 3 | ||||
-rw-r--r-- | spec/commands/console_spec.rb | 8 | ||||
-rw-r--r-- | spec/commands/newgem_spec.rb | 1 | ||||
-rw-r--r-- | spec/support/helpers.rb | 4 |
7 files changed, 0 insertions, 19 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 03bacf2e89..6f1a0b7596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ Features: - add support for private S3 sources (@tryba) - prevent whitespace in gem declarations with clear messaging (@benlakey) - tries to find a `bundler-<command>` executable on your path for non-bundler commands (@andremedeiros) - - generates a `.consolerc` file with new gems and tries to load it on `bundle console` (@andremedeiros) - tries to find `gems.rb` and it's new counterpart, `gems.locked` (@andremedeiros) - Change the initial version of new gems from `0.0.1` to `0.1.0` (@petedmarsh) diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb index f52bfb11d8..bc4f377d25 100644 --- a/lib/bundler/cli/console.rb +++ b/lib/bundler/cli/console.rb @@ -11,7 +11,6 @@ module Bundler ARGV.clear console = get_console(Bundler.settings[:console] || 'irb') - load '.consolerc' if File.exists?('.consolerc') console.start end diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 102a26b6e8..54c4640341 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -44,7 +44,6 @@ module Bundler "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb", "LICENSE.txt.tt" => "LICENSE.txt", "newgem.gemspec.tt" => "#{name}.gemspec", - "consolerc.tt" => ".consolerc", "Rakefile.tt" => "Rakefile", "README.md.tt" => "README.md" } diff --git a/lib/bundler/templates/newgem/consolerc.tt b/lib/bundler/templates/newgem/consolerc.tt deleted file mode 100644 index 7ed81db66d..0000000000 --- a/lib/bundler/templates/newgem/consolerc.tt +++ /dev/null @@ -1,3 +0,0 @@ -# This file is automatically loaded when `bundle console` is run. You can add -# fixtures and/or initialization code here to make experimenting with your gem -# easier. diff --git a/spec/commands/console_spec.rb b/spec/commands/console_spec.rb index 8c6e184cb6..f26fbcdba5 100644 --- a/spec/commands/console_spec.rb +++ b/spec/commands/console_spec.rb @@ -39,14 +39,6 @@ describe "bundle console" do expect(out).to include("IRB") end - it "loads up .consolerc if it exists" do - consolerc <<-C - puts "Hello!" - C - bundle "console" - expect(out).to include("Hello!") - end - it "doesn't load any other groups" do bundle "console" do |input| input.puts("puts ACTIVESUPPORT") diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 978d28cb92..1b454c66ed 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -90,7 +90,6 @@ describe "bundle gem" do expect(bundled_app("test_gem/lib/test_gem.rb")).to exist expect(bundled_app("test_gem/lib/test_gem/version.rb")).to exist expect(bundled_app("test_gem/.gitignore")).to exist - expect(bundled_app("test_gem/.consolerc")).to exist end it "starts with version 0.1.0" do diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index eb8405fa98..bd28b975b0 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -165,10 +165,6 @@ module Spec create_file("Gemfile.lock", *args) end - def consolerc(*args) - create_file(".consolerc", *args) - end - def strip_whitespace(str) # Trim the leading spaces spaces = str[/\A\s+/, 0] || "" |