Permalink
Browse files

Fixes 'bundle lock' exception with GemCache source.

The bundle lock command was throwing an exception when processing a
Gemfile like the following.

  source Bundler::Source::GemCache.new("path" => "/tmp")
  • Loading branch information...
1 parent 3a82605 commit 10c07bf62a840287c576cb5bdae0ba440bcf9e57 @dougbarth dougbarth committed with indirect Apr 21, 2010
Showing with 11 additions and 0 deletions.
  1. +3 −0 lib/bundler/source.rb
  2. +8 −0 spec/lock/gems_spec.rb
View
@@ -130,7 +130,10 @@ def to_s
end
class GemCache
+ attr_reader :options
+
def initialize(options)
+ @options = options
@path = options["path"]
end
View
@@ -72,4 +72,12 @@
bundle :install
out.should =~ /You changed your Gemfile after locking. Please run `bundle install --relock`/
end
+
+ it "correctly serializes GemCache sources" do
+ gemfile <<-G
+ source Bundler::Source::GemCache.new("path" => "#{tmp}")
+ G
+
+ bundle :lock
+ end
end

0 comments on commit 10c07bf

Please sign in to comment.