Nameit is a small zero-dependency library and tool that helps you generate a random name for a project, database, session--you decide. You get glorious adjective-noun style names such as "pushy-clock" and "lovely-ducks" or ask for a random number on the end to give you names like "numberless-cactus-123" and "superb-shoes-915".
- No dependencies
- Runs on all the Ruby implementations
- Uses
SecureRandom
Add this line to your application's Gemfile:
gem 'nameit'
And then execute:
$ bundle
Or install it yourself as:
$ gem install nameit
Nameit ships with the nameit
command so you can get a shiny new name right from the command line:
$ nameit
abhorrent-flowers
$ nameit 3
cowardly-pot
quickest-sleep
heartbreaking-lamp
Use it with a class method for a quick one-offs:
require 'nameit'
Nameit.generate
# => "sassy-clocks"
Nameit.generate
# => "dazzling-comb"
Nameit.generate(number: true)
# => "blushing-camera-632"
Or for peppier performance (to save on re-reading the data sources), use a Nameit
instance:
require 'nameit'
nameit = Nameit.new
3.times.map { nameit.generate }
# => ["ethereal-music", "historical-argument", "recondite-pear"]
nameit = Nameit.new(number: true)
2.times.map { nameit.generate }
# => ["peaceful-book-260", "synonymous-lizards-501"]
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Fletcher Nichol (fnichol@nichol.ca)
MIT (see LICENSE)