remove def newline :-)

This commit is contained in:
Christoph Hartmann 2016-02-05 11:38:52 +01:00
parent 7494854c60
commit 30aabc4f42

View file

@ -126,16 +126,12 @@ class Inspec::BaseCLI < Thor
def headline(title) def headline(title)
puts title puts title
title.each_char { print '-' } title.each_char { print '-' }
newline puts
end end
def li(entry) def li(entry)
puts " #{mark_text('*')} #{entry}" puts " #{mark_text('*')} #{entry}"
end end
def newline
print "\n"
end
end end
class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
@ -186,14 +182,14 @@ class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
%w{location profile controls timestamp valid}.each { |item| %w{location profile controls timestamp valid}.each { |item|
puts "#{mark_text(item.to_s.capitalize + ':')} #{result[:summary][item.to_sym]}" puts "#{mark_text(item.to_s.capitalize + ':')} #{result[:summary][item.to_sym]}"
} }
newline puts
%w{errors warnings}.each { |list| %w{errors warnings}.each { |list|
headline(list.to_s.capitalize) headline(list.to_s.capitalize)
result[list.to_sym].each { |item| result[list.to_sym].each { |item|
puts "#{item[:file]}:#{item[:line]}:#{item[:column]}: #{item[:msg]} " puts "#{item[:file]}:#{item[:line]}:#{item[:column]}: #{item[:msg]} "
} }
newline puts
} }
end end
exit 1 unless result[:summary][:valid] exit 1 unless result[:summary][:valid]