Sha256: 1ca1542d7dca9c4b6c31b8c9263f7fe5a21a50ef97efb797e226a64c7382235c

Contents?: true

Size: 1.53 KB

Versions: 8

Compression:

Stored size: 1.53 KB

Contents

require 'thor'
require 'foreplay'

module Foreplay
  class CLI < Thor
    desc 'deploy ENVIRONMENT', 'Deploys to specified environment'

    method_option :role,        :aliases => '-r'
    method_option :server,      :aliases => '-s'

    def deploy(environment)
      Foreplay::Deploy.start [:deploy, environment, options]
    end

    desc 'check ENVIRONMENT', 'Checks if configuration is OK for specified environment'

    method_option :role,        :aliases => '-r'
    method_option :server,      :aliases => '-s'

    def check(environment)
      Foreplay::Deploy.start [:check, environment, options]
    end

    desc 'setup', 'Create the Foreplay config file'

    method_option :name,        :aliases => '-n'
    method_option :repository,  :aliases => '-r'
    method_option :user,        :aliases => '-u'
    method_option :password
    method_option :keyfile
    method_option :private_key, :aliases => '-k'
    method_option :path,        :aliases => '-f'
    method_option :port,        :aliases => '-p', :type => :numeric
    method_option :servers,     :aliases => '-s', :type => :array
    method_option :db_adapter,  :aliases => '-a'
    method_option :db_encoding, :aliases => '-e'
    method_option :db_name,     :aliases => '-d'
    method_option :db_pool                      , :type => :numeric
    method_option :db_host,     :aliases => '-h'
    method_option :db_user
    method_option :db_password
    method_option :resque_redis

    def setup
      Foreplay::Setup.start
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreplay-0.1.5 lib/foreplay/cli.rb
foreplay-0.1.4 lib/foreplay/cli.rb
foreplay-0.1.3 lib/foreplay/cli.rb
foreplay-0.1.2 lib/foreplay/cli.rb
foreplay-0.1.1 lib/foreplay/cli.rb
foreplay-0.1.0 lib/foreplay/cli.rb
foreplay-0.0.7 lib/foreplay/cli.rb
foreplay-0.0.6 lib/foreplay/cli.rb