[DRE-commits] [ruby-packetfu] 06/07: Fix test suite for version 1.1.10 and Ruby 2.x

Jérémy Bobbio lunar at moszumanska.debian.org
Sat May 3 13:18:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-packetfu.

commit 44f955610a587a02950179b61bbfc59f72d8bdb6
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat May 3 15:10:19 2014 +0200

    Fix test suite for version 1.1.10 and Ruby 2.x
    
    Two patches are taken from upstream master branch.
---
 ...better-about-version-checking-multidigits.patch | 25 +++++++++++
 ...Fix-encoding-issues-in-specs-for-Ruby-2.x.patch | 49 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 76 insertions(+)

diff --git a/debian/patches/0001-Be-better-about-version-checking-multidigits.patch b/debian/patches/0001-Be-better-about-version-checking-multidigits.patch
new file mode 100644
index 0000000..5cf02cd
--- /dev/null
+++ b/debian/patches/0001-Be-better-about-version-checking-multidigits.patch
@@ -0,0 +1,25 @@
+From af19f787042c7193627645f920661426dc531975 Mon Sep 17 00:00:00 2001
+From: Tod Beardsley <todb at packetfu.com>
+Date: Tue, 4 Feb 2014 09:37:10 -0600
+Subject: [PATCH] Be better about version checking multidigits
+
+---
+ spec/packetfu_spec.rb |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/packetfu_spec.rb b/spec/packetfu_spec.rb
+index 6bd3f7e..de55556 100644
+--- a/spec/packetfu_spec.rb
++++ b/spec/packetfu_spec.rb
+@@ -2,7 +2,7 @@ require 'spec_helper'
+ 
+ describe PacketFu, "version information" do
+ 	it "reports a version number" do
+-		PacketFu::VERSION.should match /^1\.[0-9]\.[0-9]$/
++		PacketFu::VERSION.should match /^1\.[0-9]+\.[0-9]+$/
+ 	end
+ 	its(:version) {should eq PacketFu::VERSION}
+ 
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0003-Fix-encoding-issues-in-specs-for-Ruby-2.x.patch b/debian/patches/0003-Fix-encoding-issues-in-specs-for-Ruby-2.x.patch
new file mode 100644
index 0000000..9b9214a
--- /dev/null
+++ b/debian/patches/0003-Fix-encoding-issues-in-specs-for-Ruby-2.x.patch
@@ -0,0 +1,49 @@
+From ba3ef1af81b494248db230b4f7fdcc155fe256d5 Mon Sep 17 00:00:00 2001
+From: Jonathan Claudius <jclaudius at trustwave.com>
+Date: Sat, 5 Apr 2014 22:15:00 -0400
+Subject: [PATCH] Fix encoding issues in specs for Ruby 2.x
+
+---
+ spec/structfu_spec.rb |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/spec/structfu_spec.rb b/spec/structfu_spec.rb
+index 2e7b868..43a8a3d 100644
+--- a/spec/structfu_spec.rb
++++ b/spec/structfu_spec.rb
+@@ -79,7 +79,7 @@ describe StructFu::Int8, "one byte value" do
+ 		@int.to_s.should == "\x02"
+ 		@int.read(254)
+ 		@int.to_i.should == 254
+-		@int.to_s.should == "\xfe"
++		@int.to_s.should == "\xfe".force_encoding("binary")
+ 	end
+ 
+ end
+@@ -99,7 +99,7 @@ describe StructFu::Int16, "two byte value" do
+ 	end
+ 
+ 	it "should print a two character packed string" do
+-		@int.to_s.should == "\x00\x0b"
++		@int.to_s.should == "\x00\x0b".force_encoding("binary")
+ 	end
+ 
+ 	it "should have a value of 11" do
+@@ -114,7 +114,7 @@ describe StructFu::Int16, "two byte value" do
+ 		@int.to_s.should == "\x00\x02"
+ 		@int.read(254)
+ 		@int.to_i.should == 254
+-		@int.to_s.should == "\x00\xfe"
++		@int.to_s.should == "\x00\xfe".force_encoding("binary")
+ 	end
+ 
+ 	it "should be able to set endianness" do
+@@ -199,7 +199,7 @@ describe StructFu::Int32, "four byte value" do
+ 		@int.to_s.should == "\x00\x00\x00\x02"
+ 		@int.read(254)
+ 		@int.to_i.should == 254
+-		@int.to_s.should == "\x00\x00\x00\xfe"
++		@int.to_s.should == "\x00\x00\x00\xfe".force_encoding("binary")
+ 	end
+ 
+ 	it "should be able to set endianness" do
diff --git a/debian/patches/series b/debian/patches/series
index 309ff20..92e09d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
+0001-Be-better-about-version-checking-multidigits.patch
 0002-Do-not-require-rubygems-even-with-Ruby-1.8.patch
+0003-Fix-encoding-issues-in-specs-for-Ruby-2.x.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-packetfu.git



More information about the Pkg-ruby-extras-commits mailing list