Class: Librarian::Puppet::Cli
- Inherits:
-
Cli
- Object
- Cli
- Librarian::Puppet::Cli
- Extended by:
- Particularity
- Includes:
- Particularity
- Defined in:
- lib/librarian/puppet/cli.rb
Defined Under Namespace
Modules: Particularity
Instance Method Summary collapse
Methods included from Particularity
Instance Method Details
#init ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/librarian/puppet/cli.rb', line 21 def init copy_file environment.specfile_name if File.exists? ".gitignore" gitignore = File.read('.gitignore').split("\n") else gitignore = [] end gitignore << ".tmp/" unless gitignore.include? ".tmp/" gitignore << "modules/" unless gitignore.include? "modules/" File.open(".gitignore", 'w') do |f| f.puts gitignore.join("\n") end end |
#install ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/librarian/puppet/cli.rb', line 47 def install ensure! clean! if ["clean"] unless ["destructive"].nil? environment.config_db.local['destructive'] = ['destructive'].to_s end if .include?("strip-dot-git") strip_dot_git_val = ["strip-dot-git"] ? "1" : nil environment.config_db.local["install.strip-dot-git"] = strip_dot_git_val end if .include?("path") environment.config_db.local["path"] = ["path"] end environment.config_db.local['mode'] = ['local'] ? 'local' : nil resolve! install! end |
#package ⇒ Object
75 76 77 78 |
# File 'lib/librarian/puppet/cli.rb', line 75 def package environment.vendor! install end |