diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-ruby/fakeweb |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-ruby/fakeweb')
-rw-r--r-- | dev-ruby/fakeweb/Manifest | 7 | ||||
-rw-r--r-- | dev-ruby/fakeweb/fakeweb-1.3.0.20131201-r1.ebuild | 55 | ||||
-rw-r--r-- | dev-ruby/fakeweb/files/fakeweb-ruby22.patch | 24 | ||||
-rw-r--r-- | dev-ruby/fakeweb/files/fakeweb-ruby23.patch | 27 | ||||
-rw-r--r-- | dev-ruby/fakeweb/metadata.xml | 11 |
5 files changed, 124 insertions, 0 deletions
diff --git a/dev-ruby/fakeweb/Manifest b/dev-ruby/fakeweb/Manifest new file mode 100644 index 000000000000..f08a0ff59413 --- /dev/null +++ b/dev-ruby/fakeweb/Manifest @@ -0,0 +1,7 @@ +AUX fakeweb-ruby22.patch 870 SHA256 b68f415a5bcb1ef3c4aa1ef21811aa4770a8732b4750a73941ea4505cd61a0a2 SHA512 32c5c7e3b6e6e5402ffeb809b74036de854752eded5721ea778ecd9d83b19e992ff3091ac7608e49b0984f3c26b21c95ae52489a585bb862e03f1fc201e4fa89 WHIRLPOOL af6b7e8f02aaf0966475191b07f55e343ff190f34b8caa2230baba1122ae1e44fa21ec568c1b9990476b3535adc9a1ce1a12c95d788e226ca70dd68ee865c400 +AUX fakeweb-ruby23.patch 1214 SHA256 dce56eecca1c3766d061a7e57ee018938285689dcef537e1672928c56912679d SHA512 3384a8fb96b34f17f929ebfb0ceb01d1238a7333058954097985928ef8bd9d5ec31002a8f2d18b65133ea48cb4309e24222bc675f15f72d869dcea062164f3f9 WHIRLPOOL 93480efe68cbed9030e14b60619e54fb2ddd4cfebda260f08f80bbfc36d586788f90bdd3b82866ba2166c5d88ef26f3b5b3072fc800fd8ff7ec9eb660bf2cae0 +DIST fakeweb-1.3.0.20131201.tar.gz 60162 SHA256 44f599eb76b4996c53a3f047b3f37c72d93bac967893dcb1da18e5f8270b4f14 SHA512 f3bd40680b7eefe90d3fee67f5282dbe4c67d46a1f1040d0d0d62c978b69d08987581a53495bb56e32ebcc6679c84f03c2e26c51d2bd98daa80554d3424c6603 WHIRLPOOL 5cdb5faf3932614838fb9e1bb5f01a115c087af396df6bbecab421ea0d97f24377c06ab41f1919b339f76137d4c1ea1186a4269052163f0942cd9ee9ca1f8900 +EBUILD fakeweb-1.3.0.20131201-r1.ebuild 1531 SHA256 9f8e2cf23f4dd40d794eb1dd2dd6f07a8f19086d23065fd67892dfe96f9a8613 SHA512 1f8f894770da7851958560caaf3adc3c3d8e17f2e8bcbe158785f199a8e1875e9f26b1b0c26d2c468122501f92ddba42329744d232a82f1099b507445d042d05 WHIRLPOOL 98202a8485b79e6bec1c0d9b25948b840d50eb7dfcbbac668a88e0ce9051aa1dc5d775f56e8be4231c269ecabb875ef648231dba68c151e1d1ce6192a5e84890 +MISC ChangeLog 3639 SHA256 3fa0c8dee2cc9e65da5371aa661cc197aadacc8d9f760eb89e056a6b9676b88b SHA512 a82f38d5d04272a9685e2ffd952940956c95983dcfb7a797460aadaa632d161b5f4f82f636c9ed61308eb911f7b05589a5a117caf2ce3fda503e3ce3398e3b08 WHIRLPOOL 0fea9ab90a8c2bc5130136dfcc392a954289a3cdb2299a2b6939fa544d4ae78536fb0f566e10216b8fe2bee0e0e6d69223a55a00b8adec5b714501a99a45b82b +MISC ChangeLog-2015 3343 SHA256 81bec59beee9c6c58d4f457156112e79e83f923a22cec0e813d2f8c77c5ac0a2 SHA512 13cd6d887ef889d54ec21bbfec23150001c01aa2220f776f82c7747c69906e4c6fd2247cc536dbe740b85e74f77becaf5eb0ded0bfc4b12ce5801efaec0c80fb WHIRLPOOL 3c69db6f0a5198c52a3e2873a937690c804ed69663cc99f136dda8d680bc922296743c8e72c86bf59e5a1bb4c8dffe2c4def99211425d63ea2c3450d0608dc67 +MISC metadata.xml 340 SHA256 15e130c5f23138d159f6fbc8887cdc53edb68802a6648d2b61ee5ad371f636bb SHA512 4915509da84a354d665c9c59881e83356a8e8b2f7f09afdae68755484a6e575a7502f98ef8da1cffab96ff12264c048cda182f1c5042b95b058b731bf0395077 WHIRLPOOL 77036843fc698ca505106d9bf952ad8c5414b77e5578c154423241773a5bef701ad62de0fcb349442476c72e0be48e04e885de765efc72139eee169c39e0426c diff --git a/dev-ruby/fakeweb/fakeweb-1.3.0.20131201-r1.ebuild b/dev-ruby/fakeweb/fakeweb-1.3.0.20131201-r1.ebuild new file mode 100644 index 000000000000..02e0bb4aa9b5 --- /dev/null +++ b/dev-ruby/fakeweb/fakeweb-1.3.0.20131201-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# ruby24 -> not compatible with Net::HTTP implementation +USE_RUBY="ruby21 ruby22 ruby23" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.rdoc" + +COMMIT=48208f9bf053577befe5723746b6ff35b99b45d0 + +inherit ruby-fakegem + +DESCRIPTION="Helper for faking web requests in Ruby" +HOMEPAGE="https://github.com/chrisk/fakeweb" +SRC_URI="https://github.com/chrisk/fakeweb/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +RUBY_S="${PN}-${COMMIT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" +IUSE="" + +RUBY_PATCHES=( fakeweb-ruby22.patch + fakeweb-ruby23.patch ) + +ruby_add_bdepend " + test? ( + dev-ruby/mocha:0.14 + dev-ruby/test-unit + )" + +all_ruby_prepare() { + # The package bundles samuel and right_http_connection, remove + # them + rm -r test/vendor || die "failed to remove bundled gems" + + # We don't package sdoc and we don't have the direct template. + sed -i -e 's/sdoc/rdoc/' -e '/template/d' Rakefile || die + + # Require an old enough version of mocha + sed -i -e '1igem "mocha", "~> 0.14.0"' test/test_helper.rb || die + + # Use the test-unit gem to make jruby compatible with newer mocha. + sed -i -e '1igem "test-unit"' \ + -e '/bundler/I s:^:#:' \ + -e '/simplecov/ s:^:#:' test/test_helper.rb || die + + # Avoid test dependencies on unmaintained packages that no longer work + rm test/test_other_net_http_libraries.rb || die + + sed -i -e '/test:preflight/ s:^:#:' Rakefile || die +} diff --git a/dev-ruby/fakeweb/files/fakeweb-ruby22.patch b/dev-ruby/fakeweb/files/fakeweb-ruby22.patch new file mode 100644 index 000000000000..7c44aef68922 --- /dev/null +++ b/dev-ruby/fakeweb/files/fakeweb-ruby22.patch @@ -0,0 +1,24 @@ +From 1647ca210691429a75eb159814f42e68c3c1ce4c Mon Sep 17 00:00:00 2001 +From: Josef Stribny <jstribny@redhat.com> +Date: Thu, 19 Mar 2015 09:32:50 +0100 +Subject: [PATCH] Fix tests by expecting TypeError for Ruby 2.2 + +--- + test/test_fake_web.rb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/test_fake_web.rb b/test/test_fake_web.rb +index f344612..682c43d 100644 +--- a/test/test_fake_web.rb ++++ b/test/test_fake_web.rb +@@ -35,7 +35,9 @@ def test_response_for_with_wrong_number_of_arguments + end + + def test_register_uri_without_domain_name +- assert_raises URI::InvalidURIError do ++ # Ruby 2.1 and lower raises URI::InvalidURIError ++ # Ruby 2.2 and higher raises TypeError ++ assert_raises URI::InvalidURIError, TypeError do + FakeWeb.register_uri(:get, 'test_example2.txt', fixture_path("test_example.txt")) + end + end diff --git a/dev-ruby/fakeweb/files/fakeweb-ruby23.patch b/dev-ruby/fakeweb/files/fakeweb-ruby23.patch new file mode 100644 index 000000000000..0a1c6db6b3e7 --- /dev/null +++ b/dev-ruby/fakeweb/files/fakeweb-ruby23.patch @@ -0,0 +1,27 @@ +From c42a354eda2f6bfe8dc7c1176e085dda6867f4d0 Mon Sep 17 00:00:00 2001 +From: Christian Hofstaedtler <christian@hofstaedtler.name> +Date: Thu, 3 Mar 2016 17:42:30 -0300 +Subject: [PATCH] Fix tests for ruby 2.3 (new connect_nonblock call) + +Applies on top of the changes for 2.2 (#53). +--- + test/test_helper.rb | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/test/test_helper.rb b/test/test_helper.rb +index e9a36af..8ce492d 100644 +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -119,7 +119,11 @@ def setup_expectations_for_real_request(options = {}) + OpenSSL::SSL::SSLSocket.expects(:===).with(socket).returns(true).at_least_once + OpenSSL::SSL::SSLSocket.expects(:new).with(socket, instance_of(OpenSSL::SSL::SSLContext)).returns(socket).at_least_once + socket.stubs(:sync_close=).returns(true) +- socket.expects(:connect).with().at_least_once ++ if RUBY_VERSION >= "2.3.0" ++ socket.expects(:connect_nonblock).with(:exception => false).at_least_once ++ else ++ socket.expects(:connect).with().at_least_once ++ end + if RUBY_VERSION >= "2.0.0" && RUBY_PLATFORM != "java" + socket.expects(:session).with().at_least_once + end diff --git a/dev-ruby/fakeweb/metadata.xml b/dev-ruby/fakeweb/metadata.xml new file mode 100644 index 000000000000..d7fdd1dd499c --- /dev/null +++ b/dev-ruby/fakeweb/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ruby@gentoo.org</email> + <name>Gentoo Ruby Project</name> + </maintainer> + <upstream> + <remote-id type="github">chrisk/fakeweb</remote-id> + </upstream> +</pkgmetadata> |