Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split off friendly race UUIDs into its own gem #730

Merged
merged 1 commit into from Nov 2, 2020

Conversation

glacials
Copy link
Owner

@glacials glacials commented Nov 1, 2020

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.

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 https://github.com/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.
Copy link
Collaborator

@BatedUrGonnaDie BatedUrGonnaDie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 1/2 questions for you on this.

app/controllers/races_controller.rb Show resolved Hide resolved
@glacials glacials merged commit 883b485 into main Nov 2, 2020
@glacials glacials deleted the gemify_friendly_uuid branch November 2, 2020 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants