diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-01-30 12:24:29 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-01-30 09:26:54 +0000 |
commit | 2f54422d03d12ef34356e879669303a58cca1b33 (patch) | |
tree | fb0c7172fc7bcf945e7628bc0d99c79913d87f33 | |
parent | b31995d8829738f61f26b9166b2d7e500b3f4abf (diff) |
[rubygems/rubygems] Update namespace Gem::Resolver::Molinillo to Gem::Molinillo
https://github.com/rubygems/rubygems/commit/6c4caf3ab0
21 files changed, 56 insertions, 56 deletions
diff --git a/lib/rubygems/resolver.rb b/lib/rubygems/resolver.rb index 330a07f425..115c716b6b 100644 --- a/lib/rubygems/resolver.rb +++ b/lib/rubygems/resolver.rb @@ -167,7 +167,7 @@ class Gem::Resolver reqs end - include Molinillo::UI + include Gem::Molinillo::UI def output @output ||= debug? ? $stdout : File.open(IO::NULL, "w") @@ -177,14 +177,14 @@ class Gem::Resolver DEBUG_RESOLVER end - include Molinillo::SpecificationProvider + include Gem::Molinillo::SpecificationProvider ## # Proceed with resolution! Returns an array of ActivationRequest objects. def resolve - Molinillo::Resolver.new(self, self).resolve(@needed.map {|d| DependencyRequest.new d, nil }).tsort.map(&:payload).compact - rescue Molinillo::VersionConflict => e + Gem::Molinillo::Resolver.new(self, self).resolve(@needed.map {|d| DependencyRequest.new d, nil }).tsort.map(&:payload).compact + rescue Gem::Molinillo::VersionConflict => e conflict = e.conflicts.values.first raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement) ensure diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo.rb b/lib/rubygems/vendor/molinillo/lib/molinillo.rb index f67badbde7..dd5600c9e3 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo.rb @@ -6,6 +6,6 @@ require_relative 'molinillo/resolver' require_relative 'molinillo/modules/ui' require_relative 'molinillo/modules/specification_provider' -# Gem::Resolver::Molinillo is a generic dependency resolution algorithm. -module Gem::Resolver::Molinillo +# Gem::Molinillo is a generic dependency resolution algorithm. +module Gem::Molinillo end diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb index d540d3baff..34842d46d5 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb @@ -1,55 +1,55 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo # @!visibility private module Delegates - # Delegates all {Gem::Resolver::Molinillo::ResolutionState} methods to a `#state` property. + # Delegates all {Gem::Molinillo::ResolutionState} methods to a `#state` property. module ResolutionState - # (see Gem::Resolver::Molinillo::ResolutionState#name) + # (see Gem::Molinillo::ResolutionState#name) def name - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.name end - # (see Gem::Resolver::Molinillo::ResolutionState#requirements) + # (see Gem::Molinillo::ResolutionState#requirements) def requirements - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.requirements end - # (see Gem::Resolver::Molinillo::ResolutionState#activated) + # (see Gem::Molinillo::ResolutionState#activated) def activated - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.activated end - # (see Gem::Resolver::Molinillo::ResolutionState#requirement) + # (see Gem::Molinillo::ResolutionState#requirement) def requirement - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.requirement end - # (see Gem::Resolver::Molinillo::ResolutionState#possibilities) + # (see Gem::Molinillo::ResolutionState#possibilities) def possibilities - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.possibilities end - # (see Gem::Resolver::Molinillo::ResolutionState#depth) + # (see Gem::Molinillo::ResolutionState#depth) def depth - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.depth end - # (see Gem::Resolver::Molinillo::ResolutionState#conflicts) + # (see Gem::Molinillo::ResolutionState#conflicts) def conflicts - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.conflicts end - # (see Gem::Resolver::Molinillo::ResolutionState#unused_unwind_options) + # (see Gem::Molinillo::ResolutionState#unused_unwind_options) def unused_unwind_options - current_state = state || Gem::Resolver::Molinillo::ResolutionState.empty + current_state = state || Gem::Molinillo::ResolutionState.empty current_state.unused_unwind_options end end diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb index b765226fb0..8417721537 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb @@ -1,67 +1,67 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo module Delegates - # Delegates all {Gem::Resolver::Molinillo::SpecificationProvider} methods to a + # Delegates all {Gem::Molinillo::SpecificationProvider} methods to a # `#specification_provider` property. module SpecificationProvider - # (see Gem::Resolver::Molinillo::SpecificationProvider#search_for) + # (see Gem::Molinillo::SpecificationProvider#search_for) def search_for(dependency) with_no_such_dependency_error_handling do specification_provider.search_for(dependency) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#dependencies_for) + # (see Gem::Molinillo::SpecificationProvider#dependencies_for) def dependencies_for(specification) with_no_such_dependency_error_handling do specification_provider.dependencies_for(specification) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#requirement_satisfied_by?) + # (see Gem::Molinillo::SpecificationProvider#requirement_satisfied_by?) def requirement_satisfied_by?(requirement, activated, spec) with_no_such_dependency_error_handling do specification_provider.requirement_satisfied_by?(requirement, activated, spec) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#dependencies_equal?) + # (see Gem::Molinillo::SpecificationProvider#dependencies_equal?) def dependencies_equal?(dependencies, other_dependencies) with_no_such_dependency_error_handling do specification_provider.dependencies_equal?(dependencies, other_dependencies) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#name_for) + # (see Gem::Molinillo::SpecificationProvider#name_for) def name_for(dependency) with_no_such_dependency_error_handling do specification_provider.name_for(dependency) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#name_for_explicit_dependency_source) + # (see Gem::Molinillo::SpecificationProvider#name_for_explicit_dependency_source) def name_for_explicit_dependency_source with_no_such_dependency_error_handling do specification_provider.name_for_explicit_dependency_source end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#name_for_locking_dependency_source) + # (see Gem::Molinillo::SpecificationProvider#name_for_locking_dependency_source) def name_for_locking_dependency_source with_no_such_dependency_error_handling do specification_provider.name_for_locking_dependency_source end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#sort_dependencies) + # (see Gem::Molinillo::SpecificationProvider#sort_dependencies) def sort_dependencies(dependencies, activated, conflicts) with_no_such_dependency_error_handling do specification_provider.sort_dependencies(dependencies, activated, conflicts) end end - # (see Gem::Resolver::Molinillo::SpecificationProvider#allow_missing?) + # (see Gem::Molinillo::SpecificationProvider#allow_missing?) def allow_missing?(dependency) with_no_such_dependency_error_handling do specification_provider.allow_missing?(dependency) diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb index 731a9e3e90..b9ebe2951c 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb @@ -5,7 +5,7 @@ require_relative '../../../../tsort' require_relative 'dependency_graph/log' require_relative 'dependency_graph/vertex' -module Gem::Resolver::Molinillo +module Gem::Molinillo # A directed acyclic graph that is tuned to hold named dependencies class DependencyGraph include Enumerable diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb index cc140031b3..8707ec451d 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # An action that modifies a {DependencyGraph} that is reversible. # @abstract diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb index 5570483253..aa9815c5ae 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # (see DependencyGraph#add_edge_no_circular) diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb index f1411d5efa..9c7066a669 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # (see DependencyGraph#add_vertex) diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb index 3b48d77a50..1e62c0a0b6 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # (see DependencyGraph#delete_edge) diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb index 92f60d5be8..6132f969b9 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # @see DependencyGraph#detach_vertex_named diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb index 7aeb8847ec..6954c4b1f8 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb @@ -7,7 +7,7 @@ require_relative 'detach_vertex_named' require_relative 'set_payload' require_relative 'tag' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # A log for dependency graph actions class Log diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb index 726292a2c3..9bcaaae0f9 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # @see DependencyGraph#set_payload diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb index bfe6fd31f8..62f243a2af 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'action' -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # @!visibility private # @see DependencyGraph#tag diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb index 77114951b2..074de369be 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo class DependencyGraph # A vertex in a {DependencyGraph} that encapsulates a {#name} and a # {#payload} diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb index 4289902828..07ea5fdf37 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo # An error that occurred during the resolution process class ResolverError < StandardError; end diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb index 86c249c404..8ed3a920a2 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo - # The version of Gem::Resolver::Molinillo. +module Gem::Molinillo + # The version of Gem::Molinillo. VERSION = '0.8.0'.freeze end diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb index 1067bf7439..85860902fc 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo # Provides information about specifications and dependencies to the resolver, # allowing the {Resolver} class to remain generic while still providing power # and flexibility. # - # This module contains the methods that users of Gem::Resolver::Molinillo must to implement, + # This module contains the methods that users of Gem::Molinillo must to implement, # using knowledge of their own model classes. module SpecificationProvider # Search for the specifications that match the given dependency. diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb index a810fd519c..464722902e 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo # Conveys information about the resolution process to a user. module UI # The {IO} object that should be used to print output. `STDOUT`, by default. diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb index 8b40e59e42..5cfc6e3a0d 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo class Resolver # A specific resolution from a given {Resolver} class Resolution @@ -244,8 +244,8 @@ module Gem::Resolver::Molinillo require_relative 'delegates/resolution_state' require_relative 'delegates/specification_provider' - include Gem::Resolver::Molinillo::Delegates::ResolutionState - include Gem::Resolver::Molinillo::Delegates::SpecificationProvider + include Gem::Molinillo::Delegates::ResolutionState + include Gem::Molinillo::Delegates::SpecificationProvider # Processes the topmost available {RequirementState} on the stack # @return [void] diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb index d43121f8ca..86229c3fa1 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb @@ -2,7 +2,7 @@ require_relative 'dependency_graph' -module Gem::Resolver::Molinillo +module Gem::Molinillo # This class encapsulates a dependency resolver. # The resolver is responsible for determining which set of dependencies to # activate, with feedback from the {#specification_provider} diff --git a/lib/rubygems/vendor/molinillo/lib/molinillo/state.rb b/lib/rubygems/vendor/molinillo/lib/molinillo/state.rb index 6e7c715fce..c48ec6af9c 100644 --- a/lib/rubygems/vendor/molinillo/lib/molinillo/state.rb +++ b/lib/rubygems/vendor/molinillo/lib/molinillo/state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Gem::Resolver::Molinillo +module Gem::Molinillo # A state that a {Resolution} can be in # @attr [String] name the name of the current requirement # @attr [Array<Object>] requirements currently unsatisfied requirements |