Project

mocker

0.0
No commit activity in last 3 years
No release in over 3 years
Get a random existing place name, based on a list of weird name places around the world
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 2.0
~> 10.0
~> 3.2

Runtime

~> 0.7
 Project Readme

Mocker

This gem is a data generation helper. It gives you real data for different types, but from the unusual list of names, just for fun!

Currently only has locations available. More models will follow.

Installation

Add this line to your application's Gemfile:

gem 'mocker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mocker

Usage

require 'mocker'

# returns one possible place
Mocker::Place.name

# returns a place from the country code passed (e.g. Mocker::Place.name_in 'us')
Mocker::Place.name_in <2 letter country code>

# returns a name of a 'famous person'
Mocker::Name.famous_person

# returns a full name
Mocker::Name.full_name gender

# returns a first name
Mocker::Name.first_name gender

# returns a last name
Mocker::Name.last_name

Contributing

  1. Fork it ( https://github.com/[my-github-username]/mocker/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