summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Barth <dougbarth@gmail.com>2010-04-20 21:42:25 -0500
committerAndre Arko <andre@arko.net>2010-04-21 14:47:49 -0700
commit10c07bf62a840287c576cb5bdae0ba440bcf9e57 (patch)
tree0be4a2cefc10bc3105c8bc9aa6418636672cd8f9
parent3a8260523af31eb4a3cd1a933233a53c0b9148e9 (diff)
downloadbundler-10c07bf62a840287c576cb5bdae0ba440bcf9e57.tar.gz
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")
-rw-r--r--lib/bundler/source.rb3
-rw-r--r--spec/lock/gems_spec.rb8
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index cccf031fd1..de9eddea57 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -130,7 +130,10 @@ module Bundler
end
class GemCache
+ attr_reader :options
+
def initialize(options)
+ @options = options
@path = options["path"]
end
diff --git a/spec/lock/gems_spec.rb b/spec/lock/gems_spec.rb
index 95e8bdc86a..11cd3f3592 100644
--- a/spec/lock/gems_spec.rb
+++ b/spec/lock/gems_spec.rb
@@ -72,4 +72,12 @@ describe "bundle lock with gems" do
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