diff options
author | Tim Moore <tmoore@incrementalism.net> | 2014-09-29 23:03:27 +1000 |
---|---|---|
committer | Tim Moore <tmoore@incrementalism.net> | 2014-10-11 18:00:28 +1100 |
commit | 802832864a19cd8c9d81b1123dce1d8acc8cc805 (patch) | |
tree | ed62a0a4494abb2690be45f56ba1d2b4d3ef943d /lib/bundler | |
parent | 8e2f2ded68397a7402d4507b713e026504a4df0a (diff) | |
download | bundler-802832864a19cd8c9d81b1123dce1d8acc8cc805.tar.gz |
Normalize sources to lock format when comparing.
Fixes #3167.
Also moves the reversing of Rubygems remotes for the lock file out of
SourceList#combine_rubygems_sources and into Rubygems#to_lock.
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source/rubygems.rb | 6 | ||||
-rw-r--r-- | lib/bundler/source_list.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index e5b6b243..870fe48d 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -313,7 +313,7 @@ module Bundler deleted = [] changed = [] - gemfile_sources = sources.all_sources + gemfile_sources = sources.lock_sources if @locked_sources != gemfile_sources new_sources = gemfile_sources - @locked_sources deleted_sources = @locked_sources - gemfile_sources diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index f3b8b7c8..044b3632 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -52,9 +52,9 @@ module Bundler def to_lock out = "GEM\n" - out << remotes.map { |remote| - " remote: #{suppress_configured_credentials remote}\n" - }.join + remotes.reverse_each do |remote| + out << " remote: #{suppress_configured_credentials remote}\n" + end out << " specs:\n" end diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index 0d9fb516..c0eeaf3a 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -74,7 +74,7 @@ module Bundler end def combine_rubygems_sources - Source::Rubygems.new("remotes" => rubygems_sources.map(&:remotes).flatten.uniq.reverse) + Source::Rubygems.new("remotes" => rubygems_sources.map(&:remotes).flatten.uniq) end end end |