Make tests optional, No tests for RHEL

epel9
Troy Dawson 4 years ago
parent de7e6e3aa0
commit 04e0131e12

@ -2,18 +2,26 @@
%global rubyabi 1.8
%if 0%{?rhel}
%bcond_with tests
%else
%bcond_without tests
%endif
Summary: HTTP Client interface for ruby
Name: rubygem-%{gem_name}
Version: 2.8.3
Release: 1%{?dist}
Release: 2%{?dist}
License: (Ruby or BSD) and Public Domain
URL: https://github.com/nahi/httpclient
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(release)
#BuildRequires: rubygem(minitest4)
BuildRequires: rubygem(test-unit)
BuildRequires: rubygems-devel
%if %{with tests}
BuildRequires: rubygem(test-unit)
BuildRequires: rubygem(http-cookie)
%endif
BuildArch: noarch
%description
@ -59,6 +67,7 @@ find %{buildroot}/%{gem_instdir} -type f -perm /g+wx -exec chmod -v g-w {} \;
# Find files that are not readable
find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
%if %{with tests}
%check
pushd %{buildroot}%{gem_instdir}
# All the tests in test_auth.rb were being bypassed
@ -81,6 +90,7 @@ ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)' -- \
--ignore-name /^test_debug_dev$/ \
--ignore-name /^test_ciphers$/ \
popd
%endif
%files
%dir %{gem_instdir}
@ -97,6 +107,13 @@ popd
%changelog
* Fri Nov 20 2020 Troy Dawson <tdawson@redhat.com> - 2.8.3-2
- Make tests optional
- No tests for RHEL
* Wed Aug 05 2020 Troy Dawson <tdawson@redhat.com> - 2.8.3-1
- Update to 2.8.3
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

Loading…
Cancel
Save