Skip to content

Commit

Permalink
Added Rubocop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfox1985 committed Jul 15, 2015
1 parent c8c936b commit 1395537
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)

desc 'Run RSpec with code coverage'
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['spec'].execute
require 'rubocop/rake_task'
desc 'Run RuboCop on the lib directory'
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = ['lib/**/*.rb']
# don't abort rake on failure
task.fail_on_error = false
end

require 'yard'
require 'yard/rake/yardoc_task'

task default: [:spec, :rdoc]

require 'yard'
desc 'Generate documentation for the wice_grid plugin.'
YARD::Rake::YardocTask.new(:rdoc) do |t|
OTHER_PATHS = %w()
Expand All @@ -33,3 +31,11 @@ YARD::Rake::YardocTask.new(:rdoc) do |t|
t.options = %w(--main=README.md --file TODO.md,CHANGELOG.md,SAVED_QUERIES_HOWTO.md,MIT-LICENSE)
t.stats_options = ['--list-undoc']
end

desc 'Run RSpec with code coverage'
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['spec'].execute
end

task default: [:rubocop, :spec, :rdoc]
1 change: 1 addition & 0 deletions wice_grid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ Gem::Specification.new do |s|
s.add_development_dependency('yard', '~> 0.8')
s.add_development_dependency('bundler', '~> 1.3')
s.add_development_dependency('simplecov', '~> 0.7')
s.add_development_dependency('rubocop', '~> 0.32')
end

0 comments on commit 1395537

Please sign in to comment.