0.1
No commit activity in last 3 years
No release in over 3 years
Simple, scalable UUID generation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

simple_uuid¶ ↑

Simple, scalable UUID generation.

License¶ ↑

Copyright 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.

Installation¶ ↑

Install 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 problems¶ ↑

The support forum is here.

Patches and contributions are very welcome.