You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2023. It is now read-only.
This is a gem which will generate a "person" object for a completely make up human being. The primary reason for creating this is gem is for the Rails Rumble competition where we need to be able to generate fake personalities to allow judges to use our application.
Installation
Just put the following in your Gemfile and run bundle.
gem"fake_person","~> 1.0"
Usage
person=FakePerson.new# Namesperson.first_name#=> "Alexander"person.middle_name#=> "James"person.last_name#=> "Smith"person.name#=> "Alexander Smith"person.name(:full)#=> "Alexander James Smith"person.initials#=> "AJS"# Titlesperson.title#=> "Mr"person.name(:formal)#=> "Mr Smith"person.name(:formal_with_first)#=> "Mr Alexander Smith"# Genderperson.gender#=> :male (or :female)# Date of birthperson.date_of_birth#=> #<Date: 1954-10-12>person.age#=> 37# Usernamesperson.username#=> "alexsmith" (various styles exist)# E-Mail Addressesperson.email_address#=> "alexsmith@example.com"person.free_email_address#=> "alexsmith@gmail.com" (or various other free providers)# Activitiesperson.favorite_activity#=> "Figure skating"# Foodsperson.favorite_food#=> "Pizza"# Likes/Dislikesperson.likes(3)#=> ['Driving', 'Fish fingers', 'Jogging']person.dislikes(2)#=> ['Kitesurfing', 'Coffee']# Colourperson.favorite_color#=> "Purple"# Avatarsperson.avatar_url#=> "https://s3-eu-west-1.amazonaws.com/fakepeople/male/256/57.png"
Why not Faker?
Faker is great and everything but the data it generates can be a little strange. This library uses some of the most popular given & surnames in the US & UK.