AutoFix RuboCop Layout/HashAlignment

This commit is contained in:
Pieter Oliver 2025-06-30 12:34:54 +01:00
parent c9dfc20973
commit ea6126dab1
2 changed files with 2 additions and 12 deletions

View file

@ -29,16 +29,6 @@ Gemspec/RequiredRubyVersion:
Exclude: Exclude:
- 'grape_logging.gemspec' - 'grape_logging.gemspec'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
Exclude:
- 'spec/lib/grape_logging/loggers/request_headers_spec.rb'
# Offense count: 4 # Offense count: 4
# This cop supports safe autocorrection (--autocorrect). # This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Width, AllowedPatterns. # Configuration parameters: Width, AllowedPatterns.

View file

@ -9,14 +9,14 @@ describe GrapeLogging::Loggers::RequestHeaders do
let(:mock_request_with_unhandled_headers) do let(:mock_request_with_unhandled_headers) do
OpenStruct.new(env: { OpenStruct.new(env: {
HTTP_REFERER: 'http://example.com', HTTP_REFERER: 'http://example.com',
"PATH_INFO"=>"/api/v1/users" "PATH_INFO" => "/api/v1/users"
}) })
end end
let(:mock_request_with_long_headers) do let(:mock_request_with_long_headers) do
OpenStruct.new(env: { OpenStruct.new(env: {
HTTP_REFERER: 'http://example.com', HTTP_REFERER: 'http://example.com',
HTTP_USER_AGENT: "Mozilla/5.0" HTTP_USER_AGENT: "Mozilla/5.0"
}) })
end end