ยถ โ
simple_uuidSimple, scalable UUID generation.
ยถ โ
LicenseCopyright 2009-2010 Twitter, Inc. See included LICENSE file.
ยถ โ
Features-
pure-Ruby
-
no MAC address scraping
-
no file-based locking
This library implements UUID format version 1, as specified in RFC 4122, with jitter in place of the mac address and sequence counter.
ยถ โ
InstallationInstall the gem:
sudo gem install simple_uuid
ยถ โ
Usage# Creating and getting a timestamp from the UUID uuid = SimpleUUID::UUID.new => <UUID#2278170300 .... > uuid.to_time => Thu Aug 18 19:15:16 -0400 2011 # Given raw bytes from a source such as cassandra (using bytes from an existing UUID as an example) bytes = SimpleUUID::UUID.new.bytes SimpleUUID::UUID.to_time(bytes) => Thu Aug 18 19:15:16 -0400 2011
ยถ โ
Reporting problemsThe support forum is here.
Patches and contributions are very welcome.