Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polamjag/petname-ruby
Generator for random human-friendly name, like Docker and GitHub
https://github.com/polamjag/petname-ruby
Last synced: about 1 month ago
JSON representation
Generator for random human-friendly name, like Docker and GitHub
- Host: GitHub
- URL: https://github.com/polamjag/petname-ruby
- Owner: polamjag
- License: mit
- Created: 2015-01-30T10:57:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-30T13:22:47.000Z (almost 10 years ago)
- Last Synced: 2024-11-18T01:58:34.975Z (about 2 months ago)
- Language: Ruby
- Homepage: https://rubygems.org/gems/petname
- Size: 316 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PetName
[![Build Status](https://travis-ci.org/polamjag/petname-ruby.svg?branch=master)](https://travis-ci.org/polamjag/petname-ruby)
[![Gem Version](https://badge.fury.io/rb/petname.svg)](http://badge.fury.io/rb/petname)## Installation
Add this line to your application's Gemfile:
```ruby
gem 'petname'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install petname
## Usage
```ruby
require 'petname'
pn = PetName::Generator.new
# returns random name consisted of two words and separated with '-'
pn.generate # => e.g. "intercentral-parthenia"# and you can specify separator and number of words
pn.generate separator: "!!!" # => e.g. "simulacral!!!sherika"
pn.generate words: 5 # => e.g. "theistically-subsuperficially-synaptically-metapneustic-nedra"
pn.generate separator: "**", words: 3 # => e.g. "ridiculously**nontypographical**jacque"```
## Contributing
1. Fork it ( https://github.com/polamjag/petname/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Acknowledgment
This gem is a Ruby port of [dustinkirkland/petname](https://github.com/dustinkirkland/petname).