Skip to content

Instantly share code, notes, and snippets.

@vittorius
Created April 2, 2021 18:30
Show Gist options
  • Save vittorius/b3b18764341aad68e63e0a9d7b8514af to your computer and use it in GitHub Desktop.
Save vittorius/b3b18764341aad68e63e0a9d7b8514af to your computer and use it in GitHub Desktop.
Ruumba Rake task
# frozen_string_literal: true
# The default Ruumba::RakeTask is pretty fragile, so we're going a simpler way
namespace :dev do
desc 'Run ruumba linter on app/views'
# rubocop:disable Rails/RakeEnvironment
task :ruumba, :path do |_t, args|
sh "bundle exec ruumba -c .ruumba.yml -e --force-exclusion '#{args.path || 'app/views'}'" do |ok|
puts 'Ruumba has detected some offenses' unless ok
end
end
# rubocop:enable Rails/RakeEnvironment
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment