h1. random_data h2. What This plugin defines a Random singleton class that has a bunch of class methods to quickly generate random test for testing and developmental use. h3. Contact Methods Random.phone, Random.international_phone, Random.email h3. Time/Date Methods Random.date h3. Location Methods Random.address_line_1, Random.address_line_2, Random.zipcode, Random.state, Random.country, Random.city, h3. Name Methods Random.firstname, Random.initial, Random.lastname, h3. Text Methods Random.alphanumeric, Random.paragraphs Note that some methods take parameters to bound or limit the amount of data returned. See RDocs for details. h2. Installing
sudo gem install random_data
require 'random_data'
h2. Demonstration of usage
>> Random.alphanumeric
=> "cfbutm3vYfhZXil0"
>> Random.alphanumeric(5)
=> "XYVyn"
>> Random.paragraphs
=> "Ulysses, fighting evil and tyranny with all his power and with all of his might. Ulysses, fighting evil and tyranny with all his power and with all of his 
might. \n\nHe's got style, a groovy style, and a car that just won't stop. \n\n"
>> Random.paragraphs(3) => "Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Down the road that's where I'll always be. He's got style, a groovy style, and a car that just won't stop. I've gotten burned over Cheryl Tiegs and blown up for Raquel Welch, but when I end up in the hay it's only hay hey hey. Hey there where ya goin, not exactly knowin'. \n\nLorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. I might jump an open drawbridge or Tarzan from a vine, beause I'm the unknown stuntman that makes Eastwood look so fine. He just keeps on movin' and ladies keep improvin'. Rolling down to Dallas - who is providin my palace?. Every stop I make I make a new friend; Can't stay for long just turn around and I'm gone again. \n\nAlways fighting all the evil forces bringing peace and justice to all. \n\n"
>> Random.firstname
=> "Thomas"
>> Random.initial  
=> "E"
>> Random.lastname
=> "Robinson"
>> Random.date
=> Sun, 09 Sep 2007
>> Random.date(1000)
=> Sun, 26 Nov 2006
>> Random.email
=> "zrodriguez@example.com"
>> Random.phone
=> "564-103-8353"
>> Random.international_phone
=> "011-24-37-9704"
>> Random.address_line_1
=> "38367 Adams Rd"
>> Random.address_line_2
=> "Lot 247"
>> Random.zipcode
=> 22904
(note that the zipcodes are totally random and may not be real zipcodes)
>> Random.state
=> "MD"
>> Random.state_full
=> "New Mexico"
>> Random.country
=> "Philippines"
h2. How to submit patches Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and e-mail the patch to me at "mike@subelsky.com":mailto:mike@subelsky.com. The trunk repository is svn://rubyforge.org/var/svn/random_data/trunk for anonymous access. h2. License This code is free to use under the terms of the MIT license. h2. Contact Comments are welcome. Send an email to "mike@subelsky.com":mailto:mike@subelsky.com