diff --git a/.rubocop.yml b/.rubocop.yml index 39a64ee..f5c8917 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -159,7 +159,7 @@ Metrics/CyclomaticComplexity: Metrics/PerceivedComplexity: Max: 10 -Metric/BlockLength: +Metrics/BlockLength: Exclude: - "Rakefile" - "**/*.rake" diff --git a/Gemfile b/Gemfile index fc5100d..b261a56 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ end group :development do # code style - gem "rubocop", "0.44.1" + gem "rubocop", "0.45.0" gem "pronto", "0.7.1" gem "pronto-rubocop", "0.7.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 54ca18d..4743257 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -226,7 +226,7 @@ GEM rspec-mocks (~> 3.5.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) - rubocop (0.44.1) + rubocop (0.45.0) parser (>= 2.3.1.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) @@ -307,7 +307,7 @@ DEPENDENCIES rspec-collection_matchers (~> 1.1.2) rspec-core (~> 3.5.1) rspec-rails (~> 3.5.1) - rubocop (= 0.44.1) + rubocop (= 0.45.0) simplecov (= 0.12.0) simplecov-rcov (= 0.2.3) spring @@ -319,4 +319,4 @@ DEPENDENCIES yard BUNDLED WITH - 1.12.5 + 1.13.6 diff --git a/test/dummy/config/logging.rb b/test/dummy/config/logging.rb index fb4b258..344865b 100644 --- a/test/dummy/config/logging.rb +++ b/test/dummy/config/logging.rb @@ -29,28 +29,32 @@ Logging::Rails.configure do |config| # Configure an appender that will write log events to STDOUT. A colorized # pattern layout is used to format the log events into strings before # writing. - Logging.appenders.stdout( - "stdout", - auto_flushing: true, - layout: Logging.layouts.pattern( - pattern: pattern, - color_scheme: "bright" + if config.log_to.include? "stdout" + Logging.appenders.stdout( + "stdout", + auto_flushing: true, + layout: Logging.layouts.pattern( + pattern: pattern, + color_scheme: "bright" + ) ) - ) if config.log_to.include? "stdout" + end # Configure an appender that will write log events to a file. The file will # be rolled on a daily basis, and the past 7 rolled files will be kept. # Older files will be deleted. The default pattern layout is used when # formatting log events into strings. - Logging.appenders.rolling_file( - "file", - filename: config.paths["log"].first, - keep: 7, - age: "daily", - truncate: false, - auto_flushing: true, - layout: layout - ) if config.log_to.include? "file" + if config.log_to.include? "file" + Logging.appenders.rolling_file( + "file", + filename: config.paths["log"].first, + keep: 7, + age: "daily", + truncate: false, + auto_flushing: true, + layout: layout + ) + end # Setup the root logger with the Rails log level and the desired set of # appenders. The list of appenders to use should be set in the environment