Class: Librarian::Puppet::Environment
- Inherits:
-
Environment
- Object
- Environment
- Librarian::Puppet::Environment
- Defined in:
- lib/librarian/puppet/environment.rb
Instance Method Summary collapse
- #adapter_name ⇒ Object
- #ephemeral_lockfile ⇒ Object
- #install_path ⇒ Object
- #local? ⇒ Boolean
- #lockfile ⇒ Object
- #tmp_path ⇒ Object
- #use_short_cache_path ⇒ Object
- #use_v1_api ⇒ Object
- #vendor! ⇒ Object
- #vendor? ⇒ Boolean
- #vendor_cache ⇒ Object
- #vendor_path ⇒ Object
- #vendor_source ⇒ Object
Instance Method Details
#adapter_name ⇒ Object
10 11 12 |
# File 'lib/librarian/puppet/environment.rb', line 10 def adapter_name "puppet" end |
#ephemeral_lockfile ⇒ Object
18 19 20 |
# File 'lib/librarian/puppet/environment.rb', line 18 def ephemeral_lockfile Lockfile.new(self, nil) end |
#install_path ⇒ Object
27 28 29 30 |
# File 'lib/librarian/puppet/environment.rb', line 27 def install_path part = config_db["path"] || "modules" project_path.join(part) end |
#local? ⇒ Boolean
53 54 55 |
# File 'lib/librarian/puppet/environment.rb', line 53 def local? config_db['mode'] == 'local' end |
#lockfile ⇒ Object
14 15 16 |
# File 'lib/librarian/puppet/environment.rb', line 14 def lockfile Lockfile.new(self, lockfile_path) end |
#tmp_path ⇒ Object
22 23 24 25 |
# File 'lib/librarian/puppet/environment.rb', line 22 def tmp_path part = config_db["tmp"] || ".tmp" project_path.join(part) end |
#use_short_cache_path ⇒ Object
61 62 63 |
# File 'lib/librarian/puppet/environment.rb', line 61 def use_short_cache_path config_db['use-short-cache-path'] end |
#use_v1_api ⇒ Object
57 58 59 |
# File 'lib/librarian/puppet/environment.rb', line 57 def use_v1_api config_db['use-v1-api'] end |
#vendor! ⇒ Object
44 45 46 47 |
# File 'lib/librarian/puppet/environment.rb', line 44 def vendor! vendor_cache.mkpath unless vendor_cache.exist? vendor_source.mkpath unless vendor_source.exist? end |
#vendor? ⇒ Boolean
49 50 51 |
# File 'lib/librarian/puppet/environment.rb', line 49 def vendor? vendor_path.exist? end |
#vendor_cache ⇒ Object
36 37 38 |
# File 'lib/librarian/puppet/environment.rb', line 36 def vendor_cache vendor_path.join('cache') end |
#vendor_path ⇒ Object
32 33 34 |
# File 'lib/librarian/puppet/environment.rb', line 32 def vendor_path project_path.join('vendor/puppet') end |
#vendor_source ⇒ Object
40 41 42 |
# File 'lib/librarian/puppet/environment.rb', line 40 def vendor_source vendor_path.join('source') end |