Permalink
Browse files

lock down requirements order via String#<=>

refs #1375
  • Loading branch information...
1 parent cb1dd15 commit 3a2a18a112015156e0d5ac1c7f9918cbc0be1b39 @indirect indirect committed Sep 17, 2011
Showing with 2 additions and 3 deletions.
  1. +1 −1 lib/bundler/rubygems_ext.rb
  2. +1 −2 spec/lock/lockfile_spec.rb
@@ -124,7 +124,7 @@ def to_yaml_properties
def to_lock
out = " #{name}"
unless requirement == Gem::Requirement.default
- reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }
+ reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }.sort.reverse
out << " (#{reqs.join(', ')})"
end
out
@@ -70,10 +70,9 @@
G
end
- it "parses lockfiles w/ crazy shit" do
+ it "generates lockfiles with multiple requirements" do
install_gemfile <<-G
source "file://#{gem_repo1}"
-
gem "net-sftp"
G

0 comments on commit 3a2a18a

Please sign in to comment.