wcc-contentful-app 1.4.0.rc1 → 1.4.0.rc2
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/app/version.rb +1 -1
- data/lib/wcc/contentful/model/menu_button.rb +14 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb8544accdf8bb9c26bcf200d5fdff9b4ae21c1292e6878958bc72d99cf38bb2
|
4
|
+
data.tar.gz: 955a3aaeb9d8bbee66955e29df093637a005fd58886369c2114a7df178cb53a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a7e458f40876b6eb374f7916b55854ead7ff0b619ae741b068a2c3871699ca9f31dc87cbf450a5474bf8f3026baaa109519ff2030ecb49981f6b8abd2cb0386
|
7
|
+
data.tar.gz: 81c39f1053eff4f0144b5a1b536bf1cec297c4c061b7a2eefd789e3d8668654b8dcfa4ce17e0fe883ee1ee8fccfc4fc39e174a2886542ad80aab30eb976762c8
|
@@ -18,7 +18,8 @@ class WCC::Contentful::Model::MenuButton < WCC::Contentful::Model
|
|
18
18
|
url = (link&.try(:slug) || link&.try(:url))
|
19
19
|
url = URI(url || '')
|
20
20
|
|
21
|
-
url
|
21
|
+
url = rewrite_to_locale(url, sys.locale) if default_locale && sys.locale != default_locale
|
22
|
+
|
22
23
|
url.fragment = fragment if fragment.present?
|
23
24
|
url.to_s
|
24
25
|
end
|
@@ -26,4 +27,16 @@ class WCC::Contentful::Model::MenuButton < WCC::Contentful::Model
|
|
26
27
|
def fragment
|
27
28
|
WCC::Contentful::App::SectionHelper.section_id(section_link) if section_link
|
28
29
|
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def default_locale
|
34
|
+
WCC::Contentful.configuration&.default_locale
|
35
|
+
end
|
36
|
+
|
37
|
+
def rewrite_to_locale(uri, locale)
|
38
|
+
uri = URI(uri)
|
39
|
+
uri.path = File.join("/#{locale}", uri.path)
|
40
|
+
uri.to_s
|
41
|
+
end
|
29
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-contentful-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.
|
4
|
+
version: 1.4.0.rc2
|
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-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -338,14 +338,14 @@ dependencies:
|
|
338
338
|
requirements:
|
339
339
|
- - "~>"
|
340
340
|
- !ruby/object:Gem::Version
|
341
|
-
version: 1.4.0.
|
341
|
+
version: 1.4.0.rc2
|
342
342
|
type: :runtime
|
343
343
|
prerelease: false
|
344
344
|
version_requirements: !ruby/object:Gem::Requirement
|
345
345
|
requirements:
|
346
346
|
- - "~>"
|
347
347
|
- !ruby/object:Gem::Version
|
348
|
-
version: 1.4.0.
|
348
|
+
version: 1.4.0.rc2
|
349
349
|
description: Models, Controllers, and Views common to Watermark Church apps
|
350
350
|
email:
|
351
351
|
- dev@watermark.org
|