ffakerTW 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Changelog.md +7 -0
- data/Gemfile +8 -0
- data/LICENSE +17 -0
- data/RANDOM.md +153 -0
- data/README.md +31 -0
- data/REFERENCE.md +2709 -0
- data/Rakefile +152 -0
- data/ffakerTW.gemspec +65 -0
- data/lib/ffakerTW/address.rb +115 -0
- data/lib/ffakerTW/address_au.rb +120 -0
- data/lib/ffakerTW/address_br.rb +57 -0
- data/lib/ffakerTW/address_ca.rb +32 -0
- data/lib/ffakerTW/address_ch.rb +18 -0
- data/lib/ffakerTW/address_ch_de.rb +14 -0
- data/lib/ffakerTW/address_ch_fr.rb +14 -0
- data/lib/ffakerTW/address_ch_it.rb +14 -0
- data/lib/ffakerTW/address_da.rb +49 -0
- data/lib/ffakerTW/address_de.rb +42 -0
- data/lib/ffakerTW/address_fi.rb +44 -0
- data/lib/ffakerTW/address_fr.rb +40 -0
- data/lib/ffakerTW/address_gr.rb +38 -0
- data/lib/ffakerTW/address_id.rb +36 -0
- data/lib/ffakerTW/address_in.rb +56 -0
- data/lib/ffakerTW/address_it.rb +36 -0
- data/lib/ffakerTW/address_ja.rb +83 -0
- data/lib/ffakerTW/address_kr.rb +87 -0
- data/lib/ffakerTW/address_mx.rb +31 -0
- data/lib/ffakerTW/address_nl.rb +43 -0
- data/lib/ffakerTW/address_pl.rb +83 -0
- data/lib/ffakerTW/address_ru.rb +37 -0
- data/lib/ffakerTW/address_se.rb +44 -0
- data/lib/ffakerTW/address_sn.rb +22 -0
- data/lib/ffakerTW/address_ua.rb +56 -0
- data/lib/ffakerTW/address_uk.rb +25 -0
- data/lib/ffakerTW/address_us.rb +58 -0
- data/lib/ffakerTW/airline.rb +16 -0
- data/lib/ffakerTW/animal.rb +14 -0
- data/lib/ffakerTW/animal_br.rb +12 -0
- data/lib/ffakerTW/animal_cn.rb +12 -0
- data/lib/ffakerTW/animal_es.rb +12 -0
- data/lib/ffakerTW/animal_pl.rb +15 -0
- data/lib/ffakerTW/animal_tw.rb +12 -0
- data/lib/ffakerTW/animal_us.rb +12 -0
- data/lib/ffakerTW/avatar.rb +36 -0
- data/lib/ffakerTW/aws.rb +24 -0
- data/lib/ffakerTW/bacon_ipsum.rb +19 -0
- data/lib/ffakerTW/bank.rb +118 -0
- data/lib/ffakerTW/book.rb +56 -0
- data/lib/ffakerTW/boolean.rb +18 -0
- data/lib/ffakerTW/cheesy_lingo.rb +39 -0
- data/lib/ffakerTW/code.rb +37 -0
- data/lib/ffakerTW/color.rb +66 -0
- data/lib/ffakerTW/color_pl.rb +14 -0
- data/lib/ffakerTW/color_ua.rb +12 -0
- data/lib/ffakerTW/company.rb +44 -0
- data/lib/ffakerTW/company_cn.rb +23 -0
- data/lib/ffakerTW/company_fr.rb +35 -0
- data/lib/ffakerTW/company_it.rb +45 -0
- data/lib/ffakerTW/company_ja.rb +24 -0
- data/lib/ffakerTW/company_se.rb +23 -0
- data/lib/ffakerTW/company_tw.rb +23 -0
- data/lib/ffakerTW/conference.rb +12 -0
- data/lib/ffakerTW/courses_fr.rb +23 -0
- data/lib/ffakerTW/currency.rb +20 -0
- data/lib/ffakerTW/data/address/city_suffixes +19 -0
- data/lib/ffakerTW/data/address/country +249 -0
- data/lib/ffakerTW/data/address/country_code +249 -0
- data/lib/ffakerTW/data/address/neighborhood +49 -0
- data/lib/ffakerTW/data/address/street_suffix +195 -0
- data/lib/ffakerTW/data/address/time_zone +130 -0
- data/lib/ffakerTW/data/address_br/city +299 -0
- data/lib/ffakerTW/data/address_br/complement +3 -0
- data/lib/ffakerTW/data/address_br/neighborhood_prefixes +3 -0
- data/lib/ffakerTW/data/address_br/state +27 -0
- data/lib/ffakerTW/data/address_br/state_abbr +27 -0
- data/lib/ffakerTW/data/address_ca/city +181 -0
- data/lib/ffakerTW/data/address_ca/province +13 -0
- data/lib/ffakerTW/data/address_ch/canton_abbr +26 -0
- data/lib/ffakerTW/data/address_chde/canton +26 -0
- data/lib/ffakerTW/data/address_chfr/canton +26 -0
- data/lib/ffakerTW/data/address_chit/canton +26 -0
- data/lib/ffakerTW/data/address_da/city +592 -0
- data/lib/ffakerTW/data/address_da/kommune +88 -0
- data/lib/ffakerTW/data/address_da/street +657 -0
- data/lib/ffakerTW/data/address_de/city +1666 -0
- data/lib/ffakerTW/data/address_de/state +15 -0
- data/lib/ffakerTW/data/address_fi/city +107 -0
- data/lib/ffakerTW/data/address_fi/countries +96 -0
- data/lib/ffakerTW/data/address_fi/street +140 -0
- data/lib/ffakerTW/data/address_fr/city +261 -0
- data/lib/ffakerTW/data/address_fr/region +27 -0
- data/lib/ffakerTW/data/address_gr/city +79 -0
- data/lib/ffakerTW/data/address_gr/region +13 -0
- data/lib/ffakerTW/data/address_gr/street +100 -0
- data/lib/ffakerTW/data/address_id/city +102 -0
- data/lib/ffakerTW/data/address_id/common_street_names +170 -0
- data/lib/ffakerTW/data/address_id/state +33 -0
- data/lib/ffakerTW/data/address_id/state_abbr +33 -0
- data/lib/ffakerTW/data/address_in/city +24 -0
- data/lib/ffakerTW/data/address_in/state +29 -0
- data/lib/ffakerTW/data/address_in/state_abbr +29 -0
- data/lib/ffakerTW/data/address_in/union_territory +7 -0
- data/lib/ffakerTW/data/address_in/union_territory_abbr +7 -0
- data/lib/ffakerTW/data/address_it/city +111 -0
- data/lib/ffakerTW/data/address_it/region +20 -0
- data/lib/ffakerTW/data/address_ja/city +791 -0
- data/lib/ffakerTW/data/address_ja/county +98 -0
- data/lib/ffakerTW/data/address_ja/designated_city +20 -0
- data/lib/ffakerTW/data/address_ja/prefecture +47 -0
- data/lib/ffakerTW/data/address_ja/street +37 -0
- data/lib/ffakerTW/data/address_ja/tokyo_ward +23 -0
- data/lib/ffakerTW/data/address_ja/village +183 -0
- data/lib/ffakerTW/data/address_ja/ward +188 -0
- data/lib/ffakerTW/data/address_kr/boroughs +29 -0
- data/lib/ffakerTW/data/address_kr/cities +51 -0
- data/lib/ffakerTW/data/address_mx/ags +11 -0
- data/lib/ffakerTW/data/address_mx/bc +5 -0
- data/lib/ffakerTW/data/address_mx/bcs +5 -0
- data/lib/ffakerTW/data/address_mx/camp +11 -0
- data/lib/ffakerTW/data/address_mx/chih +67 -0
- data/lib/ffakerTW/data/address_mx/chis +118 -0
- data/lib/ffakerTW/data/address_mx/coah +38 -0
- data/lib/ffakerTW/data/address_mx/col +10 -0
- data/lib/ffakerTW/data/address_mx/df +16 -0
- data/lib/ffakerTW/data/address_mx/dgo +39 -0
- data/lib/ffakerTW/data/address_mx/gro +81 -0
- data/lib/ffakerTW/data/address_mx/gto +46 -0
- data/lib/ffakerTW/data/address_mx/hgo +84 -0
- data/lib/ffakerTW/data/address_mx/jal +125 -0
- data/lib/ffakerTW/data/address_mx/mex +125 -0
- data/lib/ffakerTW/data/address_mx/mich +113 -0
- data/lib/ffakerTW/data/address_mx/mor +33 -0
- data/lib/ffakerTW/data/address_mx/nay +20 -0
- data/lib/ffakerTW/data/address_mx/nl +51 -0
- data/lib/ffakerTW/data/address_mx/oax +570 -0
- data/lib/ffakerTW/data/address_mx/pue +217 -0
- data/lib/ffakerTW/data/address_mx/qr +10 -0
- data/lib/ffakerTW/data/address_mx/qro +18 -0
- data/lib/ffakerTW/data/address_mx/sin +18 -0
- data/lib/ffakerTW/data/address_mx/slp +58 -0
- data/lib/ffakerTW/data/address_mx/son +72 -0
- data/lib/ffakerTW/data/address_mx/state +32 -0
- data/lib/ffakerTW/data/address_mx/state_abbr +32 -0
- data/lib/ffakerTW/data/address_mx/tab +17 -0
- data/lib/ffakerTW/data/address_mx/tamps +43 -0
- data/lib/ffakerTW/data/address_mx/tlax +60 -0
- data/lib/ffakerTW/data/address_mx/ver +212 -0
- data/lib/ffakerTW/data/address_mx/yuc +106 -0
- data/lib/ffakerTW/data/address_mx/zac +58 -0
- data/lib/ffakerTW/data/address_nl/city +2226 -0
- data/lib/ffakerTW/data/address_nl/province +12 -0
- data/lib/ffakerTW/data/address_pl/city +916 -0
- data/lib/ffakerTW/data/address_pl/square +390 -0
- data/lib/ffakerTW/data/address_pl/street +390 -0
- data/lib/ffakerTW/data/address_pl/voivodeship +16 -0
- data/lib/ffakerTW/data/address_pl/voivodeship_abbr +16 -0
- data/lib/ffakerTW/data/address_pl/voivodeship_capital_city +18 -0
- data/lib/ffakerTW/data/address_ru/city +74 -0
- data/lib/ffakerTW/data/address_ru/province +83 -0
- data/lib/ffakerTW/data/address_ru/street +49 -0
- data/lib/ffakerTW/data/address_se/city +154 -0
- data/lib/ffakerTW/data/address_se/countries +250 -0
- data/lib/ffakerTW/data/address_se/street +2887 -0
- data/lib/ffakerTW/data/address_sn/arrondissements +47 -0
- data/lib/ffakerTW/data/address_sn/departements +43 -0
- data/lib/ffakerTW/data/address_sn/regions +14 -0
- data/lib/ffakerTW/data/address_ua/city +57 -0
- data/lib/ffakerTW/data/address_ua/country +193 -0
- data/lib/ffakerTW/data/address_ua/province +27 -0
- data/lib/ffakerTW/data/address_ua/street +13 -0
- data/lib/ffakerTW/data/address_uk/county +70 -0
- data/lib/ffakerTW/data/address_us/state +50 -0
- data/lib/ffakerTW/data/address_us/state_abbr +50 -0
- data/lib/ffakerTW/data/address_us/state_and_territories_abbr +62 -0
- data/lib/ffakerTW/data/airline/codes_list +209 -0
- data/lib/ffakerTW/data/airline/names_list +206 -0
- data/lib/ffakerTW/data/animal/common_names +141 -0
- data/lib/ffakerTW/data/animal_br/common_names +423 -0
- data/lib/ffakerTW/data/animal_cn/common_names +141 -0
- data/lib/ffakerTW/data/animal_es/common_names +135 -0
- data/lib/ffakerTW/data/animal_pl/common_names +256 -0
- data/lib/ffakerTW/data/animal_tw/common_names +141 -0
- data/lib/ffakerTW/data/animal_us/common_names +141 -0
- data/lib/ffakerTW/data/aws/ec2_instance_type +59 -0
- data/lib/ffakerTW/data/aws/ec2_reserved_instance_tenancy +3 -0
- data/lib/ffakerTW/data/aws/ec2_reserved_offering_type +6 -0
- data/lib/ffakerTW/data/aws/ec2_reserved_product_description +14 -0
- data/lib/ffakerTW/data/bacon_ipsum/bacon_words +62 -0
- data/lib/ffakerTW/data/bank/card_types +12 -0
- data/lib/ffakerTW/data/book/adj_and_adv +20 -0
- data/lib/ffakerTW/data/book/genres +369 -0
- data/lib/ffakerTW/data/book/nouns +36 -0
- data/lib/ffakerTW/data/book/prefixes +17 -0
- data/lib/ffakerTW/data/cheesy_lingo/cheesy_phrases +54 -0
- data/lib/ffakerTW/data/cheesy_lingo/cheesy_words +34 -0
- data/lib/ffakerTW/data/color/names_list +147 -0
- data/lib/ffakerTW/data/color_pl/names_list +122 -0
- data/lib/ffakerTW/data/color_ua/names_list +114 -0
- data/lib/ffakerTW/data/company/bs_mid +65 -0
- data/lib/ffakerTW/data/company/bs_pos +44 -0
- data/lib/ffakerTW/data/company/bs_pre +60 -0
- data/lib/ffakerTW/data/company/catch_mid +101 -0
- data/lib/ffakerTW/data/company/catch_pos +104 -0
- data/lib/ffakerTW/data/company/catch_pre +100 -0
- data/lib/ffakerTW/data/company/position_areas +11 -0
- data/lib/ffakerTW/data/company_it/piva_office_codes +99 -0
- data/lib/ffakerTW/data/conference/conference_list +40 -0
- data/lib/ffakerTW/data/currency/currency_code +169 -0
- data/lib/ffakerTW/data/currency/currency_name +169 -0
- data/lib/ffakerTW/data/currency/currency_symbol +8 -0
- data/lib/ffakerTW/data/dizzle_ipsum/dizzle_words +69 -0
- data/lib/ffakerTW/data/education/degree_prefix +274 -0
- data/lib/ffakerTW/data/education/degree_short_prefix +19 -0
- data/lib/ffakerTW/data/education/major_noun +13 -0
- data/lib/ffakerTW/data/education/school_suffix +13 -0
- data/lib/ffakerTW/data/education_cn/city +351 -0
- data/lib/ffakerTW/data/education_cn/major +506 -0
- data/lib/ffakerTW/data/education_cn/province +31 -0
- data/lib/ffakerTW/data/education_cn/school_type +27 -0
- data/lib/ffakerTW/data/education_tw/city +20 -0
- data/lib/ffakerTW/data/education_tw/major +506 -0
- data/lib/ffakerTW/data/education_tw/school_type +27 -0
- data/lib/ffakerTW/data/filesystem/extension +32 -0
- data/lib/ffakerTW/data/filesystem/mime_type +67 -0
- data/lib/ffakerTW/data/food/fruit +82 -0
- data/lib/ffakerTW/data/food/herb_spice +64 -0
- data/lib/ffakerTW/data/food/meat +48 -0
- data/lib/ffakerTW/data/food/vegetable +207 -0
- data/lib/ffakerTW/data/food_pl/diary +14 -0
- data/lib/ffakerTW/data/food_pl/fermented +13 -0
- data/lib/ffakerTW/data/food_pl/fruits +34 -0
- data/lib/ffakerTW/data/food_pl/herbs +20 -0
- data/lib/ffakerTW/data/food_pl/meats +9 -0
- data/lib/ffakerTW/data/food_pl/preserves +10 -0
- data/lib/ffakerTW/data/food_pl/spices +26 -0
- data/lib/ffakerTW/data/food_pl/vegetables +45 -0
- data/lib/ffakerTW/data/freedom_ipsum/freedom_words +161 -0
- data/lib/ffakerTW/data/game/adj_and_adv +18 -0
- data/lib/ffakerTW/data/game/category +84 -0
- data/lib/ffakerTW/data/game/mechanic +182 -0
- data/lib/ffakerTW/data/game/nouns +37 -0
- data/lib/ffakerTW/data/game/prefixes +17 -0
- data/lib/ffakerTW/data/healthcare_ipsum/healthcare_words +193 -0
- data/lib/ffakerTW/data/healthcare_ru/doctor_specialization +127 -0
- data/lib/ffakerTW/data/hipster_ipsum/hipster_words +101 -0
- data/lib/ffakerTW/data/identification_mx/estados_curp +33 -0
- data/lib/ffakerTW/data/job/job_adj +37 -0
- data/lib/ffakerTW/data/job/job_noun +25 -0
- data/lib/ffakerTW/data/job/job_prefix +22 -0
- data/lib/ffakerTW/data/job_br/job_nouns +52 -0
- data/lib/ffakerTW/data/job_cn/job_nouns +300 -0
- data/lib/ffakerTW/data/job_fr/job_nouns +14 -0
- data/lib/ffakerTW/data/job_fr/job_prefixes +15 -0
- data/lib/ffakerTW/data/job_it/job_adj +37 -0
- data/lib/ffakerTW/data/job_it/job_noun +25 -0
- data/lib/ffakerTW/data/job_it/job_prefix +22 -0
- data/lib/ffakerTW/data/job_ja/job_nouns +235 -0
- data/lib/ffakerTW/data/job_kr/job_nouns +1209 -0
- data/lib/ffakerTW/data/job_tw/job_nouns +300 -0
- data/lib/ffakerTW/data/job_vn/job_nouns +191 -0
- data/lib/ffakerTW/data/locale/language +136 -0
- data/lib/ffakerTW/data/locale/language_code +136 -0
- data/lib/ffakerTW/data/lorem/characters +36 -0
- data/lib/ffakerTW/data/lorem/words +182 -0
- data/lib/ffakerTW/data/lorem_ar/words +911 -0
- data/lib/ffakerTW/data/lorem_br/characters +36 -0
- data/lib/ffakerTW/data/lorem_br/words +183 -0
- data/lib/ffakerTW/data/lorem_cn/words +706 -0
- data/lib/ffakerTW/data/lorem_fr/words +229 -0
- data/lib/ffakerTW/data/lorem_ie/characters +5 -0
- data/lib/ffakerTW/data/lorem_ie/paragraphs +2 -0
- data/lib/ffakerTW/data/lorem_ie/questions +1 -0
- data/lib/ffakerTW/data/lorem_ie/sentences +1 -0
- data/lib/ffakerTW/data/lorem_ie/words +107 -0
- data/lib/ffakerTW/data/lorem_it/words +321 -0
- data/lib/ffakerTW/data/lorem_ja/characters +101 -0
- data/lib/ffakerTW/data/lorem_ja/sentences +30 -0
- data/lib/ffakerTW/data/lorem_ja/sentences_end +21 -0
- data/lib/ffakerTW/data/lorem_ja/words +81 -0
- data/lib/ffakerTW/data/lorem_kr/words +47 -0
- data/lib/ffakerTW/data/lorem_pl/characters +32 -0
- data/lib/ffakerTW/data/lorem_pl/words +245 -0
- data/lib/ffakerTW/data/lorem_ru/capital_chars +33 -0
- data/lib/ffakerTW/data/lorem_ru/chars +33 -0
- data/lib/ffakerTW/data/lorem_ru/words +191 -0
- data/lib/ffakerTW/data/lorem_tw/words +706 -0
- data/lib/ffakerTW/data/lorem_ua/capital_chars +33 -0
- data/lib/ffakerTW/data/lorem_ua/chars +33 -0
- data/lib/ffakerTW/data/lorem_ua/words +362 -0
- data/lib/ffakerTW/data/mathematiques/lessons +58 -0
- data/lib/ffakerTW/data/movie/adj_and_adv +20 -0
- data/lib/ffakerTW/data/movie/nouns +36 -0
- data/lib/ffakerTW/data/movie/prefixes +17 -0
- data/lib/ffakerTW/data/music/albums +91 -0
- data/lib/ffakerTW/data/music/artists +100 -0
- data/lib/ffakerTW/data/music/genres +20 -0
- data/lib/ffakerTW/data/music/songs +100 -0
- data/lib/ffakerTW/data/name/first_names_female +4045 -0
- data/lib/ffakerTW/data/name/first_names_male +1182 -0
- data/lib/ffakerTW/data/name/last_names +474 -0
- data/lib/ffakerTW/data/name/pronouns +6 -0
- data/lib/ffakerTW/data/name_ar/first_names_female +250 -0
- data/lib/ffakerTW/data/name_ar/first_names_male +567 -0
- data/lib/ffakerTW/data/name_ar/last_names +357 -0
- data/lib/ffakerTW/data/name_br/first_names_female +1068 -0
- data/lib/ffakerTW/data/name_br/first_names_male +607 -0
- data/lib/ffakerTW/data/name_br/last_names +77 -0
- data/lib/ffakerTW/data/name_cn/first_names +1000 -0
- data/lib/ffakerTW/data/name_cn/last_names +1057 -0
- data/lib/ffakerTW/data/name_cs/female_first_names +40 -0
- data/lib/ffakerTW/data/name_cs/female_last_names +50 -0
- data/lib/ffakerTW/data/name_cs/male_first_names +88 -0
- data/lib/ffakerTW/data/name_cs/male_last_names +49 -0
- data/lib/ffakerTW/data/name_cs/prefixes +16 -0
- data/lib/ffakerTW/data/name_da/female_first_names +303 -0
- data/lib/ffakerTW/data/name_da/last_names +187 -0
- data/lib/ffakerTW/data/name_da/male_first_names +301 -0
- data/lib/ffakerTW/data/name_de/first_names +1166 -0
- data/lib/ffakerTW/data/name_de/last_names +100 -0
- data/lib/ffakerTW/data/name_es/first_names_female +184 -0
- data/lib/ffakerTW/data/name_es/first_names_male +165 -0
- data/lib/ffakerTW/data/name_es/last_names +208 -0
- data/lib/ffakerTW/data/name_fr/first_names +220 -0
- data/lib/ffakerTW/data/name_fr/last_names +408 -0
- data/lib/ffakerTW/data/name_ga/first_names_female +225 -0
- data/lib/ffakerTW/data/name_ga/first_names_male +306 -0
- data/lib/ffakerTW/data/name_gr/female_first_names +80 -0
- data/lib/ffakerTW/data/name_gr/female_last_names +45 -0
- data/lib/ffakerTW/data/name_gr/male_first_names +90 -0
- data/lib/ffakerTW/data/name_gr/male_last_names +57 -0
- data/lib/ffakerTW/data/name_id/first_names_female +267 -0
- data/lib/ffakerTW/data/name_id/first_names_male +312 -0
- data/lib/ffakerTW/data/name_id/last_names +1669 -0
- data/lib/ffakerTW/data/name_in/first_names_female +100 -0
- data/lib/ffakerTW/data/name_in/first_names_male +100 -0
- data/lib/ffakerTW/data/name_in/last_names +100 -0
- data/lib/ffakerTW/data/name_it/first_names +171 -0
- data/lib/ffakerTW/data/name_it/last_names +70 -0
- data/lib/ffakerTW/data/name_ja/first_names +397 -0
- data/lib/ffakerTW/data/name_ja/last_names +1078 -0
- data/lib/ffakerTW/data/name_kh/first_names +64 -0
- data/lib/ffakerTW/data/name_kh/last_names +71 -0
- data/lib/ffakerTW/data/name_kh/nick_names +30 -0
- data/lib/ffakerTW/data/name_kr/first_names +1317 -0
- data/lib/ffakerTW/data/name_kr/last_names +197 -0
- data/lib/ffakerTW/data/name_mx/female_first_names +216 -0
- data/lib/ffakerTW/data/name_mx/last_names +352 -0
- data/lib/ffakerTW/data/name_mx/male_first_names +211 -0
- data/lib/ffakerTW/data/name_nb/first_names_female +50 -0
- data/lib/ffakerTW/data/name_nb/first_names_male +50 -0
- data/lib/ffakerTW/data/name_nb/last_names +100 -0
- data/lib/ffakerTW/data/name_nl/first_names_female +89 -0
- data/lib/ffakerTW/data/name_nl/first_names_male +75 -0
- data/lib/ffakerTW/data/name_nl/last_names +115 -0
- data/lib/ffakerTW/data/name_ph/autochthonous_surnames +217 -0
- data/lib/ffakerTW/data/name_ph/spanish_surnames +300 -0
- data/lib/ffakerTW/data/name_pl/female_first_names +121 -0
- data/lib/ffakerTW/data/name_pl/female_last_names +200 -0
- data/lib/ffakerTW/data/name_pl/male_first_names +121 -0
- data/lib/ffakerTW/data/name_pl/male_last_names +200 -0
- data/lib/ffakerTW/data/name_ru/first_names_female +91 -0
- data/lib/ffakerTW/data/name_ru/first_names_male +172 -0
- data/lib/ffakerTW/data/name_ru/last_names_female +100 -0
- data/lib/ffakerTW/data/name_ru/last_names_male +100 -0
- data/lib/ffakerTW/data/name_ru/middle_names_female +65 -0
- data/lib/ffakerTW/data/name_ru/middle_names_male +73 -0
- data/lib/ffakerTW/data/name_se/first_names_female +110 -0
- data/lib/ffakerTW/data/name_se/first_names_male +110 -0
- data/lib/ffakerTW/data/name_se/last_names +100 -0
- data/lib/ffakerTW/data/name_sn/first_names_female +225 -0
- data/lib/ffakerTW/data/name_sn/first_names_male +304 -0
- data/lib/ffakerTW/data/name_sn/last_names +243 -0
- data/lib/ffakerTW/data/name_th/first_names +360 -0
- data/lib/ffakerTW/data/name_th/last_names +15 -0
- data/lib/ffakerTW/data/name_th/nick_names +74 -0
- data/lib/ffakerTW/data/name_then/first_names +292 -0
- data/lib/ffakerTW/data/name_then/last_names +63 -0
- data/lib/ffakerTW/data/name_then/nick_names +30 -0
- data/lib/ffakerTW/data/name_tw/first_names +122 -0
- data/lib/ffakerTW/data/name_tw/last_names +100 -0
- data/lib/ffakerTW/data/name_tw/name_tw/first_names +1000 -0
- data/lib/ffakerTW/data/name_tw/name_tw/last_names +243 -0
- data/lib/ffakerTW/data/name_ua/first_names_female +193 -0
- data/lib/ffakerTW/data/name_ua/first_names_male +195 -0
- data/lib/ffakerTW/data/name_ua/last_names_female +230 -0
- data/lib/ffakerTW/data/name_ua/last_names_male +239 -0
- data/lib/ffakerTW/data/name_ua/middle_names_female +116 -0
- data/lib/ffakerTW/data/name_ua/middle_names_male +116 -0
- data/lib/ffakerTW/data/name_vn/first_names +6 -0
- data/lib/ffakerTW/data/name_vn/last_names +67 -0
- data/lib/ffakerTW/data/name_vn/middle_names +89 -0
- data/lib/ffakerTW/data/nato_alphabet/alphabet_codes +26 -0
- data/lib/ffakerTW/data/nato_alphabet/numeric_codes +10 -0
- data/lib/ffakerTW/data/philosophie/lessons +17 -0
- data/lib/ffakerTW/data/phone_number/phone_calling_code +205 -0
- data/lib/ffakerTW/data/phone_number_id/home_phone_prefixes +303 -0
- data/lib/ffakerTW/data/phone_number_id/mobile_phone_prefixes +33 -0
- data/lib/ffakerTW/data/phone_number_it/home_phone_prefixes +232 -0
- data/lib/ffakerTW/data/phone_number_it/mobile_phone_prefixes +18 -0
- data/lib/ffakerTW/data/phone_number_ja/four_disit_area_codes +41 -0
- data/lib/ffakerTW/data/phone_number_ja/one_disit_area_codes +3 -0
- data/lib/ffakerTW/data/phone_number_ja/three_disit_area_codes +296 -0
- data/lib/ffakerTW/data/phone_number_ja/two_disit_area_codes +48 -0
- data/lib/ffakerTW/data/phone_number_nl/area_codes +142 -0
- data/lib/ffakerTW/data/phone_number_ru/home_phone_prefixes +107 -0
- data/lib/ffakerTW/data/phone_number_ru/mobile_phone_prefixes +61 -0
- data/lib/ffakerTW/data/phone_number_se/phone_prefix +265 -0
- data/lib/ffakerTW/data/phone_number_ua/home_phone_prefixes +29 -0
- data/lib/ffakerTW/data/phone_number_ua/mobile_phone_prefixes +11 -0
- data/lib/ffakerTW/data/product/adj +19 -0
- data/lib/ffakerTW/data/product/b1 +19 -0
- data/lib/ffakerTW/data/product/noun +19 -0
- data/lib/ffakerTW/data/skill/specialty_end +14 -0
- data/lib/ffakerTW/data/skill/specialty_start +18 -0
- data/lib/ffakerTW/data/skill/tech_skills +52 -0
- data/lib/ffakerTW/data/sport/names +67 -0
- data/lib/ffakerTW/data/sport_pl/summer +53 -0
- data/lib/ffakerTW/data/sport_pl/winter +14 -0
- data/lib/ffakerTW/data/sport_ru/summer +68 -0
- data/lib/ffakerTW/data/sport_ru/winter +20 -0
- data/lib/ffakerTW/data/sport_us/names +67 -0
- data/lib/ffakerTW/data/tweet/hashtag +58 -0
- data/lib/ffakerTW/data/vehicle/color_prefixes +25 -0
- data/lib/ffakerTW/data/vehicle/displacements_list +21 -0
- data/lib/ffakerTW/data/vehicle/fuel_types_list +6 -0
- data/lib/ffakerTW/data/vehicle/makes_list +73 -0
- data/lib/ffakerTW/data/vehicle/models_list +106 -0
- data/lib/ffakerTW/data/vehicle/transmissions_list +4 -0
- data/lib/ffakerTW/data/vehicle/trims_list +13 -0
- data/lib/ffakerTW/data/vehicle/upholstery_list +5 -0
- data/lib/ffakerTW/data/venue/venue_list +33 -0
- data/lib/ffakerTW/data/youtube/video_ids +50 -0
- data/lib/ffakerTW/dizzle_ipsum.rb +19 -0
- data/lib/ffakerTW/education.rb +49 -0
- data/lib/ffakerTW/education_cn.rb +37 -0
- data/lib/ffakerTW/education_tw.rb +37 -0
- data/lib/ffakerTW/filesystem.rb +25 -0
- data/lib/ffakerTW/food.rb +28 -0
- data/lib/ffakerTW/food_pl.rb +65 -0
- data/lib/ffakerTW/freedom_ipsum.rb +20 -0
- data/lib/ffakerTW/game.rb +33 -0
- data/lib/ffakerTW/gender.rb +22 -0
- data/lib/ffakerTW/gender_br.rb +17 -0
- data/lib/ffakerTW/gender_cn.rb +17 -0
- data/lib/ffakerTW/gender_id.rb +17 -0
- data/lib/ffakerTW/gender_it.rb +17 -0
- data/lib/ffakerTW/gender_ja.rb +18 -0
- data/lib/ffakerTW/gender_jp.rb +11 -0
- data/lib/ffakerTW/gender_kr.rb +17 -0
- data/lib/ffakerTW/gender_pl.rb +19 -0
- data/lib/ffakerTW/gender_ru.rb +22 -0
- data/lib/ffakerTW/gender_tw.rb +17 -0
- data/lib/ffakerTW/geolocation.rb +60 -0
- data/lib/ffakerTW/guid.rb +12 -0
- data/lib/ffakerTW/healthcare_ipsum.rb +18 -0
- data/lib/ffakerTW/healthcare_ru.rb +12 -0
- data/lib/ffakerTW/hipster_ipsum.rb +19 -0
- data/lib/ffakerTW/html_ipsum.rb +186 -0
- data/lib/ffakerTW/identification.rb +30 -0
- data/lib/ffakerTW/identification_br.rb +84 -0
- data/lib/ffakerTW/identification_es.rb +14 -0
- data/lib/ffakerTW/identification_es_cl.rb +29 -0
- data/lib/ffakerTW/identification_es_co.rb +39 -0
- data/lib/ffakerTW/identification_in.rb +15 -0
- data/lib/ffakerTW/identification_it.rb +30 -0
- data/lib/ffakerTW/identification_kr.rb +19 -0
- data/lib/ffakerTW/identification_mx.rb +58 -0
- data/lib/ffakerTW/identification_pl.rb +77 -0
- data/lib/ffakerTW/identification_tw.rb +24 -0
- data/lib/ffakerTW/image.rb +48 -0
- data/lib/ffakerTW/internet.rb +90 -0
- data/lib/ffakerTW/internet_se.rb +108 -0
- data/lib/ffakerTW/job.rb +12 -0
- data/lib/ffakerTW/job_br.rb +12 -0
- data/lib/ffakerTW/job_cn.rb +12 -0
- data/lib/ffakerTW/job_fr.rb +18 -0
- data/lib/ffakerTW/job_it.rb +12 -0
- data/lib/ffakerTW/job_ja.rb +12 -0
- data/lib/ffakerTW/job_kr.rb +12 -0
- data/lib/ffakerTW/job_tw.rb +12 -0
- data/lib/ffakerTW/job_vn.rb +12 -0
- data/lib/ffakerTW/locale.rb +22 -0
- data/lib/ffakerTW/lorem.rb +45 -0
- data/lib/ffakerTW/lorem_ar.rb +40 -0
- data/lib/ffakerTW/lorem_br.rb +45 -0
- data/lib/ffakerTW/lorem_cn.rb +40 -0
- data/lib/ffakerTW/lorem_fr.rb +39 -0
- data/lib/ffakerTW/lorem_ie.rb +40 -0
- data/lib/ffakerTW/lorem_it.rb +39 -0
- data/lib/ffakerTW/lorem_ja.rb +40 -0
- data/lib/ffakerTW/lorem_kr.rb +36 -0
- data/lib/ffakerTW/lorem_pl.rb +60 -0
- data/lib/ffakerTW/lorem_ru.rb +57 -0
- data/lib/ffakerTW/lorem_tw.rb +40 -0
- data/lib/ffakerTW/lorem_ua.rb +54 -0
- data/lib/ffakerTW/movie.rb +69 -0
- data/lib/ffakerTW/music.rb +24 -0
- data/lib/ffakerTW/name.rb +121 -0
- data/lib/ffakerTW/name_ar.rb +28 -0
- data/lib/ffakerTW/name_br.rb +62 -0
- data/lib/ffakerTW/name_cn.rb +24 -0
- data/lib/ffakerTW/name_cs.rb +87 -0
- data/lib/ffakerTW/name_da.rb +56 -0
- data/lib/ffakerTW/name_de.rb +31 -0
- data/lib/ffakerTW/name_es.rb +64 -0
- data/lib/ffakerTW/name_fr.rb +34 -0
- data/lib/ffakerTW/name_ga.rb +39 -0
- data/lib/ffakerTW/name_gr.rb +59 -0
- data/lib/ffakerTW/name_id.rb +62 -0
- data/lib/ffakerTW/name_in.rb +39 -0
- data/lib/ffakerTW/name_it.rb +31 -0
- data/lib/ffakerTW/name_ja.rb +22 -0
- data/lib/ffakerTW/name_kh.rb +24 -0
- data/lib/ffakerTW/name_kr.rb +26 -0
- data/lib/ffakerTW/name_mx.rb +101 -0
- data/lib/ffakerTW/name_nb.rb +44 -0
- data/lib/ffakerTW/name_nl.rb +48 -0
- data/lib/ffakerTW/name_ph.rb +25 -0
- data/lib/ffakerTW/name_pl.rb +98 -0
- data/lib/ffakerTW/name_ru.rb +55 -0
- data/lib/ffakerTW/name_se.rb +44 -0
- data/lib/ffakerTW/name_sn.rb +56 -0
- data/lib/ffakerTW/name_th.rb +25 -0
- data/lib/ffakerTW/name_th_en.rb +26 -0
- data/lib/ffakerTW/name_tw.rb +24 -0
- data/lib/ffakerTW/name_ua.rb +57 -0
- data/lib/ffakerTW/name_vn.rb +28 -0
- data/lib/ffakerTW/nato_alphabet.rb +38 -0
- data/lib/ffakerTW/number.rb +26 -0
- data/lib/ffakerTW/phone_number.rb +80 -0
- data/lib/ffakerTW/phone_number_au.rb +76 -0
- data/lib/ffakerTW/phone_number_br.rb +77 -0
- data/lib/ffakerTW/phone_number_ch.rb +46 -0
- data/lib/ffakerTW/phone_number_cu.rb +122 -0
- data/lib/ffakerTW/phone_number_da.rb +43 -0
- data/lib/ffakerTW/phone_number_de.rb +50 -0
- data/lib/ffakerTW/phone_number_fr.rb +65 -0
- data/lib/ffakerTW/phone_number_id.rb +36 -0
- data/lib/ffakerTW/phone_number_it.rb +44 -0
- data/lib/ffakerTW/phone_number_ja.rb +88 -0
- data/lib/ffakerTW/phone_number_kr.rb +50 -0
- data/lib/ffakerTW/phone_number_mx.rb +56 -0
- data/lib/ffakerTW/phone_number_nl.rb +46 -0
- data/lib/ffakerTW/phone_number_pl.rb +68 -0
- data/lib/ffakerTW/phone_number_ru.rb +120 -0
- data/lib/ffakerTW/phone_number_se.rb +88 -0
- data/lib/ffakerTW/phone_number_sg.rb +81 -0
- data/lib/ffakerTW/phone_number_sn.rb +71 -0
- data/lib/ffakerTW/phone_number_tw.rb +49 -0
- data/lib/ffakerTW/phone_number_ua.rb +42 -0
- data/lib/ffakerTW/product.rb +47 -0
- data/lib/ffakerTW/sem_ver.rb +19 -0
- data/lib/ffakerTW/skill.rb +24 -0
- data/lib/ffakerTW/sport.rb +14 -0
- data/lib/ffakerTW/sport_pl.rb +25 -0
- data/lib/ffakerTW/sport_ru.rb +25 -0
- data/lib/ffakerTW/sport_us.rb +12 -0
- data/lib/ffakerTW/ssn.rb +22 -0
- data/lib/ffakerTW/ssn_mx.rb +56 -0
- data/lib/ffakerTW/ssn_se.rb +80 -0
- data/lib/ffakerTW/string.rb +110 -0
- data/lib/ffakerTW/time.rb +65 -0
- data/lib/ffakerTW/tweet.rb +59 -0
- data/lib/ffakerTW/unit.rb +48 -0
- data/lib/ffakerTW/unit_english.rb +107 -0
- data/lib/ffakerTW/unit_metric.rb +98 -0
- data/lib/ffakerTW/utils/array_utils.rb +53 -0
- data/lib/ffakerTW/utils/module_utils.rb +59 -0
- data/lib/ffakerTW/utils/random_utils.rb +37 -0
- data/lib/ffakerTW/utils/unique_utils.rb +44 -0
- data/lib/ffakerTW/vehicle.rb +133 -0
- data/lib/ffakerTW/venue.rb +12 -0
- data/lib/ffakerTW/version.rb +5 -0
- data/lib/ffakerTW/youtube.rb +24 -0
- data/lib/ffakerTW.rb +263 -0
- data/lib/version.rb +5 -0
- data/scripts/benchmark.rb +21 -0
- data/scripts/profile.sh +2 -0
- data/scripts/profiling.rb +9 -0
- data/scripts/reference.rb +96 -0
- data/test/helper.rb +89 -0
- data/test/test_address.rb +109 -0
- data/test/test_address_au.rb +78 -0
- data/test/test_address_br.rb +50 -0
- data/test/test_address_ca.rb +31 -0
- data/test/test_address_ch.rb +17 -0
- data/test/test_address_ch_de.rb +13 -0
- data/test/test_address_ch_fr.rb +13 -0
- data/test/test_address_ch_it.rb +15 -0
- data/test/test_address_da.rb +50 -0
- data/test/test_address_de.rb +32 -0
- data/test/test_address_fi.rb +39 -0
- data/test/test_address_fr.rb +12 -0
- data/test/test_address_gr.rb +43 -0
- data/test/test_address_id.rb +39 -0
- data/test/test_address_in.rb +58 -0
- data/test/test_address_it.rb +12 -0
- data/test/test_address_ja.rb +58 -0
- data/test/test_address_kr.rb +14 -0
- data/test/test_address_mx.rb +32 -0
- data/test/test_address_nl.rb +36 -0
- data/test/test_address_pl.rb +80 -0
- data/test/test_address_ru.rb +36 -0
- data/test/test_address_se.rb +39 -0
- data/test/test_address_sn.rb +28 -0
- data/test/test_address_ua.rb +57 -0
- data/test/test_address_uk.rb +25 -0
- data/test/test_address_us.rb +51 -0
- data/test/test_airline.rb +17 -0
- data/test/test_animal.rb +17 -0
- data/test/test_animal_br.rb +17 -0
- data/test/test_animal_cn.rb +17 -0
- data/test/test_animal_es.rb +17 -0
- data/test/test_animal_pl.rb +17 -0
- data/test/test_animal_us.rb +17 -0
- data/test/test_array_utils.rb +100 -0
- data/test/test_avatar.rb +57 -0
- data/test/test_aws.rb +25 -0
- data/test/test_bacon_ipsum.rb +36 -0
- data/test/test_bank.rb +53 -0
- data/test/test_book.rb +46 -0
- data/test/test_boolean.rb +14 -0
- data/test/test_cheesy_lingo.rb +43 -0
- data/test/test_code.rb +39 -0
- data/test/test_color.rb +134 -0
- data/test/test_color_pl.rb +13 -0
- data/test/test_color_ua.rb +13 -0
- data/test/test_company.rb +32 -0
- data/test/test_company_cn.rb +24 -0
- data/test/test_company_fr.rb +33 -0
- data/test/test_company_it.rb +28 -0
- data/test/test_company_ja.rb +28 -0
- data/test/test_company_se.rb +20 -0
- data/test/test_conference.rb +13 -0
- data/test/test_course_mathematiques.rb +17 -0
- data/test/test_course_philosophie.rb +17 -0
- data/test/test_currency.rb +12 -0
- data/test/test_dizzle_ipsum.rb +36 -0
- data/test/test_education.rb +41 -0
- data/test/test_education_cn.rb +29 -0
- data/test/test_ffaker.rb +41 -0
- data/test/test_filesystem.rb +36 -0
- data/test/test_food.rb +28 -0
- data/test/test_food_pl.rb +61 -0
- data/test/test_freedom_ipsum.rb +21 -0
- data/test/test_game.rb +28 -0
- data/test/test_gender.rb +23 -0
- data/test/test_gender_br.rb +18 -0
- data/test/test_gender_cn.rb +18 -0
- data/test/test_gender_id.rb +18 -0
- data/test/test_gender_it.rb +27 -0
- data/test/test_gender_ja.rb +27 -0
- data/test/test_gender_jp.rb +27 -0
- data/test/test_gender_kr.rb +28 -0
- data/test/test_gender_pl.rb +27 -0
- data/test/test_gender_ru.rb +23 -0
- data/test/test_geolocation.rb +37 -0
- data/test/test_guid.rb +14 -0
- data/test/test_healthcare_ipsum.rb +36 -0
- data/test/test_healthcare_ru.rb +19 -0
- data/test/test_hipster_ipsum.rb +38 -0
- data/test/test_html_ipsum.rb +105 -0
- data/test/test_identification.rb +35 -0
- data/test/test_identification_br.rb +46 -0
- data/test/test_identification_co.rb +41 -0
- data/test/test_identification_es.rb +17 -0
- data/test/test_identification_es_cl.rb +17 -0
- data/test/test_identification_es_mx.rb +28 -0
- data/test/test_identification_in.rb +20 -0
- data/test/test_identification_it.rb +34 -0
- data/test/test_identification_kr.rb +17 -0
- data/test/test_identification_pl.rb +28 -0
- data/test/test_identification_tw.rb +17 -0
- data/test/test_image.rb +51 -0
- data/test/test_internet.rb +132 -0
- data/test/test_internet_se.rb +78 -0
- data/test/test_job.rb +17 -0
- data/test/test_job_br.rb +17 -0
- data/test/test_job_cn.rb +21 -0
- data/test/test_job_fr.rb +23 -0
- data/test/test_job_it.rb +17 -0
- data/test/test_job_ja.rb +21 -0
- data/test/test_job_kr.rb +21 -0
- data/test/test_job_vn.rb +21 -0
- data/test/test_locale.rb +27 -0
- data/test/test_lorem.rb +58 -0
- data/test/test_lorem_ar.rb +44 -0
- data/test/test_lorem_br.rb +62 -0
- data/test/test_lorem_cn.rb +54 -0
- data/test/test_lorem_fr.rb +48 -0
- data/test/test_lorem_ie.rb +52 -0
- data/test/test_lorem_it.rb +51 -0
- data/test/test_lorem_ja.rb +81 -0
- data/test/test_lorem_kr.rb +56 -0
- data/test/test_lorem_pl.rb +51 -0
- data/test/test_lorem_ru.rb +52 -0
- data/test/test_lorem_ua.rb +52 -0
- data/test/test_module_utils.rb +14 -0
- data/test/test_movie.rb +21 -0
- data/test/test_music.rb +28 -0
- data/test/test_name.rb +138 -0
- data/test/test_name_ar.rb +39 -0
- data/test/test_name_br.rb +70 -0
- data/test/test_name_cn.rb +28 -0
- data/test/test_name_cs.rb +73 -0
- data/test/test_name_da.rb +59 -0
- data/test/test_name_de.rb +25 -0
- data/test/test_name_es.rb +70 -0
- data/test/test_name_fr.rb +52 -0
- data/test/test_name_ga.rb +61 -0
- data/test/test_name_gr.rb +70 -0
- data/test/test_name_id.rb +70 -0
- data/test/test_name_it.rb +53 -0
- data/test/test_name_ja.rb +51 -0
- data/test/test_name_kh.rb +34 -0
- data/test/test_name_kr.rb +28 -0
- data/test/test_name_mx.rb +190 -0
- data/test/test_name_nb.rb +43 -0
- data/test/test_name_nl.rb +25 -0
- data/test/test_name_ph.rb +34 -0
- data/test/test_name_pl.rb +111 -0
- data/test/test_name_ru.rb +76 -0
- data/test/test_name_se.rb +43 -0
- data/test/test_name_sn.rb +92 -0
- data/test/test_name_th.rb +34 -0
- data/test/test_name_th_en.rb +35 -0
- data/test/test_name_tw.rb +28 -0
- data/test/test_name_ua.rb +68 -0
- data/test/test_name_vn.rb +42 -0
- data/test/test_nato_alphabet.rb +42 -0
- data/test/test_number.rb +45 -0
- data/test/test_phone_number.rb +46 -0
- data/test/test_phone_number_au.rb +65 -0
- data/test/test_phone_number_br.rb +63 -0
- data/test/test_phone_number_cu.rb +93 -0
- data/test/test_phone_number_da.rb +47 -0
- data/test/test_phone_number_de.rb +53 -0
- data/test/test_phone_number_fr.rb +57 -0
- data/test/test_phone_number_id.rb +57 -0
- data/test/test_phone_number_it.rb +12 -0
- data/test/test_phone_number_ja.rb +63 -0
- data/test/test_phone_number_kr.rb +49 -0
- data/test/test_phone_number_mx.rb +50 -0
- data/test/test_phone_number_nl.rb +36 -0
- data/test/test_phone_number_pl.rb +56 -0
- data/test/test_phone_number_ru.rb +76 -0
- data/test/test_phone_number_se.rb +65 -0
- data/test/test_phone_number_sg.rb +52 -0
- data/test/test_phone_number_sn.rb +41 -0
- data/test/test_phone_number_tw.rb +42 -0
- data/test/test_phone_number_ua.rb +38 -0
- data/test/test_products.rb +22 -0
- data/test/test_sem_ver.rb +18 -0
- data/test/test_skill.rb +30 -0
- data/test/test_sport_pl.rb +30 -0
- data/test/test_sport_ru.rb +30 -0
- data/test/test_sport_us.rb +17 -0
- data/test/test_sports.rb +17 -0
- data/test/test_ssn.rb +27 -0
- data/test/test_ssn_mx.rb +36 -0
- data/test/test_ssn_se.rb +43 -0
- data/test/test_string.rb +114 -0
- data/test/test_time.rb +101 -0
- data/test/test_tweet.rb +59 -0
- data/test/test_unique_utils.rb +54 -0
- data/test/test_units.rb +37 -0
- data/test/test_units_english.rb +63 -0
- data/test/test_units_metric.rb +63 -0
- data/test/test_vehicle.rb +79 -0
- data/test/test_venue.rb +13 -0
- data/test/test_youtube.rb +28 -0
- metadata +1054 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
# thanks to http://hipsteripsum.me
|
5
|
+
module HipsterIpsum
|
6
|
+
include Lorem
|
7
|
+
|
8
|
+
extend ModuleUtils
|
9
|
+
extend self
|
10
|
+
|
11
|
+
def word
|
12
|
+
fetch_sample(HIPSTER_WORDS)
|
13
|
+
end
|
14
|
+
|
15
|
+
def words(num = 3)
|
16
|
+
fetch_sample(HIPSTER_WORDS, count: num)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,186 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
# Loosely based on http://html-ipsum.com/
|
5
|
+
# Requires FFakerTW::Lorem module
|
6
|
+
module HTMLIpsum
|
7
|
+
extend ModuleUtils
|
8
|
+
extend self
|
9
|
+
|
10
|
+
def a(word_count = 2)
|
11
|
+
"<a href=\"##{word}\" title=\"#{words(word_count).capitalize!}\">#{words(word_count).capitalize!}</a>"
|
12
|
+
end
|
13
|
+
|
14
|
+
def p(count = 3, options = {})
|
15
|
+
options = { fancy: false, include_breaks: false }.merge(options)
|
16
|
+
if options[:fancy]
|
17
|
+
s = fancy_string(count, options[:include_breaks])
|
18
|
+
else
|
19
|
+
mode = options[:include_breaks] ? 'paragraphs' : 'paragraph'
|
20
|
+
s = send(mode.to_sym, count)
|
21
|
+
end
|
22
|
+
content_tag_for(:p, s)
|
23
|
+
end
|
24
|
+
|
25
|
+
def dl(definitions = 2)
|
26
|
+
content_tag_for :dl do |dl|
|
27
|
+
definitions.times do
|
28
|
+
dl << content_tag_for(:dt, words(1).capitalize!)
|
29
|
+
dl << content_tag_for(:dd, paragraph(2))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def ul_short(items = 3)
|
35
|
+
content_tag_for :ul do |ul|
|
36
|
+
items.times do
|
37
|
+
ul << content_tag_for(:li, sentence(2))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def ul_long(items = 3)
|
43
|
+
content_tag_for :ul do |ul|
|
44
|
+
items.times do
|
45
|
+
ul << content_tag_for(:li, paragraph(2))
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def ol_short(items = 3)
|
51
|
+
content_tag_for :ol do |ol|
|
52
|
+
items.times do
|
53
|
+
ol << content_tag_for(:li, sentence(2))
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def ol_long(items = 3)
|
59
|
+
content_tag_for :ol do |ol|
|
60
|
+
items.times do
|
61
|
+
ol << content_tag_for(:li, paragraph(2))
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def ul_links(items = 3)
|
67
|
+
content_tag_for :ul do |ul|
|
68
|
+
items.times do
|
69
|
+
ul << content_tag_for(:li, a(1))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def table(rows = 3)
|
75
|
+
content_tag_for(:table) do |table|
|
76
|
+
table << content_tag_for(:thead) do |thead|
|
77
|
+
thead << content_tag_for(:tr) do |tr|
|
78
|
+
tr << content_tag_for(:th, word.capitalize)
|
79
|
+
tr << content_tag_for(:th, word.capitalize)
|
80
|
+
tr << content_tag_for(:th, word.capitalize)
|
81
|
+
tr << content_tag_for(:th, word.capitalize)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
table << content_tag_for(:tbody) do |tbody|
|
85
|
+
rows.times do
|
86
|
+
tbody << content_tag_for(:tr) do |tr|
|
87
|
+
tr << content_tag_for(:td, words(1).capitalize)
|
88
|
+
tr << content_tag_for(:td, words(1).capitalize)
|
89
|
+
tr << content_tag_for(:td, words(1).capitalize)
|
90
|
+
tr << content_tag_for(:td, a)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def body
|
98
|
+
body = content_tag_for(:h1, words(2).capitalize)
|
99
|
+
rand(0..3).times do
|
100
|
+
body << content_tag_for(:p, fancy_string)
|
101
|
+
end
|
102
|
+
body << table(rand(0..3))
|
103
|
+
body << content_tag_for(:h2, words(2).capitalize)
|
104
|
+
body << content_tag_for(:ol) do |ol|
|
105
|
+
rand(0..3).times do
|
106
|
+
ol << content_tag_for(:li, paragraph(1))
|
107
|
+
end
|
108
|
+
end
|
109
|
+
body << content_tag_for(:blockquote) do |bq|
|
110
|
+
bq << content_tag_for(:p, paragraphs(3))
|
111
|
+
end
|
112
|
+
body << content_tag_for(:h3, words(2).capitalize!)
|
113
|
+
body << content_tag_for(:ul) do |ul|
|
114
|
+
rand(0..3).times do
|
115
|
+
ul << content_tag_for(:li, paragraph(1))
|
116
|
+
end
|
117
|
+
end
|
118
|
+
body << content_tag_for(:pre) do |pre|
|
119
|
+
pre << content_tag_for(:code) do |code|
|
120
|
+
code << "
|
121
|
+
##{word} h1 a {
|
122
|
+
display: block;
|
123
|
+
width: 300px;
|
124
|
+
height: 80px;
|
125
|
+
}
|
126
|
+
"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
body
|
130
|
+
end
|
131
|
+
|
132
|
+
def fancy_string(count = 3, include_breaks = false)
|
133
|
+
sep = include_breaks ? '<br>' : ' '
|
134
|
+
a = k([
|
135
|
+
content_tag_for(:strong, words(2).capitalize!),
|
136
|
+
content_tag_for(:em, paragraph),
|
137
|
+
content_tag_for(:mark, paragraph),
|
138
|
+
content_tag_for(:del, words(2)),
|
139
|
+
content_tag_for(:ins, words(2)),
|
140
|
+
content_tag_for(:sub, words(2)),
|
141
|
+
content_tag_for(:sup, words(2)),
|
142
|
+
content_tag_for(:code, words(2)),
|
143
|
+
content_tag_for(:small, words(2)),
|
144
|
+
(a 2).to_s
|
145
|
+
] + FFakerTW::Lorem.paragraphs(count - 1))
|
146
|
+
fetch_sample(a, count: count).join(sep)
|
147
|
+
end
|
148
|
+
|
149
|
+
private
|
150
|
+
|
151
|
+
def content_tag_for(element, content = nil)
|
152
|
+
element_content = if content
|
153
|
+
content
|
154
|
+
else
|
155
|
+
block_html = +''
|
156
|
+
yield(block_html)
|
157
|
+
block_html
|
158
|
+
end
|
159
|
+
+"<#{element}>#{element_content}</#{element}>"
|
160
|
+
end
|
161
|
+
|
162
|
+
def word
|
163
|
+
FFakerTW::Lorem.word
|
164
|
+
end
|
165
|
+
|
166
|
+
def words(word_count = 3)
|
167
|
+
FFakerTW::Lorem.words(word_count).join(' ')
|
168
|
+
end
|
169
|
+
|
170
|
+
def sentence(word_count = 3)
|
171
|
+
FFakerTW::Lorem.sentence(word_count)
|
172
|
+
end
|
173
|
+
|
174
|
+
def sentences(sentence_count = 3)
|
175
|
+
FFakerTW::Lorem.sentences(sentence_count).join(' ')
|
176
|
+
end
|
177
|
+
|
178
|
+
def paragraph(sentence_count = 3)
|
179
|
+
FFakerTW::Lorem.paragraph(sentence_count)
|
180
|
+
end
|
181
|
+
|
182
|
+
def paragraphs(paragraph_count = 3)
|
183
|
+
FFakerTW::Lorem.paragraphs(paragraph_count).join('<br>')
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module Identification
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
ETHNICITIES = [
|
9
|
+
'African American', 'Asian/Pacific Islander', 'Caucasian', 'Hispanic', 'Native American',
|
10
|
+
'Multiracial', 'Other', 'Prefer not to respond'
|
11
|
+
].freeze
|
12
|
+
GENDERS = %w[Male Female].freeze
|
13
|
+
|
14
|
+
def drivers_license
|
15
|
+
FFakerTW.bothify('?###-###-##-###-#').upcase
|
16
|
+
end
|
17
|
+
|
18
|
+
def ssn
|
19
|
+
FFakerTW.numerify('###-##-####')
|
20
|
+
end
|
21
|
+
|
22
|
+
def ethnicity
|
23
|
+
fetch_sample(ETHNICITIES)
|
24
|
+
end
|
25
|
+
|
26
|
+
def gender
|
27
|
+
fetch_sample(GENDERS)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationBR
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
GENDERS = %w[Feminino Masculino].freeze
|
9
|
+
CPF_VERIFICATION_MULTIPLIERS = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
10
|
+
CNPJ_VERIFICATION_MULTIPLIERS = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
11
|
+
|
12
|
+
def cpf
|
13
|
+
cpf = FFakerTW.numerify('#########')
|
14
|
+
validators = cpf_verification_digits(cpf)
|
15
|
+
cpf + validators.join
|
16
|
+
end
|
17
|
+
|
18
|
+
def pretty_cpf
|
19
|
+
cpf_numbers = cpf
|
20
|
+
format('%s.%s.%s-%s',
|
21
|
+
cpf_numbers[0..2],
|
22
|
+
cpf_numbers[3..5],
|
23
|
+
cpf_numbers[6..8],
|
24
|
+
cpf_numbers[9..10])
|
25
|
+
end
|
26
|
+
|
27
|
+
def cnpj
|
28
|
+
cnpj = FFakerTW.numerify('############')
|
29
|
+
validators = cnpj_verification_digits(cnpj)
|
30
|
+
cnpj + validators.join
|
31
|
+
end
|
32
|
+
|
33
|
+
def pretty_cnpj
|
34
|
+
cnpj_numbers = cnpj.to_s.rjust(14, '0')
|
35
|
+
format('%s.%s.%s/%s-%s',
|
36
|
+
cnpj_numbers[0..1],
|
37
|
+
cnpj_numbers[2..4],
|
38
|
+
cnpj_numbers[5..7],
|
39
|
+
cnpj_numbers[8..11],
|
40
|
+
cnpj_numbers[12..14])
|
41
|
+
end
|
42
|
+
|
43
|
+
def rg
|
44
|
+
FFakerTW.numerify('#########')
|
45
|
+
end
|
46
|
+
|
47
|
+
def pretty_rg
|
48
|
+
FFakerTW.numerify('###.###.###')
|
49
|
+
end
|
50
|
+
|
51
|
+
def gender
|
52
|
+
fetch_sample(GENDERS)
|
53
|
+
end
|
54
|
+
|
55
|
+
def cpf_verification_digits(cpf)
|
56
|
+
document_verification_digits(CPF_VERIFICATION_MULTIPLIERS, cpf)
|
57
|
+
end
|
58
|
+
|
59
|
+
def cnpj_verification_digits(cnpj)
|
60
|
+
document_verification_digits(CNPJ_VERIFICATION_MULTIPLIERS, cnpj)
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def document_verification_digits(verification_multipliers, document = nil)
|
66
|
+
return false if document.nil?
|
67
|
+
|
68
|
+
document_digits = document.to_s.scan(/[0-9]/).map(&:to_i)
|
69
|
+
validation_digits = []
|
70
|
+
|
71
|
+
if document_digits.size + 1 == verification_multipliers.size && document_digits.uniq.size > 1
|
72
|
+
0.upto(1) do |i|
|
73
|
+
sum = verification_multipliers.drop(1 - i).each_with_index.inject(0) do |val, (value, j)|
|
74
|
+
val + document_digits[j] * value
|
75
|
+
end
|
76
|
+
validation_digits[i] = (sum %= 11) < 2 ? 0 : 11 - sum
|
77
|
+
document_digits.push(validation_digits[i])
|
78
|
+
end
|
79
|
+
return validation_digits
|
80
|
+
end
|
81
|
+
[]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationESCL
|
5
|
+
extend IdentificationES
|
6
|
+
extend ModuleUtils
|
7
|
+
extend self
|
8
|
+
|
9
|
+
# RUT is the Chilean ID, followed by format: XX.XXX.XXX - Y
|
10
|
+
# http://es.wikipedia.org/wiki/Rol_%C3%9Anico_Tributario
|
11
|
+
#
|
12
|
+
# The last Y is a modulo 11 validation code. In the case the result is 10, it will be
|
13
|
+
# replaced by a 'K' character
|
14
|
+
def rut
|
15
|
+
# Rut is gonna be between 1.000.000 and 24.999.999
|
16
|
+
n = rand(1_000_000...25_000_000)
|
17
|
+
"#{n}-#{dv(n)}"
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def dv(rut)
|
23
|
+
total = rut.to_s.rjust(8, '0').split(//).zip(%w[3 2 7 6 5 4 3 2]).sum do |a, b|
|
24
|
+
a.to_i * b.to_i
|
25
|
+
end
|
26
|
+
(11 - total % 11).to_s.gsub(/10/, 'k').gsub(/11/, '0')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module FFakerTW
|
6
|
+
module IdentificationESCO
|
7
|
+
include IdentificationES
|
8
|
+
|
9
|
+
extend ModuleUtils
|
10
|
+
extend self
|
11
|
+
|
12
|
+
BLOOD_TYPE = %w[A B O AB].freeze
|
13
|
+
LICENSE_CATEGORY = %w[A B C].freeze
|
14
|
+
|
15
|
+
def drivers_license
|
16
|
+
how_many_numbers = rand(6..13)
|
17
|
+
FFakerTW.numerify('#' * how_many_numbers)
|
18
|
+
end
|
19
|
+
|
20
|
+
alias id drivers_license
|
21
|
+
|
22
|
+
def driver_license_category
|
23
|
+
category = fetch_sample(LICENSE_CATEGORY)
|
24
|
+
# the categories are A1 A2 B1 B2 B3 C1 C2 C3
|
25
|
+
num = category == 'A' ? rand(1..2) : rand(1..3)
|
26
|
+
"#{category}#{num}"
|
27
|
+
end
|
28
|
+
|
29
|
+
def blood_type
|
30
|
+
sign = fetch_sample(%w[+ -])
|
31
|
+
"#{fetch_sample(BLOOD_TYPE)}#{sign}"
|
32
|
+
end
|
33
|
+
|
34
|
+
def expedition_date
|
35
|
+
today = Date.today
|
36
|
+
today - rand(today.year)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationIN
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
AADHAAR_FORMAT = ['############'].freeze
|
9
|
+
|
10
|
+
# REF: https://en.wikipedia.org/wiki/Aadhaar
|
11
|
+
def aadhaar
|
12
|
+
FFakerTW.numerify(AADHAAR_FORMAT)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationIT
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
ETHNICITIES = [
|
9
|
+
'Afroamericano', 'Asiatico/isolano del Pacifico', 'Caucasico', 'Ispanico', 'Nativo americano',
|
10
|
+
'Multirazziale', 'Altro', 'Preferisco non rispondere'
|
11
|
+
].freeze
|
12
|
+
GENDERS = %w[Maschio Femmina].freeze
|
13
|
+
|
14
|
+
def drivers_license
|
15
|
+
FFakerTW::String.from_regexp(/U1[1-9]\d{7}[A-Z]/)
|
16
|
+
end
|
17
|
+
|
18
|
+
def ssn
|
19
|
+
FFakerTW.numerify('####################')
|
20
|
+
end
|
21
|
+
|
22
|
+
def ethnicity
|
23
|
+
fetch_sample(ETHNICITIES)
|
24
|
+
end
|
25
|
+
|
26
|
+
def gender
|
27
|
+
fetch_sample(GENDERS)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationKr
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
# Resident Registration Number
|
9
|
+
# http://ko.wikipedia.org/wiki/%EC%A3%BC%EB%AF%BC%EB%93%B1%EB%A1%9D%EB%B2%88%ED%98%B8
|
10
|
+
def rrn
|
11
|
+
birth = fetch_sample(Date.new(1970, 1, 1)..Date.new(1999, 12, 31)).strftime('%y%d%m')
|
12
|
+
sex = fetch_sample([1, 2])
|
13
|
+
loc = FFakerTW.numerify("#{fetch_sample(Array('00'..'95'))}###")
|
14
|
+
a, b, c, d, e, f, g, h, i, j, k, l = "#{birth}#{sex}#{loc}".split(//).map(&:to_i)
|
15
|
+
checksum = (11 - (2 * a + 3 * b + 4 * c + 5 * d + 6 * e + 7 * f + 8 * g + 9 * h + 2 * i + 3 * j + 4 * k + 5 * l) % 11) % 10
|
16
|
+
"#{birth}-#{sex}#{loc}#{checksum}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationMX
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
CONSONANTS = %w[B C D F G H J K L M N P Q R S T V W X Y Z].freeze
|
9
|
+
VOWELS = %w[A E I O U].freeze
|
10
|
+
HOMOCLAVE = CONSONANTS + VOWELS + Array('0'..'9')
|
11
|
+
|
12
|
+
# http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
|
13
|
+
# Registro Federal de Contribuyentes (R.F.C.) para persona física
|
14
|
+
def rfc_persona_fisica
|
15
|
+
consonants_n = CONSONANTS + ['Ñ']
|
16
|
+
[
|
17
|
+
fetch_sample(consonants_n),
|
18
|
+
fetch_sample(VOWELS),
|
19
|
+
fetch_sample(consonants_n + VOWELS, count: 2).join,
|
20
|
+
date,
|
21
|
+
fetch_sample(HOMOCLAVE, count: 3).join
|
22
|
+
].join
|
23
|
+
end
|
24
|
+
|
25
|
+
# http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
|
26
|
+
# Registro Federal de Contribuyentes (R.F.C.) para persona moral
|
27
|
+
def rfc_persona_moral
|
28
|
+
consonants_n_amp = CONSONANTS + ['Ñ', '&']
|
29
|
+
all_letters = consonants_n_amp + VOWELS
|
30
|
+
[fetch_sample(all_letters, count: 3), date, fetch_sample(HOMOCLAVE, count: 3)].flatten.join
|
31
|
+
end
|
32
|
+
|
33
|
+
# http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
|
34
|
+
# Registro Federal de Contribuyentes (R.F.C.)
|
35
|
+
def rfc
|
36
|
+
fetch_sample([rfc_persona_moral, rfc_persona_fisica])
|
37
|
+
end
|
38
|
+
|
39
|
+
# http://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Registro_de_Poblaci%C3%B3n
|
40
|
+
# Clave Única de Registro de Población
|
41
|
+
def curp
|
42
|
+
all_letters = CONSONANTS + VOWELS
|
43
|
+
hm = %w[H M]
|
44
|
+
[
|
45
|
+
fetch_sample(CONSONANTS), fetch_sample(VOWELS),
|
46
|
+
fetch_sample(all_letters, count: 2).join, date, fetch_sample(hm),
|
47
|
+
fetch_sample(ESTADOS_CURP), fetch_sample(CONSONANTS, count: 3).join,
|
48
|
+
fetch_sample(HOMOCLAVE), rand(0..9)
|
49
|
+
].join
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def date
|
55
|
+
::Time.at(rand * ::Time.now.to_f).strftime('%y%m%d')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module FFakerTW
|
6
|
+
module IdentificationPL
|
7
|
+
extend ModuleUtils
|
8
|
+
extend self
|
9
|
+
|
10
|
+
# Polish national identification number
|
11
|
+
# https://en.wikipedia.org/wiki/PESEL
|
12
|
+
def pesel
|
13
|
+
date = generate_valid_pesel_date
|
14
|
+
birthdate = pesel_birthdate(date)
|
15
|
+
serial_number = FFakerTW.numerify('####')
|
16
|
+
checksum = pesel_checksum(birthdate, serial_number)
|
17
|
+
"#{birthdate}#{serial_number}#{checksum}"
|
18
|
+
end
|
19
|
+
|
20
|
+
# Polish identity card number
|
21
|
+
# https://en.wikipedia.org/wiki/Polish_identity_card
|
22
|
+
def identity_card
|
23
|
+
letter_part = FFakerTW.letterify('???').upcase
|
24
|
+
number_part = FFakerTW.numerify('#####')
|
25
|
+
checksum = identity_card_checksum(letter_part, number_part)
|
26
|
+
"#{letter_part}#{checksum}#{number_part}"
|
27
|
+
end
|
28
|
+
|
29
|
+
alias id identity_card
|
30
|
+
|
31
|
+
# Polish driver's licence number
|
32
|
+
# https://en.wikipedia.org/wiki/Driving_licence_in_Poland
|
33
|
+
def drivers_license
|
34
|
+
FFakerTW.numerify('#####/##/####')
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def generate_valid_pesel_date
|
40
|
+
from = Date.new(1800, 1, 1)
|
41
|
+
to = [Date.today, Date.new(2299, 12, 31)].min
|
42
|
+
fetch_sample(from..to)
|
43
|
+
end
|
44
|
+
|
45
|
+
def pesel_birthdate(date)
|
46
|
+
century_differentiator = pesel_century_differentiator(date.year)
|
47
|
+
|
48
|
+
year = date.strftime('%y')
|
49
|
+
month = century_differentiator.zero? ? date.strftime('%m') : date.month + century_differentiator
|
50
|
+
day = date.strftime('%d')
|
51
|
+
|
52
|
+
"#{year}#{month}#{day}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def pesel_century_differentiator(year)
|
56
|
+
case year
|
57
|
+
when 1800..1899 then 80
|
58
|
+
when 2000..2099 then 20
|
59
|
+
when 2100..2199 then 40
|
60
|
+
when 2200..2299 then 60
|
61
|
+
else 0
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def pesel_checksum(date, serial_number)
|
66
|
+
pesel_digits = "#{date}#{serial_number}".split('').map(&:to_i)
|
67
|
+
a, b, c, d, e, f, g, h, i, j = pesel_digits
|
68
|
+
(a * 9 + b * 7 + c * 3 + d + e * 9 + f * 7 + g * 3 + h + i * 9 + j * 7) % 10
|
69
|
+
end
|
70
|
+
|
71
|
+
def identity_card_checksum(letter_part, number_part)
|
72
|
+
a, b, c = letter_part.codepoints.map { |codepoints| codepoints - 55 }
|
73
|
+
d, e, f, g, h = number_part.split('').map(&:to_i)
|
74
|
+
(a * 7 + b * 3 + c + 7 * d + 3 * e + f + 7 * g + 3 * h) % 10
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FFakerTW
|
4
|
+
module IdentificationTW
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
AREA_CODE = { a: 10, b: 11, c: 12, d: 13, e: 14, f: 15, g: 16, h: 17, i: 34, j: 18, k: 19, l: 20, m: 21, n: 22,
|
9
|
+
o: 35, p: 23, q: 24, r: 25, s: 26, t: 27, u: 28, v: 29, w: 32, x: 30, y: 31, z: 33 }.freeze
|
10
|
+
|
11
|
+
# Identity Card Number
|
12
|
+
# https://en.wikipedia.org/wiki/National_identification_card_(Taiwan)#Identity_card_number
|
13
|
+
def id
|
14
|
+
letter = FFakerTW.letterify('?')
|
15
|
+
code = AREA_CODE[letter.to_sym]
|
16
|
+
gender = fetch_sample([1, 2])
|
17
|
+
serial = FFakerTW.numerify('#######')
|
18
|
+
a, b, c, d, e, f, g, h, i, j = "#{code}#{gender}#{serial}".chars.map(&:to_i)
|
19
|
+
|
20
|
+
checksum = (9 * a + b + 2 * c + 3 * d + 4 * e + 5 * f + 6 * g + 7 * h + 8 * i + 9 * j) % 10
|
21
|
+
"#{letter.upcase}#{gender}#{serial}#{checksum}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cgi'
|
4
|
+
require 'tempfile'
|
5
|
+
require 'open-uri'
|
6
|
+
|
7
|
+
module FFakerTW
|
8
|
+
module Image
|
9
|
+
extend ModuleUtils
|
10
|
+
extend self
|
11
|
+
|
12
|
+
SUPPORTED_FORMATS = %w[png jpg jpeg gif].freeze
|
13
|
+
|
14
|
+
def url(size = '300x300', format = 'png', bg_color = :random, text_color = :random, text = nil)
|
15
|
+
check_size!(size)
|
16
|
+
check_format!(format)
|
17
|
+
|
18
|
+
bg_color = FFakerTW::Color.hex_code if bg_color == :random
|
19
|
+
text_color = FFakerTW::Color.hex_code if text_color == :random
|
20
|
+
text = CGI.escape(text.to_s)
|
21
|
+
|
22
|
+
"https://dummyimage.com/#{size}/#{bg_color}/#{text_color}.#{format}?text=#{text}"
|
23
|
+
end
|
24
|
+
|
25
|
+
def file(size = '300x300', format = 'png', bg_color = :random, text_color = :random, text = nil)
|
26
|
+
uri = URI.parse(url(size, format, bg_color, text_color, text))
|
27
|
+
file = Tempfile.new('ffaker_image')
|
28
|
+
file.binmode
|
29
|
+
file << uri.open.read
|
30
|
+
file.close
|
31
|
+
File.new(file.path)
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def check_size!(size)
|
37
|
+
return true if size =~ /\A\d+x\d+\z/
|
38
|
+
|
39
|
+
raise ArgumentError, 'Size should be specified in format 300x300'
|
40
|
+
end
|
41
|
+
|
42
|
+
def check_format!(format)
|
43
|
+
return true if SUPPORTED_FORMATS.include?(format)
|
44
|
+
|
45
|
+
raise ArgumentError, "Supported formats are #{SUPPORTED_FORMATS.join(', ')}"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|