lib/global_session/session.rb in global_session-1.0.16 vs lib/global_session/session.rb in global_session-1.0.17
- old
+ new
@@ -21,13 +21,10 @@
# Standard library dependencies
require 'set'
require 'zlib'
-# Gem dependencies
-require 'uuidtools'
-
module GlobalSession
# Ladies and gentlemen: the one and only, star of the show, GLOBAL SESSION!
#
# Session is designed to act as much like a Hash as possible. You can use
# most of the methods you would use with Hash: [], has_key?, each, etc. It has a
@@ -387,18 +384,10 @@
@signed = {}
@insecure = {}
@created_at = Time.now.utc
@authority = @directory.local_authority_name
-
- if defined?(::UUIDTools) # UUIDTools v2
- @id = ::UUIDTools::UUID.timestamp_create.to_s
- elsif defined?(::UUID) # UUIDTools v1
- @id = ::UUID.timestamp_create.to_s
- else
- raise TypeError, "Neither UUIDTools nor UUID defined; unsupported UUIDTools version?"
- end
-
+ @id = RightSupport::Data::UUID.generate
renew!
end
def create_invalid # :nodoc:
@id = nil