From ef2aaaa2349f7687f2fa3c4aae5ad6a22b2abe5d Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 28 Dec 2024 14:00:20 +0100 Subject: [PATCH 1/2] fix installing custom package uri; cleanup downloaded packages --- rakelib/gem.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rakelib/gem.rb b/rakelib/gem.rb index 75c5aaeb..208ee033 100644 --- a/rakelib/gem.rb +++ b/rakelib/gem.rb @@ -214,16 +214,18 @@ def install_gem(prebuilt_only: false, package: nil) end elsif uri.scheme == 'http' || uri.scheme == 'https' # download the binary release package - $stdout.puts "Downloading #{uri.path}..." + $stdout.puts "Downloading #{uri}..." filename = File.basename(uri.path) - if WXRuby3.config.download_file(uri.path, filename) + if WXRuby3.config.download_file(uri.to_s, filename) sha_file = File.basename(filename, '.*')+DIGEST_EXT - uri.path = File.join(File.dirname(uri.path), sha_file) - unless WXRuby3.config.download_file(uri.path, sha_file) + sha_uri = File.join(File.dirname(uri.to_s), sha_file) + unless WXRuby3.config.download_file(sha_uri, sha_file) $stderr.puts "ERROR: Unable to download digest signature for binary release package : #{package}" exit(1) end exit(1) unless install_bin_pkg(filename) + # cleanup, remove downloaded files + FileUtils.rm_f([filename, sha_file]) true else $stderr.puts "ERROR: Unable to download binary release package (#{package})!" @@ -241,6 +243,8 @@ def install_gem(prebuilt_only: false, package: nil) exit(1) end exit(1) unless install_bin_pkg(bin_pkg_name+BINPKG_EXT) + # cleanup, remove downloaded files + FileUtils.rm_f([bin_pkg_name+BINPKG_EXT, bin_pkg_name+DIGEST_EXT]) true else if prebuilt_only From a1e70473a1f7cc4a0c9b96a689ceaa90db549789 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 28 Dec 2024 14:05:24 +0100 Subject: [PATCH 2/2] update for future frozen string literals --- tests/test_event_handling.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_event_handling.rb b/tests/test_event_handling.rb index 82162192..2f1808b0 100644 --- a/tests/test_event_handling.rb +++ b/tests/test_event_handling.rb @@ -96,7 +96,7 @@ def test_event assert(win.child.test_event) win.reset evt = TestEvent.new - evt.value = 'Something happened' + evt.value = 'Something happened'.dup win.process_event(evt) evt.value << ' again' assert(win.test_event) @@ -159,7 +159,7 @@ def test_queue_event assert_false(win.child.test_cmd_event) win.reset evt = TestEvent.new - evt.value = 'Something happened' + evt.value = 'Something happened'.dup win.queue_event(evt) evt.value << ' again' Wx.get_app.yield @@ -202,7 +202,7 @@ def test_pending_event assert_false(win.child.test_cmd_event) win.reset evt = TestEvent.new - evt.value = 'Something happened' + evt.value = 'Something happened'.dup win.add_pending_event(evt) evt.value << ' again' Wx.get_app.yield