Skip to content
Snippets Groups Projects
Verified Commit 55d552a0 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Clean up template task action slightly

parent 177b24ab
No related branches found
No related tags found
No related merge requests found
......@@ -47,18 +47,18 @@ module Actions
out += if changes.any?
"#{changes.count} templates changed"
else
location = self.class == TemplateImportAction ? 'local' : 'remote'
location = is_a?(TemplateImportAction) ? 'local' : 'remote'
"no changes to #{location} templates"
end
out += if exceptions.any?
", #{output[:results].reject { |r| r[:exception].nil? }.count} templates skipped;\n- " + exceptions.join("\n- ")
", #{output[:results].count { |r| !r[:exception].nil? }} templates skipped;\n- " + exceptions.join("\n- ")
else
'.'
end
if changes.any?
out += "\n\nTemplates changed:\n- " + changes.map { |ch| "#{ch[:type].camelcase} | #{ch[:name]}" }.join("\n- ")
out += "\n\nTemplates changed:\n- #{changes.map { |ch| "#{ch[:type].camelcase} | #{ch[:name]}" }.join("\n- ")}"
end
out
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment