wcc-contentful 1.4.0.rc2 → 1.4.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wcc/contentful/entry_locale_transformer.rb +2 -3
- data/lib/wcc/contentful/version.rb +1 -1
- 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: f1c1fa12c92cfa84f2308474f177f56f015dc6c8116245b13074a64fe29eeaa5
|
4
|
+
data.tar.gz: 6ee074042103a824705738f6aeab222c302918ebf1f4fc53f37e63e0857328ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a63d99f50a9c89d5f708f8da774a178959ba3336ddb1e40503b05c32a071f00e1cb72667083caaa51b59f29f582cfa78233960d95cfe170b362d0a24160bbe4
|
7
|
+
data.tar.gz: 6e190a63485e5b22e7e772d6fee2fc545dba96daf8bdaa57ea819ae9f760cc010170ac354818f85b620167362dbfb3729d0749634e3c2217cc7f28d6160a96e1
|
@@ -26,7 +26,7 @@ module WCC::Contentful::EntryLocaleTransformer
|
|
26
26
|
'WCC::Contentful::EntryLocaleTransformer:locales_included' => [entry_locale]
|
27
27
|
})
|
28
28
|
fields =
|
29
|
-
entry['fields']
|
29
|
+
entry['fields']&.transform_values do |value|
|
30
30
|
h = {}
|
31
31
|
h[entry_locale] = value
|
32
32
|
h
|
@@ -50,7 +50,6 @@ module WCC::Contentful::EntryLocaleTransformer
|
|
50
50
|
|
51
51
|
return entry
|
52
52
|
end
|
53
|
-
return entry unless entry['fields']
|
54
53
|
|
55
54
|
# Transform the store's "locale=*" entry into a localized one
|
56
55
|
locale ||= default_locale
|
@@ -58,7 +57,7 @@ module WCC::Contentful::EntryLocaleTransformer
|
|
58
57
|
sys = entry['sys'].deep_dup
|
59
58
|
sys['locale'] = locale
|
60
59
|
fields =
|
61
|
-
entry['fields']
|
60
|
+
entry['fields']&.transform_values do |value|
|
62
61
|
next if value.nil?
|
63
62
|
|
64
63
|
# replace the all-locales value with the localized value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-contentful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.
|
4
|
+
version: 1.4.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|