Skip to content

Commit

Permalink
No longer require the first lib/ file, instead use the gemspec name.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Apr 30, 2012
1 parent 1d641d1 commit fe7abb3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#### console

* Infer the primary file to require from the gemspec name.
* No longer run `bundle console`, since it is not the same as running
`bundle exec irb -Ilib -rfoo/bar.rb`.

Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/tasks/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def console(name=nil)
gemspec = @project.gemspec(name)

require_paths = gemspec.require_paths
require_file = gemspec.files.find { |path| path.start_with?('lib/') }
require_file = gemspec.name.gsub('-',File::SEPARATOR)

arguments = [@command]

Expand Down
2 changes: 1 addition & 1 deletion spec/console_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
include_context "rake"

if RUBY_VERSION < '1.9'
let(:default_options) { %w[-Ilib -rrubygems -rrubygems/tasks.rb] }
let(:default_options) { %w[-Ilib -rrubygems -rrubygems/tasks] }
else
let(:default_options) { %w[-Ilib -rrubygems/tasks.rb] }
end
Expand Down

0 comments on commit fe7abb3

Please sign in to comment.