This gem returns simple JSON/hash responses from the Random User Generator API.
Add this line to your application's Gemfile:
gem 'randomuser'And then execute:
$ bundleOr install it as a standalone gem with:
$ gem install randomuserTo request a single random user:
Randomuser.generateTo request multiple random users:
Randomuser.generate(5)To request a single female random user:
Randomuser.generate_femaleTo request multiple female random users:
Randomuser.generate_female(5)To request a single male random user:
Randomuser.generate_maleTo request multiple male random users:
Randomuser.generate_male(5)To request a specific user:
Randomuser.generate_seed('foobar')For more information on this API, please see the Random User Generator site.
Testing works as usual:
git clone https://github.com/humanshell/randomuser.git
cd randomuser
bundle install
rake- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request