From a89fb6ac045651545f61a0139c152103d2fb125d Mon Sep 17 00:00:00 2001 From: Mikael Henriksson Date: Tue, 16 Aug 2016 08:55:35 +0200 Subject: [PATCH] Fix style violaations --- lib/sapience/core_ext/hash.rb | 2 +- lib/sapience/subscriber.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sapience/core_ext/hash.rb b/lib/sapience/core_ext/hash.rb index 2c98884..3b7173a 100644 --- a/lib/sapience/core_ext/hash.rb +++ b/lib/sapience/core_ext/hash.rb @@ -17,7 +17,7 @@ def _deep_transform_keys_in_object!(object, &block) end object when Array - object.map! { |e| _deep_transform_keys_in_object!(e, &block)} + object.map! { |e| _deep_transform_keys_in_object!(e, &block) } else object end diff --git a/lib/sapience/subscriber.rb b/lib/sapience/subscriber.rb index c082578..1b89c5e 100644 --- a/lib/sapience/subscriber.rb +++ b/lib/sapience/subscriber.rb @@ -96,7 +96,8 @@ def level_index # - Any object that responds to :call # - If none of the above apply, then the supplied block is returned as the formatter. # - Otherwise an instance of the default formatter is returned. - def extract_formatter(formatter, &block) # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable CyclomaticComplexity, AbcSize, PerceivedComplexity + def extract_formatter(formatter, &block) case when formatter.is_a?(Symbol) Sapience.constantize_symbol(formatter, "Sapience::Formatters").new @@ -115,6 +116,7 @@ def extract_formatter(formatter, &block) # rubocop:disable Metrics/CyclomaticCom default_formatter end end + # rubocop:enable CyclomaticComplexity, AbcSize, PerceivedComplexity SUBSCRIBER_OPTIONS = [:level, :formatter, :filter, :application, :host].freeze