reality-generators 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reality/generators/template.rb +3 -0
- data/reality-generators.gemspec +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: fa4919cb877db35f5c799506c93cc2b15f614690c67e47900387e03ca53b59b1
|
4
|
+
data.tar.gz: 855853b9e0d2383a465abce2bfc85a9cc856edc9f1b8e88d73c5f16ec4ce8152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a461a9b209af0ba0eb3050568bca14d667fbdb2d85487e83282f8dd040e61cd5641b16adbfb7ea4da560d5a9f8b39f07f831a2e716792d70343b3683dbe43147
|
7
|
+
data.tar.gz: cebe74c5524c03fb256c52b85e1b55011e373408a24ebf817ebfe2e97840fcd39ab47f56f37176b38fbd536dc47b0c0b49259b88fe04ad78fead254d69856374
|
@@ -111,10 +111,12 @@ module Reality #nodoc
|
|
111
111
|
# Base class for templates that generate a single file
|
112
112
|
class SingleFileOutputTemplate < Template
|
113
113
|
attr_reader :output_filename_pattern
|
114
|
+
attr_reader :output_filter
|
114
115
|
|
115
116
|
def initialize(template_set, facets, target, template_key, output_filename_pattern, helpers = [], options = {})
|
116
117
|
super(template_set, facets, target, template_key, helpers, options)
|
117
118
|
@output_filename_pattern = output_filename_pattern
|
119
|
+
@output_filter = options[:output_filter]
|
118
120
|
end
|
119
121
|
|
120
122
|
def output_path
|
@@ -132,6 +134,7 @@ module Reality #nodoc
|
|
132
134
|
output_filename = File.join(target_basedir, output_filename)
|
133
135
|
unprocessed_files.delete(output_filename)
|
134
136
|
result = self.render_to_string(context_binding)
|
137
|
+
result = self.output_filter.call(result) unless self.output_filter.nil?
|
135
138
|
FileUtils.mkdir_p File.dirname(output_filename) unless File.directory?(File.dirname(output_filename))
|
136
139
|
if File.exist?(output_filename) && IO.read(output_filename) == result
|
137
140
|
Generators.debug "Skipped generation of #{self.name} for #{self.target} #{object_name} to #{output_filename} due to no changes"
|
data/reality-generators.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reality-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Donald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reality-core
|