lib/foreplay/engine/step.rb in foreplay-0.11.0 vs lib/foreplay/engine/step.rb in foreplay-0.11.1
- old
+ new
@@ -30,11 +30,11 @@
@commands
end
def build_commands
- step['silent'] = true
+ step['silent'] = !instructions.key?('verbose')
if header?
@commands = ["echo \"#{header}\" > #{filename}"]
redirect
else
@@ -109,16 +109,16 @@
def header?
header.present?
end
- def silent
+ def silent?
@silent ||= step['silent']
end
def announce
- log "#{(step['commentary'] || command).yellow}", host: host, silent: silent
- log command.cyan, host: host, silent: silent if instructions['verbose'] && step['commentary'] && command
+ log "#{(step['commentary'] || command).yellow}", host: host, silent: silent?
+ log command.cyan, host: host, silent: silent? if instructions['verbose'] && step['commentary'] && command
end
end
end
end