From 4597d7c301325731279fc77045170ea9c5444a97 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Fri, 10 Mar 2023 15:49:27 -0500
Subject: [PATCH 1/2] Disable unwanted dependencies in RHEL builds

---
 rubygem-rspec-expectations.spec | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rubygem-rspec-expectations.spec b/rubygem-rspec-expectations.spec
index 945056c..d893cbd 100644
--- a/rubygem-rspec-expectations.spec
+++ b/rubygem-rspec-expectations.spec
@@ -31,8 +31,10 @@ BuildRequires:	rubygem(rake)
 # Some features in expectations needs this
 BuildRequires:	rubygem(rspec-support) >= 3.9.3
 BuildRequires:	rubygem(minitest) >= 5
+%if ! 0%{?rhel}
 BuildRequires:	rubygem(aruba)
 BuildRequires:	rubygem(cucumber)
+%endif
 BuildRequires:	git
 %endif
 BuildArch:		noarch
@@ -72,6 +74,7 @@ LANG=C.UTF-8
 export RUBYLIB=$(pwd)/lib
 rspec spec/
 
+%if ! 0%{?rhel}
 # Skip one failing scenario, needs investigating...
 sed -i features/built_in_matchers/include.feature -e '\@skip-on-fedora@d'
 sed -i features/built_in_matchers/include.feature -e 's|^\([ \t]*\)\(Scenario: counts usage.*\)|\1@skip-on-fedora\n\1\2|'
@@ -81,6 +84,7 @@ cucumber \
     --tag "not @skip-on-fedora" \
     %{nil}
 %endif
+%endif
 
 %files
 %dir	%{gem_instdir}

From 1d68faa32285ed7c6809eb9d9c079d3fd1386e38 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Mon, 13 Mar 2023 10:48:04 +0900
Subject: [PATCH 2/2] refactor

---
 rubygem-rspec-expectations.spec | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/rubygem-rspec-expectations.spec b/rubygem-rspec-expectations.spec
index 62d0136..ae1c645 100644
--- a/rubygem-rspec-expectations.spec
+++ b/rubygem-rspec-expectations.spec
@@ -3,7 +3,7 @@
 %global	rpmminorver	.%(echo %preminorver | sed -e 's|^\\.\\.*||')
 %global	fullver	%{majorver}%{?preminorver}
 
-%global	baserelease	1
+%global	baserelease	2
 
 %global	gem_name	rspec-expectations
 
@@ -14,7 +14,7 @@
 Summary:	RSpec expectations (should and matchers)
 Name:		rubygem-%{gem_name}
 Version:	%{majorver}
-Release:	%{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}.1
+Release:	%{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}
 
 License:	MIT
 URL:		http://github.com/rspec/rspec-expectations
@@ -69,12 +69,20 @@ cp -a .%{gem_dir}/* \
 rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
 
 %check
-%if %{without bootstrap}
+%if %{with bootstrap}
+# Skip test, exiting
+exit 0
+%endif
+
 LANG=C.UTF-8
 export RUBYLIB=$(pwd)/lib
 rspec spec/
 
-%if ! 0%{?rhel}
+%if 0%{?rhel}
+# Skip cucumber test
+exit 0
+%endif
+
 # Skip one failing scenario, needs investigating...
 sed -i features/built_in_matchers/include.feature -e '\@skip-on-fedora@d'
 sed -i features/built_in_matchers/include.feature -e 's|^\([ \t]*\)\(Scenario: counts usage.*\)|\1@skip-on-fedora\n\1\2|'
@@ -83,8 +91,6 @@ cucumber \
     --tag "not @skip-when-diff-lcs-1.3" \
     --tag "not @skip-on-fedora" \
     %{nil}
-%endif
-%endif
 
 %files
 %dir	%{gem_instdir}
@@ -102,6 +108,9 @@ cucumber \
 %{gem_docdir}
 
 %changelog
+* Fri Mar 10 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.12.2-2
+- Disable unwanted dependencies in RHEL builds
+
 * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.2-1.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild