lib/lono/template/post_processor.rb in lono-6.1.11 vs lib/lono/template/post_processor.rb in lono-7.0.0
- old
+ new
@@ -1,25 +1,15 @@
class Lono::Template
- class PostProcessor
- include Lono::Blueprint::Root
- extend Memoist
-
- def initialize(blueprint, options={})
- @blueprint, @options = blueprint, options
- @template = @options[:template] || @blueprint
- Lono::ProjectChecker.check
- set_blueprint_root(@blueprint)
- end
-
+ class PostProcessor < Lono::AbstractBase
def run
replacements.each do |placeholder, replacement|
update_template!(template)
end
write_template!
end
def write_template!
- IO.write(template_path, YAML.dump(template)) # unless ENV['TEST'] # additional safeguard for testing
+ IO.write(template_path, YAML.dump(template)) # unless ENV['LONO_TEST'] # additional safeguard for testing
end
def replacements
map = {}
registry_items.each do |item|
\ No newline at end of file