commit:     9dacf5b0714ecbf71faab4458b16535793815364
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  9 07:51:26 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Aug  9 07:56:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dacf5b0

dev-ruby/ammeter: fix tests

Restrict rails version for tests to ensure they pass.

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/ammeter/ammeter-1.1.7.ebuild | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-ruby/ammeter/ammeter-1.1.7.ebuild 
b/dev-ruby/ammeter/ammeter-1.1.7.ebuild
index 7c54ab5072e6..e9d848206ec7 100644
--- a/dev-ruby/ammeter/ammeter-1.1.7.ebuild
+++ b/dev-ruby/ammeter/ammeter-1.1.7.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-USE_RUBY="ruby31 ruby32 ruby33"
+
+USE_RUBY="ruby32 ruby33"
 
 RUBY_FAKEGEM_TASK_DOC=""
 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
@@ -29,7 +30,7 @@ ruby_add_rdepend "
 
 ruby_add_bdepend "
        test? (
-               >=dev-ruby/rails-4.0
+               || ( dev-ruby/rails:7.1 dev-ruby/rails:7.0 )
                >=dev-ruby/uglifier-1.3
                >=dev-ruby/rake-0.10
                >=dev-ruby/jquery-rails-3.0
@@ -52,8 +53,9 @@ all_ruby_prepare() {
        # haml-rails is not packaged, coffee-rails and sass-rails are no longer 
maintained
        sed -i -e '/\(coffee\|haml\|sass\)-rails/ s:^:#:' 
${RUBY_FAKEGEM_GEMSPEC} Gemfile || die
        rm -f spec/ammeter/rspec/generator/matchers/have_correct_syntax_spec.rb 
|| die
+
 }
 
 each_ruby_test() {
-       RSPEC_VERSION=">=4" ${RUBY} -S bundle exec ${RUBY} -S rspec-3 spec || 
die
+       RAILS_VERSION="< 7.2" RSPEC_VERSION=">=4" ${RUBY} -S bundle exec 
${RUBY} -S rspec-3 spec || die
 }

Reply via email to