Skip to content

Commit

Permalink
fix trivial RuboCop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
e2 committed May 22, 2016
1 parent 84c0e35 commit e03d278
Show file tree
Hide file tree
Showing 23 changed files with 182 additions and 386 deletions.
259 changes: 0 additions & 259 deletions .hound.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
inherit_from:
.hound.yml
.rubocop_todo.yml
38 changes: 36 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-05-27 21:27:40 +0200 using RuboCop version 0.25.0.
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-05-22 06:08:35 +0200 using RuboCop version 0.40.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 15
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/guard/rspec.rb'
- 'lib/guard/rspec/command.rb'
- 'lib/guard/rspec/deprecator.rb'
- 'lib/guard/rspec/dsl.rb'
- 'lib/guard/rspec/inspectors/base_inspector.rb'
- 'lib/guard/rspec/inspectors/factory.rb'
- 'lib/guard/rspec/inspectors/simple_inspector.rb'
- 'lib/guard/rspec/notifier.rb'
- 'lib/guard/rspec/options.rb'
- 'lib/guard/rspec/results.rb'
- 'lib/guard/rspec/rspec_process.rb'
- 'lib/guard/rspec/runner.rb'
- 'lib/guard/rspec_formatter.rb'

# Offense count: 148
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: leading, trailing
Style/DotPosition:
Enabled: false

# Offense count: 654
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Enabled: false
6 changes: 3 additions & 3 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ group :specs, halt_on_fail: true do
dsl.watch_spec_files_for(dsl.ruby.lib_files)

watch(%r{^(lib/guard/rspec/template)s/Guardfile$}) do
rspec.spec.("lib/guard/rspec/template")
rspec.spec.call("lib/guard/rspec/template")
end

watch(%r{^lib/guard/rspec/dsl.rb$}) do
rspec.spec.("lib/guard/rspec/template")
rspec.spec.call("lib/guard/rspec/template")
end
end

guard :rubocop, all_on_start: false do
watch(%r{.+\.rb$})
watch(/.+\.rb$/)
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
end
2 changes: 1 addition & 1 deletion guard-rspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.author = "Thibaud Guillaume-Gentil"
s.email = "thibaud@thibaud.gg"
s.summary = "Guard gem for RSpec"
s.description = "Guard::RSpec automatically run your specs" +
s.description = "Guard::RSpec automatically run your specs" \
" (much like autotest)."

s.homepage = "https://github.com/guard/guard-rspec"
Expand Down
3 changes: 2 additions & 1 deletion lib/guard/rspec/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def _parts
end

def _paths(options)
return paths unless chdir = options[:chdir]
chdir = options[:chdir]
return paths unless chdir
paths.map { |path| path.sub(File.join(chdir, "/"), "") }
end

Expand Down
Loading

0 comments on commit e03d278

Please sign in to comment.