diff --git a/.overcommit.yml b/.overcommit.yml index 2058801..52135e0 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -142,6 +142,9 @@ PreCommit: FileSize: enabled: true size_limit_bytes: 1_000_000 + exclude: + - 'db/structure.sql' + - 'db/schema.rb' FixMe: enabled: true @@ -481,7 +484,7 @@ PostCheckout: enabled: true GitLfs: - enabled: true + enabled: false flags: - 'post-checkout' @@ -509,7 +512,7 @@ PostCommit: enabled: false GitLfs: - enabled: true + enabled: false flags: - 'post-commit' @@ -537,7 +540,7 @@ PostMerge: enabled: false GitLfs: - enabled: true + enabled: false flags: - 'post-merge' diff --git a/.rubocop.yml b/.rubocop.yml index 5c5b19a..ba2ec17 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ inherit_from: - '.rubocop_core.yml' - '.rubocop_performance.yml' + - '.rubocop_rails.yml' - '.rubocop_rspec.yml' - '.rubocop_local.yml' diff --git a/.rubocop_core.yml b/.rubocop_core.yml index d425894..7502e55 100644 --- a/.rubocop_core.yml +++ b/.rubocop_core.yml @@ -1,4 +1,4 @@ -# Last updated to rubocop 0.71.0 +# Last updated to rubocop 0.76.0 AllCops: Include: @@ -105,6 +105,9 @@ Gemspec/OrderedDependencies: Gemspec/RequiredRubyVersion: Enabled: true +Gemspec/RubyVersionGlobalsUsage: + Enabled: true + ################################################################################ # LAYOUT ################################################################################ @@ -207,8 +210,6 @@ Layout/ClosingHeredocIndentation: Layout/ClosingParenthesisIndentation: Enabled: true - Exclude: - - '**/spec/**/*_spec.rb' Layout/CommentIndentation: Enabled: true @@ -336,8 +337,6 @@ Layout/IndentFirstArgument: Enabled: true EnforcedStyle: 'consistent_relative_to_receiver' IndentationWidth: ~ - Exclude: - - '**/spec/**/*_spec.rb' Layout/IndentFirstArrayElement: Enabled: true @@ -387,9 +386,8 @@ Layout/MultilineHashBraceLayout: Layout/MultilineHashKeyLineBreaks: Enabled: true -# https://github.com/rubocop-hq/rubocop/issues/6936 Layout/MultilineMethodArgumentLineBreaks: - Enabled: false + Enabled: true Exclude: - 'Gemfile' - 'config/routes.rb' @@ -682,6 +680,9 @@ Lint/SafeNavigationWithEmpty: Lint/ScriptPermission: Enabled: true +Lint/SendWithMixinArgument: + Enabled: true + Lint/ShadowedArgument: Enabled: true IgnoreImplicitReferences: false @@ -704,16 +705,16 @@ Lint/UnderscorePrefixedVariableName: Lint/UnifiedInteger: Enabled: true -Lint/UnneededCopDisableDirective: +Lint/RedundantCopDisableDirective: Enabled: true -Lint/UnneededCopEnableDirective: +Lint/RedundantCopEnableDirective: Enabled: true -Lint/UnneededRequireStatement: +Lint/RedundantRequireStatement: Enabled: true -Lint/UnneededSplatExpansion: +Lint/RedundantSplatExpansion: Enabled: true Lint/UnreachableCode: @@ -843,6 +844,7 @@ Metrics/LineLength: - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+'[^']+'$" # RSpec expectation line for a single-quoted string - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+Time\\.(new|utc).*" # RSpec expectation line for a Time - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+\\\"[^\\\"]+\\\"$" # RSpec expectation line for a double-quoted string + - "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+match\\(/[^/]+/\\)$" # RSpec expectation line for a regex - "^\\s+return\\s+.*(if|unless)" # Short circuiting returns - '^\s*((private|public|protected)\s+)?def\s+[\w\._]+\(?' # Method definitions - '^\s+belongs_to\s+.*' # Rails belongs_to relationships @@ -938,6 +940,7 @@ Naming/MemoizedInstanceVariableName: Naming/MethodName: Enabled: true EnforcedStyle: 'snake_case' + IgnoredPatterns: [] Naming/PredicateName: Enabled: true @@ -982,6 +985,7 @@ Naming/UncommunicativeMethodParamName: - 'io' - 'ip' - 'on' + - 'os' - 'to' ForbiddenNames: [] @@ -1131,7 +1135,8 @@ Style/ConditionalAssignment: SingleLineConditionsOnly: false Style/ConstantVisibility: - Enabled: true + # This seems broken + Enabled: false Style/Copyright: # Copyrights at the Top of Files are Noisy @@ -1194,6 +1199,10 @@ Style/EvalWithLocation: Style/EvenOdd: Enabled: true +Style/FloatDivision: + Enabled: true + EnforcedStyle: 'right_coerce' + Style/For: Enabled: true EnforcedStyle: 'each' @@ -1229,9 +1238,11 @@ Style/IdenticalConditionalBranches: Style/IfInsideElse: Enabled: true + AllowIfModifier: false Style/IfUnlessModifier: - Enabled: true + # Disabled Until https://github.com/rubocop-hq/rubocop/issues/3534 Is Addressed + Enabled: false Exclude: - '**/config/initializers/*.rb' @@ -1294,13 +1305,14 @@ Style/MethodCalledOnDoEndBlock: Style/MethodCallWithArgsParentheses: # Would Require a *lot* of Effort Adding Ignored Methods Enabled: false - AllowParenthesesInMultilineCall: true - AllowParenthesesInChaining: true AllowParenthesesInCamelCaseMethod: true + AllowParenthesesInChaining: true + AllowParenthesesInMultilineCall: true IgnoreMacros: true - IncludedMacros: [] IgnoredMethods: - 'puts' + IgnoredPatterns: [] + IncludedMacros: [] Style/MethodCallWithoutArgsParentheses: Enabled: true @@ -1364,6 +1376,9 @@ Style/MultilineMethodSignature: Style/MultilineTernaryOperator: Enabled: true +Style/MultilineWhenThen: + Enabled: true + Style/MultipleComparison: Enabled: true @@ -1435,10 +1450,8 @@ Style/NumericLiterals: Style/NumericPredicate: Enabled: true - EnforcedStyle: 'predicate' + EnforcedStyle: 'comparison' IgnoredMethods: [] - Exclude: - - '**/spec/**/*_spec.rb' Style/OneLineConditional: Enabled: true @@ -1676,16 +1689,16 @@ Style/TrivialAccessors: Style/UnlessElse: Enabled: true -Style/UnneededCapitalW: +Style/RedundantCapitalW: Enabled: true -Style/UnneededCondition: +Style/RedundantCondition: Enabled: true -Style/UnneededInterpolation: +Style/RedundantInterpolation: Enabled: true -Style/UnneededPercentQ: +Style/RedundantPercentQ: Enabled: true Style/UnpackFirst: diff --git a/.rubocop_performance.yml b/.rubocop_performance.yml index c84c9c3..bc796e8 100644 --- a/.rubocop_performance.yml +++ b/.rubocop_performance.yml @@ -1,4 +1,4 @@ -# Last updated to 1.3.0 +# Last updated to 1.5.0 require: - 'rubocop-performance' diff --git a/.rubocop_rspec.yml b/.rubocop_rspec.yml index fd71816..828a0dd 100644 --- a/.rubocop_rspec.yml +++ b/.rubocop_rspec.yml @@ -1,4 +1,4 @@ -# Last updated to 1.33.0 +# Last updated to 1.36.0 require: - 'rubocop-rspec' @@ -48,6 +48,9 @@ RSpec/BeforeAfterAll: - 'spec/rails_helper.rb' - 'spec/support/**/*.rb' +RSpec/ContextMethod: + Enabled: true + RSpec/ContextWording: Enabled: true Prefixes: @@ -83,6 +86,10 @@ RSpec/EmptyExampleGroup: Enabled: false CustomIncludeMethods: [] +RSpec/EmptyLineAfterExample: + Enabled: true + AllowConsecutiveOneLiners: true + RSpec/EmptyLineAfterExampleGroup: Enabled: true @@ -141,6 +148,9 @@ RSpec/HookArgument: RSpec/HooksBeforeExamples: Enabled: true +RSpec/ImplicitBlockExpectation: + Enabled: true + RSpec/ImplicitExpect: Enabled: true EnforcedStyle: 'is_expected' @@ -168,6 +178,9 @@ RSpec/IteratedExpectation: RSpec/LeadingSubject: Enabled: true +RSpec/LeakyConstantDeclaration: + Enabled: true + RSpec/LetBeforeExamples: Enabled: true @@ -193,7 +206,6 @@ RSpec/MultipleDescribes: RSpec/MultipleExpectations: Enabled: false - AggregateFailuresByDefault: true Max: 5 RSpec/MultipleSubjects: diff --git a/.ruby-version b/.ruby-version index ec1cf33..57cf282 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.3 +2.6.5 diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index bc5a589..319f329 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -35,6 +35,8 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. -This Code of Conduct is adapted from the [Contributor -Covenant](http://contributor-covenant.org), version 1.2.0, available at -[http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +This Code of Conduct is adapted from the [Contributor Covenant][1], version +1.2.0, available at [here][2]. + +[1]: http://contributor-covenant.org +[2]: http://contributor-covenant.org/version/1/2/0/ diff --git a/LICENSE.txt b/LICENSE.txt index f7cc49c..eb58bf1 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2010-2016 The Kompanee, Ltd +Copyright (c) 2010-2019 The Kompanee, Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal