From 114b44d4b68b6f22a801a76a3953dc401d449858 Mon Sep 17 00:00:00 2001 From: muratayusuke Date: Wed, 19 Jun 2013 15:01:36 +0000 Subject: [PATCH] use rubocop --- Gemfile | 1 + Gemfile.lock | 10 ++++++++++ Rakefile | 10 +++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 787a355..fd8d17e 100644 --- a/Gemfile +++ b/Gemfile @@ -12,4 +12,5 @@ group :development do gem "rcov", :platforms => :mri_18 gem "simplecov", :platforms => :mri_19 gem "test-construct" + gem "rubocop" end diff --git a/Gemfile.lock b/Gemfile.lock index b46cf39..6a55be8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,7 @@ GEM remote: https://rubygems.org/ specs: + ast (1.1.0) diff-lcs (1.2.4) git (1.2.5) jeweler (1.8.4) @@ -10,6 +11,10 @@ GEM rdoc json (1.8.0) multi_json (1.7.3) + parser (2.0.0.beta5) + ast (~> 1.0) + slop (~> 3.4) + rainbow (1.1.4) rake (10.0.4) rcov (1.0.0) rdoc (4.0.1) @@ -22,10 +27,14 @@ GEM rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) + rubocop (0.8.3) + parser (= 2.0.0.beta5) + rainbow (>= 1.1.4) simplecov (0.7.1) multi_json (~> 1.0) simplecov-html (~> 0.7.1) simplecov-html (0.7.1) + slop (3.4.5) test-construct (1.2.0) thor (0.18.1) @@ -37,6 +46,7 @@ DEPENDENCIES rake (>= 0.8.7) rcov rspec (~> 2.10) + rubocop simplecov test-construct thor (>= 0.14.0) diff --git a/Rakefile b/Rakefile index 702c2e6..a98e260 100644 --- a/Rakefile +++ b/Rakefile @@ -41,8 +41,16 @@ RSpec::Core::RakeTask.new(:rcov) do |spec| spec.rcov = true end +task :rubocop do + system('rubocop') +end -task :default => :spec +task :test do + Rake::Task['spec'].execute + Rake::Task['rubocop'].execute +end + +task :default => :test require 'rdoc/task' Rake::RDocTask.new do |rdoc|