summaryrefslogtreecommitdiff
path: root/lib/bundler/source/rubygems.rb
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/source/rubygems.rb37
1 files changed, 25 insertions, 12 deletions
@@ -26,6 +26,12 @@ module Bundler
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
end
def local!
return if @allow_local
@@ -61,13 +67,13 @@ module Bundler
o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
end
- def disable_multisource?
- @remotes.size <= 1
end
def can_lock?(spec)
- return super if disable_multisource?
- spec.source.is_a?(Rubygems)
end
def options
@@ -259,8 +265,16 @@ module Bundler
!equivalent
end
def unmet_deps
- if @allow_remote && api_fetchers.any?
remote_specs.unmet_dependency_names
else
[]
@@ -276,7 +290,7 @@ module Bundler
def double_check_for(unmet_dependency_names)
return unless @allow_remote
- return unless api_fetchers.any?
unmet_dependency_names = unmet_dependency_names.call
unless unmet_dependency_names.nil?
@@ -298,17 +312,20 @@ module Bundler
remote_specs.each do |spec|
case spec
when EndpointSpecification, Gem::Specification, StubSpecification, LazySpecification
- names.concat(spec.runtime_dependencies)
when RemoteSpecification # from the full index
return nil
else
raise "unhandled spec type (#{spec.inspect})"
end
end
- names.map!(&:name) if names
names
end
protected
def credless_remotes
@@ -387,10 +404,6 @@ module Bundler
next if gemfile =~ /^bundler\-[\d\.]+?\.gem/
s ||= Bundler.rubygems.spec_from_gem(gemfile)
s.source = self
- if Bundler.rubygems.spec_missing_extensions?(s, false)
- Bundler.ui.debug "Source #{self} is ignoring #{s} because it is missing extensions"
- next
- end
idx << s
end