Sha256: 4b33b5f2cb756226cb0db5e26376bd488c2fea7ea1133fd9412cd0e9fa8be1bf
Contents?: true
Size: 505 Bytes
Versions: 2
Compression:
Stored size: 505 Bytes
Contents
require 'digest/md5' require 'active_support' require 'active_support/core_ext' module FakeBraintree module Helpers def gzip(content) ActiveSupport::Gzip.compress(content) end def gzipped_response(status_code, uncompressed_content) [status_code, { "Content-Encoding" => "gzip" }, gzip(uncompressed_content)] end def md5(content) Digest::MD5.hexdigest(content) end def create_id(merchant_id) md5("#{merchant_id}#{Time.now.to_f}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fake_braintree-0.2.1 | lib/fake_braintree/helpers.rb |
fake_braintree-0.2.0 | lib/fake_braintree/helpers.rb |