mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-04-27 14:57:40 +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:
|
Exclude:
|
||||||
- 'lib/grape_logging/reporters/logger_reporter.rb'
|
- '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
|
# Offense count: 1
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||||
# Configuration parameters: EnforcedStyle, Autocorrect.
|
# Configuration parameters: EnforcedStyle, Autocorrect.
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ module GrapeLogging
|
||||||
class Logstash
|
class Logstash
|
||||||
def call(severity, datetime, _, data)
|
def call(severity, datetime, _, data)
|
||||||
{
|
{
|
||||||
:'@timestamp' => datetime.iso8601,
|
'@timestamp': datetime.iso8601,
|
||||||
:'@version' => '1',
|
'@version': '1',
|
||||||
:severity => severity
|
severity: severity
|
||||||
}.merge!(format(data)).to_json + "\n"
|
}.merge!(format(data)).to_json + "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue