diff options
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 2 | ||||
-rw-r--r-- | spec/lock/lockfile_spec.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 20c08b7379..a52ce02dc1 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -124,7 +124,7 @@ module Gem 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 diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index e78eb41d5a..d920571edd 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -70,10 +70,9 @@ describe "the lockfile format" do 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 |