aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authortomhuda <tomhuda@tilde.io>2012-03-07 00:51:31 -0800
committertomhuda <tomhuda@tilde.io>2012-03-07 00:51:31 -0800
commite31a1c7b24d3dfbce7ed39b6a723dd20f7d08c95 (patch)
tree89802ff67e901587aa019ca36c4bdd722c60fe69 /lib/bundler/lazy_specification.rb
parent6d4962dbad7c620045a02393a5878b29ab11a55b (diff)
downloadbundler-e31a1c7b24d3dfbce7ed39b6a723dd20f7d08c95.tar.gz
Clean up corrupted lockfiles
Bundler 1.1.pre.5 introduced a bug that could introduce duplicate GIT sections, which then caused duplicate copies of gems in the GIT sections. This commit makes the LockfileParser aware of the bug, and has it clean up any corrupted lockfiles.
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r--lib/bundler/lazy_specification.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index e9d6b226..b10d142b 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -25,6 +25,11 @@ module Bundler
end
end
+ def ==(other)
+ [name, version, dependencies, platform, source] ==
+ [other.name, other.version, other.dependencies, other.platform, other.source]
+ end
+
def satisfies?(dependency)
@name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
end