Skip to content

Commit

Permalink
[RuboCop] Use vendored rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Aug 14, 2014
1 parent ba09bbb commit 97e9619
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ begin
sh "bundle exec bacon #{specs('**')}"

title 'Checking code style...'
Rake::Task['rubocop'].invoke
Rake::Task['rubocop'].invoke if RUBY_VERSION >= '1.9.3'
end
end

Expand All @@ -73,22 +73,14 @@ begin
sh 'open coverage/index.html'
end

# RuboCop
#-----------------------------------------------------------------------------#
#-- RuboCop ----------------------------------------------------------------#

desc 'Checks code style'
task :rubocop do
if RUBY_VERSION >= '1.9.3'
require 'rubocop'
cli = RuboCop::CLI.new
result = cli.run
abort('RuboCop failed!') unless result == 0
else
puts '[!] Ruby > 1.9 is required to run style checks'
end
if RUBY_VERSION >= '1.9.3'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
end

#-----------------------------------------------------------------------------#
#---------------------------------------------------------------------------#

task :default => :spec

Expand Down

0 comments on commit 97e9619

Please sign in to comment.