Sha256: e44e80c0f24fa73cb58e5c5861ba057fad176951453df6012fb827056c020a07

Contents?: true

Size: 769 Bytes

Versions: 2

Compression:

Stored size: 769 Bytes

Contents

require File.expand_path('../commands/area', __FILE__)

module DCA
  class CLI < Thor
    include Thor::Actions

    def self.source_root
      File.expand_path('../commands/templates', __FILE__)
    end

    desc 'config', 'Create default config file'
    def config
      empty_directory 'config'
      template 'config.yml.erb', 'config/config.yml'
    end

    desc 'area SUBCOMMAND ...ARGS', 'Manage project areas'
    subcommand 'area', Commands::Area

    desc 'install', 'Install dca project'
    def install
      project = "#{DCA.project_name}::Project".constantize
      project.install
    end

    desc 'uninstall', 'Uninstall dca  project'
    def uninstall
      project = "#{DCA.project_name}::Project".constantize
      project.remove
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dca-0.1.1 lib/dca/cli.rb
dca-0.1.0 lib/dca/cli.rb