ffaker 1.23.0 → 1.24.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,232 @@
1
+ 004191
2
+ 010
3
+ 011
4
+ 0121
5
+ 0122
6
+ 0123
7
+ 0124
8
+ 0125
9
+ 0131
10
+ 0141
11
+ 0142
12
+ 0143
13
+ 0144
14
+ 015
15
+ 0161
16
+ 0163
17
+ 0165
18
+ 0166
19
+ 0171
20
+ 0172
21
+ 0173
22
+ 0174
23
+ 0175
24
+ 0182
25
+ 0183
26
+ 0184
27
+ 0185
28
+ 0187
29
+ 019
30
+ 02
31
+ 030
32
+ 031
33
+ 0321
34
+ 0322
35
+ 0323
36
+ 0324
37
+ 0331
38
+ 0332
39
+ 0341
40
+ 0342
41
+ 0343
42
+ 0344
43
+ 0345
44
+ 0346
45
+ 035
46
+ 0362
47
+ 0363
48
+ 0364
49
+ 0365
50
+ 0371
51
+ 0372
52
+ 0373
53
+ 0374
54
+ 0375
55
+ 0376
56
+ 0377
57
+ 0381
58
+ 0382
59
+ 0383
60
+ 0384
61
+ 0385
62
+ 0386
63
+ 039
64
+ 040
65
+ 041
66
+ 0421
67
+ 0422
68
+ 0423
69
+ 0424
70
+ 0425
71
+ 0426
72
+ 0427
73
+ 0428
74
+ 0429
75
+ 0431
76
+ 0432
77
+ 0433
78
+ 0434
79
+ 0435
80
+ 0436
81
+ 0437
82
+ 0438
83
+ 0439
84
+ 0442
85
+ 0444
86
+ 0445
87
+ 045
88
+ 0461
89
+ 0462
90
+ 0463
91
+ 0464
92
+ 0465
93
+ 0471
94
+ 0472
95
+ 0473
96
+ 0474
97
+ 0481
98
+ 049
99
+ 050
100
+ 051
101
+ 0521
102
+ 0522
103
+ 0523
104
+ 0524
105
+ 0525
106
+ 0532
107
+ 0533
108
+ 0534
109
+ 0535
110
+ 0536
111
+ 0541
112
+ 0542
113
+ 0543
114
+ 0544
115
+ 0545
116
+ 0546
117
+ 0547
118
+ 055
119
+ 0564
120
+ 0565
121
+ 0566
122
+ 0571
123
+ 0572
124
+ 0573
125
+ 0574
126
+ 0575
127
+ 0577
128
+ 0578
129
+ 0583
130
+ 0584
131
+ 0585
132
+ 0586
133
+ 0587
134
+ 0588
135
+ 059
136
+ 06
137
+ 070
138
+ 071
139
+ 0721
140
+ 0722
141
+ 0731
142
+ 0732
143
+ 0733
144
+ 0734
145
+ 0735
146
+ 0736
147
+ 0737
148
+ 0742
149
+ 0743
150
+ 0744
151
+ 0746
152
+ 075
153
+ 0761
154
+ 0763
155
+ 0765
156
+ 0766
157
+ 0771
158
+ 0773
159
+ 0774
160
+ 0775
161
+ 0776
162
+ 0781
163
+ 0782
164
+ 0783
165
+ 0784
166
+ 0785
167
+ 0789
168
+ 079
169
+ 080
170
+ 081
171
+ 0823
172
+ 0824
173
+ 0825
174
+ 0827
175
+ 0828
176
+ 0831
177
+ 0832
178
+ 0833
179
+ 0835
180
+ 0836
181
+ 085
182
+ 0861
183
+ 0862
184
+ 0863
185
+ 0864
186
+ 0865
187
+ 0871
188
+ 0872
189
+ 0873
190
+ 0874
191
+ 0875
192
+ 0881
193
+ 0882
194
+ 0883
195
+ 0884
196
+ 0885
197
+ 089
198
+ 090
199
+ 091
200
+ 0921
201
+ 0922
202
+ 0923
203
+ 0924
204
+ 0925
205
+ 0931
206
+ 0932
207
+ 0933
208
+ 0934
209
+ 0935
210
+ 0941
211
+ 0942
212
+ 095
213
+ 0961
214
+ 0962
215
+ 0963
216
+ 0964
217
+ 0965
218
+ 0966
219
+ 0967
220
+ 0968
221
+ 0971
222
+ 0972
223
+ 0973
224
+ 0974
225
+ 0975
226
+ 0976
227
+ 0981
228
+ 0982
229
+ 0983
230
+ 0984
231
+ 0985
232
+ 099
@@ -0,0 +1,18 @@
1
+ 320
2
+ 325
3
+ 326
4
+ 328
5
+ 329
6
+ 333
7
+ 334
8
+ 335
9
+ 337
10
+ 338
11
+ 339
12
+ 340
13
+ 344
14
+ 345
15
+ 346
16
+ 347
17
+ 348
18
+ 349
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+
3
+ module Faker
4
+ module Locale
5
+ extend ModuleUtils
6
+ extend self
7
+
8
+ def code(given_language = nil)
9
+ code_index = LANGUAGE.index(given_language)
10
+ if given_language && code_index
11
+ LANGUAGE_CODE[code_index]
12
+ else
13
+ LANGUAGE_CODE.rand
14
+ end
15
+ end
16
+
17
+ def language(given_code = nil)
18
+ language_index = LANGUAGE_CODE.index(given_code.upcase)
19
+ if given_code && language_index
20
+ LANGUAGE[language_index]
21
+ else
22
+ LANGUAGE.rand
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -1,16 +1,14 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Faker
4
- # Author PapePathe<pathe.sene@gmail.com> github.com/PapePathe
5
- # The names & first names in this module were found at this url
6
- # https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/fr_FR/Person.php
4
+ # Author microspino<info@microspino.com> github.com/microspino
7
5
  module NameIT
