Sha256: fa847d2dff50d0c65a8fc2d5008f787d1ac635db6ef706d13fe7a536acc42ebe
Contents?: true
Size: 746 Bytes
Versions: 3
Compression:
Stored size: 746 Bytes
Contents
# encoding: utf-8 require 'fileutils' require 'thor' module Napkin class CLI < Thor include Thor::Actions def self.source_root File.join(File.dirname(__FILE__), 'files') end desc 'setup TOOL', 'set up TOOL' method_option :bootstrap_file, :aliases => '-b', :desc => 'Bootstrap template for veronic/chef' def setup(tool) puts "Setting up #{tool}!" case tool when 'veronic' bootstrap_file = options[: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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
napkin-0.0.3 | lib/napkin/cli.rb |
napkin-0.0.2 | lib/napkin/cli.rb |
napkin-0.0.1.pre.1 | lib/napkin/cli.rb |