Update doc generation

This commit is contained in:
Priit Tark 2015-09-09 12:44:43 +03:00
parent 33a4d4b868
commit 58249742c1

View file

@ -79,7 +79,7 @@ module Epp
res = parse_response(server.send_request(data)) res = parse_response(server.send_request(data))
if res if res
log(data, res[:parsed]) log(data, res[:raw])
if validate_output && @xsd if validate_output && @xsd
@xsd.validate(Nokogiri(res[:raw])).each do |error| @xsd.validate(Nokogiri(res[:raw])).each do |error|
fail Exception.new, error.to_s fail Exception.new, error.to_s
@ -364,7 +364,7 @@ module Epp
def log(req, res) def log(req, res)
return unless ENV['EPP_DOC'] return unless ENV['EPP_DOC']
puts "REQUEST:\n\n```xml\n#{Nokogiri(req)}```\n\n" puts "REQUEST:\n\n```xml\n#{Nokogiri(req)}```\n\n"
puts "RESPONSE:\n\n```xml\n#{res}```\n\n" puts "RESPONSE:\n\n```xml\n#{Nokogiri(res)}```\n\n"
end end
end end