public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/net-scp/files/
@ 2021-09-26 11:40 Conrad Kostecki
  0 siblings, 0 replies; only message in thread
From: Conrad Kostecki @ 2021-09-26 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     a7b1646a5f13406ed819213b2dcb2e614e22437e
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sun Sep 26 10:23:56 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Sep 26 11:26:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7b1646a

dev-ruby/net-scp: remove unused patch(es)

Closes: https://github.com/gentoo/gentoo/pull/22409
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../net-scp/files/net-scp-1.2.1-fix-common.path    | 28 --------
 .../files/net-scp-1.2.1-fix-download_test.patch    | 21 ------
 .../files/net-scp-1.2.1-fix-download_test_2.patch  | 25 -------
 .../files/net-scp-1.2.1-fix-download_test_3.patch  | 15 ----
 .../files/net-scp-1.2.1-fix-upload_tests.patch     | 14 ----
 ...1-raise-correct-errors-net-ssh-4.0-compat.patch | 30 --------
 .../files/net-scp-1.2.1-raise-correct-errors.patch | 80 ----------------------
 7 files changed, 213 deletions(-)

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-common.path b/dev-ruby/net-scp/files/net-scp-1.2.1-fix-common.path
deleted file mode 100644
index ee262d238cb..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-common.path
+++ /dev/null
@@ -1,28 +0,0 @@
---- test/common.rb	2018-01-21 16:23:07.384173147 +0100
-+++ test/common.rb	2018-01-21 16:20:34.084172782 +0100
-@@ -1,11 +1,11 @@
- require 'test/unit'
- require 'mocha/setup'
- 
--begin
--  gem 'net-ssh', ">= 2.0.0"
--  require 'net/ssh'
--rescue LoadError
--  $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../net-ssh/lib"
-+#begin
-+#  #gem 'net-ssh', ">= 2.0.0"
-+#  require 'net/ssh'
-+#rescue LoadError
-+#  $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../net-ssh/lib"
- 
-   begin
-     require 'net/ssh'
-@@ -14,7 +14,7 @@
-   rescue LoadError => e
-     abort "could not load net/ssh v2 (#{e.inspect})"
-   end
--end
-+#end
- 
- $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
- 

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test.patch
deleted file mode 100644
index a138fcdb557..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- test/test_download.rb	2018-01-22 02:08:00.000013728 +0100
-+++ test/test_download.rb.1	2018-01-22 02:11:49.820014276 +0100
-@@ -70,12 +70,12 @@
-     end
- 
-     error = nil
--    assert_scripted do
--      begin
--        scp.download!("/path/to/remote.txt")
--      rescue
--        error = $!
--      end
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+    begin
-+      scp.download!("/path/to/remote.txt")
-+    rescue
-+      error = $!
-+    end
-     end
-     assert_equal Net::SCP::Error, error.class
-     assert_equal "SCP did not finish successfully (1): File not found: /path/to/remote.txt\n", error.message

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_2.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_2.patch
deleted file mode 100644
index 55a8e5f16bc..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- test/test_download.rb	2018-01-22 02:26:56.440016436 +0100
-+++ test/test_download.rb	2018-01-22 02:32:46.076017270 +0100
-@@ -116,7 +116,9 @@
- 
-   def test_download_io_with_recursive_should_raise_error
-     expect_scp_session "-f -r /path/to/remote.txt"
--    assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", StringIO.new, :recursive => true) }
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", StringIO.new, :recursive => true) }
-+    end
-   end
- 
-   def test_download_io_with_preserve_should_ignore_preserve
-@@ -154,8 +156,9 @@
-       channel.sends_ok
-       channel.gets_data "D0755 0 remote\n"
-     end
--
--    assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote") }
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote") }
-+    end
-   end
- 
-   def test_download_should_raise_error_if_gets_not_ok

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_3.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_3.patch
deleted file mode 100644
index 12df02c1f00..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-download_test_3.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- test/test_download.rb	2018-01-22 02:35:45.200017696 +0100
-+++ test/test_download.rb.1	2018-01-22 02:38:40.000018113 +0100
-@@ -217,8 +217,10 @@
-       channel.gets_data "E\n"
-       channel.sends_ok
-     end
--
--    scp.download!("/path/to/remote", "/path/to/local", :recursive => true, :ssh => { :verbose => :debug })
-+    
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      scp.download!("/path/to/remote", "/path/to/local", :recursive => true, :ssh => { :verbose => :debug })
-+    end
-     assert_equal "a" * 1234, file.io.string
-   end
- 

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-upload_tests.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-fix-upload_tests.patch
deleted file mode 100644
index 73c34359afc..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-fix-upload_tests.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- test/test_upload.rb	2018-01-22 08:15:30.996002204 +0100
-+++ test/test_upload.rb.1	2018-01-22 08:18:09.328002581 +0100
-@@ -155,8 +155,9 @@
-     expect_scp_session("-t /path/to/remote") do |channel|
-       channel.gets_ok
-     end
--
--    assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local", "/path/to/remote") }
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      assert_raises(Net::SCP::Error) { scp.upload!("/path/to/local", "/path/to/remote") }
-+    end
-   end
- 
-   def test_upload_empty_directory_should_create_directory_and_finish

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors-net-ssh-4.0-compat.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors-net-ssh-4.0-compat.patch
deleted file mode 100644
index 3431f06b7cf..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors-net-ssh-4.0-compat.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- test/test_download.rb	2018-01-22 01:47:38.932010818 +0100
-+++ test/test_download.rb.1	2018-01-22 01:49:14.552011046 +0100
-@@ -205,9 +205,11 @@
-       channel.sends_ok
-       channel.gets_data "\1"
-     end
--
--    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", "/path/to/local.txt") }
--    assert_equal("\1", e.message)
-+    
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", "/path/to/local.txt") }
-+      assert_equal("\1", e.message)
-+    end
-   end
- 
-   def test_download_directory_should_raise_error_if_local_exists_and_is_not_directory
-@@ -223,8 +225,10 @@
-       channel.sends_ok
-     end
-     
--    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote", "/path/to/local", :recursive => true) }
--    assert_match(/exists and is not a directory/, e.message)
-+    Net::SSH::Test::Extensions::IO.with_test_extension do
-+      e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote", "/path/to/local", :recursive => true) }
-+      assert_match(/exists and is not a directory/, e.message)
-+    end
-   end
- 
-   def test_download_directory_should_create_directory_and_files_locally

