From d1777841a9b16a5099d848d0d2ed62ef0470c0c0 Mon Sep 17 00:00:00 2001 From: Andy Brody Date: Wed, 28 Mar 2018 12:11:28 -0700 Subject: [PATCH] Update rubocop config for rubocop 0.54. --- .rubocop-disables.yml | 30 +++++++++++++----------------- rest-client.gemspec | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.rubocop-disables.yml b/.rubocop-disables.yml index d43dea7..f46b379 100644 --- a/.rubocop-disables.yml +++ b/.rubocop-disables.yml @@ -53,8 +53,9 @@ Style/BracesAroundHashParameters: Enabled: false # Offense count: 1 -Style/ClassAndModuleCamelCase: - Enabled: false +Naming/ClassAndModuleCamelCase: + Exclude: + - lib/restclient/windows/root_certs.rb # Offense count: 2 # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -102,7 +103,7 @@ Style/ConditionalAssignment: EnforcedStyle: assign_inside_condition # Offense count: 2 -Style/ConstantName: +Naming/ConstantName: Enabled: false # TODO: eh? @@ -162,11 +163,9 @@ Layout/EmptyLinesAroundExceptionHandlingKeywords: Style/Encoding: Enabled: false -# TODO: exclude -# Offense count: 1 -# Configuration parameters: Exclude. -Style/FileName: - Enabled: false +Naming/FileName: + Exclude: + - lib/rest-client.rb # Offense count: 3 # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -262,7 +261,7 @@ Style/PercentLiteralDelimiters: # Offense count: 3 # Configuration parameters: NamePrefixBlacklist. -Style/PredicateName: +Naming/PredicateName: Enabled: false # TODO: configure @@ -327,11 +326,6 @@ Layout/EmptyLinesAroundBlockBody: Layout/SpaceInsideBlockBraces: Enabled: false -# Offense count: 6 -# Cop supports --auto-correct. -Layout/SpaceInsideBrackets: - Enabled: false - # Offense count: 181 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles. @@ -350,8 +344,10 @@ Layout/SpaceInsideParens: Style/StringLiterals: Enabled: false -Style/TrailingCommaInLiteral: - EnforcedStyleForMultiline: comma +Style/TrailingCommaInArrayLiteral: + EnforcedStyleForMultiline: consistent_comma +Style/TrailingCommaInHashLiteral: + EnforcedStyleForMultiline: consistent_comma Style/TrailingCommaInArguments: Enabled: false @@ -387,7 +383,7 @@ Style/BarePercentLiterals: Enabled: false -Lint/RescueWithoutErrorClass: +Style/RescueStandardError: Exclude: - 'bin/restclient' - 'lib/restclient/windows/root_certs.rb' diff --git a/rest-client.gemspec b/rest-client.gemspec index d3fa878..b65c130 100644 --- a/rest-client.gemspec +++ b/rest-client.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_development_dependency('pry', '~> 0') s.add_development_dependency('pry-doc', '~> 0') s.add_development_dependency('rdoc', '>= 2.4.2', '< 6.0') - s.add_development_dependency('rubocop', '~> 0') + s.add_development_dependency('rubocop', '~> 0.49') s.add_dependency('http-accept', '>= 1.7.0', '< 2.0') s.add_dependency('http-cookie', '>= 1.0.2', '< 2.0')