From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B318158062 for ; Mon, 3 Apr 2023 03:03:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7C3AE07F1; Mon, 3 Apr 2023 03:03:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83FC0E07F1 for ; Mon, 3 Apr 2023 03:03:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8804E340AB5 for ; Mon, 3 Apr 2023 03:03:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B877AA1C for ; Mon, 3 Apr 2023 03:03:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1680490978.873608c1ca25d045b7068ab2a25063d920be3001.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack-cache/files/, dev-ruby/rack-cache/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/rack-cache/files/rack-cache-1.13.0-mocha2.patch dev-ruby/rack-cache/files/rack-cache-1.13.0-test-require.patch dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild X-VCS-Directories: dev-ruby/rack-cache/files/ dev-ruby/rack-cache/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 873608c1ca25d045b7068ab2a25063d920be3001 X-VCS-Branch: master Date: Mon, 3 Apr 2023 03:03:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 95e8c058-4831-4b31-a54b-7c345ae7989e X-Archives-Hash: 9fbac0d4c39d96a8f5e5e9e28e5a66eb commit: 873608c1ca25d045b7068ab2a25063d920be3001 Author: Sam James gentoo org> AuthorDate: Mon Apr 3 02:35:10 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Apr 3 03:02:58 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=873608c1 dev-ruby/rack-cache: enable ruby32, fix tests, use modern mocha - Enable ruby32 - Fix test failure which shows up for some folks (missing timeout require) - Update mocha dep & patch mocha require accordingly (upstream patch) Closes: https://bugs.gentoo.org/723920 Signed-off-by: Sam James gentoo.org> .../files/rack-cache-1.13.0-mocha2.patch | 20 +++++++++ .../files/rack-cache-1.13.0-test-require.patch | 28 ++++++++++++ dev-ruby/rack-cache/rack-cache-1.13.0-r1.ebuild | 51 ++++++++++++++++++++++ 3 files changed, 99 insertions(+) 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 +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 +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 ' + test/test_helper.rb:170:in `request' + test/test_helper.rb:177:in `get' + test/context_test.rb:980:in `block (2 levels) in ' +``` + +Signed-off-by: Sam James +--- 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/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 +}