-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from collectiveidea/khanify-rubocop
Update rubocop and fixing the test suite
- Loading branch information
Showing
38 changed files
with
323 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,154 @@ | ||
# Load the rubocop-rspec gem | ||
require: rubocop-rspec | ||
|
||
Rails: | ||
Enabled: true | ||
AllCops: | ||
RunRailsCops: true | ||
Exclude: | ||
- lib/**/templates/* | ||
- vendor/**/* | ||
|
||
################# | ||
# [i] Overrides # | ||
################# | ||
|
||
CollectionMethods: | ||
Style/CollectionMethods: | ||
Enabled: true | ||
# Mapping from undesired method to desired_method | ||
# e.g. to use `detect` over `find`: | ||
# | ||
# CollectionMethods: | ||
# PreferredMethods: | ||
# find: detect | ||
PreferredMethods: | ||
collect: 'map' | ||
collect!: 'map!' | ||
reduce: 'inject' | ||
find_all: 'select' | ||
find: 'detect' | ||
each_with_index: 'each.with_index' | ||
|
||
# Multi-line method chaining should be done with leading dots. | ||
DotPosition: | ||
EnforcedStyle: trailing | ||
Style/EmptyMethod: | ||
EnforcedStyle: expanded | ||
|
||
# Align ends correctly. | ||
EndAlignment: | ||
AlignWith: variable | ||
|
||
IfUnlessModifier: | ||
MaxLineLength: 75 | ||
EnforcedStyleAlignWith: variable | ||
|
||
LineLength: | ||
Max: 200 | ||
Max: 120 | ||
|
||
SignalException: | ||
EnforcedStyle: only_raise | ||
|
||
SpaceInsideBlockBraces: | ||
SpaceBeforeBlockParameters: false | ||
SpaceBeforeBlockParameters: true | ||
|
||
SpaceInsideHashLiteralBraces: | ||
EnforcedStyle: no_space | ||
EnforcedStyle: space | ||
|
||
BracesAroundHashParameters: | ||
EnforcedStyle: context_dependent | ||
|
||
StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
################# | ||
# Disabled cops # | ||
################# | ||
AbcSize: | ||
Metrics/ClassLength: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
ClassAndModuleChildren: | ||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
ClassLength: | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
CyclomaticComplexity: | ||
Style/EachWithObject: | ||
Enabled: false | ||
|
||
Documentation: | ||
Style/FormatString: | ||
Enabled: false | ||
|
||
EachWithObject: | ||
Style/Lambda: | ||
Enabled: false | ||
|
||
FormatString: | ||
Style/NegatedIf: | ||
Enabled: false | ||
|
||
Lambda: | ||
Style/PercentLiteralDelimiters: | ||
PreferredDelimiters: | ||
"%w": "[]" | ||
"%W": "[]" | ||
"%i": "[]" | ||
"%I": "[]" | ||
|
||
Style/Semicolon: | ||
Enabled: false | ||
|
||
MethodLength: | ||
Style/SingleLineBlockParams: | ||
Enabled: false | ||
|
||
NegatedIf: | ||
Style/TrailingCommaInLiteral: | ||
Enabled: false | ||
|
||
Style/WordArray: | ||
Enabled: false | ||
|
||
# HABTM still has a place. | ||
# https://collectiveidea.com/blog/archives/2014/08/11/has_and_belongs_to_many-isnt-dead/ | ||
Rails/HasAndBelongsToMany: | ||
Enabled: false | ||
|
||
# enforces using the class name in a describe block (e.g. `describe TestedClass do`) | ||
RSpec/DescribeClass: | ||
Enabled: false | ||
|
||
# enforces using the described_class variablea (`described_class` instead of MyClass) | ||
RSpec/DescribedClass: | ||
Enabled: false | ||
|
||
# RSpec examples are ok if they're long. | ||
# Explicitness is better than cleverness in tests. | ||
RSpec/ExampleLength: | ||
Enabled: false | ||
|
||
# enforces using either `expect` or `allow` for stubs. Since they do differnet things, | ||
# we should let the developer decide which to use | ||
RSpec/MessageExpectation: | ||
Enabled: false | ||
|
||
# enforces having only one `expect` per test | ||
RSpec/MultipleExpectations: | ||
Enabled: false | ||
|
||
# enforces rules about how many nested `describe` blocks are allowed | ||
RSpec/NestedGroups: | ||
Enabled: false | ||
|
||
# enforces rules about using `it` or `describe` block methods instead of `feature` or `scenario` | ||
Capybara/FeatureMethods: | ||
Enabled: false | ||
|
||
################### | ||
# Local overrides # | ||
################### | ||
|
||
Rails/ApplicationRecord: | ||
Enabled: false | ||
|
||
Semicolon: | ||
Rails/SkipsModelValidations: | ||
Enabled: false | ||
|
||
SingleLineBlockParams: | ||
Security/YAMLLoad: | ||
Enabled: false | ||
|
||
TrailingComma: | ||
Style/FormatStringToken: | ||
Enabled: false | ||
|
||
WordArray: | ||
Style/NumericPredicate: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec| | |
spec.authors = ["Brian Ryckbost", "Matt Griffin", "Erik Michaels-Ober"] | ||
spec.description = "ActiveRecord backend for Delayed::Job, originally authored by Tobias Lütke" | ||
spec.email = ["[email protected]", "[email protected]", "[email protected]"] | ||
spec.files = %w(CONTRIBUTING.md LICENSE.md README.md delayed_job_active_record.gemspec) + Dir["lib/**/*.rb"] | ||
spec.files = %w[CONTRIBUTING.md LICENSE.md README.md delayed_job_active_record.gemspec] + Dir["lib/**/*.rb"] | ||
spec.homepage = "https://github.com/collectiveidea/delayed_job_active_record" | ||
spec.licenses = ["MIT"] | ||
spec.name = "delayed_job_active_record" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.