exe/sg in signature_generator-0.1.2 vs exe/sg in signature_generator-0.1.3
- old
+ new
@@ -44,11 +44,11 @@
def do_process
# Your code here.
content = template_io.read
logger.debug content
- processor = SignatureGenerator::Processor.new context: context, max_retry: config['max-retry']
+ processor = SignatureGenerator::Processor.new context: context, max_retry: config[:'max-retry']
signature = processor.transform content
logger.debug signature
unless config[:'no-minify']
minifier = HtmlMinifier::Minifier.new collapseWhitespace: true, collapseInlineTagWhitespace: true
signature = minifier.minify signature
@@ -62,9 +62,11 @@
end
def check_config
# Check the config and raise an exception if incorrect.
config[:var] ||=[]
+ # Check max retry
+ config[:'max-retry'] ||= SignatureGenerator::Processor::MAX_RETRY
# Context setup
@context = {}
config[:var].each do |definition|
valid = false
definition.match(/^\s*(?<var_name>[a-z][a-z0-9_]*[!\?]?)\s*=\s*(?<var_value>.+)\s*$/) do |md|