Sha256: 32c2d6d7f71dfc6b70da1b7d846ce74f9bd03c4006f32165865d63b8ad2499eb

Contents?: true

Size: 445 Bytes

Versions: 13

Compression:

Stored size: 445 Bytes

Contents

require 'digest/md5'

module ActiveMerchant #:nodoc:
  module Utils #:nodoc:
    def generate_unique_id
      md5 = Digest::MD5.new
      now = Time.now
      md5 << now.to_s
      md5 << String(now.usec)
      md5 << String(rand(0))
      md5 << String($$)
      md5 << self.class.name
      md5.hexdigest
    end
    
    module_function :generate_unique_id

    def deprecated(message)
      warn(Kernel.caller[1] + message)
    end
  end
end

Version data entries

13 entries across 13 versions & 7 rubygems

Version Path
rclements_active_shipping-0.9.15 lib/active_merchant/common/utils.rb
rclements_active_shipping-0.9.14 lib/active_merchant/common/utils.rb
rclements_active_shipping-0.9.13 lib/active_merchant/common/utils.rb
activemerchant-1.17.0 lib/active_merchant/common/utils.rb
yetanothernguyen-activemerchant-1.16.0 lib/active_merchant/common/utils.rb
activemerchant-1.16.0 lib/active_merchant/common/utils.rb
gonow-activemerchant-1.15.0 lib/active_merchant/common/utils.rb
bitfluent-activemerchant-1.15.1 lib/active_merchant/common/utils.rb
activemerchant-kiddy-1.15.0.kiddy.1 lib/active_merchant/common/utils.rb
activemerchant-kiddy-1.15.0.kiddy lib/active_merchant/common/utils.rb
benhutton-active_shipping-0.9.13 lib/active_merchant/common/utils.rb
activemerchant-1.15.0 lib/active_merchant/common/utils.rb
activemerchant-1.14.0 lib/active_merchant/common/utils.rb