Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Ruby 3.0.z #86

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
fail-fast: false
matrix:
ruby:
- 3.0.6
- 2.7.7
appraisal:
- rails_6_1
Expand Down
128 changes: 97 additions & 31 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-packaging
- rubocop-rails
AllCops:
NewCops: disable
TargetRubyVersion: 2.7
Exclude:
- '*.gemspec'
Layout/AlignParameters:
- 'gemfiles/*'
Bundler/OrderedGems:
Include:
- '**/Gemfile'
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Layout/CommentIndentation:
Enabled: false
Layout/ConditionPosition:
Enabled: false
Layout/DotPosition:
EnforcedStyle: trailing
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/HeredocIndentation:
Enabled: false
Layout/LineLength:
Exclude:
- spec/**/*
AllowedPatterns:
- !ruby/regexp /\A +(it|describe|context|shared_examples|include_examples|it_behaves_like) ["']/
- !ruby/regexp /\A(require|require_relative) ["']/
- '^[ ]*#.+$'
- '^[ ]*''.+?'' => ''.+?'',?$'
- '^[ ]*".+?" => ".+?",?$'
Max: 100
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
Layout/SpaceInLambdaLiteral:
EnforcedStyle: require_space
Layout/SpaceInsideBlockBraces:
Enabled: false
Lint/AmbiguousBlockAssociation:
Exclude:
- spec/**/*
Lint/AmbiguousOperator:
Enabled: false
Lint/AmbiguousRegexpLiteral:
Expand All @@ -22,58 +54,73 @@ Lint/DeprecatedClassMethods:
Enabled: false
Lint/ElseLayout:
Enabled: false
Lint/HandleExceptions:
Enabled: false
Lint/IndentHeredoc:
Lint/FlipFlop:
Enabled: false
Lint/LiteralInInterpolation:
Enabled: false
Lint/Loop:
Enabled: false
Lint/MissingSuper:
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Enabled: false
Lint/RequireParentheses:
Enabled: false
Lint/SafeNavigationChain:
Enabled: false
Lint/SuppressedException:
Enabled: false
Lint/UnderscorePrefixedVariableName:
Enabled: false
Lint/Void:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/LineLength:
IgnoredPatterns:
- "^[ ]*describe.+$"
- "^[ ]*context.+$"
- "^[ ]*shared_context.+$"
- "^[ ]*shared_examples_for.+$"
- "^[ ]*it.+$"
- "^[ ]*'.+?' => '.+?',?$"
- "^[ ]*\".+?\" => \".+?\",?$"
- "^[ ]*.+?: .+?$"
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Max: 30
Metrics/ModuleLength:
Enabled: true
Exclude:
- spec/**/*
Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/PerceivedComplexity:
Enabled: false
Naming/AccessorMethodName:
Enabled: false
Naming/AsciiIdentifiers:
Enabled: false
Naming/BinaryOperatorParameterName:
Enabled: false
Naming/FileName:
Enabled: false
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/MemoizedInstanceVariableName:
EnforcedStyleForLeadingUnderscores: required
Style/ClassVars:
Naming/PredicateName:
Enabled: false
Style/ColonMethodCall:
Naming/VariableNumber:
Enabled: false
Naming/FileName:
Naming/RescuedExceptionsVariableName:
Enabled: false
Rails/Date:
Enabled: false
Rails:
Enabled: true
Rails/Delegate:
Enabled: false
Rails/HttpPositionalArguments:
Enabled: false
Rails/SkipsModelValidations:
Exclude:
- spec/**/*
Rails/TimeZone:
Enabled: false
Style/Alias:
Enabled: false
Style/ArrayJoin:
Expand All @@ -82,18 +129,25 @@ Style/AsciiComments:
Enabled: false
Style/Attr:
Enabled: false
Style/BlockDelimiters:
Enabled: false
Style/CaseEquality:
Enabled: false
Style/CharacterLiteral:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/ClassVars:
Enabled: false
Style/CollectionMethods:
Enabled: true
PreferredMethods:
find: detect
reduce: inject
collect: map
find: detect
find_all: select
reduce: inject
Style/ColonMethodCall:
Enabled: false
Style/CommentAnnotation:
Enabled: false
Style/Documentation:
Expand All @@ -102,18 +156,20 @@ Style/DoubleNegation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyElse:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Style/Encoding:
Enabled: false
Style/EvenOdd:
Enabled: false
Style/ExpandPathArguments:
Enabled: false
Style/FlipFlop:
Enabled: false
Style/FormatString:
Enabled: false
Style/FormatStringToken:
EnforcedStyle: template
Style/FrozenStringLiteralComment:
Enabled: false
Style/GlobalVars:
Expand All @@ -126,6 +182,8 @@ Style/IfWithSemicolon:
Enabled: false
Style/InlineComment:
Enabled: false
Style/InverseMethods:
Enabled: false
Style/Lambda:
Enabled: false
Style/LambdaCall:
Expand All @@ -152,6 +210,10 @@ Style/NumericPredicate:
Enabled: false
Style/OneLineConditional:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/ParenthesesAroundCondition:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/PerlBackrefs:
Expand All @@ -164,8 +226,6 @@ Style/RaiseArgs:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/SelfAssignment:
Enabled: false
Style/SignalException:
Expand All @@ -177,16 +237,22 @@ Style/SingleLineMethods:
Style/SpecialGlobalVars:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
EnforcedStyle: single_quotes
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrivialAccessors:
Enabled: false
Style/VariableInterpolation:
Enabled: false
Style/WhenThen:
Enabled: false
Style/WhileUntilModifier:
Enabled: false
Style/WordArray:
Enabled: false
Style/VariableInterpolation:
Enabled: false
Loading