lib/veritrans/cli.rb in veritrans-2.0.0 vs lib/veritrans/cli.rb in veritrans-2.0.2

- old
+ new

@@ -1,20 +1,9 @@ require 'json' require 'securerandom' require 'logger' -class Hash - def except!(*keys) - keys.each { |key| delete(key) } - self - end - - def except(*keys) - dup.except!(*keys) - end -end - module Veritrans module CLI # can't find order class OrderNotFound < Exception; end class AuthenticationError < Exception; end @@ -132,10 +121,10 @@ order_info = get_order_info(CONFIG[:order]) order_data = order_info.data.except(:status_message, :signature_key) data = data.except(:fraud_status, :masked_card).merge(order_data) end - JSON.dump(JSON.pretty_generate(data)) + JSON.pretty_generate(data) end def colorize(str, color_code) "\e[#{color_code}m#{str}\e[0m" end \ No newline at end of file