getaround_utils 0.3.1 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8229adb825c1d60f82dbf661e85bf31088640c7d1260d63993b95b674939817
4
- data.tar.gz: ae12f1034bf7efbf90a8d206fd298e0eb23b2e356f6be713e64068d65bcd69cc
3
+ metadata.gz: 5b8f527ba9f0f5c93d0aa5f5898278230277ccbe435b690c03d0b79eceb277ab
4
+ data.tar.gz: 276a5197b07e3052fc813367d04ca0e04a84c1400da83c2487c83d22e8c43bce
5
5
  SHA512:
6
- metadata.gz: '09415cfd824c79234e662ce02ca9195ef330a6ed52e64035d0d596856ffb3d76d84dcb8d27ac8670ac2c03be87bdff7f946f6d34703ea6ddafbd7b64fbf89e94'
7
- data.tar.gz: d343fe8e41a279794644f5cf386380691af2ad3ab6c0e9d48056726ee96dacf3103c9c865d1a9fbb14c955fd721bcffd721cfc930cb15b8c2e66f215612a567c
6
+ metadata.gz: 66dcca84c67e6f7f030c359fce44e48e154b7fa1c2b780a1a6ef9b0f4d6dd9045d2da248f13ead1e04cea5ed9e523d50b5bd5b5e001703e3f3b1fef00151d48e
7
+ data.tar.gz: 327b48e801f84b263ae6be9d3e9c4535b3295e2a91634f77b39271d73d81a96ddc960dedc928d668513510f2701ac94da813f893510e11c4ae3769109d4b8677
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.3.3] 2026-02-27
2
+ - `GetaroundUtils::I18nBackend::FlatKeys` should be a module
3
+
4
+ ## [0.3.2] 2026-02-27 - YANKED
5
+ - Add `GetaroundUtils::I18nBackend::FlatKeys` an I18n backend that supports flatten keys
6
+
1
7
  ## [0.3.1] 2026-02-18
2
8
  - In `GetaroundUtils::Engines::Health` ignore Heroku, add ArgoCD
3
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- getaround_utils (0.3.1)
4
+ getaround_utils (0.3.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support"
4
+
5
+ module GetaroundUtils; end
6
+ module GetaroundUtils::I18nBackend; end
7
+
8
+ module GetaroundUtils::I18nBackend::FlatKeys
9
+ def store_translations(locale, data, options = {})
10
+ expanded = expand_dot_keys(data)
11
+ super(locale, expanded, options)
12
+ end
13
+
14
+ private
15
+
16
+ def expand_dot_key(path, value)
17
+ if path.any?
18
+ { path.first.to_sym => expand_dot_key(path[1...], value) }
19
+ else
20
+ value
21
+ end
22
+ end
23
+
24
+ def expand_dot_keys(data)
25
+ data.each_with_object({}) do |(key, value), acc|
26
+ hash = expand_dot_key([*key.to_s.split(".")], value)
27
+ acc.deep_merge!(hash)
28
+ end
29
+ end
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GetaroundUtils
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getaround_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drivy
@@ -209,6 +209,7 @@ files:
209
209
  - lib/getaround_utils.rb
210
210
  - lib/getaround_utils/engines.rb
211
211
  - lib/getaround_utils/engines/health.rb
212
+ - lib/getaround_utils/i18n_backend/flat_keys.rb
212
213
  - lib/getaround_utils/mixins.rb
213
214
  - lib/getaround_utils/mixins/loggable.rb
214
215
  - lib/getaround_utils/ougai.rb