8
6
  extend ModuleUtils
9
7
  extend self
10
8
 
11
9
  PREFIX = k %w(Sig. Sig.ra Sig.na Dr. Dott. Dott.ssa Prof. Prof.ssa)
12
10
 
13
- # randomized? (FRENCH) prefix!
11
+ # randomized? (ITALIAN) prefix!
14
12
  #
15
13
  def prefix
16
14
  PREFIX.rand
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ module Faker
4
+ # Source: http://www.thai-language.com/
5
+ module NameTH
6
+ extend ModuleUtils
7
+ extend self
8
+
9
+ def first_name
10
+ FIRST_NAMES.rand
11
+ end
12
+
13
+ def last_name
14
+ LAST_NAMES.rand
15
+ end
16
+
17
+ def nick_name
18
+ NICK_NAMES.rand
19
+ end
20
+
21
+ def name
22
+ "#{first_name} #{last_name}"
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,42 @@
1
+ # encoding: utf-8
2
+
3
+ module Faker
4
+ module PhoneNumberIT
5
+ extend ModuleUtils
6
+ extend self
7
+
8
+ def phone_number
9
+ if rand(0..1) == 1
10
+ home_phone_number
11
+ else
12
+ mobile_phone_number
13
+ end
14
+ end
15
+
16
+ def home_phone_number
17
+ number HOME_PHONE_PREFIXES
18
+ end
19
+
20
+ def mobile_phone_number
21
+ number MOBILE_PHONE_PREFIXES
22
+ end
23
+
24
+ def number(prefixes)
25
+ p = [
26
+ COUNTRY_PREFIX.rand,
27
+ prefixes.rand,
28
+ random_space,
29
+ PHONE_NUMBER.rand
30
+ ].join('')
31
+
32
+ Faker.numerify p
33
+ end
34
+
35
+ def random_space
36
+ rand(0..1) == 1 ? ' ' : ''
37
+ end
38
+
39
+ COUNTRY_PREFIX = k ['+39', '0039', '+39 ', '0039 ']
40
+ PHONE_NUMBER = k ['######', '########']
41
+ end
42
+ end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ require 'helper'
4
+
5
+ class TestCompanyIT < Test::Unit::TestCase
6
+
7
+ def test_name
8
+ assert_match(/[ a-z]+/, Faker::CompanyIT.name)
9
+ end
10
+
11
+ def test_suffix
12
+ assert_match(/[ a-z]+/i, Faker::CompanyIT.suffix)
13
+ end
14
+
15
+ def test_prefix
16
+ assert_match(/[ a-z]+/i, Faker::CompanyIT.prefix)
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ # encoding: utf-8
2
+
3
+ require 'helper'
4
+
5
+ class TestFakerNameTH < Test::Unit::TestCase
6
+
7
+ def setup
8
+ @tester = Faker::NameTH
9
+ end
10
+
11
+ def test_last_name
12
+ assert Faker::NameTH::LAST_NAMES.include?(@tester.last_name)
13
+ end
14
+
15
+ def test_first_name
16
+ assert Faker::NameTH::FIRST_NAMES.include?(@tester.first_name)
17
+ end
18
+
19
+ def test_nick_name
20
+ assert Faker::NameTH::NICK_NAMES.include?(@tester.nick_name)
21
+ end
22
+
23
+ def test_name
24
+ parts = @tester.name.split(' ')
25
+ assert Faker::NameTH::FIRST_NAMES.include?(parts[0])
26
+ assert Faker::NameTH::LAST_NAMES.include?(parts[1])
27
+ end
28
+
29
+ end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.0
4
+ version: 1.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Oga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-24 00:00:00.000000000 Z
11
+ date: 2014-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 10.1.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 10.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: test-unit
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +68,7 @@ files:
68
68
  - lib/ffaker/address_us.rb
