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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/getaround_utils/i18n_backend/flat_keys.rb +30 -0
- data/lib/getaround_utils/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b8f527ba9f0f5c93d0aa5f5898278230277ccbe435b690c03d0b79eceb277ab
|
|
4
|
+
data.tar.gz: 276a5197b07e3052fc813367d04ca0e04a84c1400da83c2487c83d22e8c43bce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
@@ -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
|
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.
|
|
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
|