commit:     3547edea02c9eaa4adbf1ea1d54a9a719153d9d2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 03:47:47 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 05:06:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3547edea

dev-ruby/parallel: enable ruby32

activerecord is an optional test dep and just one of a few things
parallel can integrate with, so skip the relevant tests if not available for
the current Ruby.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-ruby/parallel/parallel-1.22.1.ebuild | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/dev-ruby/parallel/parallel-1.22.1.ebuild 
b/dev-ruby/parallel/parallel-1.22.1.ebuild
index a670da87f8a6..ca66e12e8723 100644
--- a/dev-ruby/parallel/parallel-1.22.1.ebuild
+++ b/dev-ruby/parallel/parallel-1.22.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-USE_RUBY="ruby27 ruby30 ruby31"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
 
 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
 
@@ -15,17 +15,22 @@ inherit ruby-fakegem
 
 DESCRIPTION="Run any code in parallel Processes or Threads"
 HOMEPAGE="https://github.com/grosser/parallel";
-LICENSE="MIT"
 SRC_URI="https://github.com/grosser/parallel/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 
-KEYWORDS="amd64 ~riscv"
+LICENSE="MIT"
 SLOT="1"
-IUSE="test"
+KEYWORDS="amd64 ~riscv"
 
 DEPEND+="test? ( sys-process/lsof sys-process/procps )"
 
 ruby_add_bdepend "
-       test? ( dev-ruby/ruby-progressbar dev-ruby/activerecord[sqlite] )"
+       test? ( dev-ruby/ruby-progressbar )
+"
+
+# Rails isn't yet ruby32-ready in Gentoo
+USE_RUBY="ruby27 ruby30 ruby31" ruby_add_bdepend "
+       test? ( dev-ruby/activerecord[sqlite] )
+"
 
 each_ruby_prepare() {
        # Make sure the correct ruby is used for testing
@@ -43,6 +48,10 @@ all_ruby_prepare() {
 }
 
 each_ruby_test() {
+       if ! has_version -b "dev-ruby/activerecord[sqlite]" ; then
+               rm spec/cases/map_with_ar.rb spec/cases/each_with_ar_sqlite.rb 
|| die
+       fi
+
        # Set RUBYLIB explicitly for the ruby's that get started from the specs.
        TRAVIS=true RUBYLIB="lib" ${RUBY} -S rspec-3 spec || die
 }

Reply via email to