summaryrefslogtreecommitdiff
path: root/lib/bundler/remote_specification.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-02-13 14:03:57 -0600
committerSamuel Giddins <segiddins@segiddins.me>2017-02-13 14:10:19 -0600
commitad5aaa7c9b3a6e09fea980015d9c8666525858a1 (patch)
tree0cd572b1f69866f42f8d3190c8f6cdee22a3b23c /lib/bundler/remote_specification.rb
parent659c1f9703fb4a12f36ff0c992eb5fd03c6a1c32 (diff)
downloadbundler-ad5aaa7c9b3a6e09fea980015d9c8666525858a1.tar.gz
When swapping, dont consider dep type for "missing" API deps
Diffstat (limited to 'lib/bundler/remote_specification.rb')
-rw-r--r--lib/bundler/remote_specification.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb
index 496e8dcb3a..c62c5d61d2 100644
--- a/lib/bundler/remote_specification.rb
+++ b/lib/bundler/remote_specification.rb
@@ -50,7 +50,8 @@ module Bundler
# once the remote gem is downloaded, the backend specification will
# be swapped out.
def __swap__(spec)
- if (extra_deps = spec.runtime_dependencies.-(dependencies)) && extra_deps.any?
+ without_type = proc {|d| Gem::Dependency.new(d.name, d.requirements_list) }
+ if (extra_deps = spec.runtime_dependencies.map(&without_type).-(dependencies.map(&without_type))) && extra_deps.any?
raise APIResponseMismatchError,
"Downloading #{full_name} revealed dependencies not in the API (#{extra_deps.map(&:to_s).join(", ")})." \
"\nInstalling with `--full-index` should fix the problem."