[DRE-commits] [ruby-packetfu] 05/10: Refresh and drop obsolete patches

Jérémy Bobbio lunar at moszumanska.debian.org
Thu Sep 10 14:59:16 UTC 2015


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

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

commit 6fba4783ca2e6f19b5f1479c5e35cdf7dd98b4bc
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Thu Sep 10 16:06:00 2015 +0200

    Refresh and drop obsolete patches
---
 ...better-about-version-checking-multidigits.patch |  20 ----
 ...o-not-require-rubygems-even-with-Ruby-1.8.patch |  18 ----
 ...Fix-encoding-issues-in-specs-for-Ruby-2.x.patch |  49 ----------
 debian/patches/0004-Port-to-rspec3.patch           | 108 ---------------------
 debian/patches/0005-Require-rspec-its.patch        |  12 +--
 debian/patches/series                              |   4 -
 6 files changed, 6 insertions(+), 205 deletions(-)

diff --git a/debian/patches/0001-Be-better-about-version-checking-multidigits.patch b/debian/patches/0001-Be-better-about-version-checking-multidigits.patch
deleted file mode 100644
index fc136a3..0000000
--- a/debian/patches/0001-Be-better-about-version-checking-multidigits.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-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(-)
-
---- a/spec/packetfu_spec.rb
-+++ b/spec/packetfu_spec.rb
-@@ -3,7 +3,7 @@
- 
- 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}
- 
diff --git a/debian/patches/0002-Do-not-require-rubygems-even-with-Ruby-1.8.patch b/debian/patches/0002-Do-not-require-rubygems-even-with-Ruby-1.8.patch
deleted file mode 100644
index bf3f7e2..0000000
--- a/debian/patches/0002-Do-not-require-rubygems-even-with-Ruby-1.8.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
-Date: Sat, 24 Aug 2013 19:23:30 +0200
-Subject: Do not require rubygems, even with Ruby 1.8
-
----
- lib/packetfu.rb |    1 -
- 1 file changed, 1 deletion(-)
-
---- a/lib/packetfu.rb
-+++ b/lib/packetfu.rb
-@@ -9,7 +9,6 @@
- 
- require File.join(cwd,"packetfu","structfu")
- require "ipaddr"
--require 'rubygems' if RUBY_VERSION =~ /^1\.[0-8]/
- 
- module PacketFu
- 
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
deleted file mode 100644
index 9b9214a..0000000
--- a/debian/patches/0003-Fix-encoding-issues-in-specs-for-Ruby-2.x.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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/0004-Port-to-rspec3.patch b/debian/patches/0004-Port-to-rspec3.patch
deleted file mode 100644
index 49a64f1..0000000
--- a/debian/patches/0004-Port-to-rspec3.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Description: Update spec files to make them run with ruby 2.x and rspec 3
- - updated to fit the released version of the code
-Origin: https://github.com/packetfu/packetfu/pull/66
-From: Sylvain Daubert <sylvain.daubert at laposte.net>
-Reviewed-by: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-08-09
-
---- a/spec/structfu_spec.rb
-+++ b/spec/structfu_spec.rb
-@@ -11,10 +11,10 @@
- 	end
- 
- 	it "should provide the basic StructFu methods" do
--		@sc.respond_to?(:sz).should be_true
--		@sc.respond_to?(:len).should be_true
--		@sc.respond_to?(:typecast).should be_true
--		@sc.respond_to?(:body=).should be_true
-+		@sc.respond_to?(:sz).should be true
-+		@sc.respond_to?(:len).should be true
-+		@sc.respond_to?(:typecast).should be true
-+		@sc.respond_to?(:body=).should be true
- 	end
- end	
- 
---- a/packetfu.gemspec
-+++ b/packetfu.gemspec
-@@ -13,7 +13,8 @@
-   s.license     = 'BSD'
- 
-   s.add_development_dependency('pcaprub', '>= 0.9.2')
--  s.add_development_dependency('rspec',   '>= 2.6.2')
-+  s.add_development_dependency('rspec',     '>= 2.14.1')
-+  s.add_development_dependency('rspec-its', '>= 1.0.0')
-   s.add_development_dependency('sdoc',    '>= 0.2.0')
- 
-   s.extra_rdoc_files  = %w[.document README.rdoc]
---- a/spec/packet_subclasses_spec.rb
-+++ b/spec/packet_subclasses_spec.rb
-@@ -1,11 +1,12 @@
- $:.unshift File.join(File.expand_path(File.dirname(__FILE__)), "..", "lib")
-+require 'rspec/its'
- require 'packetfu'
- 
- PacketFu.packet_classes.each do |pclass|
- 	describe pclass, "peek format" do
- 		it "will display sensible peek information" do
- 			p = pclass.new
--			p.respond_to?(:peek).should be_true
-+			p.respond_to?(:peek).should be true
- 			p.peek.size.should be <= 80, p.peek.inspect
- 			p.peek.should match(/^[A-Z0-9?]../)
- 		end
---- a/spec/packetfu_spec.rb
-+++ b/spec/packetfu_spec.rb
-@@ -10,15 +11,15 @@
- 	it "can compare version strings" do
- 		PacketFu.binarize_version("1.2.3").should == 0x010203
- 		PacketFu.binarize_version("3.0").should == 0x030000
--		PacketFu.at_least?("1.0").should be_true
--		PacketFu.at_least?("4.0").should be_false
--		PacketFu.older_than?("4.0").should be_true
--		PacketFu.newer_than?("1.0").should be_true
-+		PacketFu.at_least?("1.0").should be true
-+		PacketFu.at_least?("4.0").should be false
-+		PacketFu.older_than?("4.0").should be true
-+		PacketFu.newer_than?("1.0").should be true
- 	end
- 
- 	it "can handle .pre versions" do
- 		PacketFu.binarize_version("1.7.6.pre").should == 0x010706
--		PacketFu.at_least?("0.9.0.pre").should be_true
-+		PacketFu.at_least?("0.9.0.pre").should be true
- 	end
- end
- 
-@@ -38,9 +39,9 @@
- 		rescue LoadError
- 		end
- 		if has_pcap
--			PacketFu.instance_variable_get(:@pcaprub_loaded).should be_true
-+			PacketFu.instance_variable_get(:@pcaprub_loaded).should be true
- 		else
--			PacketFu.instance_variable_get(:@pcaprub_loaded).should be_false
-+			PacketFu.instance_variable_get(:@pcaprub_loaded).should be false
- 		end
- 	end
- end
---- a/spec/packet_spec.rb
-+++ b/spec/packet_spec.rb
-@@ -13,8 +14,8 @@
- 	end
- 
- 	it "should allow subclasses to instantiate" do
--		expect { PacketFu::FooPacket.new }. to be
--		PacketFu.packet_classes.include?(PacketFu::FooPacket).should be_true
-+		expect(PacketFu::FooPacket.new).to be
-+		PacketFu.packet_classes.include?(PacketFu::FooPacket).should be true
- 	end
- 
- 	it "should register packet classes with PacketFu" do
-@@ -27,7 +28,7 @@
- 			class PacketFu::PacketNot < PacketFu::Packet
- 			end 
- 		}.to raise_error
--		PacketFu.packet_classes.include?(PacketFu::PacketNot).should be_false
-+		PacketFu.packet_classes.include?(PacketFu::PacketNot).should be false
- 		PacketFu.packet_classes {should_not include(PacketNot) }
- 	end
diff --git a/debian/patches/0005-Require-rspec-its.patch b/debian/patches/0005-Require-rspec-its.patch
index 52d500e..542e596 100644
--- a/debian/patches/0005-Require-rspec-its.patch
+++ b/debian/patches/0005-Require-rspec-its.patch
@@ -7,12 +7,12 @@ Last-Update: 2015-08-10
 +++ b/Rakefile
 @@ -4,7 +4,9 @@
  rescue LoadError
- 	$stderr.puts "rspec not available, so can't set up spec tasks."
+   $stderr.puts "rspec not available, so can't set up spec tasks."
  else
--	RSpec::Core::RakeTask.new
-+	RSpec::Core::RakeTask.new do |spec|
-+		spec.ruby_opts = "-rrspec/its"
-+	end
+-  RSpec::Core::RakeTask.new
++  RSpec::Core::RakeTask.new do |spec|
++    spec.ruby_opts = "-rrspec/its"
++  end
  
- 	task :default => :spec
+   task :default => :spec
  end
diff --git a/debian/patches/series b/debian/patches/series
index 5061174..529075e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1 @@
-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
-0004-Port-to-rspec3.patch
 0005-Require-rspec-its.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