Class: CreateAwsProject
- Inherits:
-
Object
- Object
- CreateAwsProject
- Defined in:
- lib/renuo/cli/app/create_aws_project.rb
Instance Method Summary collapse
-
#initialize ⇒ CreateAwsProject
constructor
A new instance of CreateAwsProject.
- #run ⇒ Object
Constructor Details
#initialize ⇒ CreateAwsProject
Returns a new instance of CreateAwsProject.
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/renuo/cli/app/create_aws_project.rb', line 2 def initialize unless agree('Did you set up AWSCLI and the IAM profile (renuo-app-setup) yet?') abort('You can find setup instructions here: https://redmine.renuo.ch/projects/internal/wiki/Amazon_S3#Setup-AWS-CLI') end @project_name = ask('Project name (eg: renuo-cli): ') { |q| q.validate = /.+/ } @project_purpose = ask('Suffix describing purpose (eg: assets): ') { |q| q.default = 'none' } @project_purpose = nil if @project_purpose.empty? || @project_purpose == 'none' @redmine_project = ask('Redmine project name for billing (eg: internal): ') { |q| q.validate = /.+/ } @aws_profile = 'renuo-app-setup' @aws_region = ask('AWS bucket region: ') { |q| q.default = 'eu-central-1' } @aws_app_group = 'renuo-apps-v2' end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/renuo/cli/app/create_aws_project.rb', line 16 def run say "\n# master:\n" print_common_setup 'master' print_versioning_setup 'master' say "\n# develop:\n" print_common_setup 'develop' say "\n# testing:\n" print_common_setup 'testing' end |