diff options
author | ytti <saku@ytti.fi> | 2018-04-11 20:13:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 20:13:31 +0300 |
commit | 91deea2ef8a7ae5f9ed6b523b720f9cf2c3f33b9 (patch) | |
tree | 364c7bc80d8ac7f423de2efdd06ff460b8334929 /Rakefile | |
parent | 0f8975cf5e77e1757bb77cf694d4a0876729a0af (diff) | |
parent | 9850a6b6107685c6cfc95f0411a5e61e0955bf85 (diff) |
Merge pull request #1273 from wk/introduce-rubocop
introduce rubocop (closes #1243)
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -4,6 +4,18 @@ require 'rake/testtask' gemspec = eval(File.read(Dir['*.gemspec'].first)) file = [gemspec.name, gemspec.version].join('-') + '.gem' +# Integrate Rubocop if available +begin + require 'rubocop/rake_task' + + RuboCop::RakeTask.new + task(:default).prerequisites << task(:rubocop) +rescue LoadError + task :rubocop do + puts 'Install rubocop to run its rake tasks' + end +end + desc 'Validate gemspec' task :gemspec do gemspec.validate |