diff options
| author | Colby Swandale <colby@taplaboratories.com> | 2017-04-16 23:01:20 +1000 |
|---|---|---|
| committer | Colby Swandale <colby@taplaboratories.com> | 2017-04-16 23:01:20 +1000 |
| commit | 401edacce542093887219fc88ae7d5bb9bd27f29 (patch) | |
| tree | c16d3fc1442a58a2d234caf2c12c3d8da27fef14 /lib/bundler/dsl.rb | |
| parent | 7a1722f9e03607a7c50989880d30b9ed2392107a (diff) | |
| download | bundler-401edacce542093887219fc88ae7d5bb9bd27f29.tar.gz | |
normalize `source` in all cases for 'source' declaraction
Diffstat (limited to 'lib/bundler/dsl.rb')
| -rw-r--r-- | lib/bundler/dsl.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 478d9d2373..2b6254144e 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -126,6 +126,8 @@ module Bundler def source(source, *args, &blk) options = args.last.is_a?(Hash) ? args.pop.dup : {} options = normalize_hash(options) + source = normalize_source(source) + if options.key?("type") options["type"] = options["type"].to_s unless Plugin.source?(options["type"]) @@ -139,10 +141,8 @@ module Bundler source_opts = options.merge("uri" => source) with_source(@sources.add_plugin_source(options["type"], source_opts), &blk) elsif block_given? - source = normalize_source(source) with_source(@sources.add_rubygems_source("remotes" => source), &blk) else - source = normalize_source(source) check_primary_source_safety(@sources) @sources.add_rubygems_remote(source) end |
