lib/librarian/puppet/environment.rb in librarian-puppet-0.9.3 vs lib/librarian/puppet/environment.rb in librarian-puppet-0.9.4

- old
+ new

@@ -14,15 +14,41 @@ def install_path part = config_db["path"] || "modules" project_path.join(part) end + def vendor_path + project_path.join('vendor/puppet') + end + + def vendor_cache + vendor_path.join('cache') + end + + def vendor_source + vendor_path.join('source') + end + def cache_path project_path.join(".tmp/librarian/cache") end def scratch_path project_path.join(".tmp/librarian/scratch") end + + def vendor! + vendor_cache.mkpath unless vendor_cache.exist? + vendor_source.mkpath unless vendor_source.exist? + end + + def vendor? + vendor_path.exist? + end + + def local? + config_db['mode'] == 'local' + end + end end end