Browse files

--deployment should use the endpoint

  • Loading branch information...
1 parent b505483 commit 68e7ae35bb9259a1b160c096d3b1735a03466903 @hone hone committed Jun 10, 2011
Showing with 13 additions and 0 deletions.
  1. +1 −0 lib/bundler/spec_set.rb
  2. +12 −0 spec/install/gems/dependency_api_spec.rb
View
1 lib/bundler/spec_set.rb
@@ -80,6 +80,7 @@ def materialize(deps, missing_specs = nil)
materialized = self.for(deps, [], false, true).to_a
materialized.map! do |s|
next s unless s.is_a?(LazySpecification)
+ s.source.dependencies = deps if s.source.respond_to?(:dependencies=)
spec = s.__materialize__
if missing_specs
missing_specs << s unless spec
View
12 spec/install/gems/dependency_api_spec.rb
@@ -41,6 +41,18 @@
should_be_installed "net-sftp 1.1.1"
end
+ it "should use the endpoint when using --deployment" do
+ gemfile <<-G
+ source "#{source_uri}"
+ gem "rack"
+ G
+ bundle :install, :artifice => "endpoint"
+
+ bundle "install --deployment", :artifice => "endpoint"
+ out.should include("Fetching dependency information from the API at #{source_uri}")
+ should_be_installed "rack 1.0.0"
+ end
+
it "falls back when the API errors out" do
simulate_platform mswin

0 comments on commit 68e7ae3

Please sign in to comment.