summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-21 10:20:47 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-21 10:20:47 +0000
commit5335ce0e060c7a2a0b01c57f8f8a64254f2658e1 (patch)
treec63321cb7c7c5c15454a79d81123c7188be2c51e /lib/rubygems/resolver.rb
parent2f023c5dbaadede9ceac3eb9ac0e73f3050e5ada (diff)
Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop https://github.com/rubygems/rubygems/pull/2478 * Enable Style/MultilineIfThen in Rubocop https://github.com/rubygems/rubygems/pull/2479 * Fix required_ruby_version with prereleases and improve error message https://github.com/rubygems/rubygems/pull/2344 * Fix bundler rubygems binstub not properly looking for bundler https://github.com/rubygems/rubygems/pull/2426 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/resolver.rb')
-rw-r--r--lib/rubygems/resolver.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/resolver.rb b/lib/rubygems/resolver.rb
index 866998dc59..46276f3260 100644
--- a/lib/rubygems/resolver.rb
+++ b/lib/rubygems/resolver.rb
@@ -59,7 +59,7 @@ class Gem::Resolver
# uniform manner. If one of the +sets+ is itself a ComposedSet its sets are
# flattened into the result ComposedSet.
- def self.compose_sets *sets
+ def self.compose_sets(*sets)
sets.compact!
sets = sets.map do |set|
@@ -87,7 +87,7 @@ class Gem::Resolver
# Creates a Resolver that queries only against the already installed gems
# for the +needed+ dependencies.
- def self.for_current_gems needed
+ def self.for_current_gems(needed)
new needed, Gem::Resolver::CurrentSet.new
end
@@ -99,7 +99,7 @@ class Gem::Resolver
# satisfy the Dependencies. This defaults to IndexSet, which will query
# rubygems.org.
- def initialize needed, set = nil
+ def initialize(needed, set = nil)
@set = set || Gem::Resolver::IndexSet.new
@needed = needed
@@ -112,14 +112,14 @@ class Gem::Resolver
@stats = Gem::Resolver::Stats.new
end
- def explain stage, *data # :nodoc:
+ def explain(stage, *data) # :nodoc:
return unless DEBUG_RESOLVER
d = data.map { |x| x.pretty_inspect }.join(", ")
$stderr.printf "%10s %s\n", stage.to_s.upcase, d
end
- def explain_list stage # :nodoc:
+ def explain_list(stage) # :nodoc:
return unless DEBUG_RESOLVER
data = yield
@@ -133,7 +133,7 @@ class Gem::Resolver
#
# Returns the Specification and the ActivationRequest
- def activation_request dep, possible # :nodoc:
+ def activation_request(dep, possible) # :nodoc:
spec = possible.pop
explain :activate, [spec.full_name, possible.size]
@@ -145,7 +145,7 @@ class Gem::Resolver
return spec, activation_request
end
- def requests s, act, reqs=[] # :nodoc:
+ def requests(s, act, reqs=[]) # :nodoc:
return reqs if @ignore_dependencies
s.fetch_development_dependencies if @development
@@ -197,7 +197,7 @@ class Gem::Resolver
# Extracts the specifications that may be able to fulfill +dependency+ and
# returns those that match the local platform and all those that match.
- def find_possible dependency # :nodoc:
+ def find_possible(dependency) # :nodoc:
all = @set.find_all dependency
if (skip_dep_gems = skip_gems[dependency.name]) && !skip_dep_gems.empty?
@@ -216,7 +216,7 @@ class Gem::Resolver
##
# Returns the gems in +specs+ that match the local platform.
- def select_local_platforms specs # :nodoc:
+ def select_local_platforms(specs) # :nodoc:
specs.select do |spec|
Gem::Platform.installable? spec
end