Class: Puppet::ModuleTool::LocalTarball::ModuleRelease Private
- Inherits:
-
SemanticPuppet::Dependency::ModuleRelease
- Object
- SemanticPuppet::Dependency::ModuleRelease
- Puppet::ModuleTool::LocalTarball::ModuleRelease
- Defined in:
- lib/puppet/module_tool/local_tarball.rb
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.
Instance Attribute Summary collapse
- #install_dir ⇒ Object readonly private
- #metadata ⇒ Object readonly private
- #mod ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(source, mod) ⇒ ModuleRelease
constructor
private
A new instance of ModuleRelease.
- #install(dir) ⇒ Object private
- #prepare ⇒ Object private
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.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 48 def initialize(source, mod) @mod = mod @metadata = 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 = dependencies.to_h end super(source, name, version, dependencies || {}) end |
Instance Attribute Details
#install_dir ⇒ Object (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.
46 47 48 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 46 def install_dir @install_dir end |
#metadata ⇒ Object (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.
46 47 48 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 46 def @metadata end |
#mod ⇒ Object (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.
46 47 48 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 46 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.
65 66 67 68 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 65 def install(dir) @source.install(self, dir) @install_dir = dir end |
#prepare ⇒ 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.
70 71 72 |
# File 'lib/puppet/module_tool/local_tarball.rb', line 70 def prepare @source.prepare(self) end |