mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-04-27 14:57:40 +00:00
AutoFix RuboCop Layout/IndentationWidth
This commit is contained in:
parent
ea6126dab1
commit
fc7ae9023a
3 changed files with 4 additions and 12 deletions
|
|
@ -29,14 +29,6 @@ Gemspec/RequiredRubyVersion:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'grape_logging.gemspec'
|
- 'grape_logging.gemspec'
|
||||||
|
|
||||||
# Offense count: 4
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: Width, AllowedPatterns.
|
|
||||||
Layout/IndentationWidth:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/grape_logging/middleware/request_logger.rb'
|
|
||||||
- 'spec/lib/grape_logging/formatters/rails_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
# This cop supports safe autocorrection (--autocorrect).
|
||||||
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ module GrapeLogging
|
||||||
|
|
||||||
@included_loggers = @options[:include] || []
|
@included_loggers = @options[:include] || []
|
||||||
@reporter = if options[:instrumentation_key]
|
@reporter = if options[:instrumentation_key]
|
||||||
Reporters::ActiveSupportReporter.new(@options[:instrumentation_key])
|
Reporters::ActiveSupportReporter.new(@options[:instrumentation_key])
|
||||||
else
|
else
|
||||||
Reporters::LoggerReporter.new(@options[:logger], @options[:formatter], @options[:log_level])
|
Reporters::LoggerReporter.new(@options[:logger], @options[:formatter], @options[:log_level])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,9 @@ describe GrapeLogging::Formatters::Rails do
|
||||||
lines = message.split("\n")
|
lines = message.split("\n")
|
||||||
|
|
||||||
expected_output = if RUBY_VERSION >= '3.4'
|
expected_output = if RUBY_VERSION >= '3.4'
|
||||||
' Parameters: {"some_param" => {value_1: "123", value_2: "456"}}'
|
' Parameters: {"some_param" => {value_1: "123", value_2: "456"}}'
|
||||||
else
|
else
|
||||||
' Parameters: {"some_param"=>{:value_1=>"123", :value_2=>"456"}}'
|
' Parameters: {"some_param"=>{:value_1=>"123", :value_2=>"456"}}'
|
||||||
end
|
end
|
||||||
expect(lines.first).to eq expected_output
|
expect(lines.first).to eq expected_output
|
||||||
expect(lines.last).to eq "Completed 200 OK in 272.4ms (Views: 231.77ms | DB: 40.63ms)"
|
expect(lines.last).to eq "Completed 200 OK in 272.4ms (Views: 231.77ms | DB: 40.63ms)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue