mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
AutoFix RuboCop Style/HashSyntax
This commit is contained in:
parent
4ca251f9a8
commit
f6ae186ea6
2 changed files with 3 additions and 12 deletions
|
|
@ -148,15 +148,6 @@ Style/GuardClause:
|
|||
Exclude:
|
||||
- 'lib/grape_logging/reporters/logger_reporter.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
|
||||
Style/HashSyntax:
|
||||
Exclude:
|
||||
- 'lib/grape_logging/formatters/logstash.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle, Autocorrect.
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ module GrapeLogging
|
|||
class Logstash
|
||||
def call(severity, datetime, _, data)
|
||||
{
|
||||
:'@timestamp' => datetime.iso8601,
|
||||
:'@version' => '1',
|
||||
:severity => severity
|
||||
'@timestamp': datetime.iso8601,
|
||||
'@version': '1',
|
||||
severity: severity
|
||||
}.merge!(format(data)).to_json + "\n"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue