Class: Puppet::ModuleTool::LocalTarball::ModuleRelease Private

Inherits:
SemanticPuppet::Dependency::ModuleRelease
  • Object
show all
Defined in:
lib/puppet/module_tool/local_tarball.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, mod) ⇒ ModuleRelease

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ModuleRelease.

API:

  • private



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/puppet/module_tool/local_tarball.rb', line 47

def initialize(source, mod)
  @mod = mod
   = mod.
  name = mod.forge_name.tr('/', '-')
  version = SemanticPuppet::Version.parse(mod.version)
  release = "#{name}@#{version}"

  if mod.dependencies
    dependencies = mod.dependencies.map do |dep|
      Puppet::ModuleTool.parse_module_dependency(release, dep)[0..1]
    end
    dependencies = Hash[dependencies]
  end

  super(source, name, version, dependencies || {})
end

Instance Attribute Details

#install_dirObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



45
46
47
# File 'lib/puppet/module_tool/local_tarball.rb', line 45

def install_dir
  @install_dir
end

#metadataObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



45
46
47
# File 'lib/puppet/module_tool/local_tarball.rb', line 45

def 
  
end

#modObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



45
46
47
# File 'lib/puppet/module_tool/local_tarball.rb', line 45

def mod
  @mod
end

Instance Method Details

#install(dir) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



64
65
66
67
# File 'lib/puppet/module_tool/local_tarball.rb', line 64

def install(dir)
  @source.install(self, dir)
  @install_dir = dir
end

#prepareObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



69
70
71
# File 'lib/puppet/module_tool/local_tarball.rb', line 69

def prepare
  @source.prepare(self)
end