bridgetown-core 1.0.0.alpha2 → 1.0.0.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bridgetown-core/component.rb +1 -1
- data/lib/bridgetown-core/concerns/liquid_renderable.rb +2 -2
- data/lib/bridgetown-core/converters/erb_templates.rb +5 -3
- data/lib/bridgetown-core/converters/liquid_templates.rb +2 -0
- data/lib/bridgetown-core/model/builder_origin.rb +2 -2
- data/lib/bridgetown-core/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: 2c5f6a5f0fc27c9e3f7d45161e91317fd42e7dbeb789d8c38a103a610efb9d46
|
4
|
+
data.tar.gz: 68431d8ead8cdb11107db03aa57ae3d4607d0809e60f3fd30d7045d58e1c67f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57daec3a249941fc6303a22e470cd8fc8e1641be8527a6533c7c73527a93fc04321b774407865a07fb99df95566902d035cfdf84fd68f8aa6e440fac6860d266
|
7
|
+
data.tar.gz: f42ce24666c948ad8616ef25cb36a766392279e216716a397d27308ae5b06acb58305887264f04c83faedf3ed6a68fcdbbf716e648935bb92de8c019997c1c03
|
@@ -14,10 +14,10 @@ module Bridgetown
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def liquid_engine_configured?
|
17
|
-
data["template_engine"] == "liquid" ||
|
17
|
+
data["template_engine"].to_s == "liquid" ||
|
18
18
|
(
|
19
19
|
data["template_engine"].nil? && (
|
20
|
-
site.config[:template_engine].nil? || site.config[:template_engine] == "liquid"
|
20
|
+
site.config[:template_engine].nil? || site.config[:template_engine].to_s == "liquid"
|
21
21
|
)
|
22
22
|
)
|
23
23
|
end
|
@@ -110,7 +110,7 @@ module Bridgetown
|
|
110
110
|
#
|
111
111
|
# @return [String] The converted content.
|
112
112
|
def convert(content, convertible)
|
113
|
-
return content if convertible.data[:template_engine] != "erb"
|
113
|
+
return content if convertible.data[:template_engine].to_s != "erb"
|
114
114
|
|
115
115
|
erb_view = Bridgetown::ERBView.new(convertible)
|
116
116
|
|
@@ -131,10 +131,12 @@ module Bridgetown
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
+
# @param ext [String]
|
135
|
+
# @param convertible [Bridgetown::Resource::Base, Bridgetown::GeneratedPage]
|
134
136
|
def matches(ext, convertible)
|
135
|
-
if convertible.data[:template_engine] == "erb" ||
|
137
|
+
if convertible.data[:template_engine].to_s == "erb" ||
|
136
138
|
(convertible.data[:template_engine].nil? &&
|
137
|
-
|
139
|
+
@config[:template_engine].to_s == "erb")
|
138
140
|
convertible.data[:template_engine] = "erb"
|
139
141
|
return true
|
140
142
|
end
|
@@ -56,6 +56,8 @@ module Bridgetown
|
|
56
56
|
# rubocop: enable Metrics/MethodLength
|
57
57
|
# rubocop: enable Metrics/AbcSize
|
58
58
|
|
59
|
+
# @param ext [String]
|
60
|
+
# @param convertible [Bridgetown::Resource::Base, Bridgetown::GeneratedPage]
|
59
61
|
def matches(ext, convertible)
|
60
62
|
if convertible.render_with_liquid?
|
61
63
|
convertible.data[:template_engine] = "liquid"
|
@@ -38,9 +38,9 @@ module Bridgetown
|
|
38
38
|
|
39
39
|
def read_data_from_builder
|
40
40
|
builder = Kernel.const_get(url.host.gsub(".", "::"))
|
41
|
-
raise NameError unless builder.
|
41
|
+
raise NameError unless builder.instance_methods.include?(:resource_data_for_id)
|
42
42
|
|
43
|
-
builder.resource_data_for_id(id)
|
43
|
+
builder.new.resource_data_for_id(id) || raise(NameError)
|
44
44
|
rescue NameError
|
45
45
|
raise(
|
46
46
|
Bridgetown::Errors::FatalException,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|