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
@@ -0,0 +1,47 @@
|
|
1
|
+
가슴
|
2
|
+
가을
|
3
|
+
공활한데
|
4
|
+
괴로우나
|
5
|
+
구름
|
6
|
+
기상과
|
7
|
+
기상일세
|
8
|
+
길이
|
9
|
+
나라
|
10
|
+
남산
|
11
|
+
높고
|
12
|
+
다하여
|
13
|
+
달은
|
14
|
+
닳도록
|
15
|
+
대한
|
16
|
+
대한으로
|
17
|
+
동해
|
18
|
+
두른
|
19
|
+
듯
|
20
|
+
마르고
|
21
|
+
만세
|
22
|
+
맘으로
|
23
|
+
무궁화
|
24
|
+
물과
|
25
|
+
바람서리
|
26
|
+
밝은
|
27
|
+
백두산이
|
28
|
+
보우하사
|
29
|
+
보전하세
|
30
|
+
불변함은
|
31
|
+
사람
|
32
|
+
사랑하세
|
33
|
+
삼천리
|
34
|
+
소나무
|
35
|
+
없이
|
36
|
+
우리
|
37
|
+
우리나라
|
38
|
+
위에
|
39
|
+
이
|
40
|
+
일편단심일세
|
41
|
+
저
|
42
|
+
즐거우나
|
43
|
+
철갑을
|
44
|
+
충성을
|
45
|
+
하느님이
|
46
|
+
하늘
|
47
|
+
화려강산
|
data/lib/ffaker/education.rb
CHANGED
@@ -5,6 +5,14 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
DEGREE_SHORT_PREFIX = %w(AB BS BSc MA MD DMus DPhil)
|
9
|
+
DEGREE_PREFIX = ['Bachelor of Science', 'Bachelor of Arts', 'Master of Arts', 'Doctor of Medicine', 'Bachelor of Music', 'Doctor of Philosophy']
|
10
|
+
MAJOR_ADJ = %w(Business Systems Industrial Medical Financial Marketing Political Social) + ['Human Resource']
|
11
|
+
SCHOOL_PREFIX = %w(Green South North Wind Lake Hill Lark River Red White)
|
12
|
+
SCHOOL_ADJ = %w(International Global Polytechnic National)
|
13
|
+
SCHOOL_TYPE = %w(School University College Institution Academy)
|
14
|
+
SCHOOL_UNI = %w(University College)
|
15
|
+
|
8
16
|
def degree_short
|
9
17
|
"#{DEGREE_SHORT_PREFIX.sample} in #{major}"
|
10
18
|
end
|
@@ -37,12 +45,5 @@ module Faker
|
|
37
45
|
end
|
38
46
|
end
|
39
47
|
|
40
|
-
DEGREE_SHORT_PREFIX = k %w(AB BS BSc MA MD DMus DPhil)
|
41
|
-
DEGREE_PREFIX = k ['Bachelor of Science', 'Bachelor of Arts', 'Master of Arts', 'Doctor of Medicine', 'Bachelor of Music', 'Doctor of Philosophy']
|
42
|
-
MAJOR_ADJ = k(%w(Business Systems Industrial Medical Financial Marketing Political Social) + ['Human Resource'])
|
43
|
-
SCHOOL_PREFIX = k %w(Green South North Wind Lake Hill Lark River Red White)
|
44
|
-
SCHOOL_ADJ = k %w(International Global Polytechnic National)
|
45
|
-
SCHOOL_TYPE = k %w(School University College Institution Academy)
|
46
|
-
SCHOOL_UNI = k %w(University College)
|
47
48
|
end
|
48
49
|
end
|
data/lib/ffaker/geolocation.rb
CHANGED
@@ -13,7 +13,7 @@ module Faker
|
|
13
13
|
LATLNG.sample[1]
|
14
14
|
end
|
15
15
|
|
16
|
-
LATLNG =
|
16
|
+
LATLNG = [
|
17
17
|
[41.022921,-73.667595], [41.017643,-73.769264], [40.89505,-73.83582], [41.018461,-73.66616],
|
18
18
|
[40.6665875097692,-73.8830092325694], [40.6784867492198,-73.9716387729985], [40.5998084142575,-73.9385565185842],
|
19
19
|
[40.6175673160943,-74.0002511295821], [40.7451545655034,-73.971855164776], [40.7143394939935,-73.9783896644132],
|
data/lib/ffaker/html_ipsum.rb
CHANGED
@@ -12,7 +12,7 @@ module Faker
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def p(count = 3, options = {})
|
15
|
-
options = {:
|
15
|
+
options = {fancy: false, include_breaks: false}.merge(options)
|
16
16
|
if options[:fancy]
|
17
17
|
s = fancy_string(count, options[:include_breaks])
|
18
18
|
else
|
@@ -5,6 +5,9 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
ETHNICITIES = ['African American', 'Asian/Pacific Islander', 'Caucasian', 'Hispanic', 'Native American', 'Multiracial', 'Other', 'Prefer not to respond']
|
9
|
+
GENDERS = %w(Male Female)
|
10
|
+
|
8
11
|
def drivers_license
|
9
12
|
Faker.bothify('?###-###-##-###-#').upcase
|
10
13
|
end
|
@@ -20,8 +23,5 @@ module Faker
|
|
20
23
|
def gender
|
21
24
|
GENDERS.sample
|
22
25
|
end
|
23
|
-
|
24
|
-
ETHNICITIES = k ['African American', 'Asian/Pacific Islander', 'Caucasian', 'Hispanic', 'Native American', 'Multiracial', 'Other', 'Prefer not to respond']
|
25
|
-
GENDERS = k %w(Male Female)
|
26
26
|
end
|
27
27
|
end
|
@@ -1,15 +1,18 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'ffaker/identification_es'
|
4
|
+
require "date"
|
4
5
|
|
5
6
|
module Faker
|
6
7
|
module IdentificationESCO
|
7
8
|
include IdentificationES
|
8
9
|
|
9
10
|
extend ModuleUtils
|
10
|
-
require "date"
|
11
11
|
extend self
|
12
12
|
|
13
|
+
BLOOD_TYPE = %w(A B O AB)
|
14
|
+
LICENSE_CATEGORY = %w(A B C)
|
15
|
+
|
13
16
|
def drivers_license
|
14
17
|
how_many_numbers = 6 + rand(8)
|
15
18
|
Faker.numerify("#" * how_many_numbers)
|
@@ -34,7 +37,5 @@ module Faker
|
|
34
37
|
today - rand(today.year)
|
35
38
|
end
|
36
39
|
|
37
|
-
BLOOD_TYPE = k %w(A B O AB)
|
38
|
-
LICENSE_CATEGORY = k %w(A B C)
|
39
40
|
end
|
40
41
|
end
|
@@ -8,6 +8,10 @@ module Faker
|
|
8
8
|
extend ModuleUtils
|
9
9
|
extend self
|
10
10
|
|
11
|
+
CONSONANTS = ["B","C","D","F","G","H","J","K","L","M","N","P","Q","R","S","T","V","W","X","Y","Z"]
|
12
|
+
VOWELS = ["A","E","I","O","U"]
|
13
|
+
HOMOCLAVE = CONSONANTS + VOWELS + [*'0'..'9']
|
14
|
+
|
11
15
|
# http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
|
12
16
|
# Registro Federal de Contribuyentes (R.F.C.) para persona física
|
13
17
|
def rfc_persona_fisica
|
@@ -40,10 +44,5 @@ module Faker
|
|
40
44
|
date = ::Time.at(rand * ::Time.now.to_f).strftime("%y%m%d")
|
41
45
|
"#{CONSONANTS.sample}#{VOWELS.sample}#{ArrayUtils.random_pick(all_letters,2).join}#{date}#{hm.sample}#{ESTADOS_CURP.sample}#{ArrayUtils.random_pick(CONSONANTS,3).join}#{HOMOCLAVE.sample}#{rand(10)}"
|
42
46
|
end
|
43
|
-
|
44
|
-
|
45
|
-
CONSONANTS = ["B","C","D","F","G","H","J","K","L","M","N","P","Q","R","S","T","V","W","X","Y","Z"]
|
46
|
-
VOWELS = ["A","E","I","O","U"]
|
47
|
-
HOMOCLAVE = CONSONANTS + VOWELS + (0..9).to_a.map{|n| n.to_s}
|
48
47
|
end
|
49
48
|
end
|
data/lib/ffaker/internet.rb
CHANGED
@@ -5,6 +5,12 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
BYTE = [*'0'..'255']
|
9
|
+
HOSTS = %w(gmail.com yahoo.com hotmail.com)
|
10
|
+
DISPOSABLE_HOSTS = %w(mailinator.com suremail.info spamherelots.com binkmail.com safetymail.info)
|
11
|
+
DOMAIN_SUFFIXES = %w(co.uk com us ca biz info name)
|
12
|
+
SLUG_DELIMITERS = %w[- _ .]
|
13
|
+
|
8
14
|
def email(name = nil)
|
9
15
|
[ user_name(name), domain_name ].join('@')
|
10
16
|
end
|
@@ -63,7 +69,7 @@ module Faker
|
|
63
69
|
end
|
64
70
|
|
65
71
|
def ip_v4_address
|
66
|
-
(1..4).map { BYTE.
|
72
|
+
(1..4).map { BYTE.sample }.join(".")
|
67
73
|
end
|
68
74
|
|
69
75
|
def slug(words = nil, glue = nil)
|
@@ -84,11 +90,5 @@ module Faker
|
|
84
90
|
|
85
91
|
temp
|
86
92
|
end
|
87
|
-
|
88
|
-
BYTE = k((0..255).to_a.map { |n| n.to_s })
|
89
|
-
HOSTS = k %w(gmail.com yahoo.com hotmail.com)
|
90
|
-
DISPOSABLE_HOSTS = k %w(mailinator.com suremail.info spamherelots.com binkmail.com safetymail.info)
|
91
|
-
DOMAIN_SUFFIXES = k %w(co.uk com us ca biz info name)
|
92
|
-
SLUG_DELIMITERS = k %w[- _ .]
|
93
93
|
end
|
94
94
|
end
|
data/lib/ffaker/internet_se.rb
CHANGED
@@ -9,6 +9,12 @@ module Faker
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
11
11
|
|
12
|
+
BYTE = [*'0'..'255']
|
13
|
+
HOSTS = %w(gmail.com yahoo.com hotmail.com spray.se passagen.se)
|
14
|
+
DOMAIN_SUFFIXES = %w(se nu com)
|
15
|
+
DISPOSABLE_HOSTS = %w(mailinator.com suremail.info spamherelots.com binkmail.com safetymail.info)
|
16
|
+
SLUG_DELIMITERS = %w[- _ .]
|
17
|
+
|
12
18
|
def email(name = nil)
|
13
19
|
"#{user_name(name)}@#{domain_name}"
|
14
20
|
end
|
@@ -26,7 +32,7 @@ module Faker
|
|
26
32
|
|
27
33
|
# Used to fake login names were dot is not allowed
|
28
34
|
def login_user_name
|
29
|
-
user_name.
|
35
|
+
user_name.tr('.','')
|
30
36
|
end
|
31
37
|
|
32
38
|
# Mostly used for email creation
|
@@ -94,7 +100,7 @@ module Faker
|
|
94
100
|
end
|
95
101
|
|
96
102
|
def ip_v4_address
|
97
|
-
(1..4).map { BYTE.
|
103
|
+
(1..4).map { BYTE.sample }.join(".")
|
98
104
|
end
|
99
105
|
|
100
106
|
def slug(words = nil, glue = nil)
|
@@ -102,11 +108,5 @@ module Faker
|
|
102
108
|
|
103
109
|
(words || Faker::Lorem::words(2).join(' ')).gsub(' ', glue).downcase
|
104
110
|
end
|
105
|
-
|
106
|
-
BYTE = k((0..255).to_a.map { |n| n.to_s })
|
107
|
-
HOSTS = k %w(gmail.com yahoo.com hotmail.com spray.se passagen.se)
|
108
|
-
DOMAIN_SUFFIXES = k %w(se nu com)
|
109
|
-
DISPOSABLE_HOSTS = k %w(mailinator.com suremail.info spamherelots.com binkmail.com safetymail.info)
|
110
|
-
SLUG_DELIMITERS = k %w[- _ .]
|
111
111
|
end
|
112
112
|
end
|
data/lib/ffaker/job_fr.rb
CHANGED
@@ -5,7 +5,7 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
-
JOB_ADJECTIVES =
|
8
|
+
JOB_ADJECTIVES = ['', 'general', '', 'adjoint', '', 'associé', '']
|
9
9
|
|
10
10
|
def title
|
11
11
|
"#{JOB_PREFIXES.sample} #{JOB_ADJECTIVES.sample} #{JOB_NOUNS.sample}"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module LoremKR
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
def word
|
9
|
+
WORDS.sample
|
10
|
+
end
|
11
|
+
|
12
|
+
def words(num = 3)
|
13
|
+
WORDS.random_pick(num)
|
14
|
+
end
|
15
|
+
|
16
|
+
def sentence(word_count = 4)
|
17
|
+
"#{words(word_count + rand(5) + 1).join(' ')}."
|
18
|
+
end
|
19
|
+
|
20
|
+
alias_method :phrase, :sentence
|
21
|
+
|
22
|
+
def sentences(sentence_count = 3)
|
23
|
+
(1..sentence_count).map { sentence }
|
24
|
+
end
|
25
|
+
|
26
|
+
alias_method :phrases, :sentences
|
27
|
+
|
28
|
+
def paragraph(sentence_count = 3)
|
29
|
+
sentences(sentence_count + rand(3)).join(' ')
|
30
|
+
end
|
31
|
+
|
32
|
+
def paragraphs(paragraph_count = 3)
|
33
|
+
(1..paragraph_count).map { paragraph }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/ffaker/movie.rb
CHANGED
@@ -5,6 +5,12 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
SUFFIXES = [
|
9
|
+
"from Hell", "from Outer Space", "from Mars", "from the Black Lagoon", "with a Thousand Faces",
|
10
|
+
"from Across the Ocean", "Who Fell to Earth", "That Came to Dinner"
|
11
|
+
]
|
12
|
+
COLORS = %w{Red Yellow Black White}
|
13
|
+
|
8
14
|
def title
|
9
15
|
case rand(4)
|
10
16
|
when 0 then title_with_prefix
|
@@ -14,13 +20,6 @@ module Faker
|
|
14
20
|
end
|
15
21
|
end
|
16
22
|
|
17
|
-
SUFFIXES = k [
|
18
|
-
"from Hell", "from Outer Space", "from Mars", "from the Black Lagoon", "with a Thousand Faces",
|
19
|
-
"from Across the Ocean", "Who Fell to Earth", "That Came to Dinner"
|
20
|
-
]
|
21
|
-
|
22
|
-
COLORS = k %w{Red Yellow Black White}
|
23
|
-
|
24
23
|
private
|
25
24
|
|
26
25
|
def title_with_prefix
|
data/lib/ffaker/name.rb
CHANGED
@@ -5,6 +5,9 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
PREFIXES = %w(Mr. Mrs. Ms. Miss Dr.)
|
9
|
+
SUFFIXES = %w(Jr. Sr. I II III IV V MD DDS PhD DVM)
|
10
|
+
|
8
11
|
def name
|
9
12
|
case rand(10)
|
10
13
|
when 0 then "#{prefix} #{first_name} #{last_name}"
|
@@ -28,8 +31,5 @@ module Faker
|
|
28
31
|
def suffix
|
29
32
|
SUFFIXES.sample
|
30
33
|
end
|
31
|
-
|
32
|
-
PREFIXES = k %w(Mr. Mrs. Ms. Miss Dr.)
|
33
|
-
SUFFIXES = k %w(Jr. Sr. I II III IV V MD DDS PhD DVM)
|
34
34
|
end
|
35
35
|
end
|
data/lib/ffaker/name_br.rb
CHANGED
@@ -5,6 +5,8 @@ module Faker
|
|
5
5
|
extend ModuleUtils
|
6
6
|
extend self
|
7
7
|
|
8
|
+
PREFIXES = %w(Sr. Sra. Srta.)
|
9
|
+
|
8
10
|
def name
|
9
11
|
"#{first_name} #{last_name}"
|
10
12
|
end
|
@@ -24,8 +26,6 @@ module Faker
|
|
24
26
|
def prefix
|
25
27
|
PREFIXES.sample
|
26
28
|
end
|
27
|
-
|
28
|
-
PREFIXES = k %w(Sr. Sra. Srta.)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
data/lib/ffaker/name_cs.rb
CHANGED
@@ -9,6 +9,17 @@ module Faker
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
11
11
|
|
12
|
+
FIRST_NAMES = {
|
13
|
+
female: %w(Alena Andrea Anna Barbora Božena Dagmar Dana Eliška Eva Hana Helena Irena Ivana Jana Jarmila Jaroslava Jiřina Jitka Kateřina Kristýna Lenka Libuše Lucie Ludmila Marcela Marie Markéta Marta Martina Michaela Miroslava Monika Pavla Petra Tereza Věra Veronika Vlasta Zdeňka Zuzana),
|
14
|
+
male: %w(Adam Aleš Alexandr Alois Antonín Bedřich Bohumil Bohuslav Břetislav Dalibor Daniel David Denis Dominik Dušan Eduard Emil Filip František Ivan Ivo Jakub Jan Jaromír Jaroslav Jindřich Jiří Josef Jozef Kamil Karel Kryštof Ladislav Leoš Libor Lubomír Luboš Luděk Ludvík Lukáš Marcel Marek Marian Martin Matěj Matyáš Michael Michal Milan Miloslav Miloš Miroslav Oldřich Ondřej Otakar Patrik Pavel Petr Přemysl Radek Radim Radomír Radovan René Richard Robert Roman Rostislav Rudolf Samuel Stanislav Šimon Štefan Štěpán Tadeáš Tomáš Václav Viktor Vilém Vít Vítězslav Vladimír Vladislav Vlastimil Vojtěch Vratislav Zbyněk Zdeněk)
|
15
|
+
}
|
16
|
+
LAST_NAMES= {
|
17
|
+
female: %w(Dvořáková Černá Benešová Fialová Doležalová Čermáková Blažková Bartošová Čechová Dostálová Bláhová Burešová Dušková Beranová Bednářová Bártová Fišerová Bílková Beránková Brožová Čížková Adámková Daňková Filipová Červenková Čapková Bendová Adamcová Dvořáčková Brabcová Davidová Březinová Dlouhá Dohnalová Burianová Dufková Fojtíková Burdová Červená Boháčová Bartoňová Doleželová Dudová Adamová Bauerová Divišová Coufalová Čejková Berková Balážová),
|
18
|
+
male: %w(Dvořák Černý Beneš Fiala Doležal Čermák Blažek Bartoš Čech Dostál Bláha Bureš Dušek Beran Bednář Bárta Bílek Beránek Fišer Brož Čížek Filip Červenka Adámek Daněk Dvořáček Benda Adamec Brabec Březina David Burian Čapek Dohnal Dlouhý Fojtík Bartoň Červený Dufek Burda Duda Adam Boháč Doležel Baláž Diviš Coufal Bauer Dolejší)
|
19
|
+
}
|
20
|
+
SUFFIXES = %w(Ph.D. Th.D. DSc.)
|
21
|
+
GENDERS = [:male, :female, :random] # :nodoc:
|
22
|
+
|
12
23
|
# All names generated inside the block will have the same sex.
|
13
24
|
# Can be called with explicit sex which will affect
|
14
25
|
# all calls inside thee block:
|
@@ -65,22 +76,8 @@ module Faker
|
|
65
76
|
SUFFIXES.sample
|
66
77
|
end
|
67
78
|
|
68
|
-
FIRST_NAMES = {
|
69
|
-
:female => k(%w(Alena Andrea Anna Barbora Božena Dagmar Dana Eliška Eva Hana Helena Irena Ivana Jana Jarmila Jaroslava Jiřina Jitka Kateřina Kristýna Lenka Libuše Lucie Ludmila Marcela Marie Markéta Marta Martina Michaela Miroslava Monika Pavla Petra Tereza Věra Veronika Vlasta Zdeňka Zuzana)),
|
70
|
-
:male => k(%w(Adam Aleš Alexandr Alois Antonín Bedřich Bohumil Bohuslav Břetislav Dalibor Daniel David Denis Dominik Dušan Eduard Emil Filip František Ivan Ivo Jakub Jan Jaromír Jaroslav Jindřich Jiří Josef Jozef Kamil Karel Kryštof Ladislav Leoš Libor Lubomír Luboš Luděk Ludvík Lukáš Marcel Marek Marian Martin Matěj Matyáš Michael Michal Milan Miloslav Miloš Miroslav Oldřich Ondřej Otakar Patrik Pavel Petr Přemysl Radek Radim Radomír Radovan René Richard Robert Roman Rostislav Rudolf Samuel Stanislav Šimon Štefan Štěpán Tadeáš Tomáš Václav Viktor Vilém Vít Vítězslav Vladimír Vladislav Vlastimil Vojtěch Vratislav Zbyněk Zdeněk))
|
71
|
-
}
|
72
|
-
|
73
|
-
LAST_NAMES= {
|
74
|
-
:female => k(%w(Dvořáková Černá Benešová Fialová Doležalová Čermáková Blažková Bartošová Čechová Dostálová Bláhová Burešová Dušková Beranová Bednářová Bártová Fišerová Bílková Beránková Brožová Čížková Adámková Daňková Filipová Červenková Čapková Bendová Adamcová Dvořáčková Brabcová Davidová Březinová Dlouhá Dohnalová Burianová Dufková Fojtíková Burdová Červená Boháčová Bartoňová Doleželová Dudová Adamová Bauerová Divišová Coufalová Čejková Berková Balážová)),
|
75
|
-
:male => k(%w(Dvořák Černý Beneš Fiala Doležal Čermák Blažek Bartoš Čech Dostál Bláha Bureš Dušek Beran Bednář Bárta Bílek Beránek Fišer Brož Čížek Filip Červenka Adámek Daněk Dvořáček Benda Adamec Brabec Březina David Burian Čapek Dohnal Dlouhý Fojtík Bartoň Červený Dufek Burda Duda Adam Boháč Doležel Baláž Diviš Coufal Bauer Dolejší))
|
76
|
-
}
|
77
|
-
|
78
|
-
SUFFIXES = k %w(Ph.D. Th.D. DSc.)
|
79
|
-
|
80
79
|
private
|
81
80
|
|
82
|
-
GENDERS = [:male, :female, :random] # :nodoc:
|
83
|
-
|
84
81
|
def select_sex(sex) # :nodoc:
|
85
82
|
given_sex = @fixed_sex ? @fixed_sex : sex
|
86
83
|
raise ArgumentError, "Unknown sex #{given_sex}" unless GENDERS.include?(given_sex)
|
data/lib/ffaker/name_da.rb
CHANGED
@@ -9,6 +9,8 @@ module Faker
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
11
11
|
|
12
|
+
PREFIXES = %w(Hr. Fr. Dr. Prof.)
|
13
|
+
|
12
14
|
def name gender = :any
|
13
15
|
case gender
|
14
16
|
when :any then any_name
|
@@ -63,6 +65,5 @@ module Faker
|
|
63
65
|
PREFIXES.sample
|
64
66
|
end
|
65
67
|
|
66
|
-
PREFIXES = k %w(Hr. Fr. Dr. Prof.)
|
67
68
|
end
|
68
69
|
end
|
data/lib/ffaker/name_de.rb
CHANGED
@@ -9,6 +9,8 @@ module Faker
|
|
9
9
|
extend ModuleUtils
|
10
10
|
extend self
|
11
11
|
|
12
|
+
PREFIXES = %w(Herr Frau Dr. Prof.)
|
13
|
+
|
12
14
|
def name
|
13
15
|
case rand(10)
|
14
16
|
when 0 then "#{prefix} #{first_name} #{last_name}"
|
@@ -27,7 +29,5 @@ module Faker
|
|
27
29
|
def prefix
|
28
30
|
PREFIXES.sample
|
29
31
|
end
|
30
|
-
|
31
|
-
PREFIXES = k %w(Herr Frau Dr. Prof.)
|
32
32
|
end
|
33
33
|
end
|