lib/onering/cli/reporter.rb in onering-client-0.0.77 vs lib/onering/cli/reporter.rb in onering-client-0.0.78

- old
+ new

@@ -3,10 +3,11 @@ module Report def self.configure(global={}) @api = (Onering::CLI.connect(global.merge({ :autoconnect => false })) rescue nil) + @opts = ::Trollop::options do banner <<-EOS Generate a system report that can be saved or submitted to a Onering server Usage: @@ -29,10 +30,10 @@ def self.run(args) report = Onering::Reporter.report().stringify_keys() # pull report overrides from the config file - @api.opt('reporter.fields',{}).each do |key, value| + Onering::Config.get('reporter.fields',{}).each do |key, value| if value.is_a?(Hash) value.coalesce(key, nil, '.').each do |k,v| v = nil if ['null', '', '-'].include?(v.to_s.strip.chomp) report = report.set(k, v) end \ No newline at end of file