From baec29ea417a0261ac747cf7c442d487e9ade11d Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Wed, 26 Jun 2024 15:51:07 -0500 Subject: [PATCH 1/2] Update net-ftp to JRuby-compatible 0.3.7 Previous versions were missing our patch to disable OpenSSL session caching. See ruby/net-ftp#38 --- lib/pom.rb | 2 +- lib/pom.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pom.rb b/lib/pom.rb index d5b4dc5a7d9..c1ecaa0f731 100644 --- a/lib/pom.rb +++ b/lib/pom.rb @@ -126,7 +126,7 @@ def log(message=nil) # ['debug', '1.4.0'], ['matrix', '0.4.2'], ['minitest', '5.15.0'], - ['net-ftp', '0.1.3'], + ['net-ftp', '0.3.7'], ['net-imap', '0.2.3'], ['net-pop', '0.1.1'], ['net-smtp', '0.3.1'], diff --git a/lib/pom.xml b/lib/pom.xml index 019211b55f6..0125db6408a 100644 --- a/lib/pom.xml +++ b/lib/pom.xml @@ -931,7 +931,7 @@ DO NOT MODIFY - GENERATED CODE rubygems net-ftp - 0.1.3 + 0.3.7 gem provided @@ -1148,7 +1148,7 @@ DO NOT MODIFY - GENERATED CODE specifications/yaml-0.2.0* specifications/matrix-0.4.2* specifications/minitest-5.15.0* - specifications/net-ftp-0.1.3* + specifications/net-ftp-0.3.7* specifications/net-imap-0.2.3* specifications/net-pop-0.1.1* specifications/net-smtp-0.3.1* @@ -1227,7 +1227,7 @@ DO NOT MODIFY - GENERATED CODE gems/yaml-0.2.0*/**/* gems/matrix-0.4.2*/**/* gems/minitest-5.15.0*/**/* - gems/net-ftp-0.1.3*/**/* + gems/net-ftp-0.3.7*/**/* gems/net-imap-0.2.3*/**/* gems/net-pop-0.1.1*/**/* gems/net-smtp-0.3.1*/**/* @@ -1306,7 +1306,7 @@ DO NOT MODIFY - GENERATED CODE cache/yaml-0.2.0* cache/matrix-0.4.2* cache/minitest-5.15.0* - cache/net-ftp-0.1.3* + cache/net-ftp-0.3.7* cache/net-imap-0.2.3* cache/net-pop-0.1.1* cache/net-smtp-0.3.1* From 2fe4801fbe5a0e67aaec7b30bcc1bfd575c2974a Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 27 Jun 2024 13:20:58 -0500 Subject: [PATCH 2/2] Version-guard these specs net-ftp 0.3.6+ returns the response from `put` and `puttextfile`. See https://github.com/ruby/net-ftp/pull/34 --- spec/ruby/library/net-ftp/shared/puttextfile.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/ruby/library/net-ftp/shared/puttextfile.rb b/spec/ruby/library/net-ftp/shared/puttextfile.rb index 4722439674a..e2c04533524 100644 --- a/spec/ruby/library/net-ftp/shared/puttextfile.rb +++ b/spec/ruby/library/net-ftp/shared/puttextfile.rb @@ -34,8 +34,16 @@ remote_lines.should == local_lines.gsub("\n", "\r\n") end - it "returns nil" do - @ftp.send(@method, @local_fixture_file, "text").should be_nil + guard -> { Net::FTP::VERSION < '0.3.6' } do + it "returns nil" do + @ftp.send(@method, @local_fixture_file, "text").should be_nil + end + end + + guard -> { Net::FTP::VERSION >= '0.3.6' } do + it "returns the response" do + @ftp.send(@method, @local_fixture_file, "text").should == @ftp.last_response + end end describe "when passed a block" do