Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sane-ify DSL a bit

  • Loading branch information...
commit bbaaec84b079ac5eff1a89e561e7d787e7d64e74 1 parent 2016e47
@indirect indirect authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/bundler/dsl.rb
View
16 lib/bundler/dsl.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.