Sha256: beac5184ceb55afd1cb1956eb50b670e31ecd7ca96a578912ae3617314cd876a

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

require 'thor'
require 'grit'
require 'fileutils'
require 'puppetry/version'

module Puppetry
  class CLI < Thor
    desc "version", "Print application's version"
    def version
      puts "Puppetry v#{Puppetry::Version}"
    end

    desc "new NAME", "Create a new module called NAME"
    def new(name)
      Grit::Git.new(name).clone({}, "git://github.com/stefanozanella/puppet-skeleton", name)
      # This looks rather rough, but maybe it's the simplest way to erase all
      # git history from the folder?
      FileUtils.rm_rf File.expand_path('.git', name)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppetry_toolbox-0.0.2 lib/puppetry/cli.rb