serverengine 2.2.4-x86-mingw32 → 2.2.5-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/linux.yml +21 -16
- data/.github/workflows/windows.yml +42 -0
- data/Changelog +4 -0
- data/lib/serverengine/multi_process_server.rb +5 -1
- data/lib/serverengine/version.rb +1 -1
- data/lib/serverengine/winsock.rb +2 -8
- data/spec/supervisor_spec.rb +7 -1
- metadata +3 -3
- data/appveyor.yml +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2bf21c7402ac1749bef9cbd1941165a40112cb2875efe533b1a862b425d76f0
|
4
|
+
data.tar.gz: a603493e2e261de52879964a871a240499c9f8131c9f30ee78e3cd836a8484e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b5f80147a36a3089001dd07ddb680506a15f173d526202355451f8a10eb897bb942f74056093a1ecad4191b67c49cf0ce20c1c0998ceeb3729344f6bc0f7953
|
7
|
+
data.tar.gz: fa756ba5653d68631b8b6aaaf279e996fa7e3d1786ddd5f8c87bdae9f89dfd4519a0713aba73708de87afaa833b9187f5a779fa1fd6c907e5a79ef1b4ca40f6e
|
data/.github/workflows/linux.yml
CHANGED
@@ -1,26 +1,31 @@
|
|
1
1
|
name: Testing on Ubuntu
|
2
2
|
on:
|
3
|
-
|
4
|
-
|
3
|
+
push:
|
4
|
+
branches: [master]
|
5
|
+
pull_request:
|
6
|
+
branches: [master]
|
7
|
+
|
5
8
|
jobs:
|
6
|
-
|
9
|
+
test:
|
7
10
|
runs-on: ${{ matrix.os }}
|
8
11
|
strategy:
|
9
12
|
fail-fast: false
|
10
13
|
matrix:
|
11
|
-
ruby: [ '3.
|
14
|
+
ruby: [ '3.1', '3.0', '2.7', '2.6' ]
|
12
15
|
os:
|
13
16
|
- ubuntu-latest
|
14
|
-
name: Ruby ${{ matrix.ruby }}
|
17
|
+
name: Unit testing with Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
|
15
18
|
steps:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
- name: Install dependencies
|
25
|
+
run: |
|
26
|
+
gem install bundler rake
|
27
|
+
bundle install --jobs 4 --retry 3
|
28
|
+
- name: Run tests
|
29
|
+
env:
|
30
|
+
CI: true
|
31
|
+
run: bundle exec rake spec
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Testing on Windows
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [master]
|
5
|
+
pull_request:
|
6
|
+
branches: [master]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ${{ matrix.os }}
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby: [ '3.1', '2.7', '2.6' ]
|
15
|
+
os:
|
16
|
+
- windows-latest
|
17
|
+
include:
|
18
|
+
- ruby: '3.0.3'
|
19
|
+
os: windows-latest
|
20
|
+
# On Ruby 3.0, we need to use fiddle 1.0.8 or later to retrieve correct
|
21
|
+
# error code. In addition, we have to specify the path of fiddle by RUBYLIB
|
22
|
+
# because RubyInstaller loads Ruby's bundled fiddle before initializing gem.
|
23
|
+
# See also:
|
24
|
+
# * https://github.com/ruby/fiddle/issues/72
|
25
|
+
# * https://bugs.ruby-lang.org/issues/17813
|
26
|
+
# * https://github.com/oneclick/rubyinstaller2/blob/8225034c22152d8195bc0aabc42a956c79d6c712/lib/ruby_installer/build/dll_directory.rb
|
27
|
+
ruby-lib-opt: RUBYLIB=%RUNNER_TOOL_CACHE%/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/fiddle-1.1.0/lib
|
28
|
+
|
29
|
+
name: Unit testing with Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v2
|
32
|
+
- name: Set up Ruby
|
33
|
+
uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby }}
|
36
|
+
- name: Add Fiddle 1.1.0
|
37
|
+
if: ${{ matrix.ruby == '3.0.3' }}
|
38
|
+
run: gem install fiddle --version 1.1.0
|
39
|
+
- name: Install dependencies
|
40
|
+
run: ridk exec bundle install --jobs 4 --retry 3
|
41
|
+
- name: Run tests
|
42
|
+
run: bundle exec rake spec ${{ matrix.ruby-lib-opt }}
|
data/Changelog
CHANGED
@@ -142,7 +142,11 @@ module ServerEngine
|
|
142
142
|
return false unless @pmon
|
143
143
|
|
144
144
|
if stat = @pmon.try_join
|
145
|
-
|
145
|
+
if @stop
|
146
|
+
@worker.logger.info "Worker #{@wid} finished with #{ServerEngine.format_join_status(stat)}"
|
147
|
+
else
|
148
|
+
@worker.logger.error "Worker #{@wid} finished unexpectedly with #{ServerEngine.format_join_status(stat)}"
|
149
|
+
end
|
146
150
|
if stat.is_a?(Process::Status) && stat.exited? && @unrecoverable_exit_codes.include?(stat.exitstatus)
|
147
151
|
@unrecoverable_exit = true
|
148
152
|
@exitstatus = stat.exitstatus
|
data/lib/serverengine/version.rb
CHANGED
data/lib/serverengine/winsock.rb
CHANGED
@@ -21,6 +21,7 @@ module ServerEngine
|
|
21
21
|
require 'fiddle/import'
|
22
22
|
require 'fiddle/types'
|
23
23
|
require 'socket'
|
24
|
+
require 'rbconfig'
|
24
25
|
|
25
26
|
extend Fiddle::Importer
|
26
27
|
|
@@ -101,14 +102,7 @@ module ServerEngine
|
|
101
102
|
extern "int GetModuleFileNameA(int, char *, int)"
|
102
103
|
extern "int CloseHandle(int)"
|
103
104
|
|
104
|
-
|
105
|
-
GetModuleFileNameA(0, ruby_bin_path_buf, ruby_bin_path_buf.size)
|
106
|
-
|
107
|
-
ruby_bin_path = ruby_bin_path_buf.to_s.gsub(/\\/, '/')
|
108
|
-
ruby_dll_paths = File.dirname(ruby_bin_path) + '/*msvcr*ruby*.dll'
|
109
|
-
ruby_dll_path = Dir.glob(ruby_dll_paths).first
|
110
|
-
dlload ruby_dll_path
|
111
|
-
|
105
|
+
dlload RbConfig::CONFIG['LIBRUBY_SO']
|
112
106
|
extern "int rb_w32_map_errno(int)"
|
113
107
|
|
114
108
|
def self.raise_last_error(name)
|
data/spec/supervisor_spec.rb
CHANGED
@@ -197,7 +197,13 @@ describe ServerEngine::Supervisor do
|
|
197
197
|
t.join
|
198
198
|
end
|
199
199
|
|
200
|
-
|
200
|
+
if ServerEngine.windows?
|
201
|
+
# Because launching a process on Windows is high cost,
|
202
|
+
# it doesn't often reach to 3.
|
203
|
+
test_state(:worker_run).should <= 3
|
204
|
+
else
|
205
|
+
test_state(:worker_run).should == 3
|
206
|
+
end
|
201
207
|
end
|
202
208
|
end
|
203
209
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sigdump
|
@@ -102,6 +102,7 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- ".github/workflows/linux.yml"
|
105
|
+
- ".github/workflows/windows.yml"
|
105
106
|
- ".gitignore"
|
106
107
|
- ".rspec"
|
107
108
|
- Changelog
|
@@ -110,7 +111,6 @@ files:
|
|
110
111
|
- NOTICE
|
111
112
|
- README.md
|
112
113
|
- Rakefile
|
113
|
-
- appveyor.yml
|
114
114
|
- examples/server.rb
|
115
115
|
- examples/spawn_worker_script.rb
|
116
116
|
- lib/serverengine.rb
|
data/appveyor.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
---
|
2
|
-
image: Visual Studio 2019
|
3
|
-
|
4
|
-
install:
|
5
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
6
|
-
- ruby --version
|
7
|
-
- gem --version
|
8
|
-
- bundle install
|
9
|
-
build: off
|
10
|
-
test_script:
|
11
|
-
- bundle exec rake spec
|
12
|
-
|
13
|
-
environment:
|
14
|
-
matrix:
|
15
|
-
- ruby_version: "30-x64"
|
16
|
-
- ruby_version: "27-x64"
|
17
|
-
- ruby_version: "26-x64"
|
18
|
-
- ruby_version: "25-x64"
|
19
|
-
|
20
|
-
# On Ruby 3.0, we need to use fiddle 1.0.8 or later to retrieve correct
|
21
|
-
# error code. In addition, we have to specify the path of fiddle by RUBYLIB
|
22
|
-
# because RubyInstaller loads Ruby's bundled fiddle before initializing gem.
|
23
|
-
# See also:
|
24
|
-
# * https://github.com/ruby/fiddle/issues/72
|
25
|
-
# * https://bugs.ruby-lang.org/issues/17813
|
26
|
-
# * https://github.com/oneclick/rubyinstaller2/blob/8225034c22152d8195bc0aabc42a956c79d6c712/lib/ruby_installer/build/dll_directory.rb
|
27
|
-
for:
|
28
|
-
-
|
29
|
-
matrix:
|
30
|
-
only:
|
31
|
-
- ruby_version: "30-x64"
|
32
|
-
test_script:
|
33
|
-
- gem install fiddle --version 1.0.8
|
34
|
-
- set RUBYLIB=C:/Ruby%ruby_version%/lib/ruby/gems/3.0.0/gems/fiddle-1.0.8/lib
|
35
|
-
- bundle exec rake spec
|