lib/lono/cfn/rollback.rb in lono-6.1.11 vs lib/lono/cfn/rollback.rb in lono-7.0.0

- old
+ new

@@ -1,26 +1,26 @@ class Lono::Cfn class Rollback extend Memoist include Lono::AwsServices - def initialize(stack_name) - @stack_name = stack_name + def initialize(stack) + @stack = stack end def delete_stack - stack = find_stack(@stack_name) + stack = find_stack(@stack) if stack && rollback_complete?(stack) puts "Existing stack in ROLLBACK_COMPLETE state. Deleting stack before continuing." - cfn.delete_stack(stack_name: @stack_name) + cfn.delete_stack(stack_name: @stack) status.wait status.reset true end end def status - Lono::Cfn::Status.new(@stack_name) + Lono::Cfn::Status.new(@stack) end memoize :status end end \ No newline at end of file