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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc49b7084dd8c304b394d4239e66db433771c2be21644d833443fc64575d058a
4
- data.tar.gz: c9df932fbcd415525cb5357f33e3bd0e19b366fe5f7087102a398be634bae10d
3
+ metadata.gz: fa4919cb877db35f5c799506c93cc2b15f614690c67e47900387e03ca53b59b1
4
+ data.tar.gz: 855853b9e0d2383a465abce2bfc85a9cc856edc9f1b8e88d73c5f16ec4ce8152
5
5
  SHA512:
6
- metadata.gz: c2956dd24501a523e7afd2a492b8218dfce9a79544e3eeccd4d50ceae995f67eff43ea005db0e5cd4e0fecea5af937c001c3d5a8fc936e60cbed3153efd491d4
7
- data.tar.gz: 07ae6c65e4f97a0e4f40884f33fde589f900f79414c94a69f574e8117f8c734987a129aaee5d9ebb3bfc00f4d52bbd66e5092969e32c89ce5c4a06c2bb8dc225
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"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-generators}
5
- s.version = '1.18.0'
5
+ s.version = '1.19.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
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.18.0
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-16 00:00:00.000000000 Z
11
+ date: 2023-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reality-core