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

Commit

Permalink
sane-ify DSL a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 12, 2011
1 parent 2016e47 commit bbaaec8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/bundler/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ def gem(name, *args)
def source(source, options = {})
case source
when :gemcutter, :rubygems, :rubyforge then
rubygems_source "http://rubygems.org"
@rubygems_source.add_remote "http://rubygems.org"
return
when String
rubygems_source source
@rubygems_source.add_remote source
return
end

@source = source
options[:prepend] ? @sources.unshift(@source) : @sources << @source
else
@source = source
options[:prepend] ? @sources.unshift(@source) : @sources << @source

yield if block_given?
@source
yield if block_given?
return @source
end
ensure
@source = nil
end
Expand Down

0 comments on commit bbaaec8

Please sign in to comment.