Skip to content

Commit

Permalink
Merge pull request leikind#237 from ryanfox1985/development
Browse files Browse the repository at this point in the history
Added Rubocop.
  • Loading branch information
leikind committed Jul 15, 2015
2 parents b534b73 + 27602ff commit e0bc392
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby-19mode
- rbx-2
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-19mode
- rvm: rbx-2
- rvm: 2.2
fast_finish: true
before_install: gem update --remote bundler
install:
- bundle install --retry=3
script:
- bundle exec rake
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Version](http://img.shields.io/gem/v/wice_grid.svg)](https://rubygems.org/gems/wice_grid)
[![Build](https://travis-ci.org/ryanfox1985/wice_grid.svg)](https://travis-ci.org/ryanfox1985/wice_grid)
[![License](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](#license)

* Yuri Leikind, yuri.leikind at gmail dot com
Expand Down Expand Up @@ -1361,4 +1362,3 @@ only under certain circumstances:

The author of the plugins welcomes any contribution.
Please follow [these guidelines](https://github.com/leikind/wice_grid/wiki/How-to-submit-a-bug-report-or-a-question) when submitting a bug report.

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 e0bc392

Please sign in to comment.