Sha256: bf47c7ed21edd0cb0c85d6788b2776394ceffbabadba6452f542b99e730bd207

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

require "thor/actions"

module Gator
  module Default
    module Commands

      class NewCommand < Gator::Command::Base
        include Thor::Actions

        specify "new", "n"

        def self.source_root
          File.dirname(__FILE__)
        end

        argument :name, :type => :string, :desc => "The name of the project."
        desc "Creates an empty gator project."

        def create
          directory "new_template", name
          # we need to call directories starting with a . seperately
          directory "new_template/.gator", "#{name}/.gator"
        end

      end

      Gator::Command.add NewCommand

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gator-0.0.8.pre lib/__legacy/default/commands/new_command.rb
gator-0.0.7.pre lib/__legacy/default/commands/new_command.rb
gator-0.0.6.pre lib/__legacy/default/commands/new_command.rb
gator-0.0.5.pre lib/default/commands/new_command.rb