This gem returns simple JSON/hash responses from the Random User Generator API.
Add this line to your application's Gemfile:
gem 'randomuser-ru'
And then execute:
$ bundle
Or install it as a standalone gem with:
$ gem install randomuser-ru
To request a single random user:
RandomuserRu.generate
To request multiple random users:
RandomuserRu.generate(5)
To request a single female random user:
RandomuserRu.generate_female
To request multiple female random users:
RandomuserRu.generate_female(5)
To request a single male random user:
RandomuserRu.generate_male
To request multiple male random users:
RandomuserRu.generate_male(5)
For more information on this API, please see the Random Russian User Generator site.
Testing works as usual:
git clone https://github.com/byteg/randomuser-ru.git
cd randomuser-ru
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