Sha256: 508398bbeb6395e0fb7e3f68985b9adb6caa03931a541c2b86294669e5a65e84

Contents?: true

Size: 369 Bytes

Versions: 125

Compression:

Stored size: 369 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
  end
end

Version data entries

125 entries across 125 versions & 29 rubygems

Version Path
bcarpenter-active_shipping-0.0.2 lib/active_shipping/lib/utils.rb
bcarpenter-active_shipping-0.0.5 lib/active_shipping/lib/utils.rb
bcarpenter-active_shipping-0.0.6 lib/active_shipping/lib/utils.rb
bcarpenter-active_shipping-0.0.7 lib/active_shipping/lib/utils.rb
johnideal-activemerchant-1.4.10 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.11 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.4 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.5 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.6 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.7 lib/active_merchant/lib/utils.rb
johnideal-activemerchant-1.4.8 lib/active_merchant/lib/utils.rb
martinstannard-activemerchant-0.1.0 lib/active_merchant/lib/utils.rb
mattbauer-activemerchant-1.4.2 lib/active_merchant/lib/utils.rb
seamusabshere-active_merchant-1.4.2.1 lib/active_merchant/lib/utils.rb
seamusabshere-active_merchant-1.4.2.3 lib/active_merchant/lib/utils.rb
tomriley-active_merchant-1.4.2.3 lib/active_merchant/lib/utils.rb
tomriley-active_merchant-1.4.2.4 lib/active_merchant/lib/utils.rb
tomriley-active_merchant-1.4.2.5 lib/active_merchant/lib/utils.rb
tomriley-active_merchant-1.4.2.6 lib/active_merchant/lib/utils.rb
tomriley-active_merchant-1.4.2.7 lib/active_merchant/lib/utils.rb