Sha256: b41cb7ac207f0df28df189f27418d5ee86fd4c6bb50fed6422aae15b117bbe5b
Contents?: true
Size: 470 Bytes
Versions: 2
Compression:
Stored size: 470 Bytes
Contents
require 'digest/md5' require 'active_support/gzip' module FakeBraintree module Helpers def gzip(content) ActiveSupport::Gzip.compress(content) end def gzipped_response(status_code, uncompressed_body) [status_code, { 'Content-Encoding' => 'gzip' }, gzip(uncompressed_body)] 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.8.0 | lib/fake_braintree/helpers.rb |
fake_braintree-0.7.0 | lib/fake_braintree/helpers.rb |