diff --git a/excon-0.62.0.gem b/excon-0.62.0.gem new file mode 100644 index 0000000..dc03b30 Binary files /dev/null and b/excon-0.62.0.gem differ diff --git a/rubygem-excon-0.62.0-Ruby-2.6-escapes-InvalidURIError-output.patch b/rubygem-excon-0.62.0-Ruby-2.6-escapes-InvalidURIError-output.patch new file mode 100644 index 0000000..0ae27a5 --- /dev/null +++ b/rubygem-excon-0.62.0-Ruby-2.6-escapes-InvalidURIError-output.patch @@ -0,0 +1,23 @@ +From d92263f73cfb20527ff0d689338bbe5348798d11 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 5 Feb 2019 10:38:33 +0100 +Subject: [PATCH] Ruby 2.6 escapes InvalidURIError output. + +https://github.com/ruby/ruby/commit/684cdb4f8340f7a88b00bb91139da74b99ec1147 +--- + tests/error_tests.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/error_tests.rb b/tests/error_tests.rb +index c1bf15fe..21d2103b 100644 +--- a/tests/error_tests.rb ++++ b/tests/error_tests.rb +@@ -35,7 +35,7 @@ + Excon.new('http://localhost', path: "foo\r\nbar: baz") + false + rescue => err +- err.to_s.include? "foo\r\nbar: baz" ++ err.to_s.include?(RUBY_VERSION >= '2.6.0' ? 'foo\r\nbar: baz' : "foo\r\nbar: baz") + end + end + diff --git a/rubygem-excon.spec b/rubygem-excon.spec new file mode 100644 index 0000000..2b1f475 --- /dev/null +++ b/rubygem-excon.spec @@ -0,0 +1,75 @@ +%global gem_name excon +Name: rubygem-%{gem_name} +Version: 0.62.0 +Release: 1 +Summary: Speed, persistence, http(s) +License: MIT +URL: https://github.com/excon/excon +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Patch0: rubygem-excon-0.62.0-Ruby-2.6-escapes-InvalidURIError-output.patch +BuildRequires: ruby(release) rubygems-devel ruby %{_bindir}/openssl rubygem-rack +BuildRequires: rubygem-shindo rubygem(activesupport) rubygem(delorean) rubygem(eventmachine) +BuildRequires: rubygem(open4) rubygem(puma) rubygem(sinatra) rubygem(rspec) +BuildArch: noarch +%description +EXtended http(s) CONnections. + +%package help +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} +%description help +Documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} +%patch0 -p1 +sed -i "/ciphers/ s/'.*'/'PROFILE=SYSTEM'/" lib/excon/constants.rb + +%build +gem build ../%{gem_name}-%{version}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ +rm -rf %{buildroot}%{gem_instdir}/data + +%check +pushd .%{gem_instdir} +sed -i '/if plugin == :unicorn/ i\ before { skip("until #{plugin} is in Fedora") } if plugin == :unicorn' spec/support/shared_contexts/test_server_context.rb +sed -i '/with_unicorn/ s/^/ pending\n\n/' tests/{basic_tests.rb,proxy_tests.rb} +rspec spec +sed -i "/'bundler\/setup'/ s/^/#/" tests/test_helper.rb +sed -i '/redirecting_with_cookie.ru/,/^ end/ s/^/#/' tests/middlewares/capture_cookies_tests.rb +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 +popd + +%files +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%license %{gem_instdir}/LICENSE.md +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files help +%doc %{gem_docdir} +%doc %{gem_instdir}/CONTRIBUT* +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.md +%{gem_instdir}/Rakefile +%{gem_instdir}/benchmarks +%doc %{gem_instdir}/changelog.txt +%{gem_instdir}/excon.gemspec +%{gem_instdir}/spec +%{gem_instdir}/tests + +%changelog +* Sat Aug 22 2020 liyanan - 0.62.0-1 +- package init diff --git a/rubygem-excon.yaml b/rubygem-excon.yaml new file mode 100644 index 0000000..ecf4dfe --- /dev/null +++ b/rubygem-excon.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/excon/excon.git +version_control: github +src_repo: excon/excon +tag_prefix: "^v" +seperator: "."