[rubygem-net-sftp] Update to net-sftp 2.1.2.

Vít Ondruch vondruch at fedoraproject.org
Wed Jul 16 13:35:19 UTC 2014


commit b9913349504008d1f3fc189839208c5e921b6037
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Wed Jul 16 15:35:33 2014 +0200

    Update to net-sftp 2.1.2.

 .gitignore                                      |    1 +
 rubygem-net-sftp-2.1.2-Move-to-Minitest-5.patch |   52 +++++++++++++++++++++++
 rubygem-net-sftp.spec                           |   26 +++++++-----
 sources                                         |    2 +-
 4 files changed, 69 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index aea4cbd..01381d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /net-sftp-2.0.5.gem
 /net-sftp-2.1.1.gem
+/net-sftp-2.1.2.gem
diff --git a/rubygem-net-sftp-2.1.2-Move-to-Minitest-5.patch b/rubygem-net-sftp-2.1.2-Move-to-Minitest-5.patch
new file mode 100644
index 0000000..e65738b
--- /dev/null
+++ b/rubygem-net-sftp-2.1.2-Move-to-Minitest-5.patch
@@ -0,0 +1,52 @@
+diff --git a/test/common.rb b/test/common.rb
+index 4a26cdc..22493f4 100644
+--- a/test/common.rb
++++ b/test/common.rb
+@@ -1,4 +1,4 @@
+-require 'test/unit'
++require 'minitest/autorun'
+ require 'mocha/setup'
+ require 'stringio'
+ 
+@@ -20,7 +20,7 @@ require 'net/sftp'
+ require 'net/sftp/constants'
+ require 'net/ssh/test'
+ 
+-class Net::SFTP::TestCase < Test::Unit::TestCase
++class Net::SFTP::TestCase < Minitest::Test
+   include Net::SFTP::Constants::PacketTypes
+   include Net::SSH::Test
+ 
+diff --git a/test/protocol/01/test_base.rb b/test/protocol/01/test_base.rb
+index b9fb5bf..d74320e 100644
+--- a/test/protocol/01/test_base.rb
++++ b/test/protocol/01/test_base.rb
+@@ -44,7 +44,7 @@ class Protocol::V01::TestBase < Net::SFTP::TestCase
+       :string, "name2", :string, "long2", :long, 0x4, :long, 0550)
+     names = @base.parse_name_packet(packet)[:names]
+ 
+-    assert_not_nil names
++    refute_nil names
+     assert_equal 2, names.length
+     assert_instance_of Net::SFTP::Protocol::V01::Name, names.first
+ 
+@@ -207,4 +207,4 @@ class Protocol::V01::TestBase < Net::SFTP::TestCase
+     def attributes
+       Net::SFTP::Protocol::V01::Attributes
+     end
+-end
+\ No newline at end of file
++end
+diff --git a/test/protocol/04/test_base.rb b/test/protocol/04/test_base.rb
+index b52a5fc..f6d813d 100644
+--- a/test/protocol/04/test_base.rb
++++ b/test/protocol/04/test_base.rb
+@@ -17,7 +17,7 @@ class Protocol::V04::TestBase < Protocol::V03::TestBase
+       :string, "name2", :long, 0x4, :byte, 1, :long, 0550)
+     names = @base.parse_name_packet(packet)[:names]
+ 
+-    assert_not_nil names
++    refute_nil names
+     assert_equal 2, names.length
+     assert_instance_of Net::SFTP::Protocol::V04::Name, names.first
+ 
diff --git a/rubygem-net-sftp.spec b/rubygem-net-sftp.spec
index 05e0d37..ec10d60 100644
--- a/rubygem-net-sftp.spec
+++ b/rubygem-net-sftp.spec
@@ -2,21 +2,20 @@
 
 Summary: A pure Ruby implementation of the SFTP client protocol
 Name: rubygem-%{gem_name}
-Version: 2.1.1
-Release: 3%{?dist}
+Version: 2.1.2
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT or LGPLv2
-URL: http://net-ssh.rubyforge.org/sftp
+URL: https://github.com/net-ssh/net-sftp
 Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
-Requires: ruby(release)
-Requires: ruby(rubygems)
-Requires: rubygem(net-ssh)
+# Fix the test suite to be compatible with MiniTest 5.x.
+# https://github.com/net-ssh/net-sftp/pull/37
+Patch0: rubygem-net-sftp-2.1.2-Move-to-Minitest-5.patch
 BuildRequires: rubygems-devel
-BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(minitest) > 5
 BuildRequires: rubygem(mocha)
 BuildRequires: rubygem(net-ssh)
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 A pure Ruby implementation of the SFTP client protocol
@@ -33,6 +32,10 @@ This package contains documentation for %{name}.
 %setup -q -c -T
 %gem_install -n %{SOURCE0}
 
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
+
 %build
 
 %install
@@ -40,11 +43,9 @@ mkdir -p %{buildroot}%{gem_dir}
 cp -pa .%{gem_dir}/* \
         %{buildroot}%{gem_dir}/
 
-# NOTE: There are some tests, but they require 'echoe' and a lot of patching.
-# I've contacted upstream to fix this.
 %check
 pushd .%{gem_instdir}
-find -type f -name test_*.rb | xargs testrb -Itest
+ruby -Itest test/test_all.rb
 popd
 
 %files
@@ -67,6 +68,9 @@ popd
 %{gem_instdir}/setup.rb
 
 %changelog
+* Tue Jul 15 2014 Vít Ondruch <vondruch at redhat.com> - 2.1.2-1
+- Update to net-sftp 2.1.2.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index fe36071..8f823a4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ff92b7ba57a41a83d67bbcdc118a0b39  net-sftp-2.1.1.gem
+c49f16fae9cea91123b06d903267205b  net-sftp-2.1.2.gem


More information about the scm-commits mailing list