lib/percheron/actions/restart.rb in percheron-0.6.3 vs lib/percheron/actions/restart.rb in percheron-0.6.4
- old
+ new
@@ -7,13 +7,14 @@
def initialize(container)
@container = container
end
def execute!
- stop!
- start!
- container
+ results = []
+ results << stop!
+ results << start!
+ results.compact.empty? ? nil : container
end
private
attr_reader :container
@@ -21,10 +22,10 @@
def stop!
Stop.new(container).execute!
end
def start!
- Start.new(container, container.dependant_containers.values).execute!
+ Start.new(container, dependant_containers: container.dependant_containers.values).execute!
end
end
end
end