Sha256: cb0b4482c74e8f68b353e7b39b77795ae833053e19bc2ff93d5114664c632b52
Contents?: true
Size: 965 Bytes
Versions: 1
Compression:
Stored size: 965 Bytes
Contents
require 'thor' module Sunzi CONFIG_DIR = File.join(ENV['HOME'],'.config','sunzi') class Cli < Thor include Thor::Actions class << self def source_root File.expand_path('../../',__FILE__) end end map "c" => :create desc "create [PROJECT]", "Create sunzi project (Shortcut: c)" def create(project = 'sunzi') empty_directory project empty_directory "#{project}/here" empty_directory "#{project}/there" empty_directory "#{project}/there/recipes" template "templates/here/attributes.yml", "#{project}/here/attributes.yml" template "templates/here/compile.rb", "#{project}/here/compile.rb" template "templates/here/deploy.sh", "#{project}/here/deploy.sh" template "templates/there/install.sh", "#{project}/there/install.sh" template "templates/there/recipes/ssh_key.sh", "#{project}/there/recipes/ssh_key.sh" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sunzi-0.0.1 | lib/sunzi/cli.rb |