Sha256: 1d6a344df9d350bb89f9c32a579fc2da58696e926f8b5d5fb269db6d51005f60

Contents?: true

Size: 1.64 KB

Versions: 18

Compression:

Stored size: 1.64 KB

Contents

require 'thor'
require 'foreplay'
require 'foreplay/setup'

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

    method_option :role,        aliases: '-r'
    method_option :server,      aliases: '-s'
    method_option :config_file, aliases: '-f'
    method_option :verbose,     aliases: '-v'

    def deploy(environment)
      Foreplay::Launcher.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'
    method_option :config_file, aliases: '-f'
    method_option :verbose,     aliases: '-v'

    def check(environment)
      Foreplay::Launcher.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

18 entries across 18 versions & 1 rubygems

Version Path
foreplay-0.17.0 lib/foreplay/cli.rb
foreplay-0.16.0 lib/foreplay/cli.rb
foreplay-0.15.4 lib/foreplay/cli.rb
foreplay-0.15.2 lib/foreplay/cli.rb
foreplay-0.15.1 lib/foreplay/cli.rb
foreplay-0.15.0 lib/foreplay/cli.rb
foreplay-0.13.5 lib/foreplay/cli.rb
foreplay-0.13.4 lib/foreplay/cli.rb
foreplay-0.13.3 lib/foreplay/cli.rb
foreplay-0.13.2 lib/foreplay/cli.rb
foreplay-0.13.1 lib/foreplay/cli.rb
foreplay-0.13.0 lib/foreplay/cli.rb
foreplay-0.11.2 lib/foreplay/cli.rb
foreplay-0.11.1 lib/foreplay/cli.rb
foreplay-0.11.0 lib/foreplay/cli.rb
foreplay-0.10.3 lib/foreplay/cli.rb
foreplay-0.10.2 lib/foreplay/cli.rb
foreplay-0.10.1 lib/foreplay/cli.rb