lib/foreplay/engine.rb in foreplay-0.17.0 vs lib/foreplay/engine.rb in foreplay-0.17.1

- old
+ new

@@ -18,11 +18,11 @@ @defaults = nil @roles_all = nil end - [:deploy, :check].each { |m| define_method(m) { execute m } } + %i[deploy check].each { |m| define_method(m) { execute m } } def execute(m) @mode = m puts "#{mode.capitalize}ing #{environment.dup.yellow} environment, "\ "#{explanatory_text(filters, 'role')}, #{explanatory_text(filters, 'server')}" @@ -52,10 +52,10 @@ def build_instructions(role, additional_instructions) instructions = defaults.supermerge(additional_instructions) instructions['role'] = role instructions['verbose'] = verbose - required_keys = %w(name environment role servers path repository) + required_keys = %w[name environment role servers path repository] required_keys.each do |key| next if instructions.key? key terminate("Required key #{key} not found in instructions for #{environment} environment.\nCheck #{config_file}") end