lib/braintree/http.rb in braintree-3.3.0 vs lib/braintree/http.rb in braintree-3.4.0

- old
+ new

@@ -73,11 +73,11 @@ server, port, @config.proxy_address, @config.proxy_port, @config.proxy_user, - @config.proxy_pass + @config.proxy_pass, ) else connection = Net::HTTP.new(server, port) end end @@ -125,11 +125,11 @@ form_params = [] body.each do |k, v| form_params.push(_add_form_field(k, v)) end form_params.push(_add_file_part("file", file)) - request.body = form_params.collect {|p| "--" + boundary + "#{LINE_FEED}" + p}.join("") + "--" + boundary + "--" + request.body = form_params.collect { |p| "--" + boundary + "#{LINE_FEED}" + p }.join("") + "--" + boundary + "--" @config.logger.debug _format_and_sanitize_body_for_log(_build_xml(body)) else request.body = body @config.logger.debug _format_and_sanitize_body_for_log(body) end @@ -185,10 +185,10 @@ end def _format_and_sanitize_body_for_log(input_xml) formatted_xml = input_xml.gsub(/^/, "[Braintree] ") formatted_xml = formatted_xml.gsub(/<number>(.{6}).+?(.{4})<\/number>/m, '<number>\1******\2</number>') - formatted_xml = formatted_xml.gsub(/<cvv>.+?<\/cvv>/m, '<cvv>***</cvv>') + formatted_xml = formatted_xml.gsub(/<cvv>.+?<\/cvv>/m, "<cvv>***</cvv>") formatted_xml end def _verify_ssl_certificate(preverify_ok, ssl_context) if preverify_ok != true || ssl_context.error != 0