usmu 1.4.0-java → 1.4.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/usmu/template/layout.rb +11 -4
- data/lib/usmu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86a65bd696b88c66e6ca0b394caad26118419f98
|
4
|
+
data.tar.gz: 20593ec186d959c38a85a689fbba64b21e74e141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dba2d0320a0c2a4a3d8cc5d56d59132c28af6fd88bfb9d6eff3d5a06685af8349fe72a0b869b1de698ec99c5449db953f24ccf45e2b5a39d87725997354193b
|
7
|
+
data.tar.gz: 32a2edfdfb134795a0088e780145edf81f6aad3be5c0300041af2eae8132562d297720cae55a64776cec888461d6257517ede2e49c991f420f7a3e59137113bd
|
data/CHANGELOG.md
CHANGED
data/lib/usmu/template/layout.rb
CHANGED
@@ -66,12 +66,10 @@ module Usmu
|
|
66
66
|
# @param variables [Hash] Variables to be used in the template.
|
67
67
|
# @return [String] The rendered file.
|
68
68
|
def render(variables = {})
|
69
|
-
|
70
|
-
content = template_class.new("#{@name}", 1, template_config) { @content }.
|
71
|
-
render(helpers, get_variables(variables))
|
72
|
-
|
69
|
+
content = render_content(variables)
|
73
70
|
has_cr = content.index("\r")
|
74
71
|
content += (has_cr ? "\r\n" : "\n") if content[-1] != "\n"
|
72
|
+
|
75
73
|
if @parent.nil?
|
76
74
|
content
|
77
75
|
else
|
@@ -79,6 +77,15 @@ module Usmu
|
|
79
77
|
end
|
80
78
|
end
|
81
79
|
|
80
|
+
# Renders the internal content of the file with any templating language required and returns the result
|
81
|
+
#
|
82
|
+
# @param variables [Hash] Variables to be used in the template.
|
83
|
+
# @return [String] The rendered content.
|
84
|
+
def render_content(variables)
|
85
|
+
template_config = add_template_defaults((@configuration[provider_name] || {}).clone, provider_name)
|
86
|
+
template_class.new("#{@name}", 1, template_config) { @content }.render(helpers, get_variables(variables))
|
87
|
+
end
|
88
|
+
|
82
89
|
# @!attribute [r] input_path
|
83
90
|
# @return [String] the full path to the file in the source directory
|
84
91
|
def input_path
|
data/lib/usmu/version.rb
CHANGED