diff options
Diffstat (limited to 'dev-ruby/rack-cache')
-rw-r--r-- | dev-ruby/rack-cache/Manifest | 5 | ||||
-rw-r--r-- | dev-ruby/rack-cache/files/rack-cache-1.13.0-mocha2.patch | 20 | ||||
-rw-r--r-- | dev-ruby/rack-cache/files/rack-cache-1.13.0-test-require.patch | 28 | ||||
-rw-r--r-- | dev-ruby/rack-cache/metadata.xml | 2 | ||||
-rw-r--r-- | dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild | 51 |
5 files changed, 104 insertions, 2 deletions
diff --git a/dev-ruby/rack-cache/Manifest b/dev-ruby/rack-cache/Manifest index 2af5dbdcbaae..989e70ec63ab 100644 --- a/dev-ruby/rack-cache/Manifest +++ b/dev-ruby/rack-cache/Manifest @@ -1,3 +1,6 @@ +AUX rack-cache-1.13.0-mocha2.patch 647 BLAKE2B 47e441c389b1c7cf9c78d8e5c337192ea83de1fc870aa4fa50b215b0da5aeb3a54d55aa9f9237e2f17173296550ea82da5346820e3272a2e750ffc1ef162b95d SHA512 8a3e61d283587647c24c006942248a4da6e9fabe1f8775f8ee45ba92b0c9d42b4cae633b0e985e8e9c6f12f00e2c7190e5b636f8aca38912be682d1cea2caa96 +AUX rack-cache-1.13.0-test-require.patch 880 BLAKE2B 3e9466e6494686921edb41f4c0b5468865160c73bf8919758c8399ccf2124a0157894dbaedb28f86b18ff2a234915c9066c79d10acaf125d2f519395f70560f9 SHA512 effc0a9e4e326a7b6a20bd5fce080052323e2dec266379753774a9a98d7a920698ad2ca286c49957e4fcefd619c4c39f27f349f826ba80fdf729064d29163751 DIST rack-cache-1.13.0.tar.gz 262945 BLAKE2B ea0dafe105c8c1e10815c39b928c5a86bf77a0cf3a31f085169028cb633dddd3db761138fb85b7f5da6c3374e749e898d97622994ad3a7b4972befbd46d31e3b SHA512 049302994663703ea593e01194e1c5c3b95afc889e628906e65302dd1fe64fc280bac9d26855db2fc7af1e287201a47c7f6a52329a3151b3efc775c0585d837c +EBUILD rack-cache-1.13.0-r1.ebuild 1397 BLAKE2B 11a68281db5cc940db6407479a5f89fa30fa9594f47addb25db0c2f5e356dc1034d7d2d474eba51a6ae8b19882d83c485f6a9f136396ea52962ac7650d74c413 SHA512 11d56799ad7217fd9bb0eb67e7b7ebefd35a835e01c166300ddfa84a2a353368e3fff5b694c39d97198d270deb25d911d32c2d12054a52352258d5e2107b342a EBUILD rack-cache-1.13.0.ebuild 1293 BLAKE2B e3f01dd61af56d95aa097dcde92a38bd33d8f7962b24cb9163ad5886f8cc241183627fab69f095de75b1f94e171f301c7e4bd8a57d8bfe7bb100bacd8cdd7d30 SHA512 305a8494bc0d80c09496c6e8a31a2099f045e76fd392b3de5fe45ae70f11364de87f14b08195444018108143a41ed2aa07b59ded6a767f4bf0b96eede8d6b451 -MISC metadata.xml 336 BLAKE2B 8ec6bc6a5c4e0f07711f202690dba8fc84111f8173f5593a1e02ebd33e410e9e6381a6887e8cfb678953a3e7f24696228766693544460e87411504de9ed601d9 SHA512 48d46de12b863bd4a04d9f7fe0eed9801d6722e14b3f63073cc154133f7ec108a5643de5a3351c1074e530a1716140859c50cf631a1a6f8f2b57a17802943ea1 +MISC metadata.xml 332 BLAKE2B c4e108dc1655b9d00532fbdcf4e0c735cd87f977d7d08b64ef6595b80d5fdd155a7d3aafe297a7a61729348c3f5f4a36b77db79e99ab68052751c1e76ee2e6a8 SHA512 3c0131f6fd63a703a3ed1bf420fa0a72e76d131ffb0229b8c78c86c5475740f6e006797ace17ac95bbc620815f952cd4982537e46785ce3761ddd45409ba1f81 diff --git a/dev-ruby/rack-cache/files/rack-cache-1.13.0-mocha2.patch b/dev-ruby/rack-cache/files/rack-cache-1.13.0-mocha2.patch new file mode 100644 index 000000000000..62bd028eedf7 --- /dev/null +++ b/dev-ruby/rack-cache/files/rack-cache-1.13.0-mocha2.patch @@ -0,0 +1,20 @@ +https://github.com/rack/rack-cache/commit/8b22b6e532ed21ba30fdfbc62907f58db052e767 + +From 8b22b6e532ed21ba30fdfbc62907f58db052e767 Mon Sep 17 00:00:00 2001 +From: Peter Goldstein <peter.m.goldstein@gmail.com> +Date: Mon, 2 Jan 2023 06:32:20 -0500 +Subject: [PATCH] Adds Ruby 3.2 to the CI matrix (#12) + +* Update mocha require for modern version of mocha +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -7,7 +7,7 @@ + + require 'maxitest/global_must' + require 'maxitest/autorun' +-require 'mocha/setup' ++require 'mocha/minitest' + + # Set the MEMCACHED environment variable as follows to enable testing + # of the MemCached meta and entity stores. + diff --git a/dev-ruby/rack-cache/files/rack-cache-1.13.0-test-require.patch b/dev-ruby/rack-cache/files/rack-cache-1.13.0-test-require.patch new file mode 100644 index 000000000000..3d7d04deaa25 --- /dev/null +++ b/dev-ruby/rack-cache/files/rack-cache-1.13.0-test-require.patch @@ -0,0 +1,28 @@ +https://github.com/rack/rack-cache/pull/14 + +From db34e2b5ab7b16051f7158b2896e56502992c33e Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 3 Apr 2023 03:31:31 +0100 +Subject: [PATCH] test: Add explicit 'timeout' require + +Fixes the following when running tests individually: +``` + 1) Error: +Rack::Cache::Context#test_0078_passes if there was a metastore exception: +NameError: uninitialized constant Timeout + test/context_test.rb:981:in `block (3 levels) in <top (required)>' + test/test_helper.rb:170:in `request' + test/test_helper.rb:177:in `get' + test/context_test.rb:980:in `block (2 levels) in <top (required)>' +``` + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/test/context_test.rb ++++ b/test/context_test.rb +@@ -1,4 +1,5 @@ + require_relative 'test_helper' ++require 'timeout' + require 'rack/cache/context' + + describe Rack::Cache::Context do + diff --git a/dev-ruby/rack-cache/metadata.xml b/dev-ruby/rack-cache/metadata.xml index f688e36a67b9..99bf54904f42 100644 --- a/dev-ruby/rack-cache/metadata.xml +++ b/dev-ruby/rack-cache/metadata.xml @@ -6,6 +6,6 @@ <name>Gentoo Ruby Project</name> </maintainer> <upstream> - <remote-id type="github">rtomayko/rack-cache</remote-id> + <remote-id type="github">rack/rack-cache</remote-id> </upstream> </pkgmetadata> diff --git a/dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild b/dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild new file mode 100644 index 000000000000..a816afabdb35 --- /dev/null +++ b/dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +USE_RUBY="ruby27 ruby30 ruby31 ruby32" + +# no documentation is generable, it needs hanna, which is broken +RUBY_FAKEGEM_RECIPE_DOC="none" + +RUBY_FAKEGEM_TASK_TEST="none" + +RUBY_FAKEGEM_EXTRADOC="CHANGES README.md doc/*" + +RUBY_FAKEGEM_GEMSPEC="rack-cache.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="Enable HTTP caching for Rack-based applications that produce freshness info" +HOMEPAGE="https://github.com/rtomayko/rack-cache" +SRC_URI="https://github.com/rtomayko/rack-cache/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="1.2" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +ruby_add_rdepend "dev-ruby/rack:*" + +ruby_add_bdepend "test? ( + >=dev-ruby/maxitest-3.4.0 + >=dev-ruby/minitest-5.7.0:5 + >=dev-ruby/mocha-2 )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.13.0-test-require.patch + "${FILESDIR}"/${PN}-1.13.0-mocha2.patch +) + +all_ruby_prepare() { + sed -i -e '/bundler/ s:^:#:' \ + test/test_helper.rb || die +} + +all_ruby_prepare() { + sed -i -e 's/git ls-files/find/' ${RUBY_FAKEGEM_GEMSPEC} || die + sed -i -e '/bundler/ s:^:#:' test/test_helper.rb || die +} + +each_ruby_test() { + ${RUBY} -I.:lib:test -e 'Dir["test/*_test.rb"].each{|f| require f}' || die +} |