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
- #cache_path ⇒ Object
- #install_path ⇒ Object
- #local? ⇒ Boolean
- #scratch_path ⇒ 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 |
#cache_path ⇒ Object
31 32 33 |
# File 'lib/librarian/puppet/environment.rb', line 31 def cache_path project_path.join(".tmp/librarian/cache") end |
#install_path ⇒ Object
14 15 16 17 |
# File 'lib/librarian/puppet/environment.rb', line 14 def install_path part = config_db["path"] || "modules" project_path.join(part) end |
#local? ⇒ Boolean
48 49 50 |
# File 'lib/librarian/puppet/environment.rb', line 48 def local? config_db['mode'] == 'local' end |
#scratch_path ⇒ Object
35 36 37 |
# File 'lib/librarian/puppet/environment.rb', line 35 def scratch_path project_path.join(".tmp/librarian/scratch") end |
#vendor! ⇒ Object
39 40 41 42 |
# File 'lib/librarian/puppet/environment.rb', line 39 def vendor! vendor_cache.mkpath unless vendor_cache.exist? vendor_source.mkpath unless vendor_source.exist? end |
#vendor? ⇒ Boolean
44 45 46 |
# File 'lib/librarian/puppet/environment.rb', line 44 def vendor? vendor_path.exist? end |
#vendor_cache ⇒ Object
23 24 25 |
# File 'lib/librarian/puppet/environment.rb', line 23 def vendor_cache vendor_path.join('cache') end |
#vendor_path ⇒ Object
19 20 21 |
# File 'lib/librarian/puppet/environment.rb', line 19 def vendor_path project_path.join('vendor/puppet') end |
#vendor_source ⇒ Object
27 28 29 |
# File 'lib/librarian/puppet/environment.rb', line 27 def vendor_source vendor_path.join('source') end |