Rakefile in clever-ruby-0.3.1 vs Rakefile in clever-ruby-0.4.0

- old
+ new

@@ -7,15 +7,25 @@ test.libs << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end -task :default => :test - require 'rdoc/task' require 'clever-ruby/version' Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = "clever-ruby #{Clever::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') +end + +require 'rubocop/rake_task' + +desc 'Run RuboCop on the lib directory' +RuboCop::RakeTask.new(:lint) do |task| + task.patterns = ['lib/**/*.rb', 'test/**/*.rb'] +end + +task default: [] do + Rake::Task[:test].execute + Rake::Task[:lint].execute end