module DeployPin::Runner
Public Class Methods
list(identifiers:)
click to toggle source
# File lib/deploy_pin/runner.rb, line 12 def self.list(identifiers:) DeployPin::Collector.new(identifiers: identifiers).list do |index, count, task| self.print("======= Task ##{index} ========".white) # print details task.details.each do |key, value| self.print("#{key}:\t\t#{value}") end self.print("") self.print("<<<") self.print task.script.strip.green self.print(">>>") self.print("") end end
print(msg)
click to toggle source
# File lib/deploy_pin/runner.rb, line 35 def self.print(msg) puts(msg) unless Rails.env.test? end
run(identifiers:)
click to toggle source
# File lib/deploy_pin/runner.rb, line 6 def self.run(identifiers:) DeployPin::Collector.new(identifiers: identifiers).run do |index, count, task, executable| self.print("[#{index + 1}/#{count}] Task #{task.title} #{task.uuid}##{task.group} (#{executable ? 'run' : 'skip'})") end end
summary(identifiers:)
click to toggle source
# File lib/deploy_pin/runner.rb, line 29 def self.summary(identifiers:) # print summary self.print("======= Summary ========") self.print("tasks number: #{DeployPin::Collector.new(identifiers: identifiers).tasks_count}") end