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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80f2c84d036c02e8fdfda78021f3ddbd30981ddf
4
- data.tar.gz: be3303ad8bbe4a5695cf99159407c7640bc2a2a6
3
+ metadata.gz: 86a65bd696b88c66e6ca0b394caad26118419f98
4
+ data.tar.gz: 20593ec186d959c38a85a689fbba64b21e74e141
5
5
  SHA512:
6
- metadata.gz: 685e36705370fb2060c0c6d58d9dd8c3704eea62d01327d85287247e1d927c51d6b9bb913994e20c63e8b830bb00dd99b53b3f4f74cb852f602a2236af4ca1e3
7
- data.tar.gz: 0562b7eb37e38bffcf035bfb4e48c5c3c47e34bf168c6f31793968d27e78af396a1744b906b061b1debdcf83bd3bb3c72141a376aff14ca703836120ccb396d9
6
+ metadata.gz: 2dba2d0320a0c2a4a3d8cc5d56d59132c28af6fd88bfb9d6eff3d5a06685af8349fe72a0b869b1de698ec99c5449db953f24ccf45e2b5a39d87725997354193b
7
+ data.tar.gz: 32a2edfdfb134795a0088e780145edf81f6aad3be5c0300041af2eae8132562d297720cae55a64776cec888461d6257517ede2e49c991f420f7a3e59137113bd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Usmu Change Log
2
2
 
3
+ ## 1.4.1
4
+
5
+ Matthew Scharley <matt.scharley@gmail.com>
6
+
7
+ * Add #render_content (94c5320d4c68bf864e6b01a351dc66631b317b3b)
8
+
3
9
  ## 1.4.0
4
10
 
5
11
  Matthew Scharley <matt.scharley@gmail.com>
@@ -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
- template_config = add_template_defaults((@configuration[provider_name] || {}).clone, provider_name)
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
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Usmu
3
3
  # The current version string for the gem
4
- VERSION = '1.4.0'
4
+ VERSION = '1.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usmu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: java
6
6
  authors:
7
7
  - Matthew Scharley