Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Revert .consolerc (sorry, @andremediros :grimace:)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
indirect committed Jan 26, 2015
1 parent 3f4a1ff commit 748d8ec
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion lib/bundler/cli/console.rb
Expand Up @@ -11,7 +11,6 @@ def run
ARGV.clear

console = get_console(Bundler.settings[:console] || 'irb')
load '.consolerc' if File.exists?('.consolerc')
console.start
end

Expand Down
1 change: 0 additions & 1 deletion lib/bundler/cli/gem.rb
Expand Up @@ -44,7 +44,6 @@ def run
"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"
}
Expand Down
3 changes: 0 additions & 3 deletions lib/bundler/templates/newgem/consolerc.tt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/commands/console_spec.rb
Expand Up @@ -39,14 +39,6 @@
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")
Expand Down
1 change: 0 additions & 1 deletion spec/commands/newgem_spec.rb
Expand Up @@ -90,7 +90,6 @@ def create_temporary_dir(dir)
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
Expand Down
4 changes: 0 additions & 4 deletions spec/support/helpers.rb
Expand Up @@ -165,10 +165,6 @@ def lockfile(*args)
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] || ""
Expand Down

4 comments on commit 748d8ec

@andremedeiros
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awe man 😢

@simi
Copy link
Member

@simi simi commented on 748d8ec Jan 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better IMHO 👍

@indirect
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andremedeiros the next commit has bin/console in it, maybe try that instead? I feel like the entire bundle console command just can't scale because everyone wants to make it slightly different.

@bf4
Copy link

@bf4 bf4 commented on 748d8ec Apr 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.irbrc basically already does this, anyhow

Please sign in to comment.