diff --git a/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors.patch b/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors.patch
deleted file mode 100644
index a23164ef818..00000000000
--- a/dev-ruby/net-scp/files/net-scp-1.2.1-raise-correct-errors.patch
+++ /dev/null
@@ -1,80 +0,0 @@
---- README.rdoc
-+++ README.rdoc
-@@ -42,7 +42,7 @@ In a nutshell:
-   data = Net::SCP::download!("remote.host.com", "username", "/remote/path")
- 
-   # use a persistent connection to transfer files
--  Net::SCP.start("remote.host.com", "username", :ssh => { :password => "password" }) do |scp|
-+  Net::SCP.start("remote.host.com", "username", :password => "password") do |scp|
-     # upload a file to a remote server
-     scp.upload! "/local/path", "/remote/path"
- 
---- lib/net/scp.rb
-+++ lib/net/scp.rb
-@@ -395,7 +395,7 @@ module Net
-       def await_response_state(channel)
-         return if channel[:buffer].available == 0
-         c = channel[:buffer].read_byte
--        raise "#{c.chr}#{channel[:buffer].read}" if c != 0
-+        raise Net::SCP::Error, "#{c.chr}#{channel[:buffer].read}" if c != 0
-         channel[:next], channel[:state] = nil, channel[:next]
-         send("#{channel[:state]}_state", channel)
-       end
---- lib/net/scp/download.rb
-+++ lib/net/scp/download.rb
-@@ -129,7 +129,7 @@ module Net; class SCP
-       channel[:local] = File.join(channel[:local], directive[:name])
- 
-       if File.exists?(channel[:local]) && !File.directory?(channel[:local])
--        raise "#{channel[:local]} already exists and is not a directory"
-+        raise Net::SCP::Error, "#{channel[:local]} already exists and is not a directory"
-       elsif !File.exists?(channel[:local])
-         Dir.mkdir(channel[:local], directive[:mode] | 0700)
-       end
-@@ -162,4 +162,4 @@ module Net; class SCP
-     end
-   end
- 
--end; end
-\ No newline at end of file
-+end; end
---- test/test_download.rb
-+++ test/test_download.rb
-@@ -158,6 +158,37 @@ class TestDownload < Net::SCP::TestCase
-     assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote") }
-   end
- 
-+  def test_download_should_raise_error_if_gets_not_ok
-+    prepare_file("/path/to/local.txt", "")
-+
-+    expect_scp_session "-f /path/to/remote.txt" do |channel|
-+      channel.sends_ok
-+      channel.gets_data "C0666 0 remote.txt\n"
-+      channel.sends_ok
-+      channel.gets_data "\1"
-+    end
-+
-+    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote.txt", "/path/to/local.txt") }
-+    assert_equal("\1", e.message)
-+  end
-+
-+  def test_download_directory_should_raise_error_if_local_exists_and_is_not_directory
-+    File.stubs(:exists?).with("/path/to/local").returns(true)
-+    File.stubs(:exists?).with("/path/to/local/remote").returns(true)
-+    File.stubs(:directory?).with("/path/to/local/remote").returns(false)
-+
-+    expect_scp_session "-f -r /path/to/remote" do |channel|
-+      channel.sends_ok
-+      channel.gets_data "D0755 0 remote\n"
-+      channel.sends_ok
-+      channel.gets_data "E\n"
-+      channel.sends_ok
-+    end
-+    
-+    e = assert_raises(Net::SCP::Error) { scp.download!("/path/to/remote", "/path/to/local", :recursive => true) }
-+    assert_match(/exists and is not a directory/, e.message)
-+  end
-+
-   def test_download_directory_should_create_directory_and_files_locally
-     file = nil
-     prepare_directory "/path/to/local" do |dir|


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-26 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-26 11:40 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/net-scp/files/ Conrad Kostecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox