ffaker 2.11.0 → 2.12.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 +14 -0
- data/Gemfile +2 -0
- data/REFERENCE.md +47 -0
- data/Rakefile +2 -0
- data/ffaker.gemspec +5 -3
- data/lib/ffaker.rb +14 -9
- data/lib/ffaker/address.rb +3 -3
- data/lib/ffaker/address_au.rb +7 -9
- data/lib/ffaker/address_br.rb +1 -1
- data/lib/ffaker/address_ca.rb +2 -2
- data/lib/ffaker/address_ch.rb +1 -1
- data/lib/ffaker/address_ch_de.rb +1 -1
- data/lib/ffaker/address_ch_fr.rb +1 -1
- data/lib/ffaker/address_ch_it.rb +1 -1
- data/lib/ffaker/address_da.rb +1 -1
- data/lib/ffaker/address_de.rb +1 -1
- data/lib/ffaker/address_fi.rb +1 -1
- data/lib/ffaker/address_fr.rb +1 -1
- data/lib/ffaker/address_gr.rb +1 -1
- data/lib/ffaker/address_id.rb +0 -1
- data/lib/ffaker/address_in.rb +2 -2
- data/lib/ffaker/address_ja.rb +0 -1
- data/lib/ffaker/address_kr.rb +0 -1
- data/lib/ffaker/address_mx.rb +7 -469
- data/lib/ffaker/address_nl.rb +1 -1
- data/lib/ffaker/address_pl.rb +0 -2
- data/lib/ffaker/address_ru.rb +1 -1
- data/lib/ffaker/address_se.rb +1 -1
- data/lib/ffaker/address_sn.rb +1 -2
- data/lib/ffaker/address_ua.rb +2 -2
- data/lib/ffaker/address_uk.rb +1 -1
- data/lib/ffaker/address_us.rb +1 -1
- data/lib/ffaker/airline.rb +1 -1
- data/lib/ffaker/animal_pl.rb +0 -2
- data/lib/ffaker/animals.rb +1 -1
- data/lib/ffaker/animals_cn.rb +0 -1
- data/lib/ffaker/animals_us.rb +0 -1
- data/lib/ffaker/avatar.rb +23 -5
- data/lib/ffaker/aws.rb +1 -1
- data/lib/ffaker/bacon_ipsum.rb +1 -1
- data/lib/ffaker/bank.rb +106 -0
- data/lib/ffaker/book.rb +1 -1
- data/lib/ffaker/boolean.rb +1 -1
- data/lib/ffaker/cheesy_lingo.rb +3 -6
- data/lib/ffaker/code.rb +0 -1
- data/lib/ffaker/color.rb +7 -7
- data/lib/ffaker/color_ua.rb +1 -1
- data/lib/ffaker/company.rb +1 -1
- data/lib/ffaker/company_cn.rb +1 -1
- data/lib/ffaker/company_it.rb +4 -2
- data/lib/ffaker/company_se.rb +1 -1
- data/lib/ffaker/conference.rb +1 -1
- data/lib/ffaker/courses.rb +1 -1
- data/lib/ffaker/currency.rb +1 -1
- data/lib/ffaker/data/address/city_suffixes +1 -1
- data/lib/ffaker/data/address/country +1 -1
- data/lib/ffaker/data/address/country_code +1 -1
- data/lib/ffaker/data/address/neighborhood +1 -1
- data/lib/ffaker/data/address/street_suffix +1 -1
- data/lib/ffaker/data/address_ca/city +99 -99
- data/lib/ffaker/data/address_ca/province +1 -1
- data/lib/ffaker/data/address_de/city +1 -1
- data/lib/ffaker/data/address_de/state +1 -1
- data/lib/ffaker/data/address_fr/city +1 -1
- data/lib/ffaker/data/address_gr/city +1 -1
- data/lib/ffaker/data/address_gr/region +1 -1
- data/lib/ffaker/data/address_gr/street +1 -1
- data/lib/ffaker/data/address_mx/ags +11 -0
- data/lib/ffaker/data/address_mx/bc +5 -0
- data/lib/ffaker/data/address_mx/bcs +5 -0
- data/lib/ffaker/data/address_mx/camp +11 -0
- data/lib/ffaker/data/address_mx/chih +67 -0
- data/lib/ffaker/data/address_mx/chis +118 -0
- data/lib/ffaker/data/address_mx/coah +38 -0
- data/lib/ffaker/data/address_mx/col +10 -0
- data/lib/ffaker/data/address_mx/df +16 -0
- data/lib/ffaker/data/address_mx/dgo +39 -0
- data/lib/ffaker/data/address_mx/gro +81 -0
- data/lib/ffaker/data/address_mx/gto +46 -0
- data/lib/ffaker/data/address_mx/hgo +84 -0
- data/lib/ffaker/data/address_mx/jal +125 -0
- data/lib/ffaker/data/address_mx/mex +125 -0
- data/lib/ffaker/data/address_mx/mich +113 -0
- data/lib/ffaker/data/address_mx/mor +33 -0
- data/lib/ffaker/data/address_mx/nay +20 -0
- data/lib/ffaker/data/address_mx/nl +51 -0
- data/lib/ffaker/data/address_mx/oax +570 -0
- data/lib/ffaker/data/address_mx/pue +217 -0
- data/lib/ffaker/data/address_mx/qr +10 -0
- data/lib/ffaker/data/address_mx/qro +18 -0
- data/lib/ffaker/data/address_mx/sin +18 -0
- data/lib/ffaker/data/address_mx/slp +58 -0
- data/lib/ffaker/data/address_mx/son +72 -0
- data/lib/ffaker/data/address_mx/state +1 -1
- data/lib/ffaker/data/address_mx/state_abbr +1 -1
- data/lib/ffaker/data/address_mx/tab +17 -0
- data/lib/ffaker/data/address_mx/tamps +43 -0
- data/lib/ffaker/data/address_mx/tlax +60 -0
- data/lib/ffaker/data/address_mx/ver +212 -0
- data/lib/ffaker/data/address_mx/yuc +106 -0
- data/lib/ffaker/data/address_mx/zac +58 -0
- data/lib/ffaker/data/address_ru/city +1 -1
- data/lib/ffaker/data/address_se/city +1 -1
- data/lib/ffaker/data/address_se/countries +1 -1
- data/lib/ffaker/data/address_se/street +1 -1
- data/lib/ffaker/data/address_sn/arrondissements +1 -1
- data/lib/ffaker/data/address_sn/departements +1 -1
- data/lib/ffaker/data/address_sn/regions +1 -1
- data/lib/ffaker/data/address_uk/county +1 -1
- data/lib/ffaker/data/address_us/state +1 -1
- data/lib/ffaker/data/address_us/state_abbr +1 -1
- data/lib/ffaker/data/address_us/state_and_territories_abbr +1 -1
- data/lib/ffaker/data/animal_cn/common_names +1 -1
- data/lib/ffaker/data/aws/ec2_reserved_instance_tenancy +1 -1
- data/lib/ffaker/data/aws/ec2_reserved_offering_type +1 -1
- data/lib/ffaker/data/aws/ec2_reserved_product_description +1 -1
- data/lib/ffaker/data/cheesy_lingo/cheesy_phrases +1 -1
- data/lib/ffaker/data/cheesy_lingo/cheesy_words +1 -1
- data/lib/ffaker/data/color/names_list +1 -1
- data/lib/ffaker/data/company/bs_mid +1 -1
- data/lib/ffaker/data/company/bs_pos +1 -1
- data/lib/ffaker/data/company/bs_pre +1 -1
- data/lib/ffaker/data/company/catch_mid +1 -1
- data/lib/ffaker/data/company/catch_pos +1 -1
- data/lib/ffaker/data/company/catch_pre +1 -1
- data/lib/ffaker/data/company/position_areas +1 -1
- data/lib/ffaker/data/conference/conference_list +1 -1
- data/lib/ffaker/data/currency/currency_code +1 -1
- data/lib/ffaker/data/currency/currency_name +1 -1
- data/lib/ffaker/data/currency/currency_symbol +0 -1
- data/lib/ffaker/data/dizzle_ipsum/dizzle_words +1 -1
- data/lib/ffaker/data/education/major_noun +1 -1
- data/lib/ffaker/data/education/school_suffix +1 -1
- data/lib/ffaker/data/education_cn/city +1 -1
- data/lib/ffaker/data/education_cn/major +1 -1
- data/lib/ffaker/data/education_cn/province +1 -1
- data/lib/ffaker/data/education_cn/school_type +1 -1
- data/lib/ffaker/data/food/fruit +1 -1
- data/lib/ffaker/data/food/herb_spice +1 -1
- data/lib/ffaker/data/food/meat +1 -1
- data/lib/ffaker/data/food/vegetable +1 -1
- data/lib/ffaker/data/hipster_ipsum/hipster_words +1 -1
- data/lib/ffaker/data/identification_mx/estados_curp +1 -1
- data/lib/ffaker/data/job/job_adj +1 -1
- data/lib/ffaker/data/job/job_noun +1 -1
- data/lib/ffaker/data/job/job_prefix +1 -1
- data/lib/ffaker/data/job_fr/job_prefixes +1 -1
- data/lib/ffaker/data/locale/language +1 -1
- data/lib/ffaker/data/locale/language_code +1 -1
- data/lib/ffaker/data/lorem/characters +1 -1
- data/lib/ffaker/data/lorem/words +1 -1
- data/lib/ffaker/data/lorem_ar/words +1 -1
- data/lib/ffaker/data/lorem_cn/words +1 -1
- data/lib/ffaker/data/lorem_fr/words +1 -1
- data/lib/ffaker/data/movie/adj_and_adv +1 -1
- data/lib/ffaker/data/movie/nouns +1 -1
- data/lib/ffaker/data/movie/prefixes +1 -1
- data/lib/ffaker/data/name/pronouns +6 -0
- data/lib/ffaker/data/name_ar/first_names_female +1 -1
- data/lib/ffaker/data/name_ar/first_names_male +1 -1
- data/lib/ffaker/data/name_ar/last_names +1 -1
- data/lib/ffaker/data/name_cn/first_names +1 -1
- data/lib/ffaker/data/name_cn/last_names +1 -1
- data/lib/ffaker/data/name_cs/female_first_names +40 -0
- data/lib/ffaker/data/name_cs/female_last_names +50 -0
- data/lib/ffaker/data/name_cs/male_first_names +88 -0
- data/lib/ffaker/data/name_cs/male_last_names +49 -0
- data/lib/ffaker/data/name_cs/prefixes +4 -4
- data/lib/ffaker/data/name_de/first_names +1 -1
- data/lib/ffaker/data/name_de/last_names +1 -1
- data/lib/ffaker/data/name_fr/first_names +1 -1
- data/lib/ffaker/data/name_fr/last_names +1 -1
- data/lib/ffaker/data/name_ga/first_names_female +1 -1
- data/lib/ffaker/data/name_ga/first_names_male +1 -1
- data/lib/ffaker/data/name_gr/female_first_names +1 -1
- data/lib/ffaker/data/name_gr/female_last_names +1 -1
- data/lib/ffaker/data/name_gr/male_first_names +1 -1
- data/lib/ffaker/data/name_gr/male_last_names +1 -1
- data/lib/ffaker/data/name_it/first_names +1 -1
- data/lib/ffaker/data/name_it/last_names +1 -1
- data/lib/ffaker/data/name_ja/first_names +1 -1
- data/lib/ffaker/data/name_ja/last_names +1 -1
- data/lib/ffaker/data/name_kh/first_names +1 -1
- data/lib/ffaker/data/name_kh/nick_names +1 -1
- data/lib/ffaker/data/name_kr/first_names +1 -1
- data/lib/ffaker/data/name_kr/last_names +1 -1
- data/lib/ffaker/data/name_mx/female_first_names +1 -1
- data/lib/ffaker/data/name_mx/last_names +1 -1
- data/lib/ffaker/data/name_mx/male_first_names +1 -1
- data/lib/ffaker/data/name_ph/autochthonous_surnames +1 -1
- data/lib/ffaker/data/name_ph/spanish_surnames +1 -1
- data/lib/ffaker/data/name_ru/first_names_male +0 -1
- data/lib/ffaker/data/name_se/first_names_female +1 -1
- data/lib/ffaker/data/name_se/first_names_male +1 -1
- data/lib/ffaker/data/name_se/last_names +1 -1
- data/lib/ffaker/data/name_sn/first_names_female +1 -1
- data/lib/ffaker/data/name_sn/first_names_male +1 -1
- data/lib/ffaker/data/name_sn/last_names +1 -1
- data/lib/ffaker/data/name_th/first_names +1 -1
- data/lib/ffaker/data/name_th/last_names +1 -1
- data/lib/ffaker/data/name_th/nick_names +1 -1
- data/lib/ffaker/data/nato_alphabet/alphabet_codes +26 -0
- data/lib/ffaker/data/nato_alphabet/numeric_codes +10 -0
- data/lib/ffaker/data/phone_number_nl/area_codes +142 -0
- data/lib/ffaker/data/phone_number_ru/home_phone_prefixes +107 -0
- data/lib/ffaker/data/phone_number_ru/mobile_phone_prefixes +61 -0
- data/lib/ffaker/data/phone_number_se/phone_prefix +1 -1
- data/lib/ffaker/data/phone_number_ua/home_phone_prefixes +29 -0
- data/lib/ffaker/data/phone_number_ua/mobile_phone_prefixes +11 -0
- data/lib/ffaker/data/product/adj +1 -1
- data/lib/ffaker/data/product/b1 +1 -1
- data/lib/ffaker/data/skill/specialty_end +1 -1
- data/lib/ffaker/data/skill/specialty_start +1 -1
- data/lib/ffaker/data/skill/tech_skills +1 -1
- data/lib/ffaker/data/vehicle/displacements_list +1 -1
- data/lib/ffaker/data/vehicle/fuel_types_list +1 -1
- data/lib/ffaker/data/vehicle/makes_list +1 -1
- data/lib/ffaker/data/vehicle/transmissions_list +1 -1
- data/lib/ffaker/data/vehicle/upholstery_list +1 -1
- data/lib/ffaker/data/venue/venue_list +1 -1
- data/lib/ffaker/dizzle_ipsum.rb +1 -1
- data/lib/ffaker/education.rb +5 -2
- data/lib/ffaker/education_cn.rb +1 -2
- data/lib/ffaker/filesystem.rb +1 -1
- data/lib/ffaker/food.rb +2 -0
- data/lib/ffaker/gender.rb +1 -1
- data/lib/ffaker/gender_br.rb +1 -1
- data/lib/ffaker/gender_cn.rb +1 -1
- data/lib/ffaker/gender_id.rb +0 -1
- data/lib/ffaker/gender_ja.rb +18 -0
- data/lib/ffaker/gender_jp.rb +2 -12
- data/lib/ffaker/gender_kr.rb +1 -1
- data/lib/ffaker/gender_pl.rb +0 -2
- data/lib/ffaker/geolocation.rb +32 -22
- data/lib/ffaker/guid.rb +1 -1
- data/lib/ffaker/healthcare_ipsum.rb +1 -1
- data/lib/ffaker/healthcare_ru.rb +0 -1
- data/lib/ffaker/hipster_ipsum.rb +1 -1
- data/lib/ffaker/html_ipsum.rb +3 -3
- data/lib/ffaker/identification.rb +5 -2
- data/lib/ffaker/identification_br.rb +1 -1
- data/lib/ffaker/identification_es.rb +1 -1
- data/lib/ffaker/identification_es_cl.rb +6 -3
- data/lib/ffaker/identification_es_co.rb +2 -2
- data/lib/ffaker/identification_kr.rb +1 -1
- data/lib/ffaker/identification_mx.rb +13 -17
- data/lib/ffaker/image.rb +2 -0
- data/lib/ffaker/internet.rb +17 -22
- data/lib/ffaker/internet_se.rb +7 -7
- data/lib/ffaker/job.rb +1 -1
- data/lib/ffaker/job_br.rb +1 -1
- data/lib/ffaker/job_cn.rb +1 -1
- data/lib/ffaker/job_fr.rb +1 -1
- data/lib/ffaker/job_ja.rb +0 -1
- data/lib/ffaker/job_kr.rb +1 -1
- data/lib/ffaker/job_vn.rb +0 -1
- data/lib/ffaker/locale.rb +8 -12
- data/lib/ffaker/lorem.rb +6 -7
- data/lib/ffaker/lorem_ar.rb +1 -1
- data/lib/ffaker/lorem_cn.rb +1 -1
- data/lib/ffaker/lorem_fr.rb +1 -1
- data/lib/ffaker/lorem_ie.rb +0 -1
- data/lib/ffaker/lorem_ja.rb +1 -1
- data/lib/ffaker/lorem_kr.rb +1 -1
- data/lib/ffaker/lorem_pl.rb +0 -2
- data/lib/ffaker/lorem_ru.rb +0 -1
- data/lib/ffaker/lorem_ua.rb +3 -5
- data/lib/ffaker/movie.rb +7 -4
- data/lib/ffaker/music.rb +1 -1
- data/lib/ffaker/name.rb +5 -1
- data/lib/ffaker/name_ar.rb +0 -1
- data/lib/ffaker/name_br.rb +1 -1
- data/lib/ffaker/name_cn.rb +1 -1
- data/lib/ffaker/name_cs.rb +7 -7
- data/lib/ffaker/name_da.rb +2 -2
- data/lib/ffaker/name_de.rb +1 -1
- data/lib/ffaker/name_es.rb +0 -2
- data/lib/ffaker/name_fr.rb +1 -2
- data/lib/ffaker/name_ga.rb +1 -1
- data/lib/ffaker/name_gr.rb +2 -3
- data/lib/ffaker/name_id.rb +0 -1
- data/lib/ffaker/name_in.rb +1 -1
- data/lib/ffaker/name_it.rb +2 -3
- data/lib/ffaker/name_ja.rb +1 -1
- data/lib/ffaker/name_kh.rb +2 -0
- data/lib/ffaker/name_kr.rb +1 -1
- data/lib/ffaker/name_mx.rb +2 -2
- data/lib/ffaker/name_nb.rb +1 -1
- data/lib/ffaker/name_nl.rb +1 -1
- data/lib/ffaker/name_ph.rb +1 -1
- data/lib/ffaker/name_pl.rb +1 -2
- data/lib/ffaker/name_ru.rb +1 -1
- data/lib/ffaker/name_se.rb +1 -1
- data/lib/ffaker/name_sn.rb +3 -6
- data/lib/ffaker/name_th.rb +1 -1
- data/lib/ffaker/name_th_en.rb +1 -1
- data/lib/ffaker/name_tw.rb +0 -1
- data/lib/ffaker/name_ua.rb +1 -1
- data/lib/ffaker/name_vn.rb +1 -1
- data/lib/ffaker/nato_alphabet.rb +2 -4
- data/lib/ffaker/phone_number.rb +1 -1
- data/lib/ffaker/phone_number_au.rb +11 -12
- data/lib/ffaker/phone_number_br.rb +6 -13
- data/lib/ffaker/phone_number_ch.rb +1 -1
- data/lib/ffaker/phone_number_cu.rb +18 -27
- data/lib/ffaker/phone_number_da.rb +1 -2
- data/lib/ffaker/phone_number_de.rb +1 -2
- data/lib/ffaker/phone_number_fr.rb +3 -12
- data/lib/ffaker/phone_number_id.rb +2 -6
- data/lib/ffaker/phone_number_it.rb +1 -1
- data/lib/ffaker/phone_number_kr.rb +1 -1
- data/lib/ffaker/phone_number_mx.rb +1 -2
- data/lib/ffaker/phone_number_nl.rb +9 -12
- data/lib/ffaker/phone_number_pl.rb +3 -4
- data/lib/ffaker/phone_number_ru.rb +120 -0
- data/lib/ffaker/phone_number_se.rb +1 -1
- data/lib/ffaker/phone_number_sg.rb +1 -1
- data/lib/ffaker/phone_number_sn.rb +12 -19
- data/lib/ffaker/phone_number_tw.rb +3 -10
- data/lib/ffaker/phone_number_ua.rb +42 -0
- data/lib/ffaker/product.rb +9 -11
- data/lib/ffaker/sem_ver.rb +19 -0
- data/lib/ffaker/skill.rb +1 -1
- data/lib/ffaker/sport.rb +2 -0
- data/lib/ffaker/sport_us.rb +2 -0
- data/lib/ffaker/ssn.rb +1 -1
- data/lib/ffaker/ssn_mx.rb +1 -2
- data/lib/ffaker/ssn_se.rb +16 -25
- data/lib/ffaker/string.rb +6 -5
- data/lib/ffaker/time.rb +9 -8
- data/lib/ffaker/tweet.rb +4 -4
- data/lib/ffaker/unit.rb +1 -1
- data/lib/ffaker/unit_english.rb +1 -1
- data/lib/ffaker/unit_metric.rb +1 -1
- data/lib/ffaker/utils/array_utils.rb +7 -4
- data/lib/ffaker/utils/module_utils.rb +2 -0
- data/lib/ffaker/utils/random_utils.rb +2 -0
- data/lib/ffaker/vehicle.rb +6 -5
- data/lib/ffaker/venue.rb +1 -1
- data/lib/ffaker/youtube.rb +1 -1
- data/scripts/benchmark.rb +2 -0
- data/scripts/profiling.rb +2 -0
- data/scripts/reference.rb +5 -2
- data/test/helper.rb +2 -0
- data/test/test_address.rb +1 -1
- data/test/test_address_au.rb +4 -5
- data/test/test_address_br.rb +1 -1
- data/test/test_address_ca.rb +1 -1
- data/test/test_address_ch.rb +1 -1
- data/test/test_address_ch_de.rb +1 -1
- data/test/test_address_ch_fr.rb +1 -1
- data/test/test_address_ch_it.rb +1 -1
- data/test/test_address_da.rb +1 -1
- data/test/test_address_de.rb +1 -1
- data/test/test_address_fi.rb +3 -4
- data/test/test_address_fr.rb +1 -2
- data/test/test_address_gr.rb +1 -1
- data/test/test_address_id.rb +0 -1
- data/test/test_address_in.rb +1 -1
- data/test/test_address_ja.rb +0 -1
- data/test/test_address_kr.rb +0 -1
- data/test/test_address_mx.rb +1 -2
- data/test/test_address_nl.rb +1 -1
- data/test/test_address_pl.rb +0 -1
- data/test/test_address_ru.rb +1 -1
- data/test/test_address_se.rb +3 -3
- data/test/test_address_sn.rb +1 -4
- data/test/test_address_ua.rb +1 -1
- data/test/test_address_uk.rb +1 -1
- data/test/test_address_us.rb +1 -1
- data/test/test_airline.rb +1 -1
- data/test/test_animal.rb +1 -1
- data/test/test_animal_cn.rb +0 -1
- data/test/test_animal_pl.rb +0 -1
- data/test/test_animal_us.rb +0 -1
- data/test/test_array_utils.rb +2 -2
- data/test/test_avatar.rb +4 -2
- data/test/test_aws.rb +1 -1
- data/test/test_bacon_ipsum.rb +1 -1
- data/test/test_bank.rb +18 -0
- data/test/test_book.rb +1 -1
- data/test/test_boolean.rb +2 -2
- data/test/test_cheesy_lingo.rb +4 -2
- data/test/test_code.rb +0 -1
- data/test/test_color.rb +4 -4
- data/test/test_color_ua.rb +1 -1
- data/test/test_company.rb +3 -3
- data/test/test_company_cn.rb +1 -1
- data/test/test_company_it.rb +1 -1
- data/test/test_company_se.rb +1 -1
- data/test/test_conference.rb +1 -1
- data/test/test_course_mathematiques.rb +2 -0
- data/test/test_course_philosophie.rb +2 -0
- data/test/test_currency.rb +1 -1
- data/test/test_dizzle_ipsum.rb +1 -1
- data/test/test_education.rb +1 -1
- data/test/test_education_cn.rb +0 -1
- data/test/test_faker.rb +1 -1
- data/test/test_filesystem.rb +3 -3
- data/test/test_food.rb +2 -2
- data/test/test_gender.rb +1 -1
- data/test/test_gender_br.rb +1 -1
- data/test/test_gender_cn.rb +1 -1
- data/test/test_gender_id.rb +0 -1
- data/test/test_gender_ja.rb +27 -0
- data/test/test_gender_jp.rb +1 -2
- data/test/test_gender_kr.rb +1 -1
- data/test/test_gender_pl.rb +1 -2
- data/test/test_geolocation.rb +1 -1
- data/test/test_guid.rb +1 -1
- data/test/test_healthcare_ipsum.rb +2 -0
- data/test/test_healthcare_ru.rb +1 -2
- data/test/test_hipster_ipsum.rb +2 -2
- data/test/test_html_ipsum.rb +13 -13
- data/test/test_identification.rb +2 -2
- data/test/test_identification_br.rb +1 -1
- data/test/test_identification_co.rb +2 -0
- data/test/test_identification_es.rb +1 -1
- data/test/test_identification_es_cl.rb +1 -1
- data/test/test_identification_es_mx.rb +1 -2
- data/test/test_identification_kr.rb +1 -1
- data/test/test_internet.rb +5 -5
- data/test/test_internet_se.rb +5 -5
- data/test/test_job.rb +1 -1
- data/test/test_job_br.rb +1 -1
- data/test/test_job_cn.rb +1 -1
- data/test/test_job_fr.rb +1 -1
- data/test/test_job_ja.rb +1 -1
- data/test/test_job_kr.rb +1 -1
- data/test/test_job_vn.rb +0 -1
- data/test/test_locale.rb +1 -1
- data/test/test_lorem.rb +1 -1
- data/test/test_lorem_ar.rb +2 -3
- data/test/test_lorem_cn.rb +1 -1
- data/test/test_lorem_fr.rb +5 -5
- data/test/test_lorem_ie.rb +2 -3
- data/test/test_lorem_ja.rb +1 -1
- data/test/test_lorem_kr.rb +4 -4
- data/test/test_lorem_pl.rb +2 -3
- data/test/test_lorem_ru.rb +3 -4
- data/test/test_lorem_ua.rb +4 -4
- data/test/test_module_utils.rb +1 -1
- data/test/test_movie.rb +1 -1
- data/test/test_music.rb +2 -2
- data/test/test_name.rb +6 -2
- data/test/test_name_ar.rb +0 -1
- data/test/test_name_br.rb +1 -1
- data/test/test_name_cn.rb +1 -1
- data/test/test_name_cs.rb +2 -3
- data/test/test_name_da.rb +2 -2
- data/test/test_name_de.rb +1 -1
- data/test/test_name_es.rb +0 -1
- data/test/test_name_fr.rb +1 -2
- data/test/test_name_ga.rb +1 -1
- data/test/test_name_gr.rb +1 -1
- data/test/test_name_id.rb +0 -1
- data/test/test_name_it.rb +1 -2
- data/test/test_name_ja.rb +1 -1
- data/test/test_name_kh.rb +9 -7
- data/test/test_name_kr.rb +1 -1
- data/test/test_name_mx.rb +1 -2
- data/test/test_name_nb.rb +1 -1
- data/test/test_name_nl.rb +1 -1
- data/test/test_name_ph.rb +2 -2
- data/test/test_name_pl.rb +0 -1
- data/test/test_name_ru.rb +4 -4
- data/test/test_name_se.rb +1 -1
- data/test/test_name_sn.rb +1 -2
- data/test/test_name_th.rb +1 -1
- data/test/test_name_th_en.rb +1 -1
- data/test/test_name_tw.rb +0 -1
- data/test/test_name_ua.rb +3 -3
- data/test/test_name_vn.rb +1 -1
- data/test/test_nato_alphabet.rb +1 -1
- data/test/test_phone_number.rb +1 -1
- data/test/test_phone_number_au.rb +4 -5
- data/test/test_phone_number_br.rb +2 -4
- data/test/test_phone_number_cu.rb +4 -11
- data/test/test_phone_number_da.rb +1 -2
- data/test/test_phone_number_de.rb +1 -2
- data/test/test_phone_number_fr.rb +0 -1
- data/test/test_phone_number_id.rb +0 -1
- data/test/test_phone_number_kr.rb +1 -1
- data/test/test_phone_number_mx.rb +1 -2
- data/test/test_phone_number_nl.rb +1 -2
- data/test/test_phone_number_pl.rb +1 -1
- data/test/test_phone_number_ru.rb +76 -0
- data/test/test_phone_number_se.rb +2 -2
- data/test/test_phone_number_sg.rb +1 -1
- data/test/test_phone_number_sn.rb +3 -4
- data/test/test_phone_number_tw.rb +0 -1
- data/test/test_phone_number_ua.rb +38 -0
- data/test/test_products.rb +1 -1
- data/test/test_sem_ver.rb +18 -0
- data/test/test_skill.rb +1 -1
- data/test/test_sport_us.rb +0 -1
- data/test/test_sports.rb +1 -1
- data/test/test_ssn.rb +1 -1
- data/test/test_ssn_mx.rb +1 -2
- data/test/test_ssn_se.rb +4 -4
- data/test/test_string.rb +4 -4
- data/test/test_time.rb +1 -1
- data/test/test_tweet.rb +1 -1
- data/test/test_unique_utils.rb +1 -1
- data/test/test_units.rb +1 -2
- data/test/test_units_english.rb +1 -2
- data/test/test_units_metric.rb +1 -2
- data/test/test_vehicle.rb +1 -1
- data/test/test_venue.rb +1 -1
- data/test/test_youtube.rb +1 -1
- metadata +63 -5
@@ -1,9 +1,7 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
3
|
require 'helper'
|
5
4
|
|
6
|
-
# Author: Gustavo Souza https://github.com/gustavor-souza
|
7
5
|
class TestPhoneNumberBR < Test::Unit::TestCase
|
8
6
|
include DeterministicHelper
|
9
7
|
|
@@ -38,7 +36,7 @@ class TestPhoneNumberBR < Test::Unit::TestCase
|
|
38
36
|
end
|
39
37
|
|
40
38
|
def test_mobile_phone_number
|
41
|
-
assert_match(/\A[1-9]\d\s?
|
39
|
+
assert_match(/\A[1-9]\d\s?9[6-9]\d{3}-?\d{4}\z/,
|
42
40
|
@tester.mobile_phone_number)
|
43
41
|
end
|
44
42
|
|
@@ -50,7 +48,7 @@ class TestPhoneNumberBR < Test::Unit::TestCase
|
|
50
48
|
end
|
51
49
|
|
52
50
|
def test_international_mobile_phone_number
|
53
|
-
assert_match(/\A\+55\s?[1-9]\d\s?
|
51
|
+
assert_match(/\A\+55\s?[1-9]\d\s?9[6-9]\d{3}-?\d{4}\z/,
|
54
52
|
@tester.international_mobile_phone_number)
|
55
53
|
end
|
56
54
|
|
@@ -1,8 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
5
|
-
# Author: Luilver<luilver@gmail.com>
|
6
5
|
class TestPhoneNumberCU < Test::Unit::TestCase
|
7
6
|
include DeterministicHelper
|
8
7
|
|
@@ -19,30 +18,26 @@ class TestPhoneNumberCU < Test::Unit::TestCase
|
|
19
18
|
@tester = FFaker::PhoneNumberCU
|
20
19
|
end
|
21
20
|
|
22
|
-
# Prefix format test
|
23
|
-
#
|
24
21
|
def test_mobile_phone_prefix
|
25
|
-
assert FFaker::PhoneNumberCU::
|
22
|
+
assert FFaker::PhoneNumberCU::MOBILE_OPERATORS_PREFIX.include?(
|
26
23
|
@tester.mobile_phone_prefix
|
27
24
|
)
|
28
25
|
end
|
29
26
|
|
30
27
|
def test_home_work_phone_prefix
|
31
|
-
assert FFaker::PhoneNumberCU::
|
28
|
+
assert FFaker::PhoneNumberCU::HOME_WORK_OPERATORS_PREFIX.include?(
|
32
29
|
@tester.home_work_phone_prefix
|
33
30
|
)
|
34
31
|
end
|
35
32
|
|
36
33
|
def test_phone_prefix
|
37
34
|
10.times do
|
38
|
-
assert FFaker::PhoneNumberCU::
|
35
|
+
assert FFaker::PhoneNumberCU::OPERATORS_PREFIX.include?(
|
39
36
|
@tester.phone_prefix
|
40
37
|
)
|
41
38
|
end
|
42
39
|
end
|
43
40
|
|
44
|
-
# General format test
|
45
|
-
#
|
46
41
|
def test_mobile_phone_number
|
47
42
|
assert_match(/05 \d{3} \d{4}/,
|
48
43
|
FFaker::PhoneNumberCU.mobile_phone_number)
|
@@ -60,8 +55,6 @@ class TestPhoneNumberCU < Test::Unit::TestCase
|
|
60
55
|
end
|
61
56
|
end
|
62
57
|
|
63
|
-
# International format tests
|
64
|
-
#
|
65
58
|
def test_international_mobile_phone_number
|
66
59
|
assert_match(/(00|\+)535 \d{3} \d{4}/,
|
67
60
|
FFaker::PhoneNumberCU.international_mobile_phone_number)
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'helper'
|
4
|
+
|
5
|
+
class TestPhoneNumberRU < Test::Unit::TestCase
|
6
|
+
include DeterministicHelper
|
7
|
+
|
8
|
+
assert_methods_are_deterministic(
|
9
|
+
FFaker::PhoneNumberRU,
|
10
|
+
:international_phone_number, :international_mobile_phone_number,
|
11
|
+
:international_home_work_phone_number, :international_toll_free_number,
|
12
|
+
:phone_number, :mobile_phone_number, :home_work_phone_number,
|
13
|
+
:toll_free_number, :international_country_code, :country_code,
|
14
|
+
:home_work_phone_prefix, :mobile_phone_prefix
|
15
|
+
)
|
16
|
+
|
17
|
+
def setup
|
18
|
+
@tester = FFaker::PhoneNumberRU
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_international_phone_number
|
22
|
+
assert_match(/\A\+7 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
23
|
+
@tester.international_phone_number)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_international_mobile_phone_number
|
27
|
+
assert_match(/\A\+7 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
28
|
+
@tester.international_mobile_phone_number)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_international_home_work_phone_number
|
32
|
+
assert_match(/\A\+7 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
33
|
+
@tester.international_home_work_phone_number)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_international_toll_free_number
|
37
|
+
assert_match(/\A\+7 800 \d{3}-\d{2}-\d{2}\z/,
|
38
|
+
@tester.international_toll_free_number)
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_phone_number
|
42
|
+
assert_match(/\A8 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
43
|
+
@tester.mobile_phone_number)
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_mobile_phone_number
|
47
|
+
assert_match(/\A8 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
48
|
+
@tester.mobile_phone_number)
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_home_work_phone_number
|
52
|
+
assert_match(/\A8 \d{3} \d{3}-\d{2}-\d{2}\z/,
|
53
|
+
@tester.mobile_phone_number)
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_toll_free_number
|
57
|
+
assert_match(/\A8 800 \d{3}-\d{2}-\d{2}\z/,
|
58
|
+
@tester.toll_free_number)
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_international_country_code
|
62
|
+
assert_match('+7', @tester.international_country_code)
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_country_code
|
66
|
+
assert_match('8', @tester.country_code)
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_home_work_phone_prefix
|
70
|
+
assert_include(@tester::HOME_PHONE_PREFIXES, @tester.home_work_phone_prefix)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_mobile_phone_prefix
|
74
|
+
assert_include(@tester::MOBILE_PHONE_PREFIXES, @tester.mobile_phone_prefix)
|
75
|
+
end
|
76
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
@@ -16,7 +16,7 @@ class TestPhoneNumberSE < Test::Unit::TestCase
|
|
16
16
|
@tester = FFaker::PhoneNumberSE
|
17
17
|
end
|
18
18
|
|
19
|
-
ALLOWED_CHARS = /[()\d +-]
|
19
|
+
ALLOWED_CHARS = /[()\d +-]/.freeze
|
20
20
|
|
21
21
|
def test_mobile_phone_prefix
|
22
22
|
assert FFaker::PhoneNumberSE::MOBILE_PHONE_PREFIX.include?(@tester.mobile_prefix)
|
@@ -1,8 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
5
|
-
# Author: xarala<pathe.sene@xarala.sn> http://www.xarala.sn
|
6
5
|
class TestPhoneNumberSN < Test::Unit::TestCase
|
7
6
|
include DeterministicHelper
|
8
7
|
|
@@ -17,11 +16,11 @@ class TestPhoneNumberSN < Test::Unit::TestCase
|
|
17
16
|
end
|
18
17
|
|
19
18
|
def test_mobile_phone_prefix
|
20
|
-
assert FFaker::PhoneNumberSN::
|
19
|
+
assert FFaker::PhoneNumberSN::MOBILE_OPERATORS_PREFIX.include?(@tester.mobile_phone_prefix)
|
21
20
|
end
|
22
21
|
|
23
22
|
def test_homework_phone_prefix
|
24
|
-
assert FFaker::PhoneNumberSN::
|
23
|
+
assert FFaker::PhoneNumberSN::HOME_WORK_OPERATORS_PREFIX.include?(@tester.homework_phone_prefix)
|
25
24
|
end
|
26
25
|
|
27
26
|
def test_short_phone_number
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class TestPhoneNumberUA < Test::Unit::TestCase
|
6
|
+
include DeterministicHelper
|
7
|
+
|
8
|
+
assert_methods_are_deterministic(
|
9
|
+
FFaker::PhoneNumberUA,
|
10
|
+
:phone_number, :home_phone_number, :mobile_phone_number,
|
11
|
+
:international_home_phone_number, :international_mobile_phone_number
|
12
|
+
)
|
13
|
+
|
14
|
+
def setup
|
15
|
+
@tester = FFaker::PhoneNumberUA
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_phone_number
|
19
|
+
assert_match(/^(\+(380)\s|0)[0-9]{2}\s[0-9]{3}-[0-9]{4}$/, @tester.phone_number)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_home_phone_number
|
23
|
+
assert_match(/^0{1}[0-9]{2}\s[0-9]{3}-[0-9]{4}$/, @tester.home_phone_number)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_mobile_phone_number
|
27
|
+
assert_match(/^0{1}[0-9]{2}\s[0-9]{3}-[0-9]{4}$/, @tester.mobile_phone_number)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_international_home_phone_number
|
31
|
+
assert_match(/^\+(380)\s[0-9]{2}\s[0-9]{3}-[0-9]{4}$/, @tester.international_home_phone_number)
|
32
|
+
end
|
33
|
+
|
34
|
+
def international_mobile_phone_number
|
35
|
+
assert_match(/^\+(380)\s[0-9]{2}\s[0-9]{3}-[0-9]{4}$/,
|
36
|
+
@tester.international_mobile_phone_number)
|
37
|
+
end
|
38
|
+
end
|
data/test/test_products.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class TestSemVer < Test::Unit::TestCase
|
6
|
+
include DeterministicHelper
|
7
|
+
|
8
|
+
assert_methods_are_deterministic(FFaker::SemVer, :next)
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@tester = FFaker::SemVer
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_next
|
15
|
+
assert_includes(%w[0.0.1 0.1.0 1.0.0], @tester.next)
|
16
|
+
assert_includes(%w[2.0.0 1.3.0 1.2.4], @tester.next('1.2.3'))
|
17
|
+
end
|
18
|
+
end
|
data/test/test_skill.rb
CHANGED
data/test/test_sport_us.rb
CHANGED
data/test/test_sports.rb
CHANGED
data/test/test_ssn.rb
CHANGED
data/test/test_ssn_mx.rb
CHANGED
data/test/test_ssn_se.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
@@ -12,16 +12,16 @@ class TestSSNSE < Test::Unit::TestCase
|
|
12
12
|
assert_match(/(19|20)\d{10}/, ssn, "With no arguments year should start with 19 or 20, #{ssn}")
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def equal?(nbr)
|
16
16
|
nbr % 2
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_ssn_with_gender
|
20
20
|
ssn_male = FFaker::SSNSE.ssn(gender: :male)
|
21
|
-
assert
|
21
|
+
assert equal?(ssn_male[10].to_i)
|
22
22
|
|
23
23
|
ssn_female = FFaker::SSNSE.ssn(gender: :female)
|
24
|
-
assert
|
24
|
+
assert equal?(ssn_female[10].to_i)
|
25
25
|
|
26
26
|
assert_raise ArgumentError do
|
27
27
|
FFaker::SSNSE.ssn(gender: :unkown)
|
data/test/test_string.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'helper'
|
4
4
|
|
@@ -43,7 +43,7 @@ class TestString < Test::Unit::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def test_escaped_characters
|
46
|
-
assert_equal '\\/.()[]{}', FS.from_regexp(
|
46
|
+
assert_equal '\\/.()[]{}', FS.from_regexp(%r{\\/\.\(\)\[\]\{\}})
|
47
47
|
assert_deterministic { FS.from_regexp(%r|\\\/\.\(\)\[\]\{\}|) }
|
48
48
|
end
|
49
49
|
|
@@ -53,8 +53,8 @@ class TestString < Test::Unit::TestCase
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def test_special_sets
|
56
|
-
assert_match(/\A[\
|
57
|
-
assert_deterministic { FS.from_regexp(/[\
|
56
|
+
assert_match(/\A[\s\d]\z/, FS.from_regexp(/[\s\d]/))
|
57
|
+
assert_deterministic { FS.from_regexp(/[\s\d]/) }
|
58
58
|
end
|
59
59
|
|
60
60
|
def test_atom_question
|
data/test/test_time.rb
CHANGED
data/test/test_tweet.rb
CHANGED