Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

memorable name generator gem for ruby

Before I go roll my own and start pulling out the dictionary, does anyone know a rubygem to generate memorable names suitable for app keys. I need something pronounceable so that I can give users unique email addresses to submit content to. I like Heroku's naming for it's apps as an example.

floating-sky-58
simple-fog-45
like image 916
holden Avatar asked Nov 05 '10 09:11

holden


1 Answers

I just did an implementation of this for a project and my solution was to use the Forgery gem and something like this:

[Forgery::Basic.color, Forgery::Address.street_name.split(" ").first, rand(100)].join("-").downcase

This results in strings like this:

=> "orange-nobel-93"
=> "indigo-holmberg-41"
=> "khaki-sunfield-31"
=> "goldenrod-warrior-92"
=> "fuscia-manley-75"
=> "violet-village-17"
=> "violet-west-11"
=> "goldenrod-oak-74"
=> "yellow-hermina-74"
=> "red-shopko-36"
=> "purple-esch-43"
=> "teal-sutherland-44"
=> "blue-butterfield-56"
=> "yellow-mcbride-41"
like image 193
himynameisjonas Avatar answered Oct 30 '22 17:10

himynameisjonas