ffaker 1.31.0 → 1.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/ffaker.gemspec +11 -3
- data/lib/ffaker.rb +2 -2
- data/lib/ffaker/address.rb +4 -6
- data/lib/ffaker/address_au.rb +26 -29
- data/lib/ffaker/address_br.rb +2 -2
- data/lib/ffaker/address_ca.rb +7 -3
- data/lib/ffaker/address_da.rb +6 -9
- data/lib/ffaker/address_de.rb +1 -3
- data/lib/ffaker/address_fi.rb +3 -3
- data/lib/ffaker/address_fr.rb +6 -6
- data/lib/ffaker/address_nl.rb +2 -2
- data/lib/ffaker/address_se.rb +3 -4
- data/lib/ffaker/address_uk.rb +3 -3
- data/lib/ffaker/address_us.rb +4 -4
- data/lib/ffaker/company.rb +4 -4
- data/lib/ffaker/company_it.rb +3 -4
- data/lib/ffaker/company_se.rb +2 -3
- data/lib/ffaker/currency.rb +16 -0
- data/lib/ffaker/data/address_ca/city +181 -0
- data/lib/ffaker/data/currency/currency_code +169 -0
- data/lib/ffaker/data/currency/currency_name +169 -0
- data/lib/ffaker/data/lorem_kr/words +47 -0
- data/lib/ffaker/education.rb +8 -7
- data/lib/ffaker/geolocation.rb +1 -1
- data/lib/ffaker/html_ipsum.rb +1 -1
- data/lib/ffaker/identification.rb +3 -3
- data/lib/ffaker/identification_es.rb +2 -3
- data/lib/ffaker/identification_es_co.rb +4 -3
- data/lib/ffaker/identification_mx.rb +4 -5
- data/lib/ffaker/internet.rb +7 -7
- data/lib/ffaker/internet_se.rb +8 -8
- data/lib/ffaker/job_fr.rb +1 -1
- data/lib/ffaker/lorem_kr.rb +36 -0
- data/lib/ffaker/movie.rb +6 -7
- data/lib/ffaker/name.rb +3 -3
- data/lib/ffaker/name_br.rb +2 -2
- data/lib/ffaker/name_cs.rb +11 -14
- data/lib/ffaker/name_da.rb +2 -1
- 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_mx.rb +3 -3
- data/lib/ffaker/name_nb.rb +2 -2
- data/lib/ffaker/name_nl.rb +2 -2
- data/lib/ffaker/name_ru.rb +19 -18
- data/lib/ffaker/name_se.rb +2 -2
- data/lib/ffaker/name_sn.rb +2 -2
- data/lib/ffaker/nato_alphabet.rb +2 -2
- data/lib/ffaker/phone_number_cu.rb +133 -0
- data/lib/ffaker/phone_number_fr.rb +5 -5
- data/lib/ffaker/phone_number_it.rb +3 -3
- data/lib/ffaker/phone_number_nl.rb +6 -9
- data/lib/ffaker/phone_number_se.rb +12 -13
- data/lib/ffaker/product.rb +6 -6
- data/lib/ffaker/ssn_se.rb +2 -2
- data/lib/ffaker/string.rb +6 -6
- data/lib/ffaker/time.rb +2 -2
- data/lib/ffaker/unit.rb +13 -14
- data/lib/ffaker/unit_english.rb +35 -38
- data/lib/ffaker/unit_metric.rb +26 -30
- data/lib/ffaker/utils/array_utils.rb +1 -1
- data/lib/ffaker/vehicle.rb +7 -8
- data/test/test_address_ca.rb +4 -0
- data/test/test_identification_co.rb +7 -13
- data/test/test_lorem_kr.rb +47 -0
- data/test/test_name_cn.rb +9 -1
- data/test/test_phone_number_cu.rb +86 -0
- data/test/test_ssn_se.rb +6 -7
- metadata +13 -3
- data/lib/ffaker/course_fr.rb +0 -22
data/test/test_ssn_se.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
5
|
-
class
|
5
|
+
class TestSSNSE < Test::Unit::TestCase
|
6
6
|
|
7
7
|
def test_ssn_format
|
8
8
|
ssn = Faker::SSNSE.ssn
|
@@ -14,14 +14,14 @@ class TestSSN < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_ssn_with_gender
|
17
|
-
ssn_male = Faker::SSNSE.ssn(:
|
17
|
+
ssn_male = Faker::SSNSE.ssn(gender: :male)
|
18
18
|
assert is_equal?(ssn_male[10].to_i)
|
19
19
|
|
20
|
-
ssn_female = Faker::SSNSE.ssn(:
|
20
|
+
ssn_female = Faker::SSNSE.ssn(gender: :female)
|
21
21
|
assert is_equal?(ssn_female[10].to_i)
|
22
22
|
|
23
23
|
assert_raise ArgumentError do
|
24
|
-
Faker::SSNSE.ssn(:
|
24
|
+
Faker::SSNSE.ssn(gender: :unkown)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -30,14 +30,13 @@ class TestSSN < Test::Unit::TestCase
|
|
30
30
|
from = Time.local(1980, 2, 28)
|
31
31
|
to = Time.local(2000, 2, 28)
|
32
32
|
|
33
|
-
ssn = Faker::SSNSE.ssn(:
|
33
|
+
ssn = Faker::SSNSE.ssn(from: from, to: to)
|
34
34
|
year = ssn[0..3].to_i
|
35
35
|
month = ssn[4..5].to_i
|
36
36
|
day = ssn[6..7].to_i
|
37
37
|
ssn_birth_date = Time.local(year, month, day)
|
38
|
-
|
39
38
|
assert ssn_birth_date < to
|
40
|
-
assert ssn_birth_date
|
39
|
+
assert ssn_birth_date >= from
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.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: 2015-
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -75,8 +75,8 @@ files:
|
|
75
75
|
- lib/ffaker/company_it.rb
|
76
76
|
- lib/ffaker/company_se.rb
|
77
77
|
- lib/ffaker/conference.rb
|
78
|
-
- lib/ffaker/course_fr.rb
|
79
78
|
- lib/ffaker/courses.rb
|
79
|
+
- lib/ffaker/currency.rb
|
80
80
|
- lib/ffaker/data/address/city_suffixes
|
81
81
|
- lib/ffaker/data/address/country
|
82
82
|
- lib/ffaker/data/address/country_code
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/ffaker/data/address_br/city
|
86
86
|
- lib/ffaker/data/address_br/state
|
87
87
|
- lib/ffaker/data/address_br/state_abbr
|
88
|
+
- lib/ffaker/data/address_ca/city
|
88
89
|
- lib/ffaker/data/address_ca/province
|
89
90
|
- lib/ffaker/data/address_da/city
|
90
91
|
- lib/ffaker/data/address_da/kommune
|
@@ -119,6 +120,8 @@ files:
|
|
119
120
|
- lib/ffaker/data/company/catch_pre
|
120
121
|
- lib/ffaker/data/company/position_areas
|
121
122
|
- lib/ffaker/data/conference/conference_list
|
123
|
+
- lib/ffaker/data/currency/currency_code
|
124
|
+
- lib/ffaker/data/currency/currency_name
|
122
125
|
- lib/ffaker/data/dizzle_ipsum/dizzle_words
|
123
126
|
- lib/ffaker/data/education/major_noun
|
124
127
|
- lib/ffaker/data/education/school_suffix
|
@@ -143,6 +146,7 @@ files:
|
|
143
146
|
- lib/ffaker/data/lorem_ar/words
|
144
147
|
- lib/ffaker/data/lorem_cn/words
|
145
148
|
- lib/ffaker/data/lorem_fr/words
|
149
|
+
- lib/ffaker/data/lorem_kr/words
|
146
150
|
- lib/ffaker/data/mathematiques/lessons
|
147
151
|
- lib/ffaker/data/movie/adj_and_adv
|
148
152
|
- lib/ffaker/data/movie/nouns
|
@@ -233,6 +237,7 @@ files:
|
|
233
237
|
- lib/ffaker/lorem_ar.rb
|
234
238
|
- lib/ffaker/lorem_cn.rb
|
235
239
|
- lib/ffaker/lorem_fr.rb
|
240
|
+
- lib/ffaker/lorem_kr.rb
|
236
241
|
- lib/ffaker/movie.rb
|
237
242
|
- lib/ffaker/name.rb
|
238
243
|
- lib/ffaker/name_br.rb
|
@@ -257,6 +262,7 @@ files:
|
|
257
262
|
- lib/ffaker/nato_alphabet.rb
|
258
263
|
- lib/ffaker/phone_number.rb
|
259
264
|
- lib/ffaker/phone_number_au.rb
|
265
|
+
- lib/ffaker/phone_number_cu.rb
|
260
266
|
- lib/ffaker/phone_number_da.rb
|
261
267
|
- lib/ffaker/phone_number_de.rb
|
262
268
|
- lib/ffaker/phone_number_fr.rb
|
@@ -335,6 +341,7 @@ files:
|
|
335
341
|
- test/test_lorem_ar.rb
|
336
342
|
- test/test_lorem_cn.rb
|
337
343
|
- test/test_lorem_fr.rb
|
344
|
+
- test/test_lorem_kr.rb
|
338
345
|
- test/test_module_utils.rb
|
339
346
|
- test/test_movie.rb
|
340
347
|
- test/test_name.rb
|
@@ -358,6 +365,7 @@ files:
|
|
358
365
|
- test/test_nato_alphabet.rb
|
359
366
|
- test/test_phone_number.rb
|
360
367
|
- test/test_phone_number_au.rb
|
368
|
+
- test/test_phone_number_cu.rb
|
361
369
|
- test/test_phone_number_de.rb
|
362
370
|
- test/test_phone_number_kr.rb
|
363
371
|
- test/test_phone_number_mx.rb
|
@@ -452,6 +460,7 @@ test_files:
|
|
452
460
|
- test/test_lorem_ar.rb
|
453
461
|
- test/test_lorem_cn.rb
|
454
462
|
- test/test_lorem_fr.rb
|
463
|
+
- test/test_lorem_kr.rb
|
455
464
|
- test/test_module_utils.rb
|
456
465
|
- test/test_movie.rb
|
457
466
|
- test/test_name.rb
|
@@ -475,6 +484,7 @@ test_files:
|
|
475
484
|
- test/test_nato_alphabet.rb
|
476
485
|
- test/test_phone_number.rb
|
477
486
|
- test/test_phone_number_au.rb
|
487
|
+
- test/test_phone_number_cu.rb
|
478
488
|
- test/test_phone_number_de.rb
|
479
489
|
- test/test_phone_number_kr.rb
|
480
490
|
- test/test_phone_number_mx.rb
|
data/lib/ffaker/course_fr.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Faker
|
4
|
-
module Courses
|
5
|
-
|
6
|
-
module Mathematiques
|
7
|
-
extend ModuleUtils
|
8
|
-
extend self
|
9
|
-
def lesson
|
10
|
-
LESSONS.sample
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
module Philosophie
|
15
|
-
extend ModuleUtils
|
16
|
-
extend self
|
17
|
-
def lesson
|
18
|
-
LESSONS.sample
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|