Module: EY::Serverside::CLI::Helpers

Included in:
App
Defined in:
lib/engineyard-serverside/cli/helpers.rb

Overview

Helpers is a set of methods that define options and such for an App task

Instance Method Summary collapse

Instance Method Details

#account_app_env_optionsObject


8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/engineyard-serverside/cli/helpers.rb', line 8

def 
  method_option :app,              :type     => :string,
                                   :required => true,
                                   :desc     => "Application to deploy",
                                   :aliases  => %w[-a --app-name]
  method_option :environment_name, :type     => :string,
                                   :required => true,
                                   :desc     => "Environment name"
  method_option :account_name,     :type     => :string,
                                   :required => true,
                                   :desc     => "Account name"
end

#config_optionObject


34
35
36
37
# File 'lib/engineyard-serverside/cli/helpers.rb', line 34

def config_option
  method_option :config,           :type     => :string,
                                   :desc     => "Additional configuration"
end

#framework_env_optionObject


21
22
23
24
25
26
# File 'lib/engineyard-serverside/cli/helpers.rb', line 21

def framework_env_option
  method_option :framework_env,    :type     => :string,
                                   :required => true,
                                   :desc     => "Ruby web framework environment",
                                   :aliases  => ["-e"]
end

#instances_optionsObject


39
40
41
42
43
44
45
46
47
48
# File 'lib/engineyard-serverside/cli/helpers.rb', line 39

def instances_options
  method_option :instances,        :type     => :array,
                                   :desc     => "Hostnames of instances to deploy to, e.g. --instances localhost app1 app2"
  method_option :instance_roles,   :type     => :hash,
                                   :default  => {},
                                   :desc     => "Roles of instances, keyed on hostname, comma-separated. e.g. instance1:app_master,etc instance2:db,memcached ..."
  method_option :instance_names,   :type     => :hash,
                                   :default  => {},
                                   :desc     => "Instance names, keyed on hostname. e.g. instance1:name1 instance2:name2"
end

#stack_optionObject


28
29
30
31
# File 'lib/engineyard-serverside/cli/helpers.rb', line 28

def stack_option
  method_option :stack,            :type     => :string,
                                   :desc     => "Web stack (so we can restart it correctly)"
end

#verbose_optionObject


50
51
52
53
54
# File 'lib/engineyard-serverside/cli/helpers.rb', line 50

def verbose_option
  method_option :verbose,          :type     => :boolean,
                                   :desc     => "Verbose output",
                                   :aliases  => ["-v"]
end