update to 1.8.0
This commit is contained in:
parent
efa6d9e800
commit
fd0e4c4530
@ -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
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.7.2
|
||||
Release: 2
|
||||
Version: 1.8.0
|
||||
Release: 1
|
||||
Summary: A thin and fast web server
|
||||
License: (GPLv2+ or Ruby) and BSD and MIT
|
||||
URL: https://rubygems.org/gems/%{gem_name}/versions/%{version}
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: https://github.com/macournoyer/thin/archive/v%{version}.tar.gz
|
||||
# Fix the test suite error due to way Ruby 2.5 reports warnings.
|
||||
# https://github.com/macournoyer/thin/pull/346
|
||||
Patch0: rubygem-thin-1.7.2-Mock-Kernel.warn-in-Ruby-2.5-compatible-way.patch
|
||||
Patch1: 0001-Fix-maximum_connections-limiting-test.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec2)
|
||||
# git clone https://github.com/macournoyer/thin.git && cd thin
|
||||
# git archive -v -o thin-1.8.0-tests.tar.gz v1.8.0 spec/
|
||||
Source1: %{gem_name}-%{version}-tests.tar.gz
|
||||
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec)
|
||||
BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0
|
||||
%description
|
||||
Thin is a Ruby web server that glues together three of the best Ruby
|
||||
@ -29,10 +27,11 @@ BuildArch: noarch
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
%setup -q -n %{gem_name}-%{version} -b 1
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
@ -45,26 +44,16 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
cp -a .%{_bindir}/* \
|
||||
%{buildroot}%{_bindir}/
|
||||
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
|
||||
pushd .%{gem_instdir}
|
||||
tar xzvf %{SOURCE1}
|
||||
cp -r thin-%{version}/spec spec
|
||||
cat %{PATCH0} | patch -p1
|
||||
cat %{PATCH1} | patch -p1
|
||||
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" \
|
||||
cp -a %{_builddir}/spec spec
|
||||
|
||||
# To prevent timeout error on build.
|
||||
sed -i '/^ def wait_for_server_to_start$/,/^ end$/ s/(10)/(30)/' \
|
||||
spec/daemonizing_spec.rb
|
||||
sed -i '/^ def server_should_start_in_less_then/,/^ end/ s/(10)/(20)/' \
|
||||
spec/daemonizing_spec.rb
|
||||
sed -i '/"tracing routines (with NO custom logger)"/a \ before { pending }' \
|
||||
spec/logging_spec.rb
|
||||
rspec2 -I$(dirs +1)%{gem_extdir_mri} spec
|
||||
|
||||
rspec -I$(dirs +1)%{gem_extdir_mri} spec
|
||||
popd
|
||||
|
||||
%files
|
||||
@ -84,6 +73,9 @@ popd
|
||||
%{gem_instdir}/Rakefile
|
||||
|
||||
%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
|
||||
- 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