diff --git a/.rubocop.yml b/.rubocop.yml index d7e1355..ee95892 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,9 +9,16 @@ Layout/LeadingCommentSpace: - '**/*.ru' Layout/LineLength: Max: 120 +Layout/SpaceAroundMethodCallOperator: + Enabled: true Layout/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space +Lint/RaiseException: + Enabled: true +Lint/StructNewOverride: + Enabled: true + Metrics/AbcSize: Exclude: - lib/api_valve/middleware/logging.rb @@ -30,8 +37,16 @@ Style/ConditionalAssignment: Enabled: false Style/Documentation: Enabled: false +Style/ExponentialNotation: + Enabled: true Style/FormatString: Enabled: false +Style/HashEachMethods: + Enabled: true +Style/HashTransformKeys: + Enabled: true +Style/HashTransformValues: + Enabled: true Style/FormatStringToken: Enabled: false Style/FrozenStringLiteralComment: diff --git a/api_valve.gemspec b/api_valve.gemspec index e52f409..d66dfb5 100644 --- a/api_valve.gemspec +++ b/api_valve.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rack-test', '~> 1.1' s.add_development_dependency 'rspec', '~> 3.7' s.add_development_dependency 'rubocop', '0.82.0' - s.add_development_dependency 'rubocop-rspec', '1.37.1' + s.add_development_dependency 'rubocop-rspec', '1.39.0' s.add_development_dependency 'simplecov', '~> 0.16' s.add_development_dependency 'timecop', '~> 0.9' s.add_development_dependency 'webmock', '~> 3.4' diff --git a/spec/examples/permissions_spec.rb b/spec/examples/permissions_spec.rb index 69d1432..36f7d19 100644 --- a/spec/examples/permissions_spec.rb +++ b/spec/examples/permissions_spec.rb @@ -14,7 +14,7 @@ end end - context 'when providing the api token' do + context 'when not providing the api token' do it 'denies request' do get '/api' expect(last_response.status).to eq(403)