glacials / splits-io

a speedrunning data store and analysis engine
https://splits.io
GNU Affero General Public License v3.0
133 stars 27 forks source link

Split off friendly race UUIDs into its own gem #730

Closed glacials closed 4 years ago

glacials commented 4 years ago

Recently I've been wanting to split some of our more general-purpose code into gems so others can benefit from the work, and this one was a pretty straightforward candidate.

This splits off the logic that shortens race UUIDs into reversible, stateless slugs for use in URLs. It's now a gem that can be used in any Rails application on any model that has UUID primary keys. It is located at glacials/friendly_uuid.

Another split I might do later is our Duration implementation, as it's more precise than ActiveSupport::Duration and has been battle tested.

There are some formatting changes included here because I'm thinking of switching us over to ruby-formatter/rufo so I'm letting it leak some changes in as I test it out.