Class: Librarian::Puppet::Source::Repo
- Inherits:
-
Object
- Object
- Librarian::Puppet::Source::Repo
show all
- Defined in:
- lib/librarian/puppet/source/repo.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(source, name) ⇒ Repo
Returns a new instance of Repo.
11
12
13
14
|
# File 'lib/librarian/puppet/source/repo.rb', line 11
def initialize(source, name)
self.source = source
self.name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8
9
10
|
# File 'lib/librarian/puppet/source/repo.rb', line 8
def name
@name
end
|
#source ⇒ Object
Returns the value of attribute source.
8
9
10
|
# File 'lib/librarian/puppet/source/repo.rb', line 8
def source
@source
end
|
Instance Method Details
#cache_path ⇒ Object
20
21
22
|
# File 'lib/librarian/puppet/source/repo.rb', line 20
def cache_path
@cache_path ||= source.cache_path.join(name)
end
|
#environment ⇒ Object
16
17
18
|
# File 'lib/librarian/puppet/source/repo.rb', line 16
def environment
source.environment
end
|
#vendored?(name, version) ⇒ Boolean
28
29
30
|
# File 'lib/librarian/puppet/source/repo.rb', line 28
def vendored?(name, version)
vendored_path(name, version).exist?
end
|
#vendored_path(name, version) ⇒ Object
32
33
34
|
# File 'lib/librarian/puppet/source/repo.rb', line 32
def vendored_path(name, version)
environment.vendor_cache.join("#{name}-#{version}.tar.gz")
end
|
#version_unpacked_cache_path(version) ⇒ Object
24
25
26
|
# File 'lib/librarian/puppet/source/repo.rb', line 24
def version_unpacked_cache_path(version)
cache_path.join(version.to_s)
end
|