Skip to content

Commit

Permalink
Add Rubocop dev support.
Browse files Browse the repository at this point in the history
  • Loading branch information
futhr committed Aug 31, 2014
1 parent a0a8a9e commit d192cf9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
inherit_from: .hound.yml

AllCops:
Exclude:
- spec/dummy/**/*
- bin/*
- Guardfile
16 changes: 12 additions & 4 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
guard 'rspec', cmd: 'bundle exec rspec', all_on_start: true do
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/(.+)_spec\.rb$}) { |m| "spec/#{m[1]}_spec.rb"}
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
group :red_green_refactor, halt_on_fail: true do

guard 'rspec', cmd: 'bundle exec rspec', all_on_start: true do
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/(.+)_spec\.rb$}) { |m| "spec/#{m[1]}_spec.rb"}
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
end

guard :rubocop, all_on_start: false, cli: ['--format', 'clang', '--rails'] do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.(rubocop|hound)\.yml$}) { |m| File.dirname(m[0]) }
end
end
2 changes: 2 additions & 0 deletions spree_postal_service.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'sass-rails', '~> 4.0.0'
s.add_development_dependency 'pry-rails', '>= 0.3.2'
s.add_development_dependency 'guard-rspec', '>= 4.2.8'
s.add_development_dependency 'guard-rubocop', '>= 1.1.0'
s.add_development_dependency 'rubocop', '>= 0.24.1'
end

0 comments on commit d192cf9

Please sign in to comment.