69
69
  - lib/ffaker/bacon_ipsum.rb
70
70
  - lib/ffaker/company.rb
71
+ - lib/ffaker/company_it.rb
71
72
  - lib/ffaker/company_se.rb
72
73
  - lib/ffaker/conference.rb
73
74
  - lib/ffaker/data/address/city_suffixes
@@ -116,6 +117,8 @@ files:
116
117
  - lib/ffaker/data/job/job_prefix
117
118
  - lib/ffaker/data/job_fr/job_nouns
118
119
  - lib/ffaker/data/job_fr/job_prefixes
120
+ - lib/ffaker/data/locale/language
121
+ - lib/ffaker/data/locale/language_code
119
122
  - lib/ffaker/data/lorem/characters
120
123
  - lib/ffaker/data/lorem/words
121
124
  - lib/ffaker/data/lorem_ar/words
@@ -160,9 +163,14 @@ files:
160
163
  - lib/ffaker/data/name_sn/first_names_female
161
164
  - lib/ffaker/data/name_sn/first_names_male
162
165
  - lib/ffaker/data/name_sn/last_names
166
+ - lib/ffaker/data/name_th/first_names
167
+ - lib/ffaker/data/name_th/last_names
168
+ - lib/ffaker/data/name_th/nick_names
163
169
  - lib/ffaker/data/name_vn/first_names
164
170
  - lib/ffaker/data/name_vn/last_names
165
171
  - lib/ffaker/data/name_vn/middle_names
172
+ - lib/ffaker/data/phone_number_it/home_phone_prefixes
173
+ - lib/ffaker/data/phone_number_it/mobile_phone_prefixes
166
174
  - lib/ffaker/data/phone_number_se/phone_prefix
167
175
  - lib/ffaker/data/product/adj
168
176
  - lib/ffaker/data/product/b1
@@ -185,6 +193,7 @@ files:
185
193
  - lib/ffaker/internet_se.rb
186
194
  - lib/ffaker/job.rb
187
195
  - lib/ffaker/job_fr.rb
196
+ - lib/ffaker/locale.rb
188
197
  - lib/ffaker/lorem.rb
189
198
  - lib/ffaker/lorem_ar.rb
190
199
  - lib/ffaker/lorem_cn.rb
@@ -207,6 +216,7 @@ files:
207
216
  - lib/ffaker/name_ru.rb
208
217
  - lib/ffaker/name_se.rb
209
218
  - lib/ffaker/name_sn.rb
219
+ - lib/ffaker/name_th.rb
210
220
  - lib/ffaker/name_vn.rb
211
221
  - lib/ffaker/nato_alphabet.rb
212
222
  - lib/ffaker/phone_number.rb
@@ -214,6 +224,7 @@ files:
214
224
  - lib/ffaker/phone_number_da.rb
215
225
  - lib/ffaker/phone_number_de.rb
216
226
  - lib/ffaker/phone_number_fr.rb
227
+ - lib/ffaker/phone_number_it.rb
217
228
  - lib/ffaker/phone_number_mx.rb
218
229
  - lib/ffaker/phone_number_se.rb
219
230
  - lib/ffaker/phone_number_sg.rb
@@ -248,6 +259,7 @@ files:
248
259
  - test/test_array_utils.rb
249
260
  - test/test_bacon_ipsum.rb
250
261
  - test/test_company.rb
262
+ - test/test_company_it.rb
251
263
  - test/test_company_se.rb
252
264
  - test/test_conference.rb
253
265
  - test/test_dizzle_ipsum.rb
@@ -287,6 +299,7 @@ files:
287
299
  - test/test_name_ru.rb
288
300
  - test/test_name_se.rb
289
301
  - test/test_name_sn.rb
302
+ - test/test_name_th.rb
290
303
  - test/test_nato_alphabet.rb
291
304
  - test/test_phone_number.rb
292
305
  - test/test_phone_number_au.rb
@@ -344,6 +357,7 @@ test_files:
344
357
  - test/test_array_utils.rb
345
358
  - test/test_bacon_ipsum.rb
346
359
  - test/test_company.rb
360
+ - test/test_company_it.rb
347
361
  - test/test_company_se.rb
348
362
  - test/test_conference.rb
349
363
  - test/test_dizzle_ipsum.rb
@@ -383,6 +397,7 @@ test_files:
383
397
  - test/test_name_ru.rb
384
398
  - test/test_name_se.rb
385
399
  - test/test_name_sn.rb
400
+ - test/test_name_th.rb
386
401
  - test/test_nato_alphabet.rb
387
402
  - test/test_phone_number.rb
388
403
  - test/test_phone_number_au.rb