reality-generators 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82111a8ab71e331d0ec673a36b5ec56e4f19e84de0316cd00c246aca63512559
|
4
|
+
data.tar.gz: 632cbc111de977f63725442d7d70cb90da044b497621f14c14e5a5ec098b4281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97a5261683324a9e6813d498aa0f776d3fec0e92492947c0bf6211669d7baeea054f3863a02c318bb9294bbdc998fbd735983085c83a0df91e1d86d571d2b1b4
|
7
|
+
data.tar.gz: f992d99aa30624121674ab8659853ecdb03366253434929a997bd6f4d6de16278cf7333a877304f5e7e8d6f042e5eb6ac49ece8232572f51bb49fc95f511f07e
|
@@ -58,7 +58,7 @@ module Reality #nodoc
|
|
58
58
|
# * :guard - The :guard option passed to the template.
|
59
59
|
#
|
60
60
|
def file_artifact(template_set_suffix, artifact_key, filename_pattern, options = {})
|
61
|
-
Reality::Options.check(options, [:facets, :guard, :helpers], Reality::Generators, 'define artifact')
|
61
|
+
Reality::Options.check(options, [:output_filter, :facets, :guard, :helpers], Reality::Generators, 'define artifact')
|
62
62
|
|
63
63
|
file_extension = File.extname(filename_pattern)[1...9999]
|
64
64
|
|
@@ -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.20.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
|