diff options
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 |