import rubygem-http_parser.rb-0.8.0-1.el9

i9cf changed/i9ce/rubygem-http_parser.rb-0.8.0-1.el9
MSVSphere Packaging Team 1 year ago
commit a2bccdcf13

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/http_parser.rb-0.8.0.gem

@ -0,0 +1 @@
8aa1092bbc1f10fd9622224babf2b2a98d4d4b22 SOURCES/http_parser.rb-0.8.0.gem

@ -0,0 +1,122 @@
diff -uNr http_parser.rb-0.6.0.orig/spec/parser_spec.rb http_parser.rb-0.6.0/spec/parser_spec.rb
--- http_parser.rb-0.6.0.orig/spec/parser_spec.rb 2016-09-02 14:40:59.042007967 +0200
+++ http_parser.rb-0.6.0/spec/parser_spec.rb 2016-09-02 14:43:37.886554449 +0200
@@ -65,8 +65,8 @@
"\r\n" +
"World"
- @started.should be_true
- @done.should be_true
+ @started.should be_truthy
+ @done.should be_truthy
@parser.http_major.should == 1
@parser.http_minor.should == 1
@@ -103,7 +103,7 @@
@headers.should == {'Content-Length' => '5'}
@body.should be_empty
- @done.should be_false
+ @done.should be_falsey
end
it "should reset to initial state" do
@@ -114,7 +114,7 @@
@parser.request_url.should == '/'
- @parser.reset!.should be_true
+ @parser.reset!.should be_truthy
@parser.http_version.should be_nil
@parser.http_method.should be_nil
@@ -124,7 +124,7 @@
end
it "should optionally reset parser state on no-body responses" do
- @parser.reset!.should be_true
+ @parser.reset!.should be_truthy
@head, @complete = 0, 0
@parser.on_headers_complete = proc {|h| @head += 1; :reset }
@@ -143,12 +143,12 @@
end
it "should retain callbacks after reset" do
- @parser.reset!.should be_true
+ @parser.reset!.should be_truthy
@parser << "GET / HTTP/1.0\r\n\r\n"
- @started.should be_true
+ @started.should be_truthy
@headers.should == {}
- @done.should be_true
+ @done.should be_truthy
end
it "should parse headers incrementally" do
@@ -231,10 +231,10 @@
@parser = HTTP::Parser.new(callbacks)
@parser << "GET / HTTP/1.0\r\n\r\n"
- @started.should be_true
+ @started.should be_truthy
@headers.should == {}
@body.should == ''
- @done.should be_true
+ @done.should be_truthy
end
it "should ignore extra content beyond specified length" do
@@ -246,7 +246,7 @@
" \n"
@body.should == 'hello'
- @done.should be_true
+ @done.should be_truthy
end
it 'sets upgrade_data if available' do
@@ -256,7 +256,7 @@
"Upgrade: WebSocket\r\n\r\n" +
"third key data"
- @parser.upgrade?.should be_true
+ @parser.upgrade?.should be_truthy
@parser.upgrade_data.should == 'third key data'
end
@@ -266,7 +266,7 @@
"Connection: Upgrade\r\n" +
"Upgrade: WebSocket\r\n\r\n"
- @parser.upgrade?.should be_true
+ @parser.upgrade?.should be_truthy
@parser.upgrade_data.should == ''
end
@@ -281,13 +281,13 @@
@parser.on_headers_complete = proc { |e| :stop }
offset = (@parser << request)
- @parser.upgrade?.should be_true
+ @parser.upgrade?.should be_truthy
@parser.upgrade_data.should == ''
offset.should == request.length
end
it "should execute on_body on requests with no content-length" do
- @parser.reset!.should be_true
+ @parser.reset!.should be_truthy
@head, @complete, @body = 0, 0, 0
@parser.on_headers_complete = proc {|h| @head += 1 }
@@ -316,7 +316,7 @@
@parser.keep_alive?.should == test['should_keep_alive']
if test.has_key?('upgrade') and test['upgrade'] != 0
- @parser.upgrade?.should be_true
+ @parser.upgrade?.should be_truthy
@parser.upgrade_data.should == test['upgrade']
end

@ -0,0 +1,9 @@
diff -uNr http_parser.rb-0.6.0.orig/bench/standalone.rb http_parser.rb-0.6.0/bench/standalone.rb
--- http_parser.rb-0.6.0.orig/bench/standalone.rb 2016-09-03 15:27:48.046366524 +0200
+++ http_parser.rb-0.6.0/bench/standalone.rb 2016-09-03 15:28:13.458093864 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#!/usr/bin/ruby
$:.unshift File.dirname(__FILE__) + "/../lib"
require "rubygems"
require "http/parser"

@ -0,0 +1,178 @@
%global gem_name http_parser.rb
Name: rubygem-%{gem_name}
Version: 0.8.0
Release: 1%{?dist}
Summary: Simple callback-based HTTP request/response parser
License: MIT
URL: https://github.com/tmm1/http_parser.rb
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: gcc
BuildRequires: rubygems-devel
BuildRequires: ruby-devel
BuildRequires: rubygem-rspec
%if 0%{?fedora} <= 20 || 0%{?el7}
Provides: rubygem(%{gem_name}) = %{version}
%endif
%description
Ruby bindings to http://github.com/joylent/http-parser and
http://github.com/a2800276/http-parser.java.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%autosetup -n %{gem_name}-%{version} -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%if 0%{?fedora} || 0%{?rhel} >= 8
mkdir -p %{buildroot}%{gem_extdir_mri}
cp -ar .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
%else
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
cp -ar .%{gem_instdir}/lib/ruby_http_parser.so %{buildroot}%{gem_extdir_mri}/lib
%endif
# Prevent dangling symlink in -debuginfo (rhbz#878863).
rm -rf %{buildroot}%{gem_instdir}/{ext/,.github/}
rm -f %{buildroot}%{gem_instdir}/{.gitignore,.gitmodules,Gemfile.lock}
# Run the test suite
%check
pushd .%{gem_instdir}
rspec -Ilib -I%{buildroot}%{gem_extdir_mri} spec
popd
%files
%dir %{gem_instdir}
%{gem_libdir}
%{gem_extdir_mri}
%{gem_extdir_mri}/gem.build_complete
%exclude %{gem_cache}
%{gem_spec}
%doc %{gem_instdir}/README.md
%license %{gem_instdir}/LICENSE-MIT
%doc %{gem_instdir}/Gemfile
%files doc
%doc %{gem_docdir}
%{gem_instdir}/%{gem_name}.gemspec
%{gem_instdir}/Rakefile
%{gem_instdir}/spec
%{gem_instdir}/bench
%{gem_instdir}/tasks
%changelog
* Wed Jan 10 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.8.0-1
- Rebuilt for MSVSphere 9.3
* Sun Jul 30 2023 Ilia Gradina <ilgrad@fedoraproject.org> - 0.8.0-1
- Update to 0.8.0
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.0-26
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.0-24
- F-36: rebuild against ruby31
- modernize spec file, especially move %%gem_install to %%build
to fix FTBFS with package_notes
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 6 2021 Vít Ondruch <vondruch@redhat.com> - 0.6.0-20
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0
* Wed Aug 05 2020 Merlin Mathesius <mmathesi@redhat.com> - 0.6.0-19
- Minor conditional fixes for ELN
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 18 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.0-17
- F-32: rebuild against ruby27
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 17 2019 Vít Ondruch <vondruch@redhat.com> - 0.6.0-14
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.6
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.0-13
- Use C.UTF-8 locale
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 0.6.0-10
- Rebuilt for switch to libxcrypt
* Thu Jan 11 2018 Vít Ondruch <vondruch@redhat.com> - 0.6.0-9
- Keep the 'gem.build_complete', otherwise RubyGems tries to recompile
the binary extension.
* Thu Jan 11 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.0-8
- Enable rdoc generation again (fixed by ruby side)
* Fri Jan 05 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.0-7
- F-28: rebuild for ruby25
- Disabling rdoc generation for now to avoid segfault
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 10 2017 Vít Ondruch <vondruch@redhat.com> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4
* Fri Sep 02 2016 Yanis Guenane <yguenane@redhat.com> - 0.6.0-2
- Patch the spec file to match key words in RSpec 3
* Mon Jan 05 2015 Graeme Gillies <ggillies@redhat.com> - 0.6.0-1
- Initial package
Loading…
Cancel
Save