Sha256: 4b5ace2ea98cf36df1a74a8998164fbaac2149b9484d3f35c8be4703e8580517
Contents?: true
Size: 627 Bytes
Versions: 2
Compression:
Stored size: 627 Bytes
Contents
namespace :pre_commit do desc "Check ruby code style by rubocop" task :rubocop do |t| Githook::Util.log_task(t.name) exit 1 unless system("bundle exec rubocop") end desc "Test ruby code by rspec" task :rspec do |t| Githook::Util.log_task(t.name) exit 1 unless system("bundle exec rspec") end desc "Check java code style by checkstyle" task :checkstyle do |t| Githook::Util.log_task(t.name) exit 1 unless system("./gradlew checkstyle") end end desc "Run all pre-commit hook tasks" task :pre_commit do |t| Githook::Util.log_task(t.name) Githook::Util.run_tasks(t.name.to_sym) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
git-hook-0.1.7 | lib/githook/tasks/pre-commit.rake |
git-hook-0.1.6 | lib/githook/tasks/pre-commit.rake |