diff options
Diffstat (limited to 'lib/rubygems/resolver')
25 files changed, 50 insertions, 0 deletions
diff --git a/lib/rubygems/resolver/activation_request.rb b/lib/rubygems/resolver/activation_request.rb index 293df1efe9..2a8d6032f8 100644 --- a/lib/rubygems/resolver/activation_request.rb +++ b/lib/rubygems/resolver/activation_request.rb @@ -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 diff --git a/lib/rubygems/resolver/api_set.rb b/lib/rubygems/resolver/api_set.rb index 19c59a315b..ca92bac09c 100644 --- a/lib/rubygems/resolver/api_set.rb +++ b/lib/rubygems/resolver/api_set.rb @@ -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 diff --git a/lib/rubygems/resolver/api_specification.rb b/lib/rubygems/resolver/api_specification.rb index a47d910331..4052846e99 100644 --- a/lib/rubygems/resolver/api_specification.rb +++ b/lib/rubygems/resolver/api_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/best_set.rb b/lib/rubygems/resolver/best_set.rb index 7a708ee391..8a8c15d9a4 100644 --- a/lib/rubygems/resolver/best_set.rb +++ b/lib/rubygems/resolver/best_set.rb @@ -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 diff --git a/lib/rubygems/resolver/composed_set.rb b/lib/rubygems/resolver/composed_set.rb index 226da1e1e0..094cb69b04 100644 --- a/lib/rubygems/resolver/composed_set.rb +++ b/lib/rubygems/resolver/composed_set.rb @@ -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 diff --git a/lib/rubygems/resolver/conflict.rb b/lib/rubygems/resolver/conflict.rb index 2ce63feef2..4245b59bee 100644 --- a/lib/rubygems/resolver/conflict.rb +++ b/lib/rubygems/resolver/conflict.rb @@ -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 diff --git a/lib/rubygems/resolver/current_set.rb b/lib/rubygems/resolver/current_set.rb index c3aa3a2c37..d60e46389d 100644 --- a/lib/rubygems/resolver/current_set.rb +++ b/lib/rubygems/resolver/current_set.rb @@ -5,7 +5,9 @@ # for installed gems. class Gem::Resolver::CurrentSet < Gem::Resolver::Set + def find_all(req) req.dependency.matching_specs end + end diff --git a/lib/rubygems/resolver/dependency_request.rb b/lib/rubygems/resolver/dependency_request.rb index 77539c340f..1984aa9ddc 100644 --- a/lib/rubygems/resolver/dependency_request.rb +++ b/lib/rubygems/resolver/dependency_request.rb @@ -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 diff --git a/lib/rubygems/resolver/git_set.rb b/lib/rubygems/resolver/git_set.rb index eac51f15ad..6340b92fae 100644 --- a/lib/rubygems/resolver/git_set.rb +++ b/lib/rubygems/resolver/git_set.rb @@ -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 diff --git a/lib/rubygems/resolver/git_specification.rb b/lib/rubygems/resolver/git_specification.rb index 555dcffc22..f43cfba853 100644 --- a/lib/rubygems/resolver/git_specification.rb +++ b/lib/rubygems/resolver/git_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/index_set.rb b/lib/rubygems/resolver/index_set.rb index 9390e34255..f1ecc7f95f 100644 --- a/lib/rubygems/resolver/index_set.rb +++ b/lib/rubygems/resolver/index_set.rb @@ -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 diff --git a/lib/rubygems/resolver/index_specification.rb b/lib/rubygems/resolver/index_specification.rb index d80f121189..ed9423791c 100644 --- a/lib/rubygems/resolver/index_specification.rb +++ b/lib/rubygems/resolver/index_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/installed_specification.rb b/lib/rubygems/resolver/installed_specification.rb index 167ba1439e..9d996fc1da 100644 --- a/lib/rubygems/resolver/installed_specification.rb +++ b/lib/rubygems/resolver/installed_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/installer_set.rb b/lib/rubygems/resolver/installer_set.rb index eaa7e207b2..dad6313eba 100644 --- a/lib/rubygems/resolver/installer_set.rb +++ b/lib/rubygems/resolver/installer_set.rb @@ -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 diff --git a/lib/rubygems/resolver/local_specification.rb b/lib/rubygems/resolver/local_specification.rb index 9c69c4ab74..7418cfcc86 100644 --- a/lib/rubygems/resolver/local_specification.rb +++ b/lib/rubygems/resolver/local_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/lock_set.rb b/lib/rubygems/resolver/lock_set.rb index 1ab03e753b..12807f3957 100644 --- a/lib/rubygems/resolver/lock_set.rb +++ b/lib/rubygems/resolver/lock_set.rb @@ -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 diff --git a/lib/rubygems/resolver/lock_specification.rb b/lib/rubygems/resolver/lock_specification.rb index cdb8e4e425..5954507dba 100644 --- a/lib/rubygems/resolver/lock_specification.rb +++ b/lib/rubygems/resolver/lock_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/requirement_list.rb b/lib/rubygems/resolver/requirement_list.rb index 5b51493c9a..cf0014b0bb 100644 --- a/lib/rubygems/resolver/requirement_list.rb +++ b/lib/rubygems/resolver/requirement_list.rb @@ -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 diff --git a/lib/rubygems/resolver/set.rb b/lib/rubygems/resolver/set.rb index 8046e18ea1..242f9cd3dc 100644 --- a/lib/rubygems/resolver/set.rb +++ b/lib/rubygems/resolver/set.rb @@ -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 diff --git a/lib/rubygems/resolver/source_set.rb b/lib/rubygems/resolver/source_set.rb index bf8c23184e..8e799514fd 100644 --- a/lib/rubygems/resolver/source_set.rb +++ b/lib/rubygems/resolver/source_set.rb @@ -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 diff --git a/lib/rubygems/resolver/spec_specification.rb b/lib/rubygems/resolver/spec_specification.rb index bde5d9cddc..d0e744f3a7 100644 --- a/lib/rubygems/resolver/spec_specification.rb +++ b/lib/rubygems/resolver/spec_specification.rb @@ -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 diff --git a/lib/rubygems/resolver/specification.rb b/lib/rubygems/resolver/specification.rb index 7fe2afd3bd..e859d6659a 100644 --- a/lib/rubygems/resolver/specification.rb +++ b/lib/rubygems/resolver/specification.rb @@ -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 diff --git a/lib/rubygems/resolver/stats.rb b/lib/rubygems/resolver/stats.rb index 64b458f504..5f41940b1e 100644 --- a/lib/rubygems/resolver/stats.rb +++ b/lib/rubygems/resolver/stats.rb @@ -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 diff --git a/lib/rubygems/resolver/vendor_set.rb b/lib/rubygems/resolver/vendor_set.rb index 48c640d8c9..7e2e917d5c 100644 --- a/lib/rubygems/resolver/vendor_set.rb +++ b/lib/rubygems/resolver/vendor_set.rb @@ -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 diff --git a/lib/rubygems/resolver/vendor_specification.rb b/lib/rubygems/resolver/vendor_specification.rb index 8dfe5940f2..56f2e6eb2c 100644 --- a/lib/rubygems/resolver/vendor_specification.rb +++ b/lib/rubygems/resolver/vendor_specification.rb @@ -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 |