!8 update to 1.8.0
From: @caodongxia Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
28e6bf7299
@ -1,37 +0,0 @@
|
|||||||
From b7876b29c46fccd711638073a66d9c2ea76af4fe Mon Sep 17 00:00:00 2001
|
|
||||||
From: maminjie <maminjie1@huawei.com>
|
|
||||||
Date: Fri, 19 Mar 2021 14:15:32 +0800
|
|
||||||
Subject: [PATCH] Fix maximum_connections limiting test
|
|
||||||
|
|
||||||
reference to: https://github.com/macournoyer/thin/pull/360
|
|
||||||
---
|
|
||||||
spec/server_spec.rb | 7 ++++---
|
|
||||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/spec/server_spec.rb b/spec/server_spec.rb
|
|
||||||
index 40747cc..25fb48a 100644
|
|
||||||
--- a/spec/server_spec.rb
|
|
||||||
+++ b/spec/server_spec.rb
|
|
||||||
@@ -16,9 +16,10 @@ describe Server do
|
|
||||||
# connections, so we cannot really run this test under that
|
|
||||||
# condition.
|
|
||||||
pending("only for non-root users") if Process.euid == 0
|
|
||||||
- @server.maximum_connections = 100_000
|
|
||||||
+ maximum_connnections = 1_000_000
|
|
||||||
+ @server.maximum_connections = maximum_connnections
|
|
||||||
@server.config
|
|
||||||
- @server.maximum_connections.should < 100_000
|
|
||||||
+ @server.maximum_connections.should <= maximum_connnections
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should default to non-threaded" do
|
|
||||||
@@ -102,4 +103,4 @@ describe Server, "initialization" do
|
|
||||||
Server.should_not_receive(:setup_signals)
|
|
||||||
Server.new(:signals => false)
|
|
||||||
end
|
|
||||||
-end
|
|
||||||
\ No newline at end of file
|
|
||||||
+end
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
From fd9aad1ccc736d0ceaa36dfe1732390427354788 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
|
||||||
Date: Mon, 8 Jan 2018 13:23:43 +0100
|
|
||||||
Subject: [PATCH] Mock Kernel.warn in Ruby 2.5 compatible way.
|
|
||||||
|
|
||||||
Ruby changed the way Kernel#warn reports the error [1], but mocking the
|
|
||||||
method on the class, which is calling it, should be universal [2].
|
|
||||||
|
|
||||||
[1] https://bugs.ruby-lang.org/issues/12944
|
|
||||||
[2] https://www.reddit.com/r/ruby/comments/2nki9q/rspec_how_do_you_mock_or_stub_kernel_methods_like/
|
|
||||||
---
|
|
||||||
spec/runner_spec.rb | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/spec/runner_spec.rb b/spec/runner_spec.rb
|
|
||||||
index 825783d..cee6b91 100644
|
|
||||||
--- a/spec/runner_spec.rb
|
|
||||||
+++ b/spec/runner_spec.rb
|
|
||||||
@@ -65,10 +65,10 @@ describe Runner do
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should warn when require a rack config file" do
|
|
||||||
- STDERR.stub!(:write)
|
|
||||||
- STDERR.should_receive(:write).with(/WARNING:/)
|
|
||||||
-
|
|
||||||
runner = Runner.new(%w(start -r config.ru))
|
|
||||||
+
|
|
||||||
+ runner.should_receive(:warn).with(/WARNING:/)
|
|
||||||
+
|
|
||||||
runner.run! rescue nil
|
|
||||||
|
|
||||||
runner.options[:rackup].should == 'config.ru'
|
|
||||||
--
|
|
||||||
2.15.1
|
|
||||||
|
|
||||||
@ -1,17 +1,15 @@
|
|||||||
%global gem_name thin
|
%global gem_name thin
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.7.2
|
Version: 1.8.0
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: A thin and fast web server
|
Summary: A thin and fast web server
|
||||||
License: (GPLv2+ or Ruby) and BSD and MIT
|
License: (GPLv2+ or Ruby) and BSD and MIT
|
||||||
URL: https://rubygems.org/gems/%{gem_name}/versions/%{version}
|
URL: https://rubygems.org/gems/%{gem_name}/versions/%{version}
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
Source1: https://github.com/macournoyer/thin/archive/v%{version}.tar.gz
|
# git clone https://github.com/macournoyer/thin.git && cd thin
|
||||||
# Fix the test suite error due to way Ruby 2.5 reports warnings.
|
# git archive -v -o thin-1.8.0-tests.tar.gz v1.8.0 spec/
|
||||||
# https://github.com/macournoyer/thin/pull/346
|
Source1: %{gem_name}-%{version}-tests.tar.gz
|
||||||
Patch0: rubygem-thin-1.7.2-Mock-Kernel.warn-in-Ruby-2.5-compatible-way.patch
|
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec)
|
||||||
Patch1: 0001-Fix-maximum_connections-limiting-test.patch
|
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec2)
|
|
||||||
BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0
|
BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0
|
||||||
%description
|
%description
|
||||||
Thin is a Ruby web server that glues together three of the best Ruby
|
Thin is a Ruby web server that glues together three of the best Ruby
|
||||||
@ -29,10 +27,11 @@ BuildArch: noarch
|
|||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -T
|
%setup -q -n %{gem_name}-%{version} -b 1
|
||||||
%gem_install -n %{SOURCE0}
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
@ -45,26 +44,16 @@ mkdir -p %{buildroot}%{_bindir}
|
|||||||
cp -a .%{_bindir}/* \
|
cp -a .%{_bindir}/* \
|
||||||
%{buildroot}%{_bindir}/
|
%{buildroot}%{_bindir}/
|
||||||
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||||
pushd %{buildroot}/%{gem_instdir}/example
|
|
||||||
chmod 755 async_chat.ru
|
|
||||||
chmod 755 async_tailer.ru
|
|
||||||
popd
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
tar xzvf %{SOURCE1}
|
cp -a %{_builddir}/spec spec
|
||||||
cp -r thin-%{version}/spec spec
|
|
||||||
cat %{PATCH0} | patch -p1
|
# To prevent timeout error on build.
|
||||||
cat %{PATCH1} | patch -p1
|
sed -i '/^ def wait_for_server_to_start$/,/^ end$/ s/(10)/(30)/' \
|
||||||
find spec/perf -name "*_spec.rb" -exec \
|
|
||||||
sed -i '/be_faster_then/ i \ pending' {} \;
|
|
||||||
sed -i -r "/'should (force )?kill process in pid file'/a \ pending" \
|
|
||||||
spec/daemonizing_spec.rb
|
spec/daemonizing_spec.rb
|
||||||
sed -i '/^ def server_should_start_in_less_then/,/^ end/ s/(10)/(20)/' \
|
|
||||||
spec/daemonizing_spec.rb
|
rspec -I$(dirs +1)%{gem_extdir_mri} spec
|
||||||
sed -i '/"tracing routines (with NO custom logger)"/a \ before { pending }' \
|
|
||||||
spec/logging_spec.rb
|
|
||||||
rspec2 -I$(dirs +1)%{gem_extdir_mri} spec
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -84,6 +73,9 @@ popd
|
|||||||
%{gem_instdir}/Rakefile
|
%{gem_instdir}/Rakefile
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 17 2023 caodongxia <caodongxia@h-partners.com> - 1.8.0-1
|
||||||
|
- update to 1.8.0
|
||||||
|
|
||||||
* Fri Mar 19 2021 maminjie <maminjie1@huawei.com> - 1.7.2-2
|
* Fri Mar 19 2021 maminjie <maminjie1@huawei.com> - 1.7.2-2
|
||||||
- Fix maximum_connections limiting test
|
- Fix maximum_connections limiting test
|
||||||
|
|
||||||
|
|||||||
BIN
thin-1.7.2.gem
BIN
thin-1.7.2.gem
Binary file not shown.
BIN
thin-1.8.0-tests.tar.gz
Normal file
BIN
thin-1.8.0-tests.tar.gz
Normal file
Binary file not shown.
BIN
thin-1.8.0.gem
Normal file
BIN
thin-1.8.0.gem
Normal file
Binary file not shown.
BIN
v1.7.2.tar.gz
BIN
v1.7.2.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user