Update to Faraday 0.15.4.
This commit is contained in:
parent
361199b86f
commit
8162145c5f
3 changed files with 58 additions and 43 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,4 @@
|
|||
/faraday-0.8.8.gem
|
||||
/faraday-0.9.0.gem
|
||||
/faraday-0.15.4-tests.tgz
|
||||
/faraday-0.15.4.gem
|
||||
|
|
|
|||
|
|
@ -2,29 +2,34 @@
|
|||
%global gem_name faraday
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.9.0
|
||||
Release: 8%{?dist}
|
||||
Version: 0.15.4
|
||||
Release: 1%{?dist}
|
||||
Summary: HTTP/REST API client library
|
||||
License: MIT
|
||||
URL: https://github.com/lostisland/faraday
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# git clone https://github.com/lostisland/faraday.git && cd faraday
|
||||
# git checkout v0.15.4 && tar czvf faraday-0.15.4-tests.tgz test/ script/
|
||||
Source1: %{gem_name}-%{version}-tests.tgz
|
||||
BuildRequires: ruby(release)
|
||||
# Don't install these until test suite can be ran again. See %%check below
|
||||
#BuildRequires: wget
|
||||
#BuildRequires: lsof
|
||||
#BuildRequires: rubygem(sinatra)
|
||||
#BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(multipart-post) => 1.2
|
||||
BuildRequires: rubygem(multipart-post) < 3
|
||||
BuildRequires: rubygems-devel
|
||||
BuildRequires: ruby
|
||||
BuildRequires: ruby >= 1.9
|
||||
BuildRequires: %{_bindir}/lsof
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(multipart-post)
|
||||
BuildRequires: rubygem(sinatra)
|
||||
# Adapter test dependencies, might be optionally disabled.
|
||||
BuildRequires: rubygem(em-http-request)
|
||||
BuildRequires: rubygem(excon)
|
||||
BuildRequires: rubygem(httpclient)
|
||||
BuildRequires: rubygem(net-http-persistent)
|
||||
BuildRequires: rubygem(rack-test)
|
||||
BuildRequires: rubygem(typhoeus)
|
||||
BuildArch: noarch
|
||||
|
||||
# Filter from RPM's autorequires.
|
||||
%global __requires_exclude ^/usr/bin/env$
|
||||
|
||||
%description
|
||||
HTTP/REST API client library
|
||||
HTTP/REST API client library.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
|
|
@ -32,61 +37,68 @@ Requires: %{name} = %{version}-%{release}
|
|||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for %{name}
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
|
||||
%setup -q -D -T -n %{gem_name}-%{version}
|
||||
|
||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
%setup -q -n %{gem_name}-%{version} -b 1
|
||||
|
||||
%build
|
||||
# Create the gem as gem install only works on a gem file
|
||||
gem build %{gem_name}.gemspec
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
|
||||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
||||
# by default, so that we can move it into the buildroot in %%install
|
||||
%gem_install
|
||||
|
||||
# Remove unnecessary files
|
||||
pushd .%{gem_instdir}/
|
||||
rm %{gem_name}.gemspec
|
||||
rm Gemfile
|
||||
rm Rakefile
|
||||
rm .document
|
||||
popd
|
||||
|
||||
%install
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -pa .%{gem_dir}/* \
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
|
||||
|
||||
|
||||
%check
|
||||
pushd .%{gem_instdir}
|
||||
# The test suite is ran by a custom bash script.
|
||||
# Skip test check until this is resolved.
|
||||
# https://github.com/lostisland/faraday/blob/v0.9.0/script/test
|
||||
#ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
ln -s %{_builddir}/test test
|
||||
ln -s %{_builddir}/script script
|
||||
|
||||
# Avoid Bundler.
|
||||
sed -i '/bundler\/setup/,/^fi$/ s/^/#/' script/test
|
||||
|
||||
# Follow symlinks.
|
||||
sed -i "s/find /find -L /" script/test
|
||||
|
||||
# We don't care about code coverage.
|
||||
sed -i "/simplecov/,/^end$/ s/^/#/" test/helper.rb
|
||||
|
||||
# We don't have {patron,em-synchrony} available in Fedora.
|
||||
mv test/adapters/em_synchrony_test.rb{,.disabled}
|
||||
mv test/adapters/patron_test.rb{,.disabled}
|
||||
|
||||
# Rrequirs internet access.
|
||||
sed -i "/def test_dynamic_no_proxy/a\ skip" test/connection_test.rb
|
||||
|
||||
# Fails with Typhoeus 1.0.2
|
||||
sed -i "/def test_custom_adapter_config/a\ skip" test/adapters/typhoeus_test.rb
|
||||
|
||||
RUBYOPT="-Ilib -ryaml" script/test
|
||||
popd
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%license %{gem_instdir}/LICENSE.md
|
||||
%{gem_libdir}
|
||||
%{gem_spec}
|
||||
%doc %{gem_instdir}/LICENSE.md
|
||||
%doc %{gem_instdir}/README.md
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%{gem_instdir}/CHANGELOG.md
|
||||
%{gem_instdir}/CONTRIBUTING.md
|
||||
%{gem_instdir}/script
|
||||
%{gem_instdir}/test
|
||||
%doc %{gem_instdir}/README.md
|
||||
|
||||
%changelog
|
||||
* Fri Mar 01 2019 Vít Ondruch <vondruch@redhat.com> - 0.15.4-1
|
||||
- Update to Faraday 0.15.4.
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
f77914db9c4d4e8b2090447ec84ea746 faraday-0.9.0.gem
|
||||
SHA512 (faraday-0.15.4-tests.tgz) = a67dec047bdf38b4fdf16497b62a8bee05cef38652b44a95252dcbe70af09d23ed43f7490c4490e887acf8d503d8bdcc7b41c4f96879d16099ef626477485cc1
|
||||
SHA512 (faraday-0.15.4.gem) = e63bf8a84dfd6a945c7172fe48197f9b022f4d9d8aa63712e249475202eb8e6e070683fe8f0816b1f72d945f3280fed4104b4c6956e2853dc4d13e718be1f23b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue