ffaker 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +20 -11
- data/VERSION +1 -1
- data/lib/ffaker/address.rb +16 -16
- data/lib/ffaker/company.rb +2 -2
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -16,27 +16,28 @@ A port of Perl's Data::Faker library that generates fake data.
|
|
16
16
|
|
17
17
|
== Ffaker / Faker
|
18
18
|
|
19
|
-
|
20
|
-
so annoyed on several ineficiencies on the original gem.
|
19
|
+
The only difference between faker and ffaker is that you need to
|
21
20
|
|
22
|
-
|
23
|
-
don't feel like working with the arcane rubyforge+svn tools) I
|
24
|
-
just realeased this gem using a different name.
|
21
|
+
gem install ffaker
|
25
22
|
|
26
|
-
|
27
|
-
and require 'ffaker', instead of the previous "faker" with only one f.
|
23
|
+
and then
|
28
24
|
|
29
|
-
|
30
|
-
|
25
|
+
require 'ffaker'
|
26
|
+
|
27
|
+
instead of "faker" with only one f.
|
28
|
+
|
29
|
+
The API is pretty much the same as before.
|
30
|
+
|
31
|
+
Fork it/ping me if you feel like adding more goodies to it.
|
31
32
|
|
32
33
|
== Faster? does it really matter ?
|
33
34
|
|
34
|
-
While it may seem like the speed of good'ol faker
|
35
|
+
While it may seem like the speed of good'ol faker was not such a big deal, I
|
35
36
|
really disliked the previous code base.
|
36
37
|
|
37
38
|
Speed came as a result of having better code in place. Getting a
|
38
39
|
few more cycles here and there was not bad, specially since I had fun while
|
39
|
-
doing the refactoring
|
40
|
+
doing the refactoring.
|
40
41
|
|
41
42
|
Here are some benchmarks (yeah everybody love benchmarks!)
|
42
43
|
|
@@ -69,6 +70,10 @@ DISCLAIMER: I have no idea why I'm getting such bad numbers
|
|
69
70
|
for traditional faker on 1.9, but I'm not making this up!
|
70
71
|
Try it in your own machine, your mileage may vary.
|
71
72
|
|
73
|
+
== TODO
|
74
|
+
|
75
|
+
* Even though the API is pretty simple, better rdoc documentation would not hurt.
|
76
|
+
|
72
77
|
== Note on Patches/Pull Requests
|
73
78
|
|
74
79
|
* Fork the project.
|
@@ -79,6 +84,10 @@ Try it in your own machine, your mileage may vary.
|
|
79
84
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
80
85
|
* Send me a pull request. Bonus points for topic branches.
|
81
86
|
|
87
|
+
== Contributors
|
88
|
+
|
89
|
+
* James Rosen ( http://github.com/jamesarosen/ffaker ).
|
90
|
+
|
82
91
|
== Copyright
|
83
92
|
|
84
93
|
Copyright (c) 2010 Emmanuel Oga. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
data/lib/ffaker/address.rb
CHANGED
@@ -90,7 +90,8 @@ module Faker
|
|
90
90
|
ND MP OH OK OR PW PA PR RI SC SD TN TX UT VT VI VA WA WV
|
91
91
|
WI WY AE AA AP)
|
92
92
|
|
93
|
-
|
93
|
+
COMPASS_DIRECTIONS = k %w(North East West South)
|
94
|
+
CITY_PREFIXES = k(COMPASS_DIRECTIONS + %w(New Lake Port))
|
94
95
|
|
95
96
|
CITY_SUFFIXES = k %w(town ton land ville berg burgh borough bury view port
|
96
97
|
mouth stad furt chester mouth fort haven side shire)
|
@@ -98,25 +99,24 @@ module Faker
|
|
98
99
|
STREET_SUFFIX = k %w(Alley Avenue Branch Bridge Brook Brooks
|
99
100
|
Burg Burgs Bypass Camp Canyon Cape Causeway Center Centers Circle Circles
|
100
101
|
Cliff Cliffs Club Common Corner Corners Course Court Courts Cove Coves
|
101
|
-
Creek Crescent Crest Crossing Crossroad Curve Dale Dam Divide Drive
|
102
|
-
|
102
|
+
Creek Crescent Crest Crossing Crossroad Curve Dale Dam Divide Drive Drives
|
103
|
+
Estate Estates Expressway Extension Extensions Fall Falls Ferry
|
103
104
|
Field Fields Flat Flats Ford Fords Forest Forge Forges Fork Forks Fort
|
104
105
|
Freeway Garden Gardens Gateway Glen Glens Green Greens Grove Groves Harbor
|
105
|
-
Harbors Haven Heights Highway Hill Hills Hollow Inlet
|
106
|
-
Islands
|
107
|
-
Lakes Land Landing Lane Light Lights Loaf Lock Locks
|
108
|
-
Mall Manor Manors Meadow Meadows Mews Mill Mills Mission
|
109
|
-
Mount Mountain
|
106
|
+
Harbors Haven Heights Highway Hill Hills Hollow Inlet Island
|
107
|
+
Islands Isle Junction Junctions Key Keys Knoll Knolls Lake
|
108
|
+
Lakes Land Landing Lane Light Lights Loaf Lock Locks Lodge Loop
|
109
|
+
Mall Manor Manors Meadow Meadows Mews Mill Mills Mission Motorway
|
110
|
+
Mount Mountain Mountains Neck Orchard Oval Overpass Park
|
110
111
|
Parks Parkway Parkways Pass Passage Path Pike Pine Pines Place Plain Plains
|
111
|
-
|
112
|
-
Radial Ramp Ranch Rapid Rapids Rest Ridge Ridges River Road
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
Throughway Trace Track Trafficway Trail
|
112
|
+
Plaza Point Points Port Ports Prairie
|
113
|
+
Radial Ramp Ranch Rapid Rapids Rest Ridge Ridges River Road Roads
|
114
|
+
Route Row Rue Run Shoal Shoals Shore Shores Skyway Spring Springs
|
115
|
+
Spur Spurs Square Squares Station Stravenue
|
116
|
+
Stream Street Streets Summit Terrace
|
117
|
+
Throughway Trace Track Trafficway Trail Tunnel
|
117
118
|
Turnpike Underpass Union Unions Valley Valleys Via Viaduct View Views
|
118
|
-
Village
|
119
|
-
Wells)
|
119
|
+
Village Villages Ville Vista Walk Walks Wall Way Ways Well Wells)
|
120
120
|
|
121
121
|
SEC_ADDR = k ['Apt. ###', 'Suite ###']
|
122
122
|
|
data/lib/ffaker/company.rb
CHANGED
@@ -18,13 +18,13 @@ module Faker
|
|
18
18
|
# Generate a buzzword-laden catch phrase.
|
19
19
|
# Wordlist from http://www.1728.com/buzzword.htm
|
20
20
|
def catch_phrase
|
21
|
-
"#{
|
21
|
+
"#{CATCH_PRE.rand} #{CATCH_MID.rand} #{CATCH_POS.rand}"
|
22
22
|
end
|
23
23
|
|
24
24
|
# When a straight answer won't do, BS to the rescue!
|
25
25
|
# Wordlist from http://dack.com/web/bullshit.html
|
26
26
|
def bs
|
27
|
-
"#{
|
27
|
+
"#{BS_PRE.rand} #{BS_MID.rand} #{BS_POS.rand}"
|
28
28
|
end
|
29
29
|
|
30
30
|
SUFFIXES = k %w(Inc and\ Sons LLC Group)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 6
|
9
|
+
version: 0.3.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Emmanuel Oga
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-12 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|