Class: SemanticPuppet::Dependency::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.priorityObject



6
7
8
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb', line 6

def self.priority
  0
end

Instance Method Details

#create_release(name, version, dependencies = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb', line 14

def create_release(name, version, dependencies = {})
  version = Version.parse(version) if version.is_a? String
  dependencies = dependencies.inject({}) do |hash, (key, value)|
    hash[key] = VersionRange.parse(value || '>= 0.0.0')
    hash[key] ||= VersionRange::EMPTY_RANGE
    hash
  end
  ModuleRelease.new(self, name, version, dependencies)
end

#priorityObject



10
11
12
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb', line 10

def priority
  self.class.priority
end