ffaker 1.24.0 → 1.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -15
  2. data/Changelog.md +4 -0
  3. data/ffaker.gemspec +42 -2
  4. data/lib/ffaker.rb +1 -1
  5. data/lib/ffaker/address_fi.rb +48 -0
  6. data/lib/ffaker/address_mx.rb +3 -9
  7. data/lib/ffaker/address_nl.rb +43 -0
  8. data/lib/ffaker/boolean.rb +16 -0
  9. data/lib/ffaker/color.rb +13 -0
  10. data/lib/ffaker/data/address_fi/city +107 -0
  11. data/lib/ffaker/data/address_fi/countries +96 -0
  12. data/lib/ffaker/data/address_fi/street +140 -0
  13. data/lib/ffaker/data/address_nl/city +2226 -0
  14. data/lib/ffaker/data/address_nl/province +12 -0
  15. data/lib/ffaker/data/color/names_list +19 -0
  16. data/lib/ffaker/data/food/fruit +82 -0
  17. data/lib/ffaker/data/food/herb_spice +64 -0
  18. data/lib/ffaker/data/food/meat +48 -0
  19. data/lib/ffaker/data/food/vegetable +207 -0
  20. data/lib/ffaker/data/identification_mx/estados_curp +33 -0
  21. data/lib/ffaker/data/job_ja/job_nouns +235 -0
  22. data/lib/ffaker/data/name_nl/first_names_female +89 -0
  23. data/lib/ffaker/data/name_nl/first_names_male +75 -0
  24. data/lib/ffaker/data/name_nl/last_names +115 -0
  25. data/lib/ffaker/data/vehicle/makes_list +74 -0
  26. data/lib/ffaker/data/vehicle/models_list +106 -0
  27. data/lib/ffaker/data/vehicle/trims_list +13 -0
  28. data/lib/ffaker/food.rb +27 -0
  29. data/lib/ffaker/identification_mx.rb +49 -0
  30. data/lib/ffaker/internet.rb +15 -0
  31. data/lib/ffaker/internet_se.rb +7 -0
  32. data/lib/ffaker/job_ja.rb +12 -0
  33. data/lib/ffaker/lorem.rb +1 -1
  34. data/lib/ffaker/name_nl.rb +50 -0
  35. data/lib/ffaker/name_ru.rb +1 -1
  36. data/lib/ffaker/phone_number_nl.rb +52 -0
  37. data/lib/ffaker/ssn_mx.rb +57 -0
  38. data/lib/ffaker/vehicle.rb +50 -0
  39. data/test/test_address_fi.rb +33 -0
  40. data/test/test_address_mx.rb +9 -9
  41. data/test/test_address_nl.rb +30 -0
  42. data/test/test_boolean.rb +10 -0
  43. data/test/test_color.rb +9 -0
  44. data/test/test_food.rb +21 -0
  45. data/test/test_identification_es_mx.rb +24 -0
  46. data/test/test_internet.rb +7 -0
  47. data/test/test_internet_se.rb +4 -1
  48. data/test/test_job_ja.rb +17 -0
  49. data/test/test_lorem.rb +3 -0
  50. data/test/test_name_br.rb +4 -2
  51. data/test/test_name_nl.rb +21 -0
  52. data/test/test_phone_number_nl.rb +30 -0
  53. data/test/test_ssn_mx.rb +32 -0
  54. data/test/test_vehicle.rb +41 -0
  55. metadata +90 -45
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTcyMTBmNWNkOGY2MjhiOGZmYmIzNjlhNGY0ODUwZWZjNjA4YWI1OA==
5
- data.tar.gz: !binary |-
6
- YjNmZDVkN2M2MGYyNzNmNzY2Zjg3YmNiYTU1MjBhNTM0YWFhZWRlYg==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MWUzMGUxOTJjZGZhZWE3YjVlYzJjMzc0MmNmZWFlOTRhNDdjNmQ4MzQ1MGM4
10
- M2VhNTEyZDU4MmQ1NGM0MzIxOGVlZDZjMmFiMDI4NTY2YjIxN2NkM2VjODBk
11
- MzMyM2ExZGIyODc3NzJiM2NhOGU0ZjNlYjRkMTQ2MTE5OGExMzI=
12
- data.tar.gz: !binary |-
13
- MjdlODA4YzdlNmVmOWI4ZmFjM2FlZDk4ZDk4Y2I1ZmU1NDg4YjU5MDhiYzY4
14
- N2ZkZjQ1ZTBiMjg2NzNjMDNhNjgzYzE2YTU3OGIzNWUzZDA2OTgwMDE4NTZj
15
- ZGM5NjZhMDJlNTBkZGQ3MmM0NjZlNjIxOTI3Y2M0YzFlMWY4ZDI=
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 25d1123e607c94c339c2b23c5d4cb704aea66cb5
4
+ data.tar.gz: 137fee7de6eef82c1eaebbc7880ccb63fe54e772
5
+ SHA512:
6
+ metadata.gz: f09da2bc77721740010d0956e08989d016ac698b6fd1488468b14c468d2b43d39a1c4536121c7f8cb950ab2c4f918e201c4ccd9f948a2a3a2986c75b56e9623c
7
+ data.tar.gz: 1ff5b9862c3da28dc69043038bd2bdc9cd8a7931a6ce0fb28b643b07eab8d828e3bb1a39f21016fb2973759721a97cf4c310ebc42aabce55bd0c94bbdd1722d7
data/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.25.0
2
+
3
+ API additions and some fixes... check the git log! :)
4
+
1
5
  ## 1.24.0
2
6
 
3
7
  API additions
data/ffaker.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'ffaker'
7
- s.version = '1.24.0'
8
- s.date = '2014-04-02'
7
+ s.version = '1.25.0'
8
+ s.date = '2014-08-18'
9
9
  s.rubyforge_project = 'ffaker'
10
10
 
11
11
  s.license = 'MIT'
@@ -37,13 +37,17 @@ Gem::Specification.new do |s|
37
37
  lib/ffaker/address_ca.rb
38
38
  lib/ffaker/address_da.rb
39
39
  lib/ffaker/address_de.rb
40
+ lib/ffaker/address_fi.rb
40
41
  lib/ffaker/address_fr.rb
41
42
  lib/ffaker/address_mx.rb
43
+ lib/ffaker/address_nl.rb
42
44
  lib/ffaker/address_se.rb
43
45
  lib/ffaker/address_sn.rb
44
46
  lib/ffaker/address_uk.rb
45
47
  lib/ffaker/address_us.rb
46
48
  lib/ffaker/bacon_ipsum.rb
49
+ lib/ffaker/boolean.rb
50
+ lib/ffaker/color.rb
47
51
  lib/ffaker/company.rb
48
52
  lib/ffaker/company_it.rb
49
53
  lib/ffaker/company_se.rb
@@ -62,9 +66,14 @@ Gem::Specification.new do |s|
62
66
  lib/ffaker/data/address_da/street
63
67
  lib/ffaker/data/address_de/city
64
68
  lib/ffaker/data/address_de/state
69
+ lib/ffaker/data/address_fi/city
70
+ lib/ffaker/data/address_fi/countries
71
+ lib/ffaker/data/address_fi/street
65
72
  lib/ffaker/data/address_fr/city
66
73
  lib/ffaker/data/address_mx/state
67
74
  lib/ffaker/data/address_mx/state_abbr
75
+ lib/ffaker/data/address_nl/city
76
+ lib/ffaker/data/address_nl/province
68
77
  lib/ffaker/data/address_se/city
69
78
  lib/ffaker/data/address_se/countries
70
79
  lib/ffaker/data/address_se/street
@@ -76,6 +85,7 @@ Gem::Specification.new do |s|
76
85
  lib/ffaker/data/address_us/state_abbr
77
86
  lib/ffaker/data/address_us/state_and_territories_abbr
78
87
  lib/ffaker/data/bacon_ipsum/bacon_words
88
+ lib/ffaker/data/color/names_list
79
89
  lib/ffaker/data/company/bs_mid
80
90
  lib/ffaker/data/company/bs_pos
81
91
  lib/ffaker/data/company/bs_pre
@@ -87,13 +97,19 @@ Gem::Specification.new do |s|
87
97
  lib/ffaker/data/dizzle_ipsum/dizzle_words
88
98
  lib/ffaker/data/education/major_noun
89
99
  lib/ffaker/data/education/school_suffix
100
+ lib/ffaker/data/food/fruit
101
+ lib/ffaker/data/food/herb_spice
102
+ lib/ffaker/data/food/meat
103
+ lib/ffaker/data/food/vegetable
90
104
  lib/ffaker/data/healthcare_ipsum/healthcare_words
91
105
  lib/ffaker/data/hipster_ipsum/hipster_words
106
+ lib/ffaker/data/identification_mx/estados_curp
92
107
  lib/ffaker/data/job/job_adj
93
108
  lib/ffaker/data/job/job_noun
94
109
  lib/ffaker/data/job/job_prefix
95
110
  lib/ffaker/data/job_fr/job_nouns
96
111
  lib/ffaker/data/job_fr/job_prefixes
112
+ lib/ffaker/data/job_ja/job_nouns
97
113
  lib/ffaker/data/locale/language
98
114
  lib/ffaker/data/locale/language_code
99
115
  lib/ffaker/data/lorem/characters
@@ -132,6 +148,9 @@ Gem::Specification.new do |s|
132
148
  lib/ffaker/data/name_nb/first_names_female
133
149
  lib/ffaker/data/name_nb/first_names_male
134
150
  lib/ffaker/data/name_nb/last_names
151
+ lib/ffaker/data/name_nl/first_names_female
152
+ lib/ffaker/data/name_nl/first_names_male
153
+ lib/ffaker/data/name_nl/last_names
135
154
  lib/ffaker/data/name_ph/autochthonous_surnames
136
155
  lib/ffaker/data/name_ph/spanish_surnames
137
156
  lib/ffaker/data/name_se/first_names_female
@@ -155,9 +174,13 @@ Gem::Specification.new do |s|
155
174
  lib/ffaker/data/skill/specialty_end
156
175
  lib/ffaker/data/skill/specialty_start
157
176
  lib/ffaker/data/skill/tech_skills
177
+ lib/ffaker/data/vehicle/makes_list
178
+ lib/ffaker/data/vehicle/models_list
179
+ lib/ffaker/data/vehicle/trims_list
158
180
  lib/ffaker/data/venue/venue_list
159
181
  lib/ffaker/dizzle_ipsum.rb
160
182
  lib/ffaker/education.rb
183
+ lib/ffaker/food.rb
161
184
  lib/ffaker/geolocation.rb
162
185
  lib/ffaker/healthcare_ipsum.rb
163
186
  lib/ffaker/hipster_ipsum.rb
@@ -166,10 +189,12 @@ Gem::Specification.new do |s|
166
189
  lib/ffaker/identification_es.rb
167
190
  lib/ffaker/identification_es_cl.rb
168
191
  lib/ffaker/identification_es_co.rb
192
+ lib/ffaker/identification_mx.rb
169
193
  lib/ffaker/internet.rb
170
194
  lib/ffaker/internet_se.rb
171
195
  lib/ffaker/job.rb
172
196
  lib/ffaker/job_fr.rb
197
+ lib/ffaker/job_ja.rb
173
198
  lib/ffaker/locale.rb
174
199
  lib/ffaker/lorem.rb
175
200
  lib/ffaker/lorem_ar.rb
@@ -189,6 +214,7 @@ Gem::Specification.new do |s|
189
214
  lib/ffaker/name_kr.rb
190
215
  lib/ffaker/name_mx.rb
191
216
  lib/ffaker/name_nb.rb
217
+ lib/ffaker/name_nl.rb
192
218
  lib/ffaker/name_ph.rb
193
219
  lib/ffaker/name_ru.rb
194
220
  lib/ffaker/name_se.rb
@@ -203,12 +229,14 @@ Gem::Specification.new do |s|
203
229
  lib/ffaker/phone_number_fr.rb
204
230
  lib/ffaker/phone_number_it.rb
205
231
  lib/ffaker/phone_number_mx.rb
232
+ lib/ffaker/phone_number_nl.rb
206
233
  lib/ffaker/phone_number_se.rb
207
234
  lib/ffaker/phone_number_sg.rb
208
235
  lib/ffaker/phone_number_sn.rb
209
236
  lib/ffaker/product.rb
210
237
  lib/ffaker/skill.rb
211
238
  lib/ffaker/ssn.rb
239
+ lib/ffaker/ssn_mx.rb
212
240
  lib/ffaker/ssn_se.rb
213
241
  lib/ffaker/string.rb
214
242
  lib/ffaker/time.rb
@@ -217,6 +245,7 @@ Gem::Specification.new do |s|
217
245
  lib/ffaker/unit_metric.rb
218
246
  lib/ffaker/utils/array_utils.rb
219
247
  lib/ffaker/utils/module_utils.rb
248
+ lib/ffaker/vehicle.rb
220
249
  lib/ffaker/venue.rb
221
250
  scripts/benchmark.rb
222
251
  scripts/profile.sh
@@ -228,13 +257,17 @@ Gem::Specification.new do |s|
228
257
  test/test_address_ca.rb
229
258
  test/test_address_da.rb
230
259
  test/test_address_de.rb
260
+ test/test_address_fi.rb
231
261
  test/test_address_mx.rb
262
+ test/test_address_nl.rb
232
263
  test/test_address_se.rb
233
264
  test/test_address_sn.rb
234
265
  test/test_address_uk.rb
235
266
  test/test_address_us.rb
236
267
  test/test_array_utils.rb
237
268
  test/test_bacon_ipsum.rb
269
+ test/test_boolean.rb
270
+ test/test_color.rb
238
271
  test/test_company.rb
239
272
  test/test_company_it.rb
240
273
  test/test_company_se.rb
@@ -242,6 +275,7 @@ Gem::Specification.new do |s|
242
275
  test/test_dizzle_ipsum.rb
243
276
  test/test_education.rb
244
277
  test/test_faker.rb
278
+ test/test_food.rb
245
279
  test/test_geolocation.rb
246
280
  test/test_healthcare_ipsum.rb
247
281
  test/test_hipster_ipsum.rb
@@ -250,10 +284,12 @@ Gem::Specification.new do |s|
250
284
  test/test_identification_co.rb
251
285
  test/test_identification_es.rb
252
286
  test/test_identification_es_cl.rb
287
+ test/test_identification_es_mx.rb
253
288
  test/test_internet.rb
254
289
  test/test_internet_se.rb
255
290
  test/test_job.rb
256
291
  test/test_job_fr.rb
292
+ test/test_job_ja.rb
257
293
  test/test_lorem.rb
258
294
  test/test_lorem_ar.rb
259
295
  test/test_lorem_cn.rb
@@ -272,6 +308,7 @@ Gem::Specification.new do |s|
272
308
  test/test_name_kr.rb
273
309
  test/test_name_mx.rb
274
310
  test/test_name_nb.rb
311
+ test/test_name_nl.rb
275
312
  test/test_name_ph.rb
276
313
  test/test_name_ru.rb
277
314
  test/test_name_se.rb
@@ -282,17 +319,20 @@ Gem::Specification.new do |s|
282
319
  test/test_phone_number_au.rb
283
320
  test/test_phone_number_de.rb
284
321
  test/test_phone_number_mx.rb
322
+ test/test_phone_number_nl.rb
285
323
  test/test_phone_number_se.rb
286
324
  test/test_phone_number_sg.rb
287
325
  test/test_phone_number_sn.rb
