From e31a1c7b24d3dfbce7ed39b6a723dd20f7d08c95 Mon Sep 17 00:00:00 2001 From: tomhuda Date: Wed, 7 Mar 2012 00:51:31 -0800 Subject: 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. --- spec/support/helpers.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/support') diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 1466dc992a..c7f5c5bcdc 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -162,6 +162,12 @@ module Spec end end + def strip_whitespace(str) + # Trim the leading spaces + spaces = str[/\A\s+/, 0] || "" + str.gsub(/^#{spaces}/, '') + end + def install_gemfile(*args) gemfile(*args) opts = args.last.is_a?(Hash) ? args.last : {} -- cgit v1.2.1