ffaker 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,303 @@
1
+ 021
2
+ 022
3
+ 0231
4
+ 0232
5
+ 0233
6
+ 0234
7
+ 024
8
+ 0251
9
+ 0252
10
+ 0253
11
+ 0254
12
+ 0255
13
+ 0257
14
+ 0260
15
+ 0261
16
+ 0262
17
+ 0263
18
+ 0264
19
+ 0265
20
+ 0266
21
+ 0267
22
+ 0271
23
+ 0272
24
+ 0273
25
+ 0274
26
+ 0275
27
+ 0276
28
+ 0280
29
+ 0281
30
+ 0282
31
+ 0283
32
+ 0284
33
+ 0285
34
+ 0286
35
+ 0287
36
+ 0289
37
+ 0291
38
+ 0292
39
+ 0293
40
+ 0294
41
+ 0295
42
+ 0296
43
+ 0297
44
+ 0298
45
+ 031
46
+ 0321
47
+ 0322
48
+ 0323
49
+ 0324
50
+ 0325
51
+ 0327
52
+ 0328
53
+ 0331
54
+ 0332
55
+ 0333
56
+ 0334
57
+ 0335
58
+ 0336
59
+ 0338
60
+ 0341
61
+ 0342
62
+ 0343
63
+ 0351
64
+ 0352
65
+ 0353
66
+ 0354
67
+ 0355
68
+ 0356
69
+ 0357
70
+ 0358
71
+ 0361
72
+ 0362
73
+ 0363
74
+ 0364
75
+ 0365
76
+ 0366
77
+ 0368
78
+ 0370
79
+ 0371
80
+ 0372
81
+ 0373
82
+ 0374
83
+ 0376
84
+ 0380
85
+ 0381
86
+ 0382
87
+ 0383
88
+ 0384
89
+ 0385
90
+ 0386
91
+ 0387
92
+ 0388
93
+ 0389
94
+ 0401
95
+ 0402
96
+ 0403
97
+ 0404
98
+ 0405
99
+ 0408
100
+ 0411
101
+ 0413
102
+ 0414
103
+ 0417
104
+ 0418
105
+ 0419
106
+ 0420
107
+ 0421
108
+ 0422
109
+ 0423
110
+ 0426
111
+ 0427
112
+ 0428
113
+ 0430
114
+ 0431
115
+ 0432
116
+ 0434
117
+ 0435
118
+ 0438
119
+ 0443
120
+ 0450
121
+ 0451
122
+ 0452
123
+ 0453
124
+ 0457
125
+ 0458
126
+ 0461
127
+ 0462
128
+ 0463
129
+ 0464
130
+ 0465
131
+ 0471
132
+ 0473
133
+ 0481
134
+ 0482
135
+ 0484
136
+ 0485
137
+ 0511
138
+ 0512
139
+ 0513
140
+ 0517
141
+ 0518
142
+ 0519
143
+ 0522
144
+ 0525
145
+ 0526
146
+ 0527
147
+ 0528
148
+ 0531
149
+ 0532
150
+ 0534
151
+ 0536
152
+ 0537
153
+ 0538
154
+ 0539
155
+ 0541
156
+ 0542
157
+ 0543
158
+ 0545
159
+ 0548
160
+ 0549
161
+ 0551
162
+ 0552
163
+ 0553
164
+ 0554
165
+ 0556
166
+ 0561
167
+ 0562
168
+ 0563
169
+ 0564
170
+ 0565
171
+ 0567
172
+ 0568
173
+ 061
174
+ 0620
175
+ 0621
176
+ 0622
177
+ 0623
178
+ 0624
179
+ 0625
180
+ 0626
181
+ 0627
182
+ 0628
183
+ 0629
184
+ 0630
185
+ 0631
186
+ 0632
187
+ 0633
188
+ 0634
189
+ 0635
190
+ 0636
191
+ 0638
192
+ 0639
193
+ 0641
194
+ 0642
195
+ 0643
196
+ 0644
197
+ 0645
198
+ 0646
199
+ 0650
200
+ 0651
201
+ 0652
202
+ 0653
203
+ 0654
204
+ 0655
205
+ 0656
206
+ 0657
207
+ 0658
208
+ 0659
209
+ 0711
210
+ 0712
211
+ 0713
212
+ 0714
213
+ 0715
214
+ 0716
215
+ 0717
216
+ 0718
217
+ 0719
218
+ 0721
219
+ 0722
220
+ 0723
221
+ 0724
222
+ 0725
223
+ 0726
224
+ 0727
225
+ 0728
226
+ 0729
227
+ 0730
228
+ 0731
229
+ 0732
230
+ 0733
231
+ 0734
232
+ 0735
233
+ 0736
234
+ 0737
235
+ 0738
236
+ 0739
237
+ 0740
238
+ 0741
239
+ 0742
240
+ 0743
241
+ 0744
242
+ 0745
243
+ 0746
244
+ 0747
245
+ 0748
246
+ 0751
247
+ 0752
248
+ 0753
249
+ 0754
250
+ 0755
251
+ 0756
252
+ 0757
253
+ 0759
254
+ 0760
255
+ 0761
256
+ 0762
257
+ 0763
258
+ 0764
259
+ 0765
260
+ 0766
261
+ 0767
262
+ 0768
263
+ 0769
264
+ 0771
265
+ 0772
266
+ 0773
267
+ 0776
268
+ 0777
269
+ 0778
270
+ 0779
271
+ 0901
272
+ 0902
273
+ 0910
274
+ 0911
275
+ 0913
276
+ 0914
277
+ 0915
278
+ 0916
279
+ 0917
280
+ 0918
281
+ 0921
282
+ 0922
283
+ 0923
284
+ 0924
285
+ 0927
286
+ 0929
287
+ 0931
288
+ 0951
289
+ 0952
290
+ 0955
291
+ 0956
292
+ 0957
293
+ 0966
294
+ 0967
295
+ 0969
296
+ 0971
297
+ 0975
298
+ 0980
299
+ 0981
300
+ 0983
301
+ 0984
302
+ 0985
303
+ 0986
@@ -0,0 +1,33 @@
1
+ 0811
2
+ 0812
3
+ 0813
4
+ 0814
5
+ 0815
6
+ 0816
7
+ 0817
8
+ 0818
9
+ 0819
10
+ 0821
11
+ 0822
12
+ 0823
13
+ 0851
14
+ 0852
15
+ 0853
16
+ 0855
17
+ 0856
18
+ 0857
19
+ 0858
20
+ 0859
21
+ 0877
22
+ 0878
23
+ 0881
24
+ 0882
25
+ 0883
26
+ 0884
27
+ 0885
28
+ 0886
29
+ 0887
30
+ 0896
31
+ 0897
32
+ 0898
33
+ 0899
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ # encoding: utf-8
3
+
4
+ module FFaker
5
+ module GenderID
6
+ extend ModuleUtils
7
+ extend self
8
+
9
+ GENDERS = %w(laki-laki perempuan).freeze
10
+
11
+ def random
12
+ fetch_sample(GENDERS)
13
+ end
14
+
15
+ alias maybe random
16
+ alias sample random
17
+ end
18
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ module FFaker
5
+ module LoremRU
6
+ extend ModuleUtils
7
+ extend self
8
+
9
+ def word
10
+ fetch_sample(WORDS)
11
+ end
12
+
13
+ def words(num = 3)
14
+ fetch_sample(WORDS, count: num)
15
+ end
16
+
17
+ def sentence(word_count = 7)
18
+ elements = words(word_count + rand(10))
19
+ elements.insert(rand(3..(elements.count - 3)), ',') if elements.count > 10
20
+ result = elements.join(' ').gsub(' , ', ', ')
21
+ capitalize_russian("#{result}#{sentence_type_mark}")
22
+ end
23
+
24
+ alias phrase sentence
25
+
26
+ def sentences(sentence_count = 3)
27
+ (1..sentence_count).map { sentence }
28
+ end
29
+
30
+ alias phrases sentences
31
+
32
+ def paragraph(sentence_count = 5)
33
+ sentences(sentence_count + rand(3)).join(' ')
34
+ end
35
+
36
+ def paragraphs(paragraph_count = 3)
37
+ (1..paragraph_count).map { paragraph }
38
+ end
39
+
40
+ private
41
+
42
+ def sentence_type_mark
43
+ case rand(10)
44
+ when 0..7 then '.'
45
+ when 8 then '!'
46
+ when 9 then '?'
47
+ end
48
+ end
49
+
50
+ def capitalize_russian(string)
51
+ if CAPITAL_CHARS.include?(string[0])
52
+ string
53
+ else
54
+ CAPITAL_CHARS[CHARS.index(string[0])] + string[1..-1]
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+ # encoding: utf-8
3
+
4
+ module FFaker
5
+ module NameID
6
+ extend ModuleUtils
7
+ extend self
8
+
9
+ MALE_PREFIXES = %w(Tn.).freeze
10
+ FEMALE_PREFIXES = %w(Ny. Nn.).freeze
11
+ PREFIXES = (MALE_PREFIXES + FEMALE_PREFIXES).freeze
12
+ FIRST_NAMES = (FIRST_NAMES_FEMALE + FIRST_NAMES_MALE).freeze
13
+
14
+ def name
15
+ "#{first_name} #{last_name}"
16
+ end
17
+
18
+ def name_with_prefix
19
+ fetch_sample(
20
+ [
21
+ female_name_with_prefix,
22
+ male_name_with_prefix
23
+ ]
24
+ )
25
+ end
26
+
27
+ def female_name_with_prefix
28
+ "#{female_prefix} #{first_name_female} #{last_name}"
29
+ end
30
+
31
+ def male_name_with_prefix
32
+ "#{male_prefix} #{first_name_male} #{last_name}"
33
+ end
34
+
35
+ def first_name
36
+ fetch_sample(FIRST_NAMES)
37
+ end
38
+
39
+ def first_name_female
40
+ fetch_sample(FIRST_NAMES_FEMALE)
41
+ end
42
+
43
+ def first_name_male
44
+ fetch_sample(FIRST_NAMES_MALE)
45
+ end
46
+
47
+ def last_name
48
+ fetch_sample(LAST_NAMES)
49
+ end
50
+
51
+ def prefix
52
+ fetch_sample(PREFIXES)
53
+ end
54
+
55
+ def female_prefix
56
+ fetch_sample(FEMALE_PREFIXES)
57
+ end
58
+
59
+ def male_prefix
60
+ fetch_sample(MALE_PREFIXES)
61
+ end
62
+ end
63
+ end