dev-ruby/net-http-pipeline: fix tests; add ruby22, ruby23
authorHans de Graaff <graaff@gentoo.org>
Thu, 17 Nov 2016 07:01:33 +0000 (08:01 +0100)
committerHans de Graaff <graaff@gentoo.org>
Thu, 17 Nov 2016 07:01:58 +0000 (08:01 +0100)
Package-Manager: portage-2.3.0

dev-ruby/net-http-pipeline/files/net-http-pipeline-accept-encoding.patch [new file with mode: 0644]
dev-ruby/net-http-pipeline/net-http-pipeline-1.0.1.ebuild

diff --git a/dev-ruby/net-http-pipeline/files/net-http-pipeline-accept-encoding.patch b/dev-ruby/net-http-pipeline/files/net-http-pipeline-accept-encoding.patch
new file mode 100644 (file)
index 0000000..3adfdf2
--- /dev/null
@@ -0,0 +1,18 @@
+--- test/test_net_http_pipeline.rb.old 2016-11-17 07:58:57.284997283 +0100
++++ test/test_net_http_pipeline.rb     2016-11-17 07:58:50.345168508 +0100
+@@ -96,6 +96,7 @@
+   def http_get
+     get = []
+     get << 'GET / HTTP/1.1'
++    get << 'Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3'
+     get << 'Accept: */*'
+     get << 'User-Agent: Ruby' if RUBY_VERSION > '1.9'
+     get.push nil, nil
+@@ -106,6 +107,7 @@
+   def http_post
+     get = []
+     get << 'POST / HTTP/1.1'
++    get << 'Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3'
+     get << 'Accept: */*'
+     get << 'User-Agent: Ruby' if RUBY_VERSION > '1.9'
+     get.push nil, nil
index f9cfa202eab6210c94fae034e4f615b540e12f74..fe348b5ee47201e00d4bb704f8df7a3702f8ffda 100644 (file)
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI=5
-USE_RUBY="ruby20 ruby21"
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
 
 inherit ruby-fakegem
@@ -16,6 +16,8 @@ SLOT="1"
 KEYWORDS="~amd64"
 IUSE=""
 
+RUBY_PATCHES=( ${PN}-accept-encoding.patch )
+
 ruby_add_bdepend "
        dev-ruby/hoe
        test? ( dev-ruby/minitest )