Rakefile in review-2.0.0.beta1 vs Rakefile in review-2.0.0
- old
+ new
@@ -1,7 +1,5 @@
-require 'fileutils'
-
begin
require 'bundler'
Bundler::GemHelper.install_tasks
rescue LoadError
# ignore if bundler does not exist
@@ -9,24 +7,25 @@
require 'rubygems'
require 'rake/testtask'
require 'rake/clean'
-task :default => [:test]
+task :default => [:test, :rubocop]
-task :kpeg do
- FileUtils.rm_f "lib/review/compiler.rb"
- FileUtils.rm_f "lib/review/compiler/literals_1_8.rb"
- FileUtils.rm_f "lib/review/compiler/literals_1_9.rb"
- sh "kpeg -s lib/review/compiler/literals_1_8.kpeg -o lib/review/compiler/literals_1_8.rb"
- sh "kpeg -s lib/review/compiler/literals_1_9.kpeg -o lib/review/compiler/literals_1_9.rb"
- sh "kpeg -s lib/review/review.kpeg -o lib/review/compiler.rb"
+task :rubocop do
+ begin
+ require 'rubocop/rake_task'
+ RuboCop::RakeTask.new
+ rescue LoadError
+ warn "rubocop not found"
+ end
end
Rake::TestTask.new("test") do |t|
- t.libs << "test"
+ t.libs << "test"
t.test_files = Dir.glob("test/**/test_*.rb")
t.verbose = true
+ t.warning = false
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|