From befb44a08c6048337f27cf93db453249624e9a34 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 7 Nov 2024 10:57:42 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9Cuninitialized=20constant=20HttpL?= =?UTF-8?q?og=E2=80=9D=20errors=20in=20tootctl=20(#32796)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mastodon/cli/progress_helper.rb | 2 +- lib/tasks/mastodon.rake | 2 +- lib/tasks/repo.rake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mastodon/cli/progress_helper.rb b/lib/mastodon/cli/progress_helper.rb index 5634343796..da9527ffd7 100644 --- a/lib/mastodon/cli/progress_helper.rb +++ b/lib/mastodon/cli/progress_helper.rb @@ -5,7 +5,7 @@ dev_null = Logger.new('/dev/null') Rails.logger = dev_null ActiveRecord::Base.logger = dev_null ActiveJob::Base.logger = dev_null -HttpLog.configuration.logger = dev_null +HttpLog.configuration.logger = dev_null if defined?(HttpLog) Paperclip.options[:log] = false Chewy.logger = dev_null diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 2822f2eeb1..e1e2dd8194 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -596,7 +596,7 @@ def disable_log_stdout! Rails.logger = dev_null ActiveRecord::Base.logger = dev_null - HttpLog.configuration.logger = dev_null + HttpLog.configuration.logger = dev_null if defined?(HttpLog) Paperclip.options[:log] = false end diff --git a/lib/tasks/repo.rake b/lib/tasks/repo.rake index 539c44273f..c8f977f651 100644 --- a/lib/tasks/repo.rake +++ b/lib/tasks/repo.rake @@ -18,7 +18,7 @@ namespace :repo do url = "https://api.github.com/repos/#{REPOSITORY_NAME}/contributors?anon=1" - HttpLog.config.compact_log = true + HttpLog.config.compact_log = true if defined?(HttpLog) while url.present? response = HTTP.get(url) @@ -43,7 +43,7 @@ namespace :repo do path = Rails.root.join('CHANGELOG.md') tmp = Tempfile.new - HttpLog.config.compact_log = true + HttpLog.config.compact_log = true if defined?(HttpLog) begin File.open(path, 'r') do |file|