Nameit! "Give it a name, why dont'cha?"

Gem Version Build Status Code Climate Dependency Status

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 - 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

Installation

Add this line to your application's Gemfile:

gem 'namit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install namit

Usage

nameit Command

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

Ruby Library

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"]

Development

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:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by Fletcher Nichol ([email protected])

License

MIT (see LICENSE)