Class: Napkin::CLI
- Inherits:
-
Thor
- Object
- Thor
- Napkin::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/napkin/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/napkin/cli.rb', line 10 def self.source_root File.join(File.dirname(__FILE__), 'files') end |
Instance Method Details
#setup(tool) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/napkin/cli.rb', line 16 def setup(tool) puts "Setting up #{tool}!" case tool when 'veronic' bootstrap_file = [:bootstrap_file] || '/etc/veronic/bootstrap/lifted-chef.erb' FileUtils.mkdir_p(File.dirname(bootstrap_file)) copy_file(File.basename(bootstrap_file), bootstrap_file) else puts "#{tool} is not a recognized tool!" exit 1 end end |