faker 2.15.0 → 2.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6312a74dbe40f19bd57cda93e7b0d6b01ee227591e84d1acea6723ff86d4c98
4
- data.tar.gz: a64be3fe39785f420fd0004a4909149d588629d005d4081467d5959cb05d6e8d
3
+ metadata.gz: c64eb124941da11f6f02bdf234dcf3fe2b83568e1b951e97d198b458495a4956
4
+ data.tar.gz: 2d589426b8f0d7f7845f3e7f0f104ee0258a37a312e7400cf8a0fd3fabd2475b
5
5
  SHA512:
6
- metadata.gz: f1845f8d60cfd9b219535979d879ba40065f8330bad9db0411c9a404de780b20d614d1a8f7f421cbb7e56d2a9f28bd7bfcb202349b76a93e33681c69a4b78d3b
7
- data.tar.gz: 8a0ccf115f416f64d3d093b367f36e4659f4f010d97e2ebf596b2e41dc9e62574de51545bd6e0e39ba2af18a9bf06a8d91ab5e173f7f6e9ced017bc0d918bc32
6
+ metadata.gz: fd8f47c75906cc93e8d45db108478fea154409e86aef1b7d33c4b25c3266c540d91b174ae4cb4e17359fc6ab148cd9751d03db574d94e8726ed0d52f611c9031
7
+ data.tar.gz: 4dccd79f0c6b1ed2b9fcd1c765b0276500b03f951b096d81e563cf5dddd0a28f0910c902e3de69233d17042011f41b2372957ccb80a89bf347d7567575129f63
@@ -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
@@ -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
- module Faker
12
- @i18n_loaded = nil
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faker #:nodoc:
4
- VERSION = '2.15.0'
4
+ VERSION = '2.15.1'
5
5
  end
@@ -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.0
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-24 00:00:00.000000000 Z
12
+ date: 2020-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n