288
326
  test/test_skill.rb
289
327
  test/test_ssn.rb
328
+ test/test_ssn_mx.rb
290
329
  test/test_ssn_se.rb
291
330
  test/test_string.rb
292
331
  test/test_time.rb
293
332
  test/test_units.rb
294
333
  test/test_units_english.rb
295
334
  test/test_units_metric.rb
335
+ test/test_vehicle.rb
296
336
  test/test_venue.rb
297
337
  ]
298
338
  # = MANIFEST =
data/lib/ffaker.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Faker
2
- VERSION = "1.24.0"
2
+ VERSION = "1.25.0"
3
3
 
4
4
  require 'ffaker/utils/array_utils'
5
5
  require 'ffaker/utils/module_utils'
@@ -0,0 +1,48 @@
1
+ # encoding: utf-8
2
+
3
+ require 'ffaker/address'
4
+
5
+ module Faker
6
+ # List of countries is from Freebase:
7
+ # https://www.googleapis.com/freebase/v1/mqlread?lang=/lang/fi&query=[%7B%22name%22:null,%22type%22:%22/location/country%22%7D]
8
+ # Streetnames are from areacode 32100 (http://posti.fi/postipalvelee/tyokalut/postinumerohaku/)
9
+ # List of cities is from http://fi.wikipedia.org/wiki/Luettelo_Suomen_kaupungeista
10
+ module AddressFI
11
+ include Faker::Address
12
+
13
+ extend ModuleUtils
14
+ extend self
15
+
16
+ def zip_code
17
+ Faker.numerify ZIP_FORMATS.rand
18
+ end
19
+
20
+ def city
21
+ CITY.rand
22
+ end
23
+
24
+ def street_name
25
+ STREET.rand
26
+ end
27
+
28
+ def street_address
29
+ "#{street_name} #{street_nbr}"
30
+ end
31
+
32
+ def street_nbr
33
+ Faker.numerify STREET_NBR_FORMATS.rand
34
+ end
35
+
36
+ def full_address
37
+ "#{street_address}, #{zip_code} #{city}, SUOMI"
38
+ end
39
+
40
+ def random_country
41
+ COUNTRIES.rand
42
+ end
43
+
44
+ ZIP_FORMATS = k ['#####']
45
+
46
+ STREET_NBR_FORMATS = k ['##', '#', '# a', '# b', '###', '# a #', '# b #']
47
+ end
48
+ end
@@ -1,21 +1,17 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'ffaker/address'
4
-
5
3
  module Faker
6
- # Author guapolo<github.com/guapolo>
4
+ # Author Guapolo <github.com/guapolo>
7
5
  module AddressMX
8
- include Faker::Address
9
-
10
6
  extend ModuleUtils
11
7
  extend self
12
8
 
13
9
  def zip_code
14
- Faker::AddressUS.zip_code
10
+ Faker.numerify('#####')
15
11
  end
16
12
 
17
13
  def postal_code
18
- Faker.numerify POSTAL_CODE_FORMATS.rand
14
+ Faker.numerify('#####')
19
15
  end
20
16
 
21
17
  def state
@@ -32,8 +28,6 @@ module Faker
32
28
  MUNICIPALITY[st_abbr][rand(MUNICIPALITY[st_abbr].size)]
33
29
  end
34
30
 
