ffaker 2.21.0 → 2.22.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 +11 -0
- data/README.md +15 -4
- data/REFERENCE.md +316 -290
- data/Rakefile +9 -40
- data/bin/console +9 -0
- data/ffaker.gemspec +9 -19
- data/lib/ffaker/address_ua.rb +1 -1
- data/lib/ffaker/book.rb +5 -5
- data/lib/ffaker/code.rb +1 -1
- data/lib/ffaker/company.rb +1 -1
- data/lib/ffaker/company_fr.rb +1 -1
- data/lib/ffaker/data/address_de/state +1 -0
- data/lib/ffaker/data/jo_jo/first_names +356 -0
- data/lib/ffaker/data/jo_jo/full_names +225 -0
- data/lib/ffaker/data/jo_jo/last_names +153 -0
- data/lib/ffaker/data/jo_jo/stands +149 -0
- data/lib/ffaker/date.rb +31 -0
- data/lib/ffaker/geolocation.rb +2 -2
- data/lib/ffaker/identification_br.rb +1 -1
- data/lib/ffaker/identification_ec.rb +39 -0
- data/lib/ffaker/identification_es_cl.rb +2 -2
- data/lib/ffaker/identification_es_co.rb +1 -1
- data/lib/ffaker/identification_kr.rb +3 -3
- data/lib/ffaker/identification_pl.rb +4 -4
- data/lib/ffaker/identification_tw.rb +1 -1
- data/lib/ffaker/jo_jo.rb +24 -0
- data/lib/ffaker/name_pl.rb +1 -1
- data/lib/ffaker/number.rb +2 -2
- data/lib/ffaker/ssn_se.rb +2 -2
- data/lib/ffaker/string.rb +1 -1
- data/lib/ffaker/time.rb +3 -3
- data/lib/ffaker/utils/module_utils.rb +4 -5
- data/lib/ffaker/utils/unique_utils.rb +29 -21
- data/lib/ffaker/vehicle.rb +2 -2
- data/lib/{version.rb → ffaker/version.rb} +1 -1
- data/lib/ffaker.rb +7 -4
- data/test/helper.rb +2 -4
- data/test/test_address_da.rb +3 -3
- data/test/test_address_fi.rb +2 -2
- data/test/test_address_se.rb +2 -2
- data/test/test_cheesy_lingo.rb +1 -1
- data/test/test_color.rb +3 -3
- data/test/test_date.rb +37 -0
- data/test/test_filesystem.rb +3 -3
- data/test/test_freedom_ipsum.rb +1 -1
- data/test/test_gender_it.rb +1 -1
- data/test/test_gender_ja.rb +1 -1
- data/test/test_gender_jp.rb +1 -1
- data/test/test_gender_pl.rb +1 -1
- data/test/test_healthcare_ru.rb +1 -1
- data/test/test_hipster_ipsum.rb +1 -1
- data/test/test_html_ipsum.rb +2 -2
- data/test/test_identification_ec.rb +33 -0
- data/test/test_identification_es_mx.rb +1 -1
- data/test/test_internet_se.rb +2 -1
- data/test/test_jo_jo.rb +29 -0
- data/test/test_lorem_br.rb +1 -1
- data/test/test_lorem_cn.rb +3 -3
- data/test/test_lorem_fr.rb +3 -3
- data/test/test_lorem_ie.rb +2 -2
- data/test/test_lorem_kr.rb +3 -3
- data/test/test_lorem_pl.rb +2 -2
- data/test/test_lorem_ru.rb +3 -3
- data/test/test_lorem_ua.rb +3 -3
- data/test/test_module_utils.rb +33 -0
- data/test/test_name_da.rb +1 -1
- data/test/test_name_ph.rb +1 -1
- data/test/test_name_ru.rb +2 -2
- data/test/test_name_ua.rb +2 -2
- data/test/test_phone_number_se.rb +1 -1
- data/test/test_phone_number_sg.rb +8 -8
- data/test/test_unique_utils.rb +25 -5
- data/test/test_vehicle.rb +22 -0
- metadata +19 -198
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69babe3a9f0990b8b651d7e65f4f5732fe6c6962db3ea1da4fb86844bdaaf03d
|
4
|
+
data.tar.gz: 1674cbeb87e1090fd2690ba9c7474b98bb12332ceef6f3810e9f31ffad72191b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf2002a82d25612594f949fec41b148f1761071a8416e9b391efedb0f6b9d01a0180b0932bb2fad5016474f3316e7697712e1a030d6466577d916ee47812293
|
7
|
+
data.tar.gz: f2e9d9990797621b093250daeb851267b3146cf6933fe0e82fc21cda6f18ca0144483bdea78ec10c150bea4752d877f5ab6166cac6a085d89652203518f11ea4
|
data/Changelog.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
- Add your change HERE
|
4
4
|
|
5
|
+
# 2.22.0
|
6
|
+
- *BREAKING CHANGE*: Drop support under ruby 2.7 [@marocchino]
|
7
|
+
- Correct Vehicle::VIN result [@philippevezina]
|
8
|
+
- Improve performance unique [@iiwo]
|
9
|
+
- Drop gemspec generation in rake [@technicalpickles]
|
10
|
+
- Add identification EC [@josieljunior]
|
11
|
+
- Update data for AddressDE [@slowjack2k]
|
12
|
+
- Add ruby 3.2 to CI [@petergoldstein]
|
13
|
+
- Add JoJo module [@ar2em1s]
|
14
|
+
- Fix crash in FFaker::Time#datetime when defining FFaker::Date module [@brupla6126]
|
15
|
+
|
5
16
|
## 2.21.0
|
6
17
|
- Generate valid VINs [@xunker]
|
7
18
|
- Add neighborhood and address complement to AddressBR [@az3vedo]
|
data/README.md
CHANGED
@@ -77,12 +77,23 @@ name will be set with data from `ffaker/data/name/first_names`.
|
|
77
77
|
|
78
78
|
To get repeatable results in Minitest or Rspec, follow [these instructions](RANDOM.md#using-the-same-random-seed-as-your-tests).
|
79
79
|
|
80
|
-
## Unique
|
80
|
+
## Unique values
|
81
81
|
|
82
|
-
You can
|
82
|
+
You can ensure unique values are generated using the `unique` method. `ffaker` will retry the generation
|
83
|
+
until an unique value if found.
|
83
84
|
|
84
|
-
|
85
|
-
|
85
|
+
Example:
|
86
|
+
```ruby
|
87
|
+
FFaker::Name.unique.name # ensures an unique value is returned for FFaker::Name
|
88
|
+
```
|
89
|
+
|
90
|
+
If an unique value cannot be generated within a maximum limit of retries for a generator
|
91
|
+
a `FFaker::UniqueUtils::RetryLimitExceeded` error will be raised.
|
92
|
+
|
93
|
+
You can prevent exceeding the limit by clearing the record of used values (e.g. between tests):
|
94
|
+
```ruby
|
95
|
+
FFaker::Name.unique.clear # clears the used values for FFaker::Name
|
96
|
+
FFaker::UniqueUtils.clear # clears the used values for all generators
|
86
97
|
```
|
87
98
|
|
88
99
|
## TODO
|