FFaker는 Ruby 테스트 및 시드 데이터 작성을 위해 현실적인 가짜 데이터를 매우 빠른 속도로 생성하는 경량 라이브러리입니다.
Installation
# gem install ffaker
require 'ffaker'
주소 및 위치 좌표 (Address & Geolocation)
Faker::Address.city #=> "Autumnside"
Faker::Address.street_name #=> "Greyson Rapid"
Faker::Address.street_address #=> "98786 Neal Motorway"
Faker::Address.secondary_address #=> "Suite 560"
Faker::Geolocation.lat #=> 40.89505
Faker::Geolocation.lng #=> -115.120716
회사 및 직무 정보 (Company & Job)
Faker::Company.name #=> "Pouros-Ondricka"
Faker::Company.suffix #=> "and Sons"
Faker::Company.catch_phrase #=> "Versatile mobile help-desk"
Faker::Company.position #=> "General Corporate President"
Faker::Job.title #=> "Product Division Technician"
인터넷 도메인 및 이메일 (Internet & Emails)
Faker::Internet.email #=> "[email protected]"
Faker::Internet.user_name #=> "janelle_schamberger"
Faker::Internet.domain_name #=> "langworth.biz"
Faker::Internet.free_email #=> "[email protected]"
플레이스홀더 텍스트 (Lorem Ipsum)
Faker::Lorem.word #=> "omnis"
Faker::Lorem.sentence #=> "Rem sunt voluptatem laborum dolores."
Faker::Lorem.words(4) #=> ["repellat", "quos", "amet", "voluptatem"]
Faker::Lorem.paragraphs(2)