| |
@@ -1,18 +1,22 @@
|
| |
%global gem_name excon
|
| |
|
| |
+ # To build excon without running tests
|
| |
+ %bcond_without tests
|
| |
+
|
| |
Name: rubygem-%{gem_name}
|
| |
- Version: 0.73.0
|
| |
+ Version: 0.76.0
|
| |
Release: 2%{?dist}
|
| |
Summary: Speed, persistence, http(s)
|
| |
License: MIT
|
| |
URL: https://github.com/excon/excon
|
| |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
| |
- # git clone https://github.com/excon/excon.git && cd excon
|
| |
- # git archive -v -o excon-0.73.0-tests.tar.gz v0.73.0 spec/ tests/
|
| |
- Source1: %{gem_name}-%{version}-tests.tar.gz
|
| |
+ # git clone https://github.com/excon/excon.git --no-checkout
|
| |
+ # cd excon && git archive -v -o excon-0.76.0-tests.txz v0.76.0 tests/ spec/
|
| |
+ Source1: %{gem_name}-%{version}-tests.txz
|
| |
BuildRequires: ruby(release)
|
| |
BuildRequires: rubygems-devel
|
| |
BuildRequires: ruby
|
| |
+ %if %{with tests}
|
| |
BuildRequires: %{_bindir}/openssl
|
| |
BuildRequires: %{_bindir}/rackup
|
| |
BuildRequires: %{_bindir}/shindo
|
| |
@@ -23,6 +27,7 @@
|
| |
BuildRequires: rubygem(puma)
|
| |
BuildRequires: rubygem(sinatra)
|
| |
BuildRequires: rubygem(rspec)
|
| |
+ %endif
|
| |
BuildArch: noarch
|
| |
|
| |
%description
|
| |
@@ -60,6 +65,7 @@
|
| |
# Kill bundled cacert.pem
|
| |
rm -rf %{buildroot}%{gem_instdir}/data
|
| |
|
| |
+ %if %{with tests}
|
| |
%check
|
| |
pushd .%{gem_instdir}
|
| |
|
| |
@@ -84,8 +90,13 @@
|
| |
openssl req -subj '/CN=excon/O=excon' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout tests/data/excon.cert.key -out tests/data/excon.cert.crt
|
| |
openssl req -subj '/CN=127.0.0.1/O=excon' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout tests/data/127.0.0.1.cert.key -out tests/data/127.0.0.1.cert.crt
|
| |
|
| |
- shindo
|
| |
+ # This test requires multiple IP addresses available
|
| |
+ sed -i "/tests('local port can be re-bound')/,/^ end/ s/^/#/" \
|
| |
+ tests/basic_tests.rb
|
| |
+
|
| |
+ shindont
|
| |
popd
|
| |
+ %endif
|
| |
|
| |
%files
|
| |
%dir %{gem_instdir}
|
| |
@@ -101,6 +112,9 @@
|
| |
%{gem_instdir}/excon.gemspec
|
| |
|
| |
%changelog
|
| |
+ * Fri Aug 21 00:15:13 GMT 2020 Pavel Valena <pvalena@redhat.com> - 0.76.0-2
|
| |
+ - Update to excon 0.76.0.
|
| |
+
|
| |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.73.0-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
| |
|
| |
also enhance .spec and .gitignore files; and add bcond_with for tests.
Locally (mock) there's an issue:
Cannot assign requested address - connect(2) for 127.0.0.1:9292 (Errno::EADDRNOTAVAIL
What I've gathered is that the test requires multple IP adresses:
CustomSocket.find_alternate_ip(response.local_address
Therefore I've disabled it.
To have latest excon gem in Fedora.
Up-to-date Koji scratch-build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=37312416
Up-to-date Copr build:
https://copr.fedorainfracloud.org/coprs/pvalena/rubygems/build/1024501/
Checks: