bin/hc in hieracles-0.3.0 vs bin/hc in hieracles-0.3.1
- old
+ new
@@ -21,18 +21,19 @@
exit(1)
end
if Hieracles::Format.method_defined? command
begin
- node = Hieracles::Node.new fqdn, opt.options
+ config = Hieracles::Config.new opt.options
+ node = Hieracles::Node.new fqdn, config
rescue Exception => e
puts "*** Error: #{e.message}"
exit(1)
end
begin
- formatter = Object.const_get("Hieracles::Formats::#{Hieracles::Config.format}")
+ formatter = Object.const_get("Hieracles::Formats::#{config.format}")
rescue
- puts "*** Unknown format #{Hieracles::Config.format}"
+ puts "*** Unknown format #{config.format}"
exit(1)
end
dispatch = formatter.new node
puts dispatch.send(command.to_sym, args)
else