From 31463a97a07ca163f03ae6dbf257e07500feb713 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Wed, 1 May 2024 19:47:04 +0200 Subject: [PATCH] Fix NoMethodError: undefined method 'verbose' With rake 13.2.0, Rake.application.options is not an OpenStruct anymore and contains only valid options. The verbose flag can be queried with Rake.verbose. --- lib/hoe/debug.rb | 2 +- test/test_hoe_debug.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hoe/debug.rb b/lib/hoe/debug.rb index 8a4fdbe..eefab8e 100644 --- a/lib/hoe/debug.rb +++ b/lib/hoe/debug.rb @@ -86,7 +86,7 @@ def check_manifest File.open f, "w" do |fp| fp.puts files end - verbose = { :verbose => Rake.application.options.verbose } + verbose = { :verbose => Rake.verbose } begin sh "#{DIFF} -du Manifest.txt #{f}", verbose diff --git a/test/test_hoe_debug.rb b/test/test_hoe_debug.rb index 11d99f1..c346d7e 100644 --- a/test/test_hoe_debug.rb +++ b/test/test_hoe_debug.rb @@ -7,8 +7,8 @@ class TestHoeDebug < Minitest::Test include Hoe::Debug - # On Rake 0.8.7 verbose_flag is true, causing two tests to fail. - RakeFileUtils.verbose_flag = nil + # On Rake 0.8.7 verbose_flag is true, causing three tests to fail. + Rake.verbose(false) attr_accessor :generated_files