35
- POSTAL_CODE_FORMATS = k ['#####']
36
-
37
31
  MUNICIPALITY = {
38
32
  "AGS" => [
39
33
  "Aguascalientes", "Asientos", "Calvillo", "Cosío", "El Llano", "Jesús María",
@@ -0,0 +1,43 @@
1
+ # encoding: utf-8
2
+
3
+ require 'ffaker/address'
4
+
5
+ module Faker
6
+ module AddressNL
7
+ include Faker::Address
8
+
9
+ extend ModuleUtils
10
+ extend self
11
+
12
+ def postal_code
13
+ Faker.bothify POSTAL_CODE_FORMAT
14
+ end
15
+
16
+ def zip_code
17
+ postal_code
18
+ end
19
+
20
+ def street_name
21
+ case rand(2)
22
+ when 0 then "#{NameNL.last_name}"
23
+ when 1 then "#{NameNL.first_name}"
24
+ end << case rand(20)
25
+ when 0 then "weg"
26
+ when 1 then "boulevard"
27
+ when 3 then "pad"
28
+ when 4 then "steeg"
29
+ else "straat"
30
+ end
31
+ end
32
+
33
+ def city
34
+ CITY.rand
35
+ end
36
+
37
+ def province
38
+ PROVINCE.rand
39
+ end
40
+
41
+ POSTAL_CODE_FORMAT = k ['#### ??']
42
+ end
43
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+
3
+ module Faker
4
+ module Boolean
5
+ extend ModuleUtils
6
+ extend self
7
+
8
+ def maybe
9
+ case rand(2)
10
+ when 0 then true
11
+ when 1 then false
12
+ end
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+
3
+ module Faker
4
+ module Color
5
+ extend ModuleUtils
6
+ extend self
7
+
8
+ def name
9
+ NAMES_LIST.rand
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,107 @@
1
+ Akaa
2
+ Alajärvi
3
+ Alavus
4
+ Espoo
5
+ Forssa
6
+ Haapajärvi
7
+ Haapavesi
8
+ Hamina
9
+ Hanko
10
+ Harjavalta
11
+ Heinola
12
+ Helsinki
13
+ Huittinen
14
+ Hyvinkää
15
+ Hämeenlinna
16
+ Iisalmi
17
+ Ikaalinen
18
+ Imatra
19
+ Joensuu
20
+ Juankoski
21
+ Jyväskylä
22
+ Jämsä
23
+ Järvenpää
24
+ Kaarina
25
+ Kajaani
26
+ Kalajoki
27
+ Kankaanpää
28
+ Kannus
29
+ Karkkila
30
+ Kaskinen
31
+ Kauhajoki
32
+ Kauhava
33
+ Kauniainen
34
+ Kemi
35
+ Kemijärvi
36
+ Kerava
37
+ Keuruu
38
+ Kitee
39
+ Kiuruvesi
40
+ Kokemäki
41
+ Kokkola
42
+ Kotka
43
+ Kouvola
44
+ Kristiinankaupunki
45
+ Kuhmo
46
+ Kuopio
47
+ Kurikka
48
+ Kuusamo
49
+ Lahti
50
+ Laitila
51
+ Lappeenranta
52
+ Lapua
53
+ Lieksa
54
+ Lohja
55
+ Loimaa
56
+ Loviisa
57
+ Maarianhamina
58
+ Mikkeli
59
+ Mänttä-Vilppula
60
+ Naantali
61
+ Nivala
62
+ Nokia
63
+ Nurmes
64
+ Närpiö
65
+ Orimattila
66
+ Orivesi
67
+ Oulainen
68
+ Oulu
69
+ Outokumpu
70
+ Paimio
71
+ Parainen
72
+ Parkano
73
+ Pieksämäki
74
+ Pietarsaari
75
+ Pori
76
+ Porvoo
77
+ Pudasjärvi
78
+ Pyhäjärvi
79
+ Raahe
80
+ Raasepori
81
+ Raisio
82
+ Rauma
83
+ Riihimäki
84
+ Rovaniemi
85
+ Saarijärvi
86
+ Salo
87
+ Sastamala
88
+ Savonlinna
89
+ Seinäjoki
90
+ Somero
91
+ Suonenjoki
92
+ Tampere
93
+ Tornio
94
+ Turku
95
+ Ulvila
96
+ Uusikaarlepyy
97
+ Uusikaupunki
98
+ Vaasa
99
+ Valkeakoski
100
+ Vantaa
101
+ Varkaus
102
+ Viitasaari
103
+ Virrat
104
+ Ylivieska
105
+ Ylöjärvi
106
+ Ähtäri
107
+ Äänekoski