Class: EYCli::Command::CreateEnv
- Defined in:
- lib/ey_cli/commands/create_env.rb
Defined Under Namespace
Classes: EnvParser
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize ⇒ CreateEnv
constructor
A new instance of CreateEnv.
- #invoke ⇒ Object
- #options_parser ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ CreateEnv
Returns a new instance of CreateEnv.
4 5 6 7 8 |
# File 'lib/ey_cli/commands/create_env.rb', line 4 def initialize @accounts = EYCli::Controller::Accounts.new @apps = EYCli::Controller::Apps.new @environments = EYCli::Controller::Environments.new end |
Instance Method Details
#help ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ey_cli/commands/create_env.rb', line 18 def help "\nIt takes the information from the current directory. It will guide you if it cannot reach all that information.\nUsage: ey_cli create_env\n\nOptions:\n --app name Name of the app to create the environment for.\n --name name Name of the environment.\n --framework_env env Type of the environment (production, staging...).\n --url url Domain name for the app. It accepts comma-separated values.\n --app_instances number Number of application instances.\n --db_instances number Number of database slaves.\n --solo A single instance for application and database.\n --stack App server stack, either passenger, unicorn or trinidad.\n --db_stack DB stack, valid options:\n mysql (for MySQL 5.0),\n mysql5_5 (for MySQL 5.5),\n postgresql or postgres9_1 (for PostgreSQL 9.1)\n --app_size Size of the app instances.\n --db_size Size of the db instances.\n" end |
#invoke ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ey_cli/commands/create_env.rb', line 10 def invoke account = @accounts.fetch_account([:account]) if [:account] app = @apps.fetch_app(account, {:app_name => [:app]}) = .() @environments.create(app, ) end |
#options_parser ⇒ Object
42 43 44 |
# File 'lib/ey_cli/commands/create_env.rb', line 42 def EnvParser.new end |