faker 2.15.0 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/faker.rb +3 -26
- data/lib/faker/version.rb +1 -1
- data/lib/locales/id.yml +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c64eb124941da11f6f02bdf234dcf3fe2b83568e1b951e97d198b458495a4956
|
4
|
+
data.tar.gz: 2d589426b8f0d7f7845f3e7f0f104ee0258a37a312e7400cf8a0fd3fabd2475b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd8f47c75906cc93e8d45db108478fea154409e86aef1b7d33c4b25c3266c540d91b174ae4cb4e17359fc6ab148cd9751d03db574d94e8726ed0d52f611c9031
|
7
|
+
data.tar.gz: 4dccd79f0c6b1ed2b9fcd1c765b0276500b03f951b096d81e563cf5dddd0a28f0910c902e3de69233d17042011f41b2372957ccb80a89bf347d7567575129f63
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v2.15.1](https://github.com/faker-ruby/faker/tree/v2.15.1) (2020-11-24)
|
4
|
+
|
5
|
+
- Rollback PR #2169 and bump 2.15.1 [#2203](https://github.com/faker-ruby/faker/pull/2203) @vbrazo
|
6
|
+
|
7
|
+
------------------------------------------------------------------------------
|
8
|
+
|
3
9
|
## [v2.15.0](https://github.com/faker-ruby/faker/tree/v2.15.0) (2020-11-24)
|
4
10
|
|
5
11
|
## Bug/Fixes
|
data/lib/faker.rb
CHANGED
@@ -8,27 +8,10 @@ require 'set' # Fixes a bug in i18n 0.6.11
|
|
8
8
|
|
9
9
|
Dir.glob(File.join(mydir, 'helpers', '*.rb')).sort.each { |file| require file }
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
class << self
|
15
|
-
def load_i18n
|
16
|
-
return if @i18n_loaded
|
17
|
-
|
18
|
-
if I18n.available_locales&.any?
|
19
|
-
# We expect all locale .yml files to have the locale name in its filename
|
20
|
-
I18n.load_path += ::Dir[::File.join(__dir__, 'locales', "{#{I18n.available_locales.join(',')}}.yml")]
|
21
|
-
# Or to be located in a directory with the locale name
|
22
|
-
I18n.load_path += ::Dir[::File.join(__dir__, 'locales', "{#{I18n.available_locales.join(',')}}/*.yml")]
|
23
|
-
else
|
24
|
-
I18n.load_path += ::Dir[::File.join(__dir__, 'locales', '**/*.yml')]
|
25
|
-
end
|
26
|
-
|
27
|
-
I18n.reload! if I18n.backend.initialized?
|
28
|
-
@i18n_loaded = true
|
29
|
-
end
|
30
|
-
end
|
11
|
+
I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')]
|
12
|
+
I18n.reload! if I18n.backend.initialized?
|
31
13
|
|
14
|
+
module Faker
|
32
15
|
module Config
|
33
16
|
@locale = nil
|
34
17
|
@random = nil
|
@@ -37,8 +20,6 @@ module Faker
|
|
37
20
|
attr_writer :locale, :random
|
38
21
|
|
39
22
|
def locale
|
40
|
-
Faker.load_i18n
|
41
|
-
|
42
23
|
# Because I18n.locale defaults to :en, if we don't have :en in our available_locales, errors will happen
|
43
24
|
@locale || (I18n.available_locales.include?(I18n.locale) ? I18n.locale : I18n.available_locales.first)
|
44
25
|
end
|
@@ -168,8 +149,6 @@ module Faker
|
|
168
149
|
# Call I18n.translate with our configured locale if no
|
169
150
|
# locale is specified
|
170
151
|
def translate(*args, **opts)
|
171
|
-
Faker.load_i18n
|
172
|
-
|
173
152
|
opts[:locale] ||= Faker::Config.locale
|
174
153
|
opts[:raise] = true
|
175
154
|
I18n.translate(*args, **opts)
|
@@ -186,8 +165,6 @@ module Faker
|
|
186
165
|
|
187
166
|
# Executes block with given locale set.
|
188
167
|
def with_locale(tmp_locale = nil, &block)
|
189
|
-
Faker.load_i18n
|
190
|
-
|
191
168
|
current_locale = Faker::Config.own_locale
|
192
169
|
Faker::Config.locale = tmp_locale
|
193
170
|
|
data/lib/faker/version.rb
CHANGED
data/lib/locales/id.yml
CHANGED
@@ -20,6 +20,7 @@ id:
|
|
20
20
|
- "#{street_prefix} #{street_title}"
|
21
21
|
street_address:
|
22
22
|
- "#{street_name} No. #{building_number}"
|
23
|
+
state_abbr: [AC, BA, BT, BE, GO, JK, JA, JW, JB, JT, JI, KA, KB, KS, KT, KI, KU, BB, KR, LA, ML, MA, MU, NU, NB, NT, PP, PA, PB, RI, SL, SR, SN, ST, SG, SA, SM, SB, SS, SU, YO]
|
23
24
|
country_code: ['62']
|
24
25
|
phone_number:
|
25
26
|
formats: ['08##########', '08##-####-####', '8#########']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Curtis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-11-
|
12
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|