Class: DependencyChecker::MetadataChecker
- Inherits:
-
Object
- Object
- DependencyChecker::MetadataChecker
- Defined in:
- lib/dependency_checker/metadata_checker.rb
Instance Method Summary collapse
-
#check_dependencies ⇒ Map
Perform constraint comparisons of dependencies based on their latest version, and also override any occurance of @updated_module with @updated_module_version.
-
#initialize(metadata, forge, updated_module, updated_module_version) ⇒ MetadataChecker
constructor
A new instance of MetadataChecker.
Constructor Details
#initialize(metadata, forge, updated_module, updated_module_version) ⇒ MetadataChecker
Returns a new instance of MetadataChecker.
8 9 10 11 12 13 |
# File 'lib/dependency_checker/metadata_checker.rb', line 8 def initialize(, forge, updated_module, updated_module_version) @metadata = @forge = forge @updated_module = updated_module.sub('-', '/') if updated_module @updated_module_version = updated_module_version if updated_module_version end |
Instance Method Details
#check_dependencies ⇒ Map
Perform constraint comparisons of dependencies based on their latest version, and also override any occurance of @updated_module with @updated_module_version
18 19 20 21 22 23 24 |
# File 'lib/dependency_checker/metadata_checker.rb', line 18 def check_dependencies fetch_module_dependencies.map do |dependency, constraint| dependency = dependency.sub('-', '/') current = dependency == @updated_module ? SemanticPuppet::Version.parse(@updated_module_version) : @forge.get_current_version(dependency) [dependency, constraint, current, constraint.include?(current)] end end |