Skip to content

Instantly share code, notes, and snippets.

@frizop
Created January 2, 2020 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frizop/0d225f10d8d0f7569803df7257c915b1 to your computer and use it in GitHub Desktop.
Save frizop/0d225f10d8d0f7569803df7257c915b1 to your computer and use it in GitHub Desktop.
problem validating ruby code
desc 'Validate manifests, templates, and ruby files'
task :validate do
Dir['templates/**/*.erb'].each do |template|
begin
sh "erb -P -x -T '-' #{template} | ruby -c"
rescue SystemExit => e
puts "#{e.status}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment