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
- #init ⇒ Object
-
#initialize ⇒ Cli
constructor
A new instance of Cli.
- #install ⇒ Object
- #package ⇒ Object
- #version ⇒ Object
Methods included from Particularity
Constructor Details
#initialize ⇒ Cli
Returns a new instance of Cli.
10 11 12 13 |
# File 'lib/librarian/puppet/cli.rb', line 10 def initialize(*) super say "librarian-puppet-maestrodev gem is now deprecated in favor of librarian-puppet 0.9.11 and is no longer updated" end |
Instance Method Details
#init ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/librarian/puppet/cli.rb', line 26 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
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/librarian/puppet/cli.rb', line 52 def install unless File.exist?('Puppetfile') say "Could not find Puppetfile in #{Dir.pwd}", :red exit 1 end 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! debug { "Install: dependencies resolved"} install! end |
#package ⇒ Object
87 88 89 90 |
# File 'lib/librarian/puppet/cli.rb', line 87 def package environment.vendor! install end |