summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2020-09-23 21:02:56 +0900
committerHiroshi SHIBATA <[email protected]>2020-09-23 21:02:56 +0900
commit31a6eaabc165d8a222e176f2c809d90622d88ec2 ()
treeb5333db2c13888ede5062ccd8ecca649ea261b4c /lib/rubygems/resolver
parentf56fc720ee8cd4b79824a1c3843058b662a302bd (diff)
Manually merged from https://.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
-rw-r--r--lib/rubygems/resolver/activation_request.rb2
-rw-r--r--lib/rubygems/resolver/api_set.rb2
-rw-r--r--lib/rubygems/resolver/api_specification.rb2
-rw-r--r--lib/rubygems/resolver/best_set.rb2
-rw-r--r--lib/rubygems/resolver/composed_set.rb2
-rw-r--r--lib/rubygems/resolver/conflict.rb2
-rw-r--r--lib/rubygems/resolver/current_set.rb2
-rw-r--r--lib/rubygems/resolver/dependency_request.rb2
-rw-r--r--lib/rubygems/resolver/git_set.rb2
-rw-r--r--lib/rubygems/resolver/git_specification.rb2
-rw-r--r--lib/rubygems/resolver/index_set.rb2
-rw-r--r--lib/rubygems/resolver/index_specification.rb2
-rw-r--r--lib/rubygems/resolver/installed_specification.rb2
-rw-r--r--lib/rubygems/resolver/installer_set.rb2
-rw-r--r--lib/rubygems/resolver/local_specification.rb2
-rw-r--r--lib/rubygems/resolver/lock_set.rb2
-rw-r--r--lib/rubygems/resolver/lock_specification.rb2
-rw-r--r--lib/rubygems/resolver/requirement_list.rb2
-rw-r--r--lib/rubygems/resolver/set.rb2
-rw-r--r--lib/rubygems/resolver/source_set.rb2
-rw-r--r--lib/rubygems/resolver/spec_specification.rb2
-rw-r--r--lib/rubygems/resolver/specification.rb2
-rw-r--r--lib/rubygems/resolver/stats.rb2
-rw-r--r--lib/rubygems/resolver/vendor_set.rb2
-rw-r--r--lib/rubygems/resolver/vendor_specification.rb2
25 files changed, 50 insertions, 0 deletions
@@ -4,6 +4,7 @@
# dependency that was used to introduce this activation.
class Gem::Resolver::ActivationRequest
##
# The parent request for this activation request.
@@ -151,4 +152,5 @@ class Gem::Resolver::ActivationRequest
def name_tuple
@name_tuple ||= Gem::NameTuple.new(name, version, platform)
end
end
@@ -4,6 +4,7 @@
# Returns instances of APISpecification.
class Gem::Resolver::APISet < Gem::Resolver::Set
##
# The URI for the dependency API this APISet uses.
@@ -120,4 +121,5 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
@data[name]
end
end
@@ -6,6 +6,7 @@
# is the name, version, and dependencies.
class Gem::Resolver::APISpecification < Gem::Resolver::Specification
##
# Creates an APISpecification for the given +set+ from the rubygems.org
# +api_data+.
@@ -85,4 +86,5 @@ class Gem::Resolver::APISpecification < Gem::Resolver::Specification
def source # :nodoc:
@set.source
end
end
@@ -5,6 +5,7 @@
# It combines IndexSet and APISet
class Gem::Resolver::BestSet < Gem::Resolver::ComposedSet
##
# Creates a BestSet for the given +sources+ or Gem::sources if none are
# specified. +sources+ must be a Gem::SourceList.
@@ -73,4 +74,5 @@ class Gem::Resolver::BestSet < Gem::Resolver::ComposedSet
index_set
end
end
end
@@ -9,6 +9,7 @@
# This method will eliminate nesting of composed sets.
class Gem::Resolver::ComposedSet < Gem::Resolver::Set
attr_reader :sets # :nodoc:
##
@@ -61,4 +62,5 @@ class Gem::Resolver::ComposedSet < Gem::Resolver::Set
def prefetch(reqs)
@sets.each {|s| s.prefetch(reqs) }
end
end
@@ -4,6 +4,7 @@
# with a spec that would be activated.
class Gem::Resolver::Conflict
##
# The specification that was activated prior to the conflict
@@ -150,4 +151,5 @@ class Gem::Resolver::Conflict
def requester
@failed_dep.requester
end
end
@@ -5,7 +5,9 @@
# for installed gems.
class Gem::Resolver::CurrentSet < Gem::Resolver::Set
def find_all(req)
req.dependency.matching_specs
end
end
@@ -4,6 +4,7 @@
# contained the Dependency.
class Gem::Resolver::DependencyRequest
##
# The wrapped Gem::Dependency
@@ -115,4 +116,5 @@ class Gem::Resolver::DependencyRequest
def to_s # :nodoc:
@dependency.to_s
end
end
@@ -10,6 +10,7 @@
# set.add_git_gem 'rake', 'git://example/rake.git', tag: 'rake-10.1.0'
class Gem::Resolver::GitSet < Gem::Resolver::Set
##
# The root directory for git gems in this set. This is usually Gem.dir, the
# installation directory for regular gems.
@@ -117,4 +118,5 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set
end
end
end
end
@@ -5,6 +5,7 @@
# option.
class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification
def ==(other) # :nodoc:
self.class === other and
@set == other.set and
@@ -53,4 +54,5 @@ class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification
q.pp @source
end
end
end
@@ -4,6 +4,7 @@
# source index.
class Gem::Resolver::IndexSet < Gem::Resolver::Set
def initialize(source = nil) # :nodoc:
super()
@@ -75,4 +76,5 @@ class Gem::Resolver::IndexSet < Gem::Resolver::Set
end
end
end
end
@@ -5,6 +5,7 @@
# and +version+ are needed.
class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification
##
# An IndexSpecification is created from the index format described in `gem
# help generate_index`.
@@ -64,4 +65,5 @@ class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification
@source.fetch_spec tuple
end
end
end
@@ -4,6 +4,7 @@
# locally.
class Gem::Resolver::InstalledSpecification < Gem::Resolver::SpecSpecification
def ==(other) # :nodoc:
self.class === other and
@set == other.set and
@@ -53,4 +54,5 @@ class Gem::Resolver::InstalledSpecification < Gem::Resolver::SpecSpecification
def source
@source ||= Gem::Source::Installed.new
end
end
@@ -4,6 +4,7 @@
# files
class Gem::Resolver::InstallerSet < Gem::Resolver::Set
##
# List of Gem::Specification objects that must always be installed.
@@ -222,4 +223,5 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
@domain = :local unless remote
end
end
end
@@ -3,6 +3,7 @@
# A LocalSpecification comes from a .gem file on the local filesystem.
class Gem::Resolver::LocalSpecification < Gem::Resolver::SpecSpecification
##
# Returns +true+ if this gem is installable for the current platform.
@@ -36,4 +37,5 @@ class Gem::Resolver::LocalSpecification < Gem::Resolver::SpecSpecification
q.text "source: #{@source.path}"
end
end
end
@@ -3,6 +3,7 @@
# A set of gems from a gem dependencies lockfile.
class Gem::Resolver::LockSet < Gem::Resolver::Set
attr_reader :specs # :nodoc:
##
@@ -77,4 +78,5 @@ class Gem::Resolver::LockSet < Gem::Resolver::Set
q.pp @specs.map {|spec| spec.full_name }
end
end
end
@@ -6,6 +6,7 @@
# lockfile.
class Gem::Resolver::LockSpecification < Gem::Resolver::Specification
attr_reader :sources
def initialize(set, name, version, sources, platform)
@@ -82,4 +83,5 @@ class Gem::Resolver::LockSpecification < Gem::Resolver::Specification
s.dependencies.concat @dependencies
end
end
end
@@ -7,6 +7,7 @@
# first.
class Gem::Resolver::RequirementList
include Enumerable
##
@@ -78,4 +79,5 @@ class Gem::Resolver::RequirementList
x = @exact[0,5]
x + @list[0,5 - x.size]
end
end
@@ -4,6 +4,7 @@
# dependencies) used in resolution. This set is abstract.
class Gem::Resolver::Set
##
# Set to true to disable network access for this set
@@ -52,4 +53,5 @@ class Gem::Resolver::Set
def remote? # :nodoc:
@remote
end
end
@@ -4,6 +4,7 @@
# Kind off like BestSet but filters the sources for gems
class Gem::Resolver::SourceSet < Gem::Resolver::Set
##
# Creates a SourceSet for the given +sources+ or Gem::sources if none are
# specified. +sources+ must be a Gem::SourceList.
@@ -42,4 +43,5 @@ class Gem::Resolver::SourceSet < Gem::Resolver::Set
link = @links[name]
@sets[link] ||= Gem::Source.new(link).dependency_resolver_set if link
end
end
@@ -4,6 +4,7 @@
# Resolver specifications that are backed by a Gem::Specification.
class Gem::Resolver::SpecSpecification < Gem::Resolver::Specification
##
# A SpecSpecification is created for a +set+ for a Gem::Specification in
# +spec+. The +source+ is either where the +spec+ came from, or should be
@@ -51,4 +52,5 @@ class Gem::Resolver::SpecSpecification < Gem::Resolver::Specification
def version
spec.version
end
end
@@ -5,6 +5,7 @@
# dependency resolution in the resolver is included.
class Gem::Resolver::Specification
##
# The dependencies of the gem for this specification
@@ -110,4 +111,5 @@ class Gem::Resolver::Specification
def local? # :nodoc:
false
end
end
@@ -1,5 +1,6 @@
# frozen_string_literal: true
class Gem::Resolver::Stats
def initialize
@max_depth = 0
@max_requirements = 0
@@ -42,4 +43,5 @@ class Gem::Resolver::Stats
$stdout.printf PATTERN, "Backtracking #", @backtracking
$stdout.printf PATTERN, "Iteration #", @iterations
end
end
@@ -15,6 +15,7 @@
# rake.gemspec (watching the given name).
class Gem::Resolver::VendorSet < Gem::Resolver::Set
##
# The specifications for this set.
@@ -82,4 +83,5 @@ class Gem::Resolver::VendorSet < Gem::Resolver::Set
end
end
end
end
@@ -5,6 +5,7 @@
# option.
class Gem::Resolver::VendorSpecification < Gem::Resolver::SpecSpecification
def ==(other) # :nodoc:
self.class === other and
@set == other.set and
@@ -19,4 +20,5 @@ class Gem::Resolver::VendorSpecification < Gem::Resolver::SpecSpecification
def install(options = {})
yield nil
end
end