Class: Ufo::Base
- Inherits:
-
Object
- Object
- Ufo::Base
- Extended by:
- Memoist
- Includes:
- Stack::Helper
- Defined in:
- lib/ufo/base.rb
Direct Known Subclasses
Cancel, Destroy, Info, Logs, Ps, Releases, Rollback, Scale, Ship, Status, Stop, Task
Instance Method Summary collapse
- #full_service ⇒ Object
- #info ⇒ Object
-
#initialize(service, options = {}) ⇒ Base
constructor
A new instance of Base.
- #no_service_message ⇒ Object
- #switch_current(service) ⇒ Object
Methods included from Stack::Helper
#adjust_stack_name, #find_stack, #status
Methods included from Settings
Methods included from Util
#default_cluster, #display_params, #execute, #pretty_time, #settings, #task_definition_arns, #user_params
Methods included from AwsService
#cloudformation, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb
Constructor Details
#initialize(service, options = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 12 |
# File 'lib/ufo/base.rb', line 6 def initialize(service, ={}) @service = switch_current(service) @options = @cluster = @options[:cluster] || default_cluster(@service) @stack_name = adjust_stack_name(@cluster, @service) end |
Instance Method Details
#full_service ⇒ Object
31 32 33 |
# File 'lib/ufo/base.rb', line 31 def full_service [@service, Ufo.env_extra].compact.join("-") end |
#no_service_message ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ufo/base.rb', line 23 def <<-EOL No #{@service.color(:green)} ecs service found. No CloudFormation stack named #{@stack_name.color(:green)} found. Are sure it exists? EOL end |