-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
41 lines (23 loc) · 1.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
= Dummy
Making dummy and semi-random content. Suitable for creating baseline data for integration or performance testing.
Requires the file '/usr/share/dict/words' for now. :-/
= Examples
Post.title = Dummy::Content.words(50, 140)
Returns a string of words within specified minimum and maximum length.
Post.summary = Dummy::Content.string(64)
Returns a string of text of the specified length. (The same as Dummy::Content.words(x,x)
Post.body = Dummy::Content.text(2048, 4096)
Returns a block of text within specified minimum and maximum length. This differs from .words() in that it includes randomly inserted paragraph breaks.
Post.release_date = Dummy::Content.date(1990, 2000)
Post.release_date = Dummy::Content.date(1990)
Post.release_date = Dummy::Content.date()
Returns a random Time object initialized with a random date between the beginning and the end year. The beginning year defaults to 1970 and the the ending year defaults to the current year.
Dummy::User.new()
Returns a dummy user record with related values for first_name, last_name, login and email. For example:
#<Dummy::User:0xb7acc56c @last_name="sampson", @full_name="andrew sampson", @login="andrew.s.5547", @first_name="andrew", @email_address="[email protected]">
= Additional Info
Author: Steven Hilton
Contact: [email protected]
License: MIT
Home: http://github.com/mshiltonj/dummy
Copyright (c) 2009 Steven Hilton. All Rights Reserved.