Class: Balancer::Init
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Balancer::Init
- Includes:
- Thor::Actions
- Defined in:
- lib/balancer/init.rb
Class Method Summary collapse
-
.cli_options ⇒ Object
Ugly, but when the class_option is only defined in the Thor::Group class it doesnt show up with cli-template new help :( If anyone knows how to fix this let me know. Also options from the cli can be pass through to here.
- .source_root ⇒ Object
Instance Method Summary collapse
Class Method Details
.cli_options ⇒ Object
Ugly, but when the class_option is only defined in the Thor::Group class it doesnt show up with cli-template new help :( If anyone knows how to fix this let me know. Also options from the cli can be pass through to here
15 16 17 18 19 20 21 22 23 |
# File 'lib/balancer/init.rb', line 15 def self. [ [:force, type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files."], [:git, type: :boolean, default: true, desc: "Git initialize the project"], [:subnets, type: :array, default: ["REPLACE_ME"], desc: "Subnets"], [:security_groups, type: :array, default: ["REPLACE_ME"], desc: "Security groups"], [:vpc_id, default: "REPLACE_ME", desc: "Vpc id"], ] end |
.source_root ⇒ Object
29 30 31 |
# File 'lib/balancer/init.rb', line 29 def self.source_root File.("../template", File.dirname(__FILE__)) end |
Instance Method Details
#init_project ⇒ Object
33 34 35 36 |
# File 'lib/balancer/init.rb', line 33 def init_project puts "Setting up balancer files." directory ".", "." end |
#user_message ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/balancer/init.rb', line 38 def puts <<-EOL #{"="*64} Congrats 🎉 Balancer starter files succesfully created. Check out .balancer/profiles/default.yml make make sure the settings like subnets and vpc_id are okay. Then run `balanace create` to to create an ELB, Target Group and listener. Example: balancer create my-elb EOL end |