diff options
author | Andre Arko <andre@arko.net> | 2014-08-18 23:17:53 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-08-18 23:17:53 -0700 |
commit | 81c884ae83b9c03ce039e0bbdb9f3ff331d2e788 (patch) | |
tree | 563c751f89202ee34de2c548e5f7970eb55c9c8f /lib/bundler/source | |
parent | ad3ea31d81ff260f8a886afc794576f02b29d8bd (diff) | |
download | bundler-81c884ae83b9c03ce039e0bbdb9f3ff331d2e788.tar.gz |
don’t allow unmet deps without @allow_remote
fixes #3141
Diffstat (limited to 'lib/bundler/source')
-rw-r--r-- | lib/bundler/source/rubygems.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 581b2935dc..635bb993ad 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -179,7 +179,7 @@ module Bundler end def unmet_deps - if fetchers.any? && fetchers.all?{|f| f.use_api } + if @allow_remote && api_fetchers.any? remote_specs.unmet_dependency_names else [] @@ -276,9 +276,12 @@ module Bundler end end + def api_fetchers + fetchers.select{|f| f.use_api } + end + def remote_specs @remote_specs ||= Index.build do |idx| - api_fetchers = fetchers.select { |f| f.use_api } index_fetchers = fetchers - api_fetchers # gather lists from non-api sites |