diff options
author | Terence Lee <terence@heroku.com> | 2011-06-10 17:33:34 -0500 |
---|---|---|
committer | Terence Lee <terence@heroku.com> | 2011-06-10 17:33:34 -0500 |
commit | 68e7ae35bb9259a1b160c096d3b1735a03466903 (patch) | |
tree | fca05df47173280f7631437616aa4a82646002e5 | |
parent | b5054839de3bf51ae58fb85e77ea197a9681bdbf (diff) | |
download | bundler-68e7ae35bb9259a1b160c096d3b1735a03466903.tar.gz |
--deployment should use the endpoint
-rw-r--r-- | lib/bundler/spec_set.rb | 1 | ||||
-rw-r--r-- | spec/install/gems/dependency_api_spec.rb | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 901888a11e..fb86450295 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -80,6 +80,7 @@ module Bundler 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 diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index fbe2c0a408..6095481d0e 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -41,6 +41,18 @@ describe "gemcutter's dependency API" do 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 |