mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-30 09:45:46 +00:00
AutoFix RuboCop Layout/EmptyLinesAroundClassBody
This commit is contained in:
parent
aa596b832c
commit
cf62a2439d
4 changed files with 0 additions and 15 deletions
|
|
@ -29,16 +29,6 @@ Gemspec/RequiredRubyVersion:
|
|||
Exclude:
|
||||
- 'grape_logging.gemspec'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
||||
Layout/EmptyLinesAroundClassBody:
|
||||
Exclude:
|
||||
- 'lib/grape_logging/formatters/rails.rb'
|
||||
- 'lib/grape_logging/loggers/request_headers.rb'
|
||||
- 'lib/grape_logging/middleware/request_logger.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ require 'rack/utils'
|
|||
module GrapeLogging
|
||||
module Formatters
|
||||
class Rails
|
||||
|
||||
def call(severity, datetime, _, data)
|
||||
if data.is_a?(String)
|
||||
"#{severity[0..0]} [#{datetime}] #{severity} -- : #{data}\n"
|
||||
|
|
@ -53,7 +52,6 @@ module GrapeLogging
|
|||
|
||||
message
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module GrapeLogging
|
||||
module Loggers
|
||||
class RequestHeaders < GrapeLogging::Loggers::Base
|
||||
|
||||
HTTP_PREFIX = 'HTTP_'.freeze
|
||||
|
||||
def parameters(request, _)
|
||||
|
|
@ -16,7 +15,6 @@ module GrapeLogging
|
|||
|
||||
{ headers: headers }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ require 'grape'
|
|||
module GrapeLogging
|
||||
module Middleware
|
||||
class RequestLogger < Grape::Middleware::Base
|
||||
|
||||
ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
||||
event = ActiveSupport::Notifications::Event.new(*args)
|
||||
GrapeLogging::Timings.append_db_runtime(event)
|
||||
|
|
|
|||
Loading…
Reference in a new issue