Project

uuidify

0.0
No commit activity in last 3 years
No release in over 3 years
Generate uuids for models
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.2.13
~> 2.1.4
 Project Readme

Uuidify

Add UUIDs to existing ActiveRecord models.

To install:

rake uuidify:install:migrations
rake db:migrate

To enable on a specific model:

class Foo < ActiveRecord::Base
  uuidify
end

To get/set uuids:

Foo.new.uuid
Foo.new.uuid = UUIDTools::UUID.timestamp_create

Uuidify should hook into ActiveRecord's #destroy and automatically clean up entries. However, if you bypass #destroy or remove uuidify from a given model, you might need to run manual garbage collection to clean up existing stale uuids.

To gc orphan records:

Foo.garbage_collect_uuids # single model
Uuidify.garbage_collect_uuids # everything, even if the model doesn't exist in the source

Software Verification

This gem is signed with rubygems-openpgp. You can verify its integrity by running:

gem install uuidify --verify

Signing key:

pub   2048R/E3B5806F 2010-01-11 [expires: 2014-01-03]
      Key fingerprint = A530 C31C D762 0D26 E2BA  C384 B6F6 FFD0 E3B5 806F
uid                  Grant T. Olson (Personal email) <kgo@grant-olson.net>
uid                  Grant T Olson <grant@webkite.com>
uid                  Grant T. Olson (pikimal) <grant@pikimal.com>
sub   2048R/6A8F7CF6 2010-01-11 [expires: 2014-01-03]
sub   2048R/A18A54D6 2010-03-01 [expires: 2014-01-03]
sub   2048R/D53982CE 2010-08-31 [expires: 2014-01-03]