From a7bf717475c10935ad68a7b2814e3961de88f06a Mon Sep 17 00:00:00 2001 From: Ivy Evans Date: Tue, 16 Nov 2021 02:52:38 +0000 Subject: [PATCH] Manually fix rubocop 1.23.0 violations --- lib/lograge.rb | 1 + lib/lograge/silent_logger.rb | 2 ++ lograge.gemspec | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/lib/lograge.rb b/lib/lograge.rb index 9f60ba1b..64cc7a12 100644 --- a/lib/lograge.rb +++ b/lib/lograge.rb @@ -223,5 +223,6 @@ def lograge_config application.config.lograge end end +# rubocop:enable Metrics/ModuleLength require 'lograge/railtie' if defined?(Rails) diff --git a/lib/lograge/silent_logger.rb b/lib/lograge/silent_logger.rb index 41b1243d..04c90557 100644 --- a/lib/lograge/silent_logger.rb +++ b/lib/lograge/silent_logger.rb @@ -5,7 +5,9 @@ module Lograge class SilentLogger < SimpleDelegator %i[debug info warn error fatal unknown].each do |method_name| + # rubocop:disable Lint/EmptyBlock define_method(method_name) { |*_args| } + # rubocop:enable Lint/EmptyBlock end end end diff --git a/lograge.gemspec b/lograge.gemspec index 963bd13d..bae06c7e 100644 --- a/lograge.gemspec +++ b/lograge.gemspec @@ -12,6 +12,11 @@ Gem::Specification.new do |s| s.description = "Tame Rails' multi-line logging into a single line per request" s.license = 'MIT' + s.metadata = { 'rubygems_mfa_required' => 'true' } + + # NOTE(ivy): Ruby version 2.5 is the oldest syntax supported by Rubocop. + s.required_ruby_version = '>= 2.5' + s.files = `git ls-files lib LICENSE.txt`.split("\n") s.add_development_dependency 'rspec', '~> 3.1'