ffakerTW 0.1.0 → 1.2.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 +34 -2
- data/Gemfile +1 -1
- data/RANDOM.md +20 -20
- data/README.md +28 -31
- data/REFERENCE.md +88 -2660
- data/ffakerTW.gemspec +4 -4
- data/lib/ffakerTW/address_tw.rb +118 -0
- data/lib/ffakerTW/animal_tw.rb +1 -1
- data/lib/ffakerTW/company_tw.rb +3 -3
- data/lib/ffakerTW/data/address_tw/all +34463 -0
- data/lib/ffakerTW/data/address_tw/changhua +2765 -0
- data/lib/ffakerTW/data/address_tw/chiayi +1309 -0
- data/lib/ffakerTW/data/address_tw/hsinchu +1652 -0
- data/lib/ffakerTW/data/address_tw/hualien +1369 -0
- data/lib/ffakerTW/data/address_tw/kaohsiung +4603 -0
- data/lib/ffakerTW/data/address_tw/keelung +238 -0
- data/lib/ffakerTW/data/address_tw/kingmen +200 -0
- data/lib/ffakerTW/data/address_tw/miaoli +1133 -0
- data/lib/ffakerTW/data/address_tw/nantou +971 -0
- data/lib/ffakerTW/data/address_tw/newtaipei +2439 -0
- data/lib/ffakerTW/data/address_tw/penghu +197 -0
- data/lib/ffakerTW/data/address_tw/pingtung +2343 -0
- data/lib/ffakerTW/data/address_tw/taichung +4092 -0
- data/lib/ffakerTW/data/address_tw/tainan +2843 -0
- data/lib/ffakerTW/data/address_tw/taipei +753 -0
- data/lib/ffakerTW/data/address_tw/taitung +649 -0
- data/lib/ffakerTW/data/address_tw/taoyuan +3478 -0
- data/lib/ffakerTW/data/address_tw/yilan +1506 -0
- data/lib/ffakerTW/data/address_tw/yunlin +1923 -0
- data/lib/ffakerTW/data/animal_tw/common_names +21 -62
- data/lib/ffakerTW/data/job_tw/job_nouns +72 -206
- data/lib/ffakerTW/data/name_tw/first_names +178 -117
- data/lib/ffakerTW/data/name_tw/first_names.1120319 +122 -0
- data/lib/ffakerTW/education_tw.rb +6 -23
- data/lib/ffakerTW/gender_tw.rb +1 -4
- data/lib/ffakerTW/identification_tw.rb +1 -1
- data/lib/ffakerTW/job_tw.rb +1 -1
- data/lib/ffakerTW/lorem_tw.rb +2 -0
- data/lib/ffakerTW/name_tw.rb +3 -3
- data/lib/ffakerTW/phone_number_tw.rb +22 -15
- data/lib/ffakerTW/utils/module_utils.rb +1 -1
- data/lib/ffakerTW/version.rb +1 -1
- data/lib/ffakerTW.rb +2 -137
- data/lib/version.rb +2 -2
- data/scripts/profiling.rb +2 -2
- metadata +34 -689
- data/lib/ffakerTW/address.rb +0 -115
- data/lib/ffakerTW/address_au.rb +0 -120
- data/lib/ffakerTW/address_br.rb +0 -57
- data/lib/ffakerTW/address_ca.rb +0 -32
- data/lib/ffakerTW/address_ch.rb +0 -18
- data/lib/ffakerTW/address_ch_de.rb +0 -14
- data/lib/ffakerTW/address_ch_fr.rb +0 -14
- data/lib/ffakerTW/address_ch_it.rb +0 -14
- data/lib/ffakerTW/address_da.rb +0 -49
- data/lib/ffakerTW/address_de.rb +0 -42
- data/lib/ffakerTW/address_fi.rb +0 -44
- data/lib/ffakerTW/address_fr.rb +0 -40
- data/lib/ffakerTW/address_gr.rb +0 -38
- data/lib/ffakerTW/address_id.rb +0 -36
- data/lib/ffakerTW/address_in.rb +0 -56
- data/lib/ffakerTW/address_it.rb +0 -36
- data/lib/ffakerTW/address_ja.rb +0 -83
- data/lib/ffakerTW/address_kr.rb +0 -87
- data/lib/ffakerTW/address_mx.rb +0 -31
- data/lib/ffakerTW/address_nl.rb +0 -43
- data/lib/ffakerTW/address_pl.rb +0 -83
- data/lib/ffakerTW/address_ru.rb +0 -37
- data/lib/ffakerTW/address_se.rb +0 -44
- data/lib/ffakerTW/address_sn.rb +0 -22
- data/lib/ffakerTW/address_ua.rb +0 -56
- data/lib/ffakerTW/address_uk.rb +0 -25
- data/lib/ffakerTW/address_us.rb +0 -58
- data/lib/ffakerTW/animal.rb +0 -14
- data/lib/ffakerTW/animal_br.rb +0 -12
- data/lib/ffakerTW/animal_cn.rb +0 -12
- data/lib/ffakerTW/animal_es.rb +0 -12
- data/lib/ffakerTW/animal_pl.rb +0 -15
- data/lib/ffakerTW/animal_us.rb +0 -12
- data/lib/ffakerTW/color_pl.rb +0 -14
- data/lib/ffakerTW/color_ua.rb +0 -12
- data/lib/ffakerTW/company.rb +0 -44
- data/lib/ffakerTW/company_cn.rb +0 -23
- data/lib/ffakerTW/company_fr.rb +0 -35
- data/lib/ffakerTW/company_it.rb +0 -45
- data/lib/ffakerTW/company_ja.rb +0 -24
- data/lib/ffakerTW/company_se.rb +0 -23
- data/lib/ffakerTW/data/address/city_suffixes +0 -19
- data/lib/ffakerTW/data/address/country +0 -249
- data/lib/ffakerTW/data/address/country_code +0 -249
- data/lib/ffakerTW/data/address/neighborhood +0 -49
- data/lib/ffakerTW/data/address/street_suffix +0 -195
- data/lib/ffakerTW/data/address/time_zone +0 -130
- data/lib/ffakerTW/data/address_br/city +0 -299
- data/lib/ffakerTW/data/address_br/complement +0 -3
- data/lib/ffakerTW/data/address_br/neighborhood_prefixes +0 -3
- data/lib/ffakerTW/data/address_br/state +0 -27
- data/lib/ffakerTW/data/address_br/state_abbr +0 -27
- data/lib/ffakerTW/data/address_ca/city +0 -181
- data/lib/ffakerTW/data/address_ca/province +0 -13
- data/lib/ffakerTW/data/address_ch/canton_abbr +0 -26
- data/lib/ffakerTW/data/address_chde/canton +0 -26
- data/lib/ffakerTW/data/address_chfr/canton +0 -26
- data/lib/ffakerTW/data/address_chit/canton +0 -26
- data/lib/ffakerTW/data/address_da/city +0 -592
- data/lib/ffakerTW/data/address_da/kommune +0 -88
- data/lib/ffakerTW/data/address_da/street +0 -657
- data/lib/ffakerTW/data/address_de/city +0 -1666
- data/lib/ffakerTW/data/address_de/state +0 -15
- data/lib/ffakerTW/data/address_fi/city +0 -107
- data/lib/ffakerTW/data/address_fi/countries +0 -96
- data/lib/ffakerTW/data/address_fi/street +0 -140
- data/lib/ffakerTW/data/address_fr/city +0 -261
- data/lib/ffakerTW/data/address_fr/region +0 -27
- data/lib/ffakerTW/data/address_gr/city +0 -79
- data/lib/ffakerTW/data/address_gr/region +0 -13
- data/lib/ffakerTW/data/address_gr/street +0 -100
- data/lib/ffakerTW/data/address_id/city +0 -102
- data/lib/ffakerTW/data/address_id/common_street_names +0 -170
- data/lib/ffakerTW/data/address_id/state +0 -33
- data/lib/ffakerTW/data/address_id/state_abbr +0 -33
- data/lib/ffakerTW/data/address_in/city +0 -24
- data/lib/ffakerTW/data/address_in/state +0 -29
- data/lib/ffakerTW/data/address_in/state_abbr +0 -29
- data/lib/ffakerTW/data/address_in/union_territory +0 -7
- data/lib/ffakerTW/data/address_in/union_territory_abbr +0 -7
- data/lib/ffakerTW/data/address_it/city +0 -111
- data/lib/ffakerTW/data/address_it/region +0 -20
- data/lib/ffakerTW/data/address_ja/city +0 -791
- data/lib/ffakerTW/data/address_ja/county +0 -98
- data/lib/ffakerTW/data/address_ja/designated_city +0 -20
- data/lib/ffakerTW/data/address_ja/prefecture +0 -47
- data/lib/ffakerTW/data/address_ja/street +0 -37
- data/lib/ffakerTW/data/address_ja/tokyo_ward +0 -23
- data/lib/ffakerTW/data/address_ja/village +0 -183
- data/lib/ffakerTW/data/address_ja/ward +0 -188
- data/lib/ffakerTW/data/address_kr/boroughs +0 -29
- data/lib/ffakerTW/data/address_kr/cities +0 -51
- data/lib/ffakerTW/data/address_mx/ags +0 -11
- data/lib/ffakerTW/data/address_mx/bc +0 -5
- data/lib/ffakerTW/data/address_mx/bcs +0 -5
- data/lib/ffakerTW/data/address_mx/camp +0 -11
- data/lib/ffakerTW/data/address_mx/chih +0 -67
- data/lib/ffakerTW/data/address_mx/chis +0 -118
- data/lib/ffakerTW/data/address_mx/coah +0 -38
- data/lib/ffakerTW/data/address_mx/col +0 -10
- data/lib/ffakerTW/data/address_mx/df +0 -16
- data/lib/ffakerTW/data/address_mx/dgo +0 -39
- data/lib/ffakerTW/data/address_mx/gro +0 -81
- data/lib/ffakerTW/data/address_mx/gto +0 -46
- data/lib/ffakerTW/data/address_mx/hgo +0 -84
- data/lib/ffakerTW/data/address_mx/jal +0 -125
- data/lib/ffakerTW/data/address_mx/mex +0 -125
- data/lib/ffakerTW/data/address_mx/mich +0 -113
- data/lib/ffakerTW/data/address_mx/mor +0 -33
- data/lib/ffakerTW/data/address_mx/nay +0 -20
- data/lib/ffakerTW/data/address_mx/nl +0 -51
- data/lib/ffakerTW/data/address_mx/oax +0 -570
- data/lib/ffakerTW/data/address_mx/pue +0 -217
- data/lib/ffakerTW/data/address_mx/qr +0 -10
- data/lib/ffakerTW/data/address_mx/qro +0 -18
- data/lib/ffakerTW/data/address_mx/sin +0 -18
- data/lib/ffakerTW/data/address_mx/slp +0 -58
- data/lib/ffakerTW/data/address_mx/son +0 -72
- data/lib/ffakerTW/data/address_mx/state +0 -32
- data/lib/ffakerTW/data/address_mx/state_abbr +0 -32
- data/lib/ffakerTW/data/address_mx/tab +0 -17
- data/lib/ffakerTW/data/address_mx/tamps +0 -43
- data/lib/ffakerTW/data/address_mx/tlax +0 -60
- data/lib/ffakerTW/data/address_mx/ver +0 -212
- data/lib/ffakerTW/data/address_mx/yuc +0 -106
- data/lib/ffakerTW/data/address_mx/zac +0 -58
- data/lib/ffakerTW/data/address_nl/city +0 -2226
- data/lib/ffakerTW/data/address_nl/province +0 -12
- data/lib/ffakerTW/data/address_pl/city +0 -916
- data/lib/ffakerTW/data/address_pl/square +0 -390
- data/lib/ffakerTW/data/address_pl/street +0 -390
- data/lib/ffakerTW/data/address_pl/voivodeship +0 -16
- data/lib/ffakerTW/data/address_pl/voivodeship_abbr +0 -16
- data/lib/ffakerTW/data/address_pl/voivodeship_capital_city +0 -18
- data/lib/ffakerTW/data/address_ru/city +0 -74
- data/lib/ffakerTW/data/address_ru/province +0 -83
- data/lib/ffakerTW/data/address_ru/street +0 -49
- data/lib/ffakerTW/data/address_se/city +0 -154
- data/lib/ffakerTW/data/address_se/countries +0 -250
- data/lib/ffakerTW/data/address_se/street +0 -2887
- data/lib/ffakerTW/data/address_sn/arrondissements +0 -47
- data/lib/ffakerTW/data/address_sn/departements +0 -43
- data/lib/ffakerTW/data/address_sn/regions +0 -14
- data/lib/ffakerTW/data/address_ua/city +0 -57
- data/lib/ffakerTW/data/address_ua/country +0 -193
- data/lib/ffakerTW/data/address_ua/province +0 -27
- data/lib/ffakerTW/data/address_ua/street +0 -13
- data/lib/ffakerTW/data/address_uk/county +0 -70
- data/lib/ffakerTW/data/address_us/state +0 -50
- data/lib/ffakerTW/data/address_us/state_abbr +0 -50
- data/lib/ffakerTW/data/address_us/state_and_territories_abbr +0 -62
- data/lib/ffakerTW/data/animal/common_names +0 -141
- data/lib/ffakerTW/data/animal_br/common_names +0 -423
- data/lib/ffakerTW/data/animal_cn/common_names +0 -141
- data/lib/ffakerTW/data/animal_es/common_names +0 -135
- data/lib/ffakerTW/data/animal_pl/common_names +0 -256
- data/lib/ffakerTW/data/animal_us/common_names +0 -141
- data/lib/ffakerTW/data/color_pl/names_list +0 -122
- data/lib/ffakerTW/data/color_ua/names_list +0 -114
- data/lib/ffakerTW/data/company_it/piva_office_codes +0 -99
- data/lib/ffakerTW/data/education/degree_prefix +0 -274
- data/lib/ffakerTW/data/education/degree_short_prefix +0 -19
- data/lib/ffakerTW/data/education/major_noun +0 -13
- data/lib/ffakerTW/data/education/school_suffix +0 -13
- data/lib/ffakerTW/data/education_cn/city +0 -351
- data/lib/ffakerTW/data/education_cn/major +0 -506
- data/lib/ffakerTW/data/education_cn/province +0 -31
- data/lib/ffakerTW/data/education_cn/school_type +0 -27
- data/lib/ffakerTW/data/food_pl/diary +0 -14
- data/lib/ffakerTW/data/food_pl/fermented +0 -13
- data/lib/ffakerTW/data/food_pl/fruits +0 -34
- data/lib/ffakerTW/data/food_pl/herbs +0 -20
- data/lib/ffakerTW/data/food_pl/meats +0 -9
- data/lib/ffakerTW/data/food_pl/preserves +0 -10
- data/lib/ffakerTW/data/food_pl/spices +0 -26
- data/lib/ffakerTW/data/food_pl/vegetables +0 -45
- data/lib/ffakerTW/data/job/job_adj +0 -37
- data/lib/ffakerTW/data/job/job_noun +0 -25
- data/lib/ffakerTW/data/job/job_prefix +0 -22
- data/lib/ffakerTW/data/job_br/job_nouns +0 -52
- data/lib/ffakerTW/data/job_cn/job_nouns +0 -300
- data/lib/ffakerTW/data/job_fr/job_nouns +0 -14
- data/lib/ffakerTW/data/job_fr/job_prefixes +0 -15
- data/lib/ffakerTW/data/job_it/job_adj +0 -37
- data/lib/ffakerTW/data/job_it/job_noun +0 -25
- data/lib/ffakerTW/data/job_it/job_prefix +0 -22
- data/lib/ffakerTW/data/job_ja/job_nouns +0 -235
- data/lib/ffakerTW/data/job_kr/job_nouns +0 -1209
- data/lib/ffakerTW/data/job_vn/job_nouns +0 -191
- data/lib/ffakerTW/data/lorem/characters +0 -36
- data/lib/ffakerTW/data/lorem/words +0 -182
- data/lib/ffakerTW/data/lorem_ar/words +0 -911
- data/lib/ffakerTW/data/lorem_br/characters +0 -36
- data/lib/ffakerTW/data/lorem_br/words +0 -183
- data/lib/ffakerTW/data/lorem_cn/words +0 -706
- data/lib/ffakerTW/data/lorem_fr/words +0 -229
- data/lib/ffakerTW/data/lorem_ie/characters +0 -5
- data/lib/ffakerTW/data/lorem_ie/paragraphs +0 -2
- data/lib/ffakerTW/data/lorem_ie/questions +0 -1
- data/lib/ffakerTW/data/lorem_ie/sentences +0 -1
- data/lib/ffakerTW/data/lorem_ie/words +0 -107
- data/lib/ffakerTW/data/lorem_it/words +0 -321
- data/lib/ffakerTW/data/lorem_ja/characters +0 -101
- data/lib/ffakerTW/data/lorem_ja/sentences +0 -30
- data/lib/ffakerTW/data/lorem_ja/sentences_end +0 -21
- data/lib/ffakerTW/data/lorem_ja/words +0 -81
- data/lib/ffakerTW/data/lorem_kr/words +0 -47
- data/lib/ffakerTW/data/lorem_pl/characters +0 -32
- data/lib/ffakerTW/data/lorem_pl/words +0 -245
- data/lib/ffakerTW/data/lorem_ru/capital_chars +0 -33
- data/lib/ffakerTW/data/lorem_ru/chars +0 -33
- data/lib/ffakerTW/data/lorem_ru/words +0 -191
- data/lib/ffakerTW/data/lorem_ua/capital_chars +0 -33
- data/lib/ffakerTW/data/lorem_ua/chars +0 -33
- data/lib/ffakerTW/data/lorem_ua/words +0 -362
- data/lib/ffakerTW/data/name_ar/first_names_female +0 -250
- data/lib/ffakerTW/data/name_ar/first_names_male +0 -567
- data/lib/ffakerTW/data/name_ar/last_names +0 -357
- data/lib/ffakerTW/data/name_br/first_names_female +0 -1068
- data/lib/ffakerTW/data/name_br/first_names_male +0 -607
- data/lib/ffakerTW/data/name_br/last_names +0 -77
- data/lib/ffakerTW/data/name_cn/first_names +0 -1000
- data/lib/ffakerTW/data/name_cn/last_names +0 -1057
- data/lib/ffakerTW/data/name_cs/female_first_names +0 -40
- data/lib/ffakerTW/data/name_cs/female_last_names +0 -50
- data/lib/ffakerTW/data/name_cs/male_first_names +0 -88
- data/lib/ffakerTW/data/name_cs/male_last_names +0 -49
- data/lib/ffakerTW/data/name_cs/prefixes +0 -16
- data/lib/ffakerTW/data/name_da/female_first_names +0 -303
- data/lib/ffakerTW/data/name_da/last_names +0 -187
- data/lib/ffakerTW/data/name_da/male_first_names +0 -301
- data/lib/ffakerTW/data/name_de/first_names +0 -1166
- data/lib/ffakerTW/data/name_de/last_names +0 -100
- data/lib/ffakerTW/data/name_es/first_names_female +0 -184
- data/lib/ffakerTW/data/name_es/first_names_male +0 -165
- data/lib/ffakerTW/data/name_es/last_names +0 -208
- data/lib/ffakerTW/data/name_fr/first_names +0 -220
- data/lib/ffakerTW/data/name_fr/last_names +0 -408
- data/lib/ffakerTW/data/name_ga/first_names_female +0 -225
- data/lib/ffakerTW/data/name_ga/first_names_male +0 -306
- data/lib/ffakerTW/data/name_gr/female_first_names +0 -80
- data/lib/ffakerTW/data/name_gr/female_last_names +0 -45
- data/lib/ffakerTW/data/name_gr/male_first_names +0 -90
- data/lib/ffakerTW/data/name_gr/male_last_names +0 -57
- data/lib/ffakerTW/data/name_id/first_names_female +0 -267
- data/lib/ffakerTW/data/name_id/first_names_male +0 -312
- data/lib/ffakerTW/data/name_id/last_names +0 -1669
- data/lib/ffakerTW/data/name_in/first_names_female +0 -100
- data/lib/ffakerTW/data/name_in/first_names_male +0 -100
- data/lib/ffakerTW/data/name_in/last_names +0 -100
- data/lib/ffakerTW/data/name_it/first_names +0 -171
- data/lib/ffakerTW/data/name_it/last_names +0 -70
- data/lib/ffakerTW/data/name_ja/first_names +0 -397
- data/lib/ffakerTW/data/name_ja/last_names +0 -1078
- data/lib/ffakerTW/data/name_kh/first_names +0 -64
- data/lib/ffakerTW/data/name_kh/last_names +0 -71
- data/lib/ffakerTW/data/name_kh/nick_names +0 -30
- data/lib/ffakerTW/data/name_kr/first_names +0 -1317
- data/lib/ffakerTW/data/name_kr/last_names +0 -197
- data/lib/ffakerTW/data/name_mx/female_first_names +0 -216
- data/lib/ffakerTW/data/name_mx/last_names +0 -352
- data/lib/ffakerTW/data/name_mx/male_first_names +0 -211
- data/lib/ffakerTW/data/name_nb/first_names_female +0 -50
- data/lib/ffakerTW/data/name_nb/first_names_male +0 -50
- data/lib/ffakerTW/data/name_nb/last_names +0 -100
- data/lib/ffakerTW/data/name_nl/first_names_female +0 -89
- data/lib/ffakerTW/data/name_nl/first_names_male +0 -75
- data/lib/ffakerTW/data/name_nl/last_names +0 -115
- data/lib/ffakerTW/data/name_ph/autochthonous_surnames +0 -217
- data/lib/ffakerTW/data/name_ph/spanish_surnames +0 -300
- data/lib/ffakerTW/data/name_pl/female_first_names +0 -121
- data/lib/ffakerTW/data/name_pl/female_last_names +0 -200
- data/lib/ffakerTW/data/name_pl/male_first_names +0 -121
- data/lib/ffakerTW/data/name_pl/male_last_names +0 -200
- data/lib/ffakerTW/data/name_ru/first_names_female +0 -91
- data/lib/ffakerTW/data/name_ru/first_names_male +0 -172
- data/lib/ffakerTW/data/name_ru/last_names_female +0 -100
- data/lib/ffakerTW/data/name_ru/last_names_male +0 -100
- data/lib/ffakerTW/data/name_ru/middle_names_female +0 -65
- data/lib/ffakerTW/data/name_ru/middle_names_male +0 -73
- data/lib/ffakerTW/data/name_se/first_names_female +0 -110
- data/lib/ffakerTW/data/name_se/first_names_male +0 -110
- data/lib/ffakerTW/data/name_se/last_names +0 -100
- data/lib/ffakerTW/data/name_sn/first_names_female +0 -225
- data/lib/ffakerTW/data/name_sn/first_names_male +0 -304
- data/lib/ffakerTW/data/name_sn/last_names +0 -243
- data/lib/ffakerTW/data/name_th/first_names +0 -360
- data/lib/ffakerTW/data/name_th/last_names +0 -15
- data/lib/ffakerTW/data/name_th/nick_names +0 -74
- data/lib/ffakerTW/data/name_then/first_names +0 -292
- data/lib/ffakerTW/data/name_then/last_names +0 -63
- data/lib/ffakerTW/data/name_then/nick_names +0 -30
- data/lib/ffakerTW/data/name_ua/first_names_female +0 -193
- data/lib/ffakerTW/data/name_ua/first_names_male +0 -195
- data/lib/ffakerTW/data/name_ua/last_names_female +0 -230
- data/lib/ffakerTW/data/name_ua/last_names_male +0 -239
- data/lib/ffakerTW/data/name_ua/middle_names_female +0 -116
- data/lib/ffakerTW/data/name_ua/middle_names_male +0 -116
- data/lib/ffakerTW/data/name_vn/first_names +0 -6
- data/lib/ffakerTW/data/name_vn/last_names +0 -67
- data/lib/ffakerTW/data/name_vn/middle_names +0 -89
- data/lib/ffakerTW/data/phone_number_id/home_phone_prefixes +0 -303
- data/lib/ffakerTW/data/phone_number_id/mobile_phone_prefixes +0 -33
- data/lib/ffakerTW/data/phone_number_it/home_phone_prefixes +0 -232
- data/lib/ffakerTW/data/phone_number_it/mobile_phone_prefixes +0 -18
- data/lib/ffakerTW/data/phone_number_ja/four_disit_area_codes +0 -41
- data/lib/ffakerTW/data/phone_number_ja/one_disit_area_codes +0 -3
- data/lib/ffakerTW/data/phone_number_ja/three_disit_area_codes +0 -296
- data/lib/ffakerTW/data/phone_number_ja/two_disit_area_codes +0 -48
- data/lib/ffakerTW/data/phone_number_nl/area_codes +0 -142
- data/lib/ffakerTW/data/phone_number_ru/home_phone_prefixes +0 -107
- data/lib/ffakerTW/data/phone_number_ru/mobile_phone_prefixes +0 -61
- data/lib/ffakerTW/data/phone_number_se/phone_prefix +0 -265
- data/lib/ffakerTW/data/phone_number_ua/home_phone_prefixes +0 -29
- data/lib/ffakerTW/data/phone_number_ua/mobile_phone_prefixes +0 -11
- data/lib/ffakerTW/data/sport_pl/summer +0 -53
- data/lib/ffakerTW/data/sport_pl/winter +0 -14
- data/lib/ffakerTW/data/sport_ru/summer +0 -68
- data/lib/ffakerTW/data/sport_ru/winter +0 -20
- data/lib/ffakerTW/data/sport_us/names +0 -67
- data/lib/ffakerTW/education.rb +0 -49
- data/lib/ffakerTW/education_cn.rb +0 -37
- data/lib/ffakerTW/food_pl.rb +0 -65
- data/lib/ffakerTW/gender.rb +0 -22
- data/lib/ffakerTW/gender_br.rb +0 -17
- data/lib/ffakerTW/gender_cn.rb +0 -17
- data/lib/ffakerTW/gender_id.rb +0 -17
- data/lib/ffakerTW/gender_it.rb +0 -17
- data/lib/ffakerTW/gender_ja.rb +0 -18
- data/lib/ffakerTW/gender_jp.rb +0 -11
- data/lib/ffakerTW/gender_kr.rb +0 -17
- data/lib/ffakerTW/gender_pl.rb +0 -19
- data/lib/ffakerTW/gender_ru.rb +0 -22
- data/lib/ffakerTW/healthcare_ru.rb +0 -12
- data/lib/ffakerTW/identification.rb +0 -30
- data/lib/ffakerTW/identification_br.rb +0 -84
- data/lib/ffakerTW/identification_es.rb +0 -14
- data/lib/ffakerTW/identification_es_cl.rb +0 -29
- data/lib/ffakerTW/identification_es_co.rb +0 -39
- data/lib/ffakerTW/identification_in.rb +0 -15
- data/lib/ffakerTW/identification_it.rb +0 -30
- data/lib/ffakerTW/identification_kr.rb +0 -19
- data/lib/ffakerTW/identification_mx.rb +0 -58
- data/lib/ffakerTW/identification_pl.rb +0 -77
- data/lib/ffakerTW/internet_se.rb +0 -108
- data/lib/ffakerTW/job.rb +0 -12
- data/lib/ffakerTW/job_br.rb +0 -12
- data/lib/ffakerTW/job_cn.rb +0 -12
- data/lib/ffakerTW/job_fr.rb +0 -18
- data/lib/ffakerTW/job_it.rb +0 -12
- data/lib/ffakerTW/job_ja.rb +0 -12
- data/lib/ffakerTW/job_kr.rb +0 -12
- data/lib/ffakerTW/job_vn.rb +0 -12
- data/lib/ffakerTW/lorem.rb +0 -45
- data/lib/ffakerTW/lorem_ar.rb +0 -40
- data/lib/ffakerTW/lorem_br.rb +0 -45
- data/lib/ffakerTW/lorem_cn.rb +0 -40
- data/lib/ffakerTW/lorem_fr.rb +0 -39
- data/lib/ffakerTW/lorem_ie.rb +0 -40
- data/lib/ffakerTW/lorem_it.rb +0 -39
- data/lib/ffakerTW/lorem_ja.rb +0 -40
- data/lib/ffakerTW/lorem_kr.rb +0 -36
- data/lib/ffakerTW/lorem_pl.rb +0 -60
- data/lib/ffakerTW/lorem_ru.rb +0 -57
- data/lib/ffakerTW/lorem_ua.rb +0 -54
- data/lib/ffakerTW/name_ar.rb +0 -28
- data/lib/ffakerTW/name_br.rb +0 -62
- data/lib/ffakerTW/name_cn.rb +0 -24
- data/lib/ffakerTW/name_cs.rb +0 -87
- data/lib/ffakerTW/name_da.rb +0 -56
- data/lib/ffakerTW/name_de.rb +0 -31
- data/lib/ffakerTW/name_es.rb +0 -64
- data/lib/ffakerTW/name_fr.rb +0 -34
- data/lib/ffakerTW/name_ga.rb +0 -39
- data/lib/ffakerTW/name_gr.rb +0 -59
- data/lib/ffakerTW/name_id.rb +0 -62
- data/lib/ffakerTW/name_in.rb +0 -39
- data/lib/ffakerTW/name_it.rb +0 -31
- data/lib/ffakerTW/name_ja.rb +0 -22
- data/lib/ffakerTW/name_kh.rb +0 -24
- data/lib/ffakerTW/name_kr.rb +0 -26
- data/lib/ffakerTW/name_mx.rb +0 -101
- data/lib/ffakerTW/name_nb.rb +0 -44
- data/lib/ffakerTW/name_nl.rb +0 -48
- data/lib/ffakerTW/name_ph.rb +0 -25
- data/lib/ffakerTW/name_pl.rb +0 -98
- data/lib/ffakerTW/name_ru.rb +0 -55
- data/lib/ffakerTW/name_se.rb +0 -44
- data/lib/ffakerTW/name_sn.rb +0 -56
- data/lib/ffakerTW/name_th.rb +0 -25
- data/lib/ffakerTW/name_th_en.rb +0 -26
- data/lib/ffakerTW/name_ua.rb +0 -57
- data/lib/ffakerTW/name_vn.rb +0 -28
- data/lib/ffakerTW/phone_number.rb +0 -80
- data/lib/ffakerTW/phone_number_au.rb +0 -76
- data/lib/ffakerTW/phone_number_br.rb +0 -77
- data/lib/ffakerTW/phone_number_ch.rb +0 -46
- data/lib/ffakerTW/phone_number_cu.rb +0 -122
- data/lib/ffakerTW/phone_number_da.rb +0 -43
- data/lib/ffakerTW/phone_number_de.rb +0 -50
- data/lib/ffakerTW/phone_number_fr.rb +0 -65
- data/lib/ffakerTW/phone_number_id.rb +0 -36
- data/lib/ffakerTW/phone_number_it.rb +0 -44
- data/lib/ffakerTW/phone_number_ja.rb +0 -88
- data/lib/ffakerTW/phone_number_kr.rb +0 -50
- data/lib/ffakerTW/phone_number_mx.rb +0 -56
- data/lib/ffakerTW/phone_number_nl.rb +0 -46
- data/lib/ffakerTW/phone_number_pl.rb +0 -68
- data/lib/ffakerTW/phone_number_ru.rb +0 -120
- data/lib/ffakerTW/phone_number_se.rb +0 -88
- data/lib/ffakerTW/phone_number_sg.rb +0 -81
- data/lib/ffakerTW/phone_number_sn.rb +0 -71
- data/lib/ffakerTW/phone_number_ua.rb +0 -42
- data/lib/ffakerTW/sport_pl.rb +0 -25
- data/lib/ffakerTW/sport_ru.rb +0 -25
- data/lib/ffakerTW/sport_us.rb +0 -12
- data/lib/ffakerTW/ssn_mx.rb +0 -56
- data/lib/ffakerTW/ssn_se.rb +0 -80
- data/lib/ffakerTW/unit_english.rb +0 -107
- data/test/test_address_au.rb +0 -78
- data/test/test_address_br.rb +0 -50
- data/test/test_address_ca.rb +0 -31
- data/test/test_address_ch.rb +0 -17
- data/test/test_address_ch_de.rb +0 -13
- data/test/test_address_ch_fr.rb +0 -13
- data/test/test_address_ch_it.rb +0 -15
- data/test/test_address_da.rb +0 -50
- data/test/test_address_de.rb +0 -32
- data/test/test_address_fi.rb +0 -39
- data/test/test_address_fr.rb +0 -12
- data/test/test_address_gr.rb +0 -43
- data/test/test_address_id.rb +0 -39
- data/test/test_address_in.rb +0 -58
- data/test/test_address_it.rb +0 -12
- data/test/test_address_ja.rb +0 -58
- data/test/test_address_kr.rb +0 -14
- data/test/test_address_mx.rb +0 -32
- data/test/test_address_nl.rb +0 -36
- data/test/test_address_pl.rb +0 -80
- data/test/test_address_ru.rb +0 -36
- data/test/test_address_se.rb +0 -39
- data/test/test_address_sn.rb +0 -28
- data/test/test_address_ua.rb +0 -57
- data/test/test_address_uk.rb +0 -25
- data/test/test_address_us.rb +0 -51
- data/test/test_animal_br.rb +0 -17
- data/test/test_animal_cn.rb +0 -17
- data/test/test_animal_es.rb +0 -17
- data/test/test_animal_pl.rb +0 -17
- data/test/test_animal_us.rb +0 -17
- data/test/test_color_pl.rb +0 -13
- data/test/test_color_ua.rb +0 -13
- data/test/test_company_cn.rb +0 -24
- data/test/test_company_fr.rb +0 -33
- data/test/test_company_it.rb +0 -28
- data/test/test_company_ja.rb +0 -28
- data/test/test_company_se.rb +0 -20
- data/test/test_education_cn.rb +0 -29
- data/test/test_food_pl.rb +0 -61
- data/test/test_gender_br.rb +0 -18
- data/test/test_gender_cn.rb +0 -18
- data/test/test_gender_id.rb +0 -18
- data/test/test_gender_it.rb +0 -27
- data/test/test_gender_ja.rb +0 -27
- data/test/test_gender_jp.rb +0 -27
- data/test/test_gender_kr.rb +0 -28
- data/test/test_gender_pl.rb +0 -27
- data/test/test_gender_ru.rb +0 -23
- data/test/test_healthcare_ru.rb +0 -19
- data/test/test_identification_br.rb +0 -46
- data/test/test_identification_co.rb +0 -41
- data/test/test_identification_es.rb +0 -17
- data/test/test_identification_es_cl.rb +0 -17
- data/test/test_identification_es_mx.rb +0 -28
- data/test/test_identification_in.rb +0 -20
- data/test/test_identification_it.rb +0 -34
- data/test/test_identification_kr.rb +0 -17
- data/test/test_identification_pl.rb +0 -28
- data/test/test_identification_tw.rb +0 -17
- data/test/test_internet_se.rb +0 -78
- data/test/test_job_br.rb +0 -17
- data/test/test_job_cn.rb +0 -21
- data/test/test_job_fr.rb +0 -23
- data/test/test_job_it.rb +0 -17
- data/test/test_job_ja.rb +0 -21
- data/test/test_job_kr.rb +0 -21
- data/test/test_job_vn.rb +0 -21
- data/test/test_lorem_ar.rb +0 -44
- data/test/test_lorem_br.rb +0 -62
- data/test/test_lorem_cn.rb +0 -54
- data/test/test_lorem_fr.rb +0 -48
- data/test/test_lorem_ie.rb +0 -52
- data/test/test_lorem_it.rb +0 -51
- data/test/test_lorem_ja.rb +0 -81
- data/test/test_lorem_kr.rb +0 -56
- data/test/test_lorem_pl.rb +0 -51
- data/test/test_lorem_ru.rb +0 -52
- data/test/test_lorem_ua.rb +0 -52
- data/test/test_name_ar.rb +0 -39
- data/test/test_name_br.rb +0 -70
- data/test/test_name_cn.rb +0 -28
- data/test/test_name_cs.rb +0 -73
- data/test/test_name_da.rb +0 -59
- data/test/test_name_de.rb +0 -25
- data/test/test_name_es.rb +0 -70
- data/test/test_name_fr.rb +0 -52
- data/test/test_name_ga.rb +0 -61
- data/test/test_name_gr.rb +0 -70
- data/test/test_name_id.rb +0 -70
- data/test/test_name_it.rb +0 -53
- data/test/test_name_ja.rb +0 -51
- data/test/test_name_kh.rb +0 -34
- data/test/test_name_kr.rb +0 -28
- data/test/test_name_mx.rb +0 -190
- data/test/test_name_nb.rb +0 -43
- data/test/test_name_nl.rb +0 -25
- data/test/test_name_ph.rb +0 -34
- data/test/test_name_pl.rb +0 -111
- data/test/test_name_ru.rb +0 -76
- data/test/test_name_se.rb +0 -43
- data/test/test_name_sn.rb +0 -92
- data/test/test_name_th.rb +0 -34
- data/test/test_name_th_en.rb +0 -35
- data/test/test_name_tw.rb +0 -28
- data/test/test_name_ua.rb +0 -68
- data/test/test_name_vn.rb +0 -42
- data/test/test_phone_number_au.rb +0 -65
- data/test/test_phone_number_br.rb +0 -63
- data/test/test_phone_number_cu.rb +0 -93
- data/test/test_phone_number_da.rb +0 -47
- data/test/test_phone_number_de.rb +0 -53
- data/test/test_phone_number_fr.rb +0 -57
- data/test/test_phone_number_id.rb +0 -57
- data/test/test_phone_number_it.rb +0 -12
- data/test/test_phone_number_ja.rb +0 -63
- data/test/test_phone_number_kr.rb +0 -49
- data/test/test_phone_number_mx.rb +0 -50
- data/test/test_phone_number_nl.rb +0 -36
- data/test/test_phone_number_pl.rb +0 -56
- data/test/test_phone_number_ru.rb +0 -76
- data/test/test_phone_number_se.rb +0 -65
- data/test/test_phone_number_sg.rb +0 -52
- data/test/test_phone_number_sn.rb +0 -41
- data/test/test_phone_number_tw.rb +0 -42
- data/test/test_phone_number_ua.rb +0 -38
- data/test/test_sport_pl.rb +0 -30
- data/test/test_sport_ru.rb +0 -30
- data/test/test_sport_us.rb +0 -17
- /data/lib/ffakerTW/data/name_tw/{name_tw/first_names → first_names.1120318} +0 -0
- /data/lib/ffakerTW/data/name_tw/{name_tw/last_names → last_names.1120318} +0 -0
@@ -1,81 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
# Based on information from http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore
|
5
|
-
module PhoneNumberSG
|
6
|
-
extend ModuleUtils
|
7
|
-
extend self
|
8
|
-
|
9
|
-
# Number Ranges
|
10
|
-
# 3xxx xxxx - Voice Over IP services
|
11
|
-
# 6xxx xxxx - Fixed Line services inclusive of Fixed Line Voice Over IP services
|
12
|
-
# like StarHub Digital Voice and SingTel mio Voice
|
13
|
-
# 8xxx xxxx - Mobile phone services
|
14
|
-
# 9xxx xxxx - Mobile phone services Includes Paging Services like SUNPAGE
|
15
|
-
# 800 xxx xxxx - Toll-Free International services
|
16
|
-
# 1800 xxx xxxx - Toll-Free line services
|
17
|
-
# 1900 xxx xxxx - Premium Service
|
18
|
-
|
19
|
-
# Generates a voip phone number
|
20
|
-
# 3xxx xxxx
|
21
|
-
#
|
22
|
-
def voip_number
|
23
|
-
FFakerTW.numerify('3### ####')
|
24
|
-
end
|
25
|
-
|
26
|
-
# Generates a fixed line phone number
|
27
|
-
# 6xxx xxxx
|
28
|
-
#
|
29
|
-
def fixed_line_number
|
30
|
-
FFakerTW.numerify('6### ####')
|
31
|
-
end
|
32
|
-
|
33
|
-
# Generates a fixed mobile phone number
|
34
|
-
# 8xxx xxxx
|
35
|
-
#
|
36
|
-
def mobile_number
|
37
|
-
FFakerTW.numerify('8### ####')
|
38
|
-
end
|
39
|
-
|
40
|
-
# Generates a fixed mobile phone number or pager service number
|
41
|
-
# 9xxx xxxx
|
42
|
-
#
|
43
|
-
def mobile_or_pager_number
|
44
|
-
FFakerTW.numerify('9### ####')
|
45
|
-
end
|
46
|
-
|
47
|
-
# Generates an international toll-free number
|
48
|
-
# 800 xxx xxxx
|
49
|
-
#
|
50
|
-
def international_toll_free_number
|
51
|
-
FFakerTW.numerify('800 ### ####')
|
52
|
-
end
|
53
|
-
|
54
|
-
# Generates an toll-free number
|
55
|
-
# 1800 xxx xxxx
|
56
|
-
#
|
57
|
-
def toll_free_number
|
58
|
-
FFakerTW.numerify('1800 ### ####')
|
59
|
-
end
|
60
|
-
|
61
|
-
# Generates a premium service number
|
62
|
-
# (1900) xxx xxxx
|
63
|
-
#
|
64
|
-
def premium_service_number
|
65
|
-
FFakerTW.numerify('1900 ### ####')
|
66
|
-
end
|
67
|
-
|
68
|
-
# generates mobile or home/work number
|
69
|
-
def phone_number
|
70
|
-
case rand(0..2)
|
71
|
-
when 0 then fixed_line_number
|
72
|
-
when 1 then mobile_number
|
73
|
-
when 2 then mobile_or_pager_number
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def country_code
|
78
|
-
'+65'
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
module PhoneNumberSN
|
5
|
-
extend ModuleUtils
|
6
|
-
extend self
|
7
|
-
|
8
|
-
# Mobile Operator prefixes
|
9
|
-
#
|
10
|
-
# 77 => Orange
|
11
|
-
# 76 => Tigo
|
12
|
-
# 70 => Expresso
|
13
|
-
#
|
14
|
-
MOBILE_OPERATORS_PREFIX = %w[70 76 77].freeze
|
15
|
-
|
16
|
-
# Home or Work Operator prefixes
|
17
|
-
#
|
18
|
-
# 33 => Orange
|
19
|
-
#
|
20
|
-
HOME_WORK_OPERATORS_PREFIX = %w[33].freeze
|
21
|
-
|
22
|
-
# Return a prefix in MOBILE_OPERATORS_PREFIX
|
23
|
-
# @see FFakerTW::PhoneNumberSN::MOBILE_OPERATORS_PREFIX
|
24
|
-
#
|
25
|
-
def mobile_phone_prefix
|
26
|
-
fetch_sample(MOBILE_OPERATORS_PREFIX)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Return a prefix in HOME_WORK_OPERATORS_PREFIX
|
30
|
-
# @see FFakerTW::PhoneNumberSN::HOME_WORK_OPERATORS_PREFIX
|
31
|
-
#
|
32
|
-
def homework_phone_prefix
|
33
|
-
fetch_sample(HOME_WORK_OPERATORS_PREFIX)
|
34
|
-
end
|
35
|
-
|
36
|
-
# Pattern that can be combined with a prefix to generate mobile, office phone_numbers
|
37
|
-
# Example 745 77 99
|
38
|
-
# Example 245 07 00
|
39
|
-
# Example 726 29 05
|
40
|
-
#
|
41
|
-
def short_phone_number
|
42
|
-
FFakerTW.numerify('###-##-##')
|
43
|
-
end
|
44
|
-
|
45
|
-
# Generates a mobile phone number
|
46
|
-
# Example 70 745 77 99
|
47
|
-
# Example 76 245 07 00
|
48
|
-
# Example 77 726 29 05
|
49
|
-
#
|
50
|
-
def mobile_number
|
51
|
-
"#{mobile_phone_prefix}-#{short_phone_number}"
|
52
|
-
end
|
53
|
-
|
54
|
-
# Generates a home or work phone number
|
55
|
-
# Example 33 845 77 99
|
56
|
-
# Example 33 945 07 00
|
57
|
-
# Example 33 906 29 05
|
58
|
-
#
|
59
|
-
def homework_number
|
60
|
-
"#{homework_phone_prefix}-#{rand(8..9)}#{FFakerTW.numerify('##-##-##')}"
|
61
|
-
end
|
62
|
-
|
63
|
-
# Generates a random phone number mobile or home or work
|
64
|
-
#
|
65
|
-
def phone_number
|
66
|
-
return homework_number if rand(0..1).zero?
|
67
|
-
|
68
|
-
mobile_number
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
module PhoneNumberUA
|
5
|
-
extend ModuleUtils
|
6
|
-
extend self
|
7
|
-
|
8
|
-
LOCAL_PREFIX = '0'
|
9
|
-
COUNTRY_PREFIX = '+380 '
|
10
|
-
PHONE_NUMBER = ' ###-####'
|
11
|
-
|
12
|
-
def phone_number
|
13
|
-
rand(0..1).zero? ? home_phone_number : mobile_phone_number
|
14
|
-
end
|
15
|
-
|
16
|
-
def home_phone_number
|
17
|
-
local_number(HOME_PHONE_PREFIXES)
|
18
|
-
end
|
19
|
-
|
20
|
-
def mobile_phone_number
|
21
|
-
local_number(MOBILE_PHONE_PREFIXES)
|
22
|
-
end
|
23
|
-
|
24
|
-
def international_home_phone_number
|
25
|
-
international_number(HOME_PHONE_PREFIXES)
|
26
|
-
end
|
27
|
-
|
28
|
-
def international_mobile_phone_number
|
29
|
-
international_number(MOBILE_PHONE_PREFIXES)
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def local_number(prefixes)
|
35
|
-
FFakerTW.numerify([LOCAL_PREFIX, fetch_sample(prefixes), PHONE_NUMBER].join(''))
|
36
|
-
end
|
37
|
-
|
38
|
-
def international_number(prefixes)
|
39
|
-
FFakerTW.numerify([COUNTRY_PREFIX, fetch_sample(prefixes), PHONE_NUMBER].join(''))
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
data/lib/ffakerTW/sport_pl.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
# Inspirations:
|
5
|
-
# https://pl.wikipedia.org/wiki/Kategoria:Dyscypliny_sportowe
|
6
|
-
# https://pl.wikipedia.org/wiki/Igrzyska_olimpijskie
|
7
|
-
module SportPL
|
8
|
-
extend ModuleUtils
|
9
|
-
extend self
|
10
|
-
|
11
|
-
ALL = SUMMER + WINTER
|
12
|
-
|
13
|
-
def name
|
14
|
-
fetch_sample(ALL)
|
15
|
-
end
|
16
|
-
|
17
|
-
def summer
|
18
|
-
fetch_sample(SUMMER)
|
19
|
-
end
|
20
|
-
|
21
|
-
def winter
|
22
|
-
fetch_sample(WINTER)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/lib/ffakerTW/sport_ru.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
# Inspirations:
|
5
|
-
# https://olympic.ru/team/sport/
|
6
|
-
# http://ru.sport-wiki.org/vidy-sporta/
|
7
|
-
module SportRU
|
8
|
-
extend ModuleUtils
|
9
|
-
extend self
|
10
|
-
|
11
|
-
ALL = SUMMER + WINTER
|
12
|
-
|
13
|
-
def name
|
14
|
-
fetch_sample(ALL)
|
15
|
-
end
|
16
|
-
|
17
|
-
def summer
|
18
|
-
fetch_sample(SUMMER)
|
19
|
-
end
|
20
|
-
|
21
|
-
def winter
|
22
|
-
fetch_sample(WINTER)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/lib/ffakerTW/sport_us.rb
DELETED
data/lib/ffakerTW/ssn_mx.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
module SSNMX
|
5
|
-
extend ModuleUtils
|
6
|
-
extend self
|
7
|
-
|
8
|
-
# The Social Security number is a eleven-digit number in the format
|
9
|
-
# "AABBCCDDEE-F".
|
10
|
-
def ssn
|
11
|
-
FFakerTW.numerify('##########-#')
|
12
|
-
end
|
13
|
-
|
14
|
-
# The Social Security number is a eleven-digit number in the format
|
15
|
-
# "AABBCCDDEEF".
|
16
|
-
def ssn_undashed
|
17
|
-
FFakerTW.numerify('###########')
|
18
|
-
end
|
19
|
-
|
20
|
-
# http://es.wikipedia.org/wiki/Instituto_Mexicano_del_Seguro_Social
|
21
|
-
# The Social Security number from IMSS
|
22
|
-
# (Instituto Mexicano del Seguro Social)
|
23
|
-
# is a eleven-digit number in the format
|
24
|
-
# "AABBCCDDEE-F".
|
25
|
-
def imss
|
26
|
-
FFakerTW.numerify('##########-#')
|
27
|
-
end
|
28
|
-
|
29
|
-
# http://es.wikipedia.org/wiki/Instituto_Mexicano_del_Seguro_Social
|
30
|
-
# The Social Security number from IMSS
|
31
|
-
# (Instituto Mexicano del Seguro Social)
|
32
|
-
# is a eleven-digit number in the format
|
33
|
-
# "AABBCCDDEEF".
|
34
|
-
def imss_undashed
|
35
|
-
FFakerTW.numerify('###########')
|
36
|
-
end
|
37
|
-
|
38
|
-
# http://es.wikipedia.org/wiki/Instituto_de_Seguridad_y_Servicios_Sociales_de_los_Trabajadores_del_Estado
|
39
|
-
# The Social Security number from ISSSTE
|
40
|
-
# (Instituto de Seguridad y Servicios Sociales de los Trabajadores del Estado)
|
41
|
-
# is a eleven-digit number in the format
|
42
|
-
# "AABBCCDDEE-F".
|
43
|
-
def issste
|
44
|
-
FFakerTW.numerify('##########-#')
|
45
|
-
end
|
46
|
-
|
47
|
-
# http://es.wikipedia.org/wiki/Instituto_de_Seguridad_y_Servicios_Sociales_de_los_Trabajadores_del_Estado
|
48
|
-
# The Social Security number from ISSSTE
|
49
|
-
# (Instituto de Seguridad y Servicios Sociales de los Trabajadores del Estado)
|
50
|
-
# is a eleven-digit number in the format
|
51
|
-
# "AABBCCDDEEF".
|
52
|
-
def issste_undashed
|
53
|
-
FFakerTW.numerify('###########')
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
data/lib/ffakerTW/ssn_se.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module FFakerTW
|
6
|
-
# The Social Security number is a 12-digit number in the format:
|
7
|
-
# "YYYYDDMM-XXXX'
|
8
|
-
#
|
9
|
-
# http://sv.wikipedia.org/wiki/Personnummer_i_Sverige
|
10
|
-
#
|
11
|
-
# The 4 last digits (XXXX) are generated based on what region the person are
|
12
|
-
# born # in, the gender and the last one is a check digit using the luhn
|
13
|
-
# algorithm.
|
14
|
-
#
|
15
|
-
# http://en.wikipedia.org/wiki/Luhn_algorithm
|
16
|
-
#
|
17
|
-
# Usage:
|
18
|
-
# ssn(from: Time.local(1980, 2, 28),
|
19
|
-
# to: Time.local(2000, 2, 28),
|
20
|
-
# gender: :male)
|
21
|
-
#
|
22
|
-
module SSNSE
|
23
|
-
extend ModuleUtils
|
24
|
-
extend self
|
25
|
-
|
26
|
-
GENDERS = %w[female male].freeze
|
27
|
-
|
28
|
-
def ssn(opts = {})
|
29
|
-
from = opts[:from] || ::Time.local(1940, 1, 1)
|
30
|
-
to = opts[:to] || ::Time.now
|
31
|
-
gender = (opts[:gender] || fetch_sample(GENDERS)).to_s
|
32
|
-
|
33
|
-
raise_error_on_bad_arguments(from, to, gender)
|
34
|
-
|
35
|
-
generate_ssn(from, to, gender)
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def generate_ssn(from, to, gender)
|
41
|
-
birth_date = random_birth_time_between(from, to)
|
42
|
-
birth_date_str = birth_date.strftime('%Y%m%d') # "19800228"
|
43
|
-
region = random_region_for(gender) # "413"
|
44
|
-
ssn_without_check_digit = birth_date_str + region # "19800228413"
|
45
|
-
check_digit = luhn_check(ssn_without_check_digit) # "9"
|
46
|
-
ssn_without_check_digit + check_digit # "198002284139"
|
47
|
-
end
|
48
|
-
|
49
|
-
def raise_error_on_bad_arguments(from, to, gender)
|
50
|
-
raise ArgumentError, 'Invalid from argument: from' unless to.is_a? ::Time
|
51
|
-
raise ArgumentError, 'Invalid from argument: from' unless from.is_a? ::Time
|
52
|
-
raise ArgumentError, 'Invalid argument: from > to' if from > to
|
53
|
-
raise ArgumentError, 'Invalid argument: gender' unless GENDERS.include?(gender.to_s)
|
54
|
-
end
|
55
|
-
|
56
|
-
def random_birth_time_between(from = ::Time.local(1940, 1, 1), to = ::Time.now)
|
57
|
-
::Time.at(from + rand * (to.to_f - from.to_f))
|
58
|
-
end
|
59
|
-
|
60
|
-
def random_region_for(gender)
|
61
|
-
region_number = case gender
|
62
|
-
when 'female' then random_region_even
|
63
|
-
when 'male' then random_region_odd
|
64
|
-
end
|
65
|
-
three_character_string(region_number)
|
66
|
-
end
|
67
|
-
|
68
|
-
def random_region_even
|
69
|
-
rand(0..498) * 2
|
70
|
-
end
|
71
|
-
|
72
|
-
def random_region_odd
|
73
|
-
rand(0..498) * 2 + 1
|
74
|
-
end
|
75
|
-
|
76
|
-
def three_character_string(number)
|
77
|
-
format('%03d', number)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,107 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FFakerTW
|
4
|
-
module UnitEnglish
|
5
|
-
include FFakerTW::Unit
|
6
|
-
|
7
|
-
extend ModuleUtils
|
8
|
-
extend self
|
9
|
-
|
10
|
-
LENGTH_UNITS = [
|
11
|
-
{ name: 'inch', abbreviation: 'in' },
|
12
|
-
{ name: 'foot', abbreviation: 'ft' },
|
13
|
-
{ name: 'yard', abbreviation: 'yd' },
|
14
|
-
{ name: 'furlong', abbreviation: 'fur' },
|
15
|
-
{ name: 'mile', abbreviation: 'mi' }
|
16
|
-
].freeze
|
17
|
-
MASS_UNITS = [
|
18
|
-
{ name: 'grains', abbreviation: 'gr' },
|
19
|
-
{ name: 'ounces', abbreviation: 'oz' },
|
20
|
-
{ name: 'pounds', abbreviation: 'lb' },
|
21
|
-
{ name: 'hundredweight', abbreviation: 'cwt' },
|
22
|
-
{ name: 'ton', abbreviation: 't' }
|
23
|
-
].freeze
|
24
|
-
LIQUID_UNITS = [
|
25
|
-
{ name: 'fluid ounce', abbreviation: 'fl oz' },
|
26
|
-
{ name: 'gill', abbreviation: 'gi' },
|
27
|
-
{ name: 'pint', abbreviation: 'pt' },
|
28
|
-
{ name: 'quart', abbreviation: 'qt' }
|
29
|
-
].freeze
|
30
|
-
VOLUME_UNITS = [
|
31
|
-
{ name: 'cubic inch', abbreviation: 'CI' },
|
32
|
-
{ name: 'cubic foot', abbreviation: 'CFT' },
|
33
|
-
{ name: 'cubic yard', abbreviation: 'CY' }
|
34
|
-
].freeze
|
35
|
-
AREA_UNITS = [
|
36
|
-
{ name: 'square inch', abbreviation: 'sq in' },
|
37
|
-
{ name: 'square foot', abbreviation: 'sq ft' },
|
38
|
-
{ name: 'square yard', abbreviation: 'sq yd' },
|
39
|
-
{ name: 'acre', abbreviation: 'ac' },
|
40
|
-
{ name: 'section', abbreviation: 's' },
|
41
|
-
{ name: 'square mile', abbreviation: 'sq mi' },
|
42
|
-
{ name: 'township', abbreviation: 'twp' }
|
43
|
-
].freeze
|
44
|
-
|
45
|
-
def mass_name
|
46
|
-
mass[:name]
|
47
|
-
end
|
48
|
-
|
49
|
-
def mass_abbr
|
50
|
-
mass[:abbreviation]
|
51
|
-
end
|
52
|
-
|
53
|
-
def length_name
|
54
|
-
length[:name]
|
55
|
-
end
|
56
|
-
|
57
|
-
def length_abbr
|
58
|
-
length[:abbreviation]
|
59
|
-
end
|
60
|
-
|
61
|
-
def liquid_name
|
62
|
-
liquid[:name]
|
63
|
-
end
|
64
|
-
|
65
|
-
def liquid_abbr
|
66
|
-
liquid[:abbreviation]
|
67
|
-
end
|
68
|
-
|
69
|
-
def volume_name
|
70
|
-
volume[:name]
|
71
|
-
end
|
72
|
-
|
73
|
-
def volume_abbr
|
74
|
-
volume[:abbreviation]
|
75
|
-
end
|
76
|
-
|
77
|
-
def area_name
|
78
|
-
area[:name]
|
79
|
-
end
|
80
|
-
|
81
|
-
def area_abbr
|
82
|
-
area[:abbreviation]
|
83
|
-
end
|
84
|
-
|
85
|
-
private
|
86
|
-
|
87
|
-
def length
|
88
|
-
fetch_sample(LENGTH_UNITS)
|
89
|
-
end
|
90
|
-
|
91
|
-
def mass
|
92
|
-
fetch_sample(MASS_UNITS)
|
93
|
-
end
|
94
|
-
|
95
|
-
def liquid
|
96
|
-
fetch_sample(LIQUID_UNITS)
|
97
|
-
end
|
98
|
-
|
99
|
-
def volume
|
100
|
-
fetch_sample(VOLUME_UNITS)
|
101
|
-
end
|
102
|
-
|
103
|
-
def area
|
104
|
-
fetch_sample(AREA_UNITS)
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
data/test/test_address_au.rb
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'helper'
|
4
|
-
|
5
|
-
class TestAddressAU < Test::Unit::TestCase
|
6
|
-
include DeterministicHelper
|
7
|
-
|
8
|
-
assert_methods_are_deterministic(
|
9
|
-
FFakerTW::AddressAU,
|
10
|
-
:state, :state_abbr, :suburb, :postcode, :full_address
|
11
|
-
)
|
12
|
-
|
13
|
-
def test_au_state_abbr_insertion
|
14
|
-
FFakerTW::AddressAU::STATE_ABBR.sort
|
15
|
-
assert FFakerTW::AddressAU::SUBURB.keys.sort
|
16
|
-
assert FFakerTW::AddressAU::POSTCODE.keys.sort
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_au_state
|
20
|
-
assert_match(/[ a-z]/, FFakerTW::AddressAU.state)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_au_state_abbr
|
24
|
-
assert_match(/[A-Z]/, FFakerTW::AddressAU.state_abbr)
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_au_suburb
|
28
|
-
assert_match(/[a-zA-Z]/, FFakerTW::AddressAU.suburb)
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_postcode
|
32
|
-
assert_match(/\d{4}/, FFakerTW::AddressAU.postcode)
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_full_address
|
36
|
-
assert_match(/[, a-z]/, FFakerTW::AddressAU.full_address)
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_au_suburb_with_states
|
40
|
-
FFakerTW::AddressAU::STATE_ABBR.each do |st_abbr|
|
41
|
-
assert_match(/[a-zA-Z]/, FFakerTW::AddressAU.suburb(st_abbr))
|
42
|
-
assert_deterministic { FFakerTW::AddressAU.suburb(st_abbr) }
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_au_suburb_with_state_and_postcodes
|
47
|
-
FFakerTW::AddressAU::STATE_ABBR.each do |st_abbr|
|
48
|
-
p_code = FFakerTW::AddressAU.postcode(st_abbr)
|
49
|
-
assert_match(/[a-zA-Z]/, FFakerTW::AddressAU.suburb(st_abbr, p_code))
|
50
|
-
assert_deterministic { FFakerTW::AddressAU.suburb(st_abbr, p_code) }
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_postcode_with_states
|
55
|
-
FFakerTW::AddressAU::STATE_ABBR.each do |st_abbr|
|
56
|
-
assert_match(/\d{4}/, FFakerTW::AddressAU.postcode(st_abbr))
|
57
|
-
assert_deterministic { FFakerTW::AddressAU.postcode(st_abbr) }
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_full_address_with_states
|
62
|
-
FFakerTW::AddressAU::STATE_ABBR.each do |st_abbr|
|
63
|
-
assert_match(/[, a-z]/, FFakerTW::AddressAU.full_address(st_abbr))
|
64
|
-
assert_deterministic { FFakerTW::AddressAU.full_address(st_abbr) }
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_time_zone
|
69
|
-
assert_includes(FFakerTW::AddressAU::TIME_ZONE.values, FFakerTW::AddressAU.time_zone)
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_time_zone_with_states
|
73
|
-
FFakerTW::AddressAU::STATE_ABBR.each do |st_abbr|
|
74
|
-
assert_includes(FFakerTW::AddressAU::TIME_ZONE.values, FFakerTW::AddressAU.time_zone)
|
75
|
-
assert_deterministic { FFakerTW::AddressAU.postcode(st_abbr) }
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
data/test/test_address_br.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'helper'
|
4
|
-
|
5
|
-
class TestAddressBR < Test::Unit::TestCase
|
6
|
-
include DeterministicHelper
|
7
|
-
|
8
|
-
assert_methods_are_deterministic(
|
9
|
-
FFakerTW::AddressBR,
|
10
|
-
:zip_code, :state, :state_abbr, :city, :street_prefix, :street, :complement, :neighborhood, :full_address
|
11
|
-
)
|
12
|
-
|
13
|
-
def test_zip_code
|
14
|
-
assert_match(/\d{5}-\d{3}/, FFakerTW::AddressBR.zip_code)
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_state
|
18
|
-
assert FFakerTW::AddressBR::STATE.include?(FFakerTW::AddressBR.state)
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_state_abbr
|
22
|
-
assert FFakerTW::AddressBR::STATE_ABBR.include?(FFakerTW::AddressBR.state_abbr)
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_city
|
26
|
-
assert FFakerTW::AddressBR::CITY.include?(FFakerTW::AddressBR.city)
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_street_prefix
|
30
|
-
assert FFakerTW::AddressBR::STREET_PREFIX.include?(FFakerTW::AddressBR.street_prefix)
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_street
|
34
|
-
prefixes = FFakerTW::AddressBR::STREET_PREFIX
|
35
|
-
assert_match(/\A(#{prefixes.join('|')})(?: [\p{Alpha}-]+)+\z/, FFakerTW::AddressBR.street)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_complement
|
39
|
-
assert_match(/\A(?:Apartamento \d{3}|Casa Térrea|Fundos)\z/, FFakerTW::AddressBR.complement)
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_neighborhood
|
43
|
-
neighborhood_prefix = FFakerTW::AddressBR.neighborhood.split(' ').first
|
44
|
-
assert FFakerTW::AddressBR::NEIGHBORHOOD_PREFIXES.include?(neighborhood_prefix)
|
45
|
-
end
|
46
|
-
|
47
|
-
def test_full_address
|
48
|
-
assert_match(/\A[\p{Alpha}\d, -]+\z/, FFakerTW::AddressBR.full_address)
|
49
|
-
end
|
50
|
-
end
|
data/test/test_address_ca.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'helper'
|
4
|
-
|
5
|
-
class TestAddressCA < Test::Unit::TestCase
|
6
|
-
include DeterministicHelper
|
7
|
-
|
8
|
-
assert_methods_are_deterministic(
|
9
|
-
FFakerTW::AddressCA,
|
10
|
-
:province, :province_abbr, :city, :postal_code
|
11
|
-
)
|
12
|
-
|
13
|
-
def test_province
|
14
|
-
assert_match(/\A[ a-z]+\z/i, FFakerTW::AddressCA.province)
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_province_abbr
|
18
|
-
assert_match(/\A[A-Z]{2}\z/, FFakerTW::AddressCA.province_abbr)
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_city
|
22
|
-
assert_include(FFakerTW::AddressCA::CITY, FFakerTW::AddressCA.city)
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_postal_code
|
26
|
-
assert_match(
|
27
|
-
/\A[A-CEGHJK-NPR-TVXY]\d[A-CEGHJK-NPR-TV-Z] \d[A-CEGHJK-NPR-TV-Z]\d\z/,
|
28
|
-
FFakerTW::AddressCA.postal_code
|
29
|
-
)
|
30
|
-
end
|
31
|
-
end
|
data/test/test_address_ch.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'helper'
|
4
|
-
|
5
|
-
class TestAddressCHCH < Test::Unit::TestCase
|
6
|
-
include DeterministicHelper
|
7
|
-
|
8
|
-
assert_methods_are_deterministic(FFakerTW::AddressCH, :canton_abbr, :postal_code)
|
9
|
-
|
10
|
-
def test_ch_canton_abbr
|
11
|
-
assert_match(/\A[A-Z]{2}\z/, FFakerTW::AddressCH.canton_abbr)
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_postal_code
|
15
|
-
assert_match(/\A\d{4}\z/, FFakerTW::AddressCH.postal_code)
|
16
|
-
end
|
17
|
-
end
|
data/test/test_address_ch_de.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'helper'
|
4
|
-
|
5
|
-
class TestAddressCHDE < Test::Unit::TestCase
|
6
|
-
include DeterministicHelper
|
7
|
-
|
8
|
-
assert_methods_are_deterministic(FFakerTW::AddressCHDE, :canton)
|
9
|
-
|
10
|
-
def test_ch_de_canton
|
11
|
-
assert_match(/\A[-. a-zæøåü]+\z/i, FFakerTW::AddressCHDE.canton)
|
12
|
-
end
|
13
|
-
end
|