ffaker 1.32.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +35 -23
- data/README.md +3 -3
- data/Rakefile +20 -0
- data/ffaker.gemspec +2 -2
- data/lib/ffaker.rb +2 -2
- data/lib/ffaker/address.rb +9 -9
- data/lib/ffaker/address_au.rb +3 -3
- data/lib/ffaker/address_br.rb +3 -3
- data/lib/ffaker/address_ca.rb +3 -3
- data/lib/ffaker/address_da.rb +3 -3
- data/lib/ffaker/address_de.rb +3 -3
- data/lib/ffaker/address_fi.rb +4 -4
- data/lib/ffaker/address_fr.rb +5 -5
- data/lib/ffaker/address_mx.rb +3 -3
- data/lib/ffaker/address_nl.rb +3 -3
- data/lib/ffaker/address_se.rb +4 -4
- data/lib/ffaker/address_sn.rb +2 -2
- data/lib/ffaker/address_uk.rb +3 -3
- data/lib/ffaker/address_us.rb +3 -3
- data/lib/ffaker/bacon_ipsum.rb +1 -1
- data/lib/ffaker/boolean.rb +1 -1
- data/lib/ffaker/color.rb +1 -1
- data/lib/ffaker/company.rb +1 -1
- data/lib/ffaker/company_it.rb +1 -1
- data/lib/ffaker/company_se.rb +1 -1
- data/lib/ffaker/conference.rb +1 -1
- data/lib/ffaker/courses.rb +1 -1
- data/lib/ffaker/currency.rb +1 -1
- data/lib/ffaker/dizzle_ipsum.rb +1 -1
- data/lib/ffaker/education.rb +1 -1
- data/lib/ffaker/food.rb +1 -1
- data/lib/ffaker/gender.rb +1 -1
- data/lib/ffaker/gender_cn.rb +1 -1
- data/lib/ffaker/gender_kr.rb +1 -1
- data/lib/ffaker/geolocation.rb +1 -1
- data/lib/ffaker/guid.rb +2 -2
- data/lib/ffaker/healthcare_ipsum.rb +1 -1
- data/lib/ffaker/hipster_ipsum.rb +1 -1
- data/lib/ffaker/html_ipsum.rb +9 -9
- data/lib/ffaker/identification.rb +3 -3
- data/lib/ffaker/identification_es.rb +1 -1
- data/lib/ffaker/identification_es_cl.rb +1 -1
- data/lib/ffaker/identification_es_co.rb +2 -2
- data/lib/ffaker/identification_mx.rb +1 -1
- data/lib/ffaker/internet.rb +2 -2
- data/lib/ffaker/internet_se.rb +2 -2
- data/lib/ffaker/job.rb +1 -1
- data/lib/ffaker/job_fr.rb +1 -1
- data/lib/ffaker/job_ja.rb +1 -1
- data/lib/ffaker/job_kr.rb +1 -1
- data/lib/ffaker/locale.rb +1 -1
- data/lib/ffaker/lorem.rb +1 -1
- data/lib/ffaker/lorem_ar.rb +1 -1
- data/lib/ffaker/lorem_cn.rb +1 -1
- data/lib/ffaker/lorem_fr.rb +1 -1
- data/lib/ffaker/lorem_kr.rb +1 -1
- data/lib/ffaker/movie.rb +7 -7
- data/lib/ffaker/name.rb +1 -1
- data/lib/ffaker/name_br.rb +1 -1
- data/lib/ffaker/name_cn.rb +1 -1
- data/lib/ffaker/name_cs.rb +6 -6
- data/lib/ffaker/name_da.rb +2 -2
- data/lib/ffaker/name_de.rb +2 -2
- data/lib/ffaker/name_fr.rb +1 -1
- data/lib/ffaker/name_ga.rb +1 -1
- data/lib/ffaker/name_it.rb +1 -1
- data/lib/ffaker/name_ja.rb +1 -1
- data/lib/ffaker/name_kr.rb +1 -1
- data/lib/ffaker/name_mx.rb +2 -2
- data/lib/ffaker/name_nb.rb +2 -2
- data/lib/ffaker/name_nl.rb +2 -2
- data/lib/ffaker/name_ph.rb +2 -2
- data/lib/ffaker/name_ru.rb +7 -7
- data/lib/ffaker/name_se.rb +2 -2
- data/lib/ffaker/name_sn.rb +1 -1
- data/lib/ffaker/name_th.rb +1 -1
- data/lib/ffaker/name_vn.rb +1 -1
- data/lib/ffaker/nato_alphabet.rb +1 -1
- data/lib/ffaker/phone_number.rb +3 -3
- data/lib/ffaker/phone_number_au.rb +7 -7
- data/lib/ffaker/phone_number_cu.rb +12 -14
- data/lib/ffaker/phone_number_da.rb +3 -3
- data/lib/ffaker/phone_number_de.rb +4 -4
- data/lib/ffaker/phone_number_fr.rb +3 -3
- data/lib/ffaker/phone_number_it.rb +2 -2
- data/lib/ffaker/phone_number_kr.rb +3 -3
- data/lib/ffaker/phone_number_mx.rb +7 -7
- data/lib/ffaker/phone_number_nl.rb +5 -5
- data/lib/ffaker/phone_number_se.rb +5 -5
- data/lib/ffaker/phone_number_sg.rb +9 -9
- data/lib/ffaker/phone_number_sn.rb +5 -5
- data/lib/ffaker/product.rb +1 -1
- data/lib/ffaker/skill.rb +1 -1
- data/lib/ffaker/ssn.rb +2 -2
- data/lib/ffaker/ssn_mx.rb +7 -7
- data/lib/ffaker/ssn_se.rb +1 -1
- data/lib/ffaker/string.rb +1 -1
- data/lib/ffaker/time.rb +1 -1
- data/lib/ffaker/unit.rb +1 -1
- data/lib/ffaker/unit_english.rb +2 -2
- data/lib/ffaker/unit_metric.rb +2 -2
- data/lib/ffaker/utils/array_utils.rb +1 -1
- data/lib/ffaker/utils/module_utils.rb +3 -3
- data/lib/ffaker/vehicle.rb +3 -3
- data/lib/ffaker/venue.rb +1 -1
- data/scripts/benchmark.rb +2 -2
- data/scripts/profiling.rb +1 -1
- data/test/test_address.rb +21 -21
- data/test/test_address_au.rb +17 -17
- data/test/test_address_br.rb +7 -7
- data/test/test_address_ca.rb +4 -4
- data/test/test_address_da.rb +9 -9
- data/test/test_address_de.rb +5 -5
- data/test/test_address_fi.rb +6 -6
- data/test/test_address_mx.rb +5 -5
- data/test/test_address_nl.rb +1 -1
- data/test/test_address_se.rb +6 -6
- data/test/test_address_sn.rb +4 -4
- data/test/test_address_uk.rb +3 -3
- data/test/test_address_us.rb +7 -7
- data/test/test_array_utils.rb +1 -1
- data/test/test_bacon_ipsum.rb +6 -6
- data/test/test_boolean.rb +1 -1
- data/test/test_color.rb +1 -1
- data/test/test_company.rb +6 -6
- data/test/test_company_it.rb +4 -4
- data/test/test_company_se.rb +2 -2
- data/test/test_conference.rb +1 -1
- data/test/test_course_mathematiques.rb +1 -1
- data/test/test_course_philosophie.rb +1 -1
- data/test/test_dizzle_ipsum.rb +6 -6
- data/test/test_education.rb +1 -1
- data/test/test_faker.rb +6 -6
- data/test/test_food.rb +4 -4
- data/test/test_gender.rb +1 -1
- data/test/test_gender_cn.rb +1 -1
- data/test/test_gender_kr.rb +1 -1
- data/test/test_geolocation.rb +3 -3
- data/test/test_guid.rb +1 -1
- data/test/test_healthcare_ipsum.rb +6 -6
- data/test/test_hipster_ipsum.rb +6 -6
- data/test/test_html_ipsum.rb +19 -19
- data/test/test_identification.rb +1 -1
- data/test/test_identification_co.rb +1 -1
- data/test/test_identification_es.rb +1 -1
- data/test/test_identification_es_cl.rb +1 -1
- data/test/test_identification_es_mx.rb +7 -7
- data/test/test_internet.rb +1 -1
- data/test/test_internet_se.rb +1 -1
- data/test/test_job.rb +1 -1
- data/test/test_job_fr.rb +1 -1
- data/test/test_job_ja.rb +1 -1
- data/test/test_job_kr.rb +1 -1
- data/test/test_lorem.rb +13 -13
- data/test/test_lorem_ar.rb +8 -8
- data/test/test_lorem_cn.rb +10 -10
- data/test/test_lorem_fr.rb +8 -8
- data/test/test_lorem_kr.rb +2 -2
- data/test/test_module_utils.rb +1 -1
- data/test/test_movie.rb +1 -1
- data/test/test_name.rb +1 -1
- data/test/test_name_br.rb +1 -1
- data/test/test_name_cn.rb +1 -1
- data/test/test_name_cs.rb +6 -6
- data/test/test_name_de.rb +1 -1
- data/test/test_name_fr.rb +10 -10
- data/test/test_name_ga.rb +12 -12
- data/test/test_name_it.rb +10 -10
- data/test/test_name_ja.rb +2 -2
- data/test/test_name_kr.rb +1 -1
- data/test/test_name_mx.rb +58 -58
- data/test/test_name_nb.rb +5 -5
- data/test/test_name_nl.rb +1 -1
- data/test/test_name_ph.rb +1 -1
- data/test/test_name_ru.rb +5 -5
- data/test/test_name_se.rb +5 -5
- data/test/test_name_sn.rb +21 -21
- data/test/test_name_th.rb +6 -6
- data/test/test_nato_alphabet.rb +5 -5
- data/test/test_phone_number.rb +2 -2
- data/test/test_phone_number_au.rb +10 -10
- data/test/test_phone_number_cu.rb +13 -13
- data/test/test_phone_number_de.rb +10 -10
- data/test/test_phone_number_kr.rb +1 -1
- data/test/test_phone_number_mx.rb +1 -1
- data/test/test_phone_number_nl.rb +1 -1
- data/test/test_phone_number_se.rb +15 -15
- data/test/test_phone_number_sg.rb +1 -1
- data/test/test_phone_number_sn.rb +7 -7
- data/test/test_skill.rb +4 -4
- data/test/test_ssn.rb +1 -1
- data/test/test_ssn_mx.rb +10 -10
- data/test/test_ssn_se.rb +5 -5
- data/test/test_string.rb +1 -1
- data/test/test_time.rb +1 -1
- data/test/test_units.rb +5 -5
- data/test/test_units_english.rb +11 -11
- data/test/test_units_metric.rb +11 -11
- data/test/test_vehicle.rb +9 -9
- data/test/test_venue.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 862894ba20d39b03c8265bd7198a6844b5080303
|
4
|
+
data.tar.gz: 2367534621bb52657c10a4cdbc8d868d62d9aa38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515c5818c9fb8c8f19fa9df9da1db1b01dac1310f80b43c87f5b60a0d12c13c0260998946350ca1dea4b5448482024a2726954cf035cdc18cf599da9719f3dd0
|
7
|
+
data.tar.gz: b5acad51337d9b91248b57b8330b12cbd9823ae3822e06f4daca6af2d4c9fd6ae79fcd67cb8f95a47bf8da73f4bdb785a5bb032d29ca5e646c49503c22b2d50b
|
data/Changelog.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 2.0.0
|
2
|
+
- switched faker to ffaker namespace, you should now be able to use
|
3
|
+
faker and ffaker gem together.
|
4
|
+
## 1.32.1
|
5
|
+
- set required ruby version for gem
|
6
|
+
## 1.32.0
|
7
|
+
- add Korean lorem to API
|
8
|
+
- add 100 canadian largest cities to API
|
9
|
+
- add Cuban phone numbers to API
|
10
|
+
- add currency code to API
|
11
|
+
- internal code-style improvements
|
12
|
+
|
1
13
|
## 1.31.0
|
2
14
|
|
3
15
|
- add deprecation warning to ArrayUtils#rand method
|
@@ -78,15 +90,15 @@ NameKR (https://github.com/EmmanuelOga/ffaker/pull/47) and PhoneNumbersSG
|
|
78
90
|
|
79
91
|
## 1.14.0
|
80
92
|
|
81
|
-
AddressSN (thanks PapePathe), and a bugfix on
|
93
|
+
AddressSN (thanks PapePathe), and a bugfix on FFaker::Product.model (thanks finarfin).
|
82
94
|
|
83
95
|
## 1.13.0
|
84
96
|
|
85
|
-
Education bug fix,
|
97
|
+
Education bug fix, FFaker::Job (thanks Piotr Usewicz)
|
86
98
|
|
87
99
|
## 1.12.0
|
88
100
|
|
89
|
-
|
101
|
+
FFaker::AddressAU and FakkerAddressPhoneAU modules (thanks Ben Wiseley).
|
90
102
|
|
91
103
|
## 1.11.0
|
92
104
|
|
@@ -94,13 +106,13 @@ Extraction of AddressUK and AddressUS classes. (Thanks doctorbh).
|
|
94
106
|
|
95
107
|
## 1.10.1
|
96
108
|
|
97
|
-
|
109
|
+
FFaker::AddressCA (Thanks doctorbh, https://github.com/EmmanuelOga/ffaker/pull/27)
|
98
110
|
|
99
111
|
## 1.9.1
|
100
112
|
|
101
|
-
|
113
|
+
FFaker::NameSN, FFaker::PhoneNumberSN (Thanks SENE, https://github.com/EmmanuelOga/ffaker/pull/26)
|
102
114
|
|
103
|
-
Added
|
115
|
+
Added FFaker::NameJA (Thanks kichiro, https://github.com/EmmanuelOga/ffaker/pull/21)
|
104
116
|
|
105
117
|
## 1.8.1
|
106
118
|
|
@@ -108,52 +120,52 @@ Remove a warning.
|
|
108
120
|
|
109
121
|
## 1.8.0
|
110
122
|
|
111
|
-
|
123
|
+
FFaker::HTMLIpsum module inspired in http://html-ipsum.com/ (Thanks Chris Bloom, https://github.com/EmmanuelOga/ffaker/pull/18)
|
112
124
|
|
113
125
|
## 1.7.0
|
114
126
|
|
115
|
-
|
127
|
+
FFaker::LoremCN (Thanks Shane Weng, Shane Weng, https://github.com/swcool, https://github.com/EmmanuelOga/ffaker/pull/16/files)
|
116
128
|
|
117
129
|
## 1.6.0
|
118
130
|
|
119
|
-
|
120
|
-
Added
|
131
|
+
FFaker::NameDE (thanks David Noelte, https://github.com/marvin, https://github.com/EmmanuelOga/ffaker/pull/17)
|
132
|
+
Added FFaker::Internet#disposable_email (Thanks Port 80 Labs, https://github.com/port80labs, https://github.com/EmmanuelOga/ffaker/pull/15)
|
121
133
|
|
122
134
|
## 1.5.0
|
123
135
|
|
124
|
-
|
136
|
+
FFaker::NameRU (Thanks Vsevolod Romashov, https://github.com/7even, https://github.com/EmmanuelOga/ffaker/pull/14)
|
125
137
|
|
126
138
|
## 1.4.0
|
127
139
|
|
128
|
-
|
140
|
+
FFaker::Product and FFaker::Education (thanks Rico Sta. Cruz, https://github.com/EmmanuelOga/ffaker/pull/12 )
|
129
141
|
|
130
142
|
## 1.3.0
|
131
143
|
|
132
|
-
|
144
|
+
FFaker::Lorem.word as a convenience method, instead of FFaker::Lorem.words(1).first.
|
133
145
|
|
134
146
|
## 1.2.0
|
135
147
|
|
136
|
-
New
|
148
|
+
New FFaker::NameCN module (contributions by qichunren)
|
137
149
|
|
138
|
-
|
139
|
-
|
140
|
-
|
150
|
+
FFaker::NameCN.first_name # => 鑫洋
|
151
|
+
FFaker::NameCN.last_name # => 禹
|
152
|
+
FFaker::NameCN.name # => 俊伶漫
|
141
153
|
|
142
154
|
## 1.1.0
|
143
155
|
|
144
156
|
Api additions (contributions by Robert Berry)
|
145
157
|
|
146
|
-
|
147
|
-
|
148
|
-
|
158
|
+
FFaker::Internet.uri(protocol)
|
159
|
+
FFaker::Internet.http_url
|
160
|
+
FFaker::Internet.ip_v4_address
|
149
161
|
|
150
162
|
## 0.4.0
|
151
163
|
|
152
164
|
Api additions by Rafael Souza
|
153
165
|
|
154
|
-
|
155
|
-
|
156
|
-
|
166
|
+
FFaker::Geolocation.lat # => 40.6609944585817
|
167
|
+
FFaker::Geolocation.lng # => -73.8454648940358
|
168
|
+
FFaker::Address.neighborhood # => "Renton West"
|
157
169
|
|
158
170
|
|
159
171
|
## 0.3.3 2010-01-14
|
data/README.md
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
require 'ffaker'
|
12
|
-
|
13
|
-
|
12
|
+
FFaker::Name.name => "Christophe Bartell"
|
13
|
+
FFaker::Internet.email => "kirsten.greenholt@corkeryfisher.info"
|
14
14
|
```
|
15
15
|
|
16
16
|
## ffaker vs faker
|
@@ -55,7 +55,7 @@ for Faker modules, so if you try to use a constant that is not defined
|
|
55
55
|
in the module, the
|
56
56
|
[override](https://github.com/EmmanuelOga/ffaker/blob/master/lib/ffaker/utils/module_utils.rb#L9)
|
57
57
|
will look for a data file matching the name of the constant. E.G.: the
|
58
|
-
first time someone accesses ++
|
58
|
+
first time someone accesses ++FFaker::Name::FIRST_NAMES++, a const of that
|
59
59
|
name will be set with data from ffaker/data/name/first_names.
|
60
60
|
|
61
61
|
## TODO
|
data/Rakefile
CHANGED
@@ -2,6 +2,26 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'date'
|
4
4
|
|
5
|
+
require "test/unit/testsuite"
|
6
|
+
|
7
|
+
module Test
|
8
|
+
module Unit
|
9
|
+
class TestSuite
|
10
|
+
|
11
|
+
def run(result, &progress_block)
|
12
|
+
yield(STARTED, name)
|
13
|
+
run_startup(result)
|
14
|
+
@tests.each do |test|
|
15
|
+
test.run(result, &progress_block)
|
16
|
+
break unless result.passed?
|
17
|
+
end
|
18
|
+
run_shutdown(result)
|
19
|
+
yield(FINISHED, name)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
5
25
|
#############################################################################
|
6
26
|
#
|
7
27
|
# Helper functions
|
data/ffaker.gemspec
CHANGED
data/lib/ffaker.rb
CHANGED
data/lib/ffaker/address.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
module
|
3
|
+
module FFaker
|
4
4
|
module Address
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
@@ -12,17 +12,17 @@ module Faker
|
|
12
12
|
# @deprecated US specific address info. Moved into {AddressUS}
|
13
13
|
def zip_code
|
14
14
|
warn '[zip_code] is deprecated. For US addresses please use the AddressUS module'
|
15
|
-
|
15
|
+
FFaker::AddressUS.zip_code
|
16
16
|
end
|
17
17
|
|
18
18
|
def us_state
|
19
19
|
warn '[us_state] is deprecated. For US addresses please use the AddressUS module'
|
20
|
-
|
20
|
+
FFaker::AddressUS.state
|
21
21
|
end
|
22
22
|
|
23
23
|
def us_state_abbr
|
24
24
|
warn '[state_abbr] is deprecated. For US addresses please use the AddressUS module'
|
25
|
-
|
25
|
+
FFaker::AddressUS.state_abbr
|
26
26
|
end
|
27
27
|
# end US deprecation
|
28
28
|
|
@@ -48,7 +48,7 @@ module Faker
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def building_number
|
51
|
-
|
51
|
+
FFaker.numerify(( '#' * rand(3) ) << '###')
|
52
52
|
end
|
53
53
|
|
54
54
|
def street_name
|
@@ -65,24 +65,24 @@ module Faker
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def secondary_address
|
68
|
-
|
68
|
+
FFaker.numerify(SEC_ADDR.sample)
|
69
69
|
end
|
70
70
|
|
71
71
|
# @deprecated UK specific address info. Moved into {AddressUK}
|
72
72
|
# UK Variants
|
73
73
|
def uk_county
|
74
74
|
warn '[uk_county] is deprecated. For UK addresses please use the AddressUK module'
|
75
|
-
|
75
|
+
FFaker::AddressUK.county
|
76
76
|
end
|
77
77
|
|
78
78
|
def uk_country
|
79
79
|
warn '[uk_country] is deprecated. For UK addresses please use the AddressUK module'
|
80
|
-
|
80
|
+
FFaker::AddressUK.country
|
81
81
|
end
|
82
82
|
|
83
83
|
def uk_postcode
|
84
84
|
warn '[uk_postcode] is deprecated. For UK addresses please use the AddressUK module'
|
85
|
-
|
85
|
+
FFaker::AddressUK.postcode
|
86
86
|
end
|
87
87
|
# end UK deprecation
|
88
88
|
|
data/lib/ffaker/address_au.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
# Author wiseleyb<wiseleyb@gmail.com>
|
7
7
|
module AddressAU
|
8
|
-
include
|
8
|
+
include FFaker::Address
|
9
9
|
|
10
10
|
extend ModuleUtils
|
11
11
|
extend self
|
@@ -97,7 +97,7 @@ module Faker
|
|
97
97
|
|
98
98
|
def full_address(st_abbr = nil)
|
99
99
|
st_abbr ||= state_abbr
|
100
|
-
"#{
|
100
|
+
"#{FFaker::Address.street_address}, #{suburb(st_abbr)} #{st_abbr} #{postcode}"
|
101
101
|
end
|
102
102
|
end
|
103
103
|
end
|
data/lib/ffaker/address_br.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
module AddressBR
|
7
|
-
include
|
7
|
+
include FFaker::Address
|
8
8
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
@@ -12,7 +12,7 @@ module Faker
|
|
12
12
|
STREET_PREFIX = %w( Rua Avenida Travessa Alameda )
|
13
13
|
|
14
14
|
def zip_code
|
15
|
-
|
15
|
+
FFaker.numerify '#####-###'
|
16
16
|
end
|
17
17
|
|
18
18
|
def state
|
data/lib/ffaker/address_ca.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
module AddressCA
|
7
|
-
include
|
7
|
+
include FFaker::Address
|
8
8
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
@@ -13,7 +13,7 @@ module Faker
|
|
13
13
|
PROVINCE_ABBRS = %w(NL NS PE NB QC ON MB SK AB BC YT NT NU)
|
14
14
|
|
15
15
|
def postal_code
|
16
|
-
|
16
|
+
FFaker.bothify(POSTAL_CODE_FORMATS.sample).upcase
|
17
17
|
end
|
18
18
|
|
19
19
|
def province
|
data/lib/ffaker/address_da.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
module AddressDA
|
7
|
-
include
|
7
|
+
include FFaker::Address
|
8
8
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
@@ -15,7 +15,7 @@ module Faker
|
|
15
15
|
STATE = REGION
|
16
16
|
|
17
17
|
def zip_code
|
18
|
-
|
18
|
+
FFaker.numerify('####')
|
19
19
|
end
|
20
20
|
|
21
21
|
def post_nr
|
data/lib/ffaker/address_de.rb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
module AddressDE
|
7
|
-
include
|
7
|
+
include FFaker::Address
|
8
8
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
11
11
|
|
12
12
|
def zip_code
|
13
|
-
|
13
|
+
FFaker.numerify '#####'
|
14
14
|
end
|
15
15
|
|
16
16
|
def state
|
data/lib/ffaker/address_fi.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
# List of countries is from Freebase:
|
7
7
|
# https://www.googleapis.com/freebase/v1/mqlread?lang=/lang/fi&query=[%7B%22name%22:null,%22type%22:%22/location/country%22%7D]
|
8
8
|
# Streetnames are from areacode 32100 (http://posti.fi/postipalvelee/tyokalut/postinumerohaku/)
|
9
9
|
# List of cities is from http://fi.wikipedia.org/wiki/Luettelo_Suomen_kaupungeista
|
10
10
|
module AddressFI
|
11
|
-
include
|
11
|
+
include FFaker::Address
|
12
12
|
|
13
13
|
extend ModuleUtils
|
14
14
|
extend self
|
@@ -17,7 +17,7 @@ module Faker
|
|
17
17
|
STREET_NBR_FORMATS = ['##', '#', '# a', '# b', '###', '# a #', '# b #']
|
18
18
|
|
19
19
|
def zip_code
|
20
|
-
|
20
|
+
FFaker.numerify ZIP_FORMATS.sample
|
21
21
|
end
|
22
22
|
|
23
23
|
def city
|
@@ -33,7 +33,7 @@ module Faker
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def street_nbr
|
36
|
-
|
36
|
+
FFaker.numerify STREET_NBR_FORMATS.sample
|
37
37
|
end
|
38
38
|
|
39
39
|
def full_address
|
data/lib/ffaker/address_fr.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'ffaker/address'
|
4
4
|
|
5
|
-
module
|
5
|
+
module FFaker
|
6
6
|
module AddressFR
|
7
|
-
include
|
7
|
+
include FFaker::Address
|
8
8
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
@@ -16,15 +16,15 @@ module Faker
|
|
16
16
|
POSTAL_CODE_FORMATS = ['####', '#####', '97####', '2A###', '2B###']
|
17
17
|
|
18
18
|
def street_address
|
19
|
-
|
19
|
+
FFaker.numerify(NUM.sample) +
|
20
20
|
MOD.sample +
|
21
21
|
SEP.sample +
|
22
22
|
TYPE.sample + ' ' +
|
23
|
-
|
23
|
+
FFaker::NameFR.name
|
24
24
|
end
|
25
25
|
|
26
26
|
def postal_code
|
27
|
-
|
27
|
+
FFaker.numerify POSTAL_CODE_FORMATS.sample
|
28
28
|
end
|
29
29
|
|
30
30
|
def city
|
data/lib/ffaker/address_mx.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
module
|
3
|
+
module FFaker
|
4
4
|
# Author Guapolo <github.com/guapolo>
|
5
5
|
module AddressMX
|
6
6
|
extend ModuleUtils
|
7
7
|
extend self
|
8
8
|
|
9
9
|
def zip_code
|
10
|
-
|
10
|
+
FFaker.numerify('#####')
|
11
11
|
end
|
12
12
|
|
13
13
|
def postal_code
|
14
|
-
|
14
|
+
FFaker.numerify('#####')
|
15
15
|
end
|
16
16
|
|
17
17
|
def state
|