[DRE-commits] [ruby-httparty] 01/02: add spec_convert_nil_to_empty_string.patch to fix a FTBFS caused by the addition of a string with nil in a test. (Closes: #747734)

Cédric Boutillier boutil at moszumanska.debian.org
Sun Jun 15 23:04:57 UTC 2014


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

boutil pushed a commit to branch master
in repository ruby-httparty.

commit 04fdd9272afb38896133afe09e67984a2c517991
Author: Cédric Boutillier <boutil at debian.org>
Date:   Mon Jun 16 01:00:49 2014 +0200

    add spec_convert_nil_to_empty_string.patch to fix a FTBFS caused by the addition of a string with nil in a test. (Closes: #747734)
---
 debian/patches/series                                 |  1 +
 debian/patches/spec_convert_nil_to_empty_string.patch | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 4b7df14..a6d2080 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ newer_rspec.patch
 deactivate_failing_test.patch
 #fix_rspec_deprecation_warning.patch
 exception_spec.patch
+spec_convert_nil_to_empty_string.patch
diff --git a/debian/patches/spec_convert_nil_to_empty_string.patch b/debian/patches/spec_convert_nil_to_empty_string.patch
new file mode 100644
index 0000000..2c6d33c
--- /dev/null
+++ b/debian/patches/spec_convert_nil_to_empty_string.patch
@@ -0,0 +1,17 @@
+Description: replace chunk by an empty string if is nil
+ Trying to add nil to a string gives an error causing FTBFS
+Bug-Debian: https://bugs.debian.org/747734
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-06-16
+
+--- a/spec/httparty/request_spec.rb
++++ b/spec/httparty/request_spec.rb
+@@ -368,7 +368,7 @@
+           FakeWeb.register_uri(:get, "http://test.com/redirect", :status => [300, "REDIRECT"], :location => "http://api.foo.com/v2")
+           FakeWeb.register_uri(:get, "http://api.foo.com/v2", :body => "<hash><foo>bar</foo></hash>")
+           body = ""
+-          response = @request.perform { |chunk| body += chunk }
++          response = @request.perform { |chunk| body += chunk || "" }
+           body.length.should == 27
+         end
+ 

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



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