No commit activity in last 3 years
No release in over 3 years
Temporary fork of Robert Hall's imposter gem with Ruby 1.9 and Rails 3 support. Provides generators and rake tasks via YAML based imposters for schema level data faking
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Imposter¶ ↑

Real fake data. Allows creation of an entire schema of fake data that honors associations.

Forked for urlsplease.com to adapt to Ruby 1.9.x (CSV library)

Usage¶ ↑

# YAMLs are executed in series order much like migrations

  • rake::imposter IMPOSTER=“products” #generate only the /test/fixtures/products.csv

  • rake::imposter #generate all /test/imposter/*.yaml to /test/fixtures

  • rake::imposter –force #generate all /test/imposter/-*.yaml to /test/fixtures to

  • overwrite any existing .csv

  • Imposter::Noun.noun => “apple” #random noun

  • Imposter::Verb.verbs(3) => “run tag jump” #random verbs string space delimited

#—For unit/integration/etl testing that require real but random addresses

  • Imposter::CSZ.zip => “90210” #random real postal code

  • Imposter::CSZ.city(:zip=>“90210”) => “Beverly Hills” #real city name from zip

  • Imposter::CSZ.state_abbr(:zip=>“90210”) => “CA” #real 2 letter state abbreviation upper case

  • Imposter::CSZ.state_name(:zip=>“90210”) => “California” #Real State name Camelized

  • Imposter::CSZ.zip(:state_abbr=>“CA”) => “90115” #Random but real postal code from real state.