test/helper.rb in nanoc-4.7.9 vs test/helper.rb in nanoc-4.7.10
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
$VERBOSE = false
require 'simplecov'
SimpleCov.start
@@ -68,25 +70,30 @@
site_name = "site-#{@site_num}"
@site_num += 1
end
# Build rules
- rules_content = <<EOS
-compile '*' do
- {{compilation_rule_content}}
-end
+ rules_content = <<~EOS
+ compile '*' do
+ {{compilation_rule_content}}
+ end
-route '*' do
- if item.binary?
- item.identifier.chop + (item[:extension] ? '.' + item[:extension] : '')
- else
- item.identifier + 'index.html'
- end
-end
+ route '*' do
+ if item.binary?
+ item.identifier.chop + (item[:extension] ? '.' + item[:extension] : '')
+ else
+ item.identifier + 'index.html'
+ end
+ end
-layout '*', :erb
+ layout '*', :erb
EOS
- rules_content.gsub!('{{compilation_rule_content}}', params[:compilation_rule_content] || '')
+
+ rules_content =
+ rules_content.gsub(
+ '{{compilation_rule_content}}',
+ params[:compilation_rule_content] || '',
+ )
# Create site
unless File.directory?(site_name)
FileUtils.mkdir_p(site_name)
FileUtils.cd(site_name) do