rack-test_server 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/rack/test_server/signal_trap_interceptor.rb +12 -5
- data/lib/rack/test_server/version.rb +1 -1
- data/rack-test_server.gemspec +2 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd4dbc5493600c8a866575bf35aa8647cfc7db2bac5567facea21049349f37a8
|
4
|
+
data.tar.gz: 7abbb603d5f8939fdde602fda10358d74e3e52f5fc9027d941158900246831f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3457708296eb15462157ebcd56b4baea71b335881d917a86f3612448e9a1cdf9908ab1eafb1f1a65cfc09db8760b2ba94fd52557c2d8ae687a3554ec32290a6f
|
7
|
+
data.tar.gz: a848bd023e20be3b4685b1655bcc9073d4d34532b0382a0f98760a80c2091a8480a832689cfe1901b510b0eafb2c74384a1576e8015fe93fede763ec48ebb606
|
data/README.md
CHANGED
@@ -38,6 +38,8 @@ gem 'rack-test_server'
|
|
38
38
|
|
39
39
|
and then `bundle install`.
|
40
40
|
|
41
|
+
NOTE: Ruby 2.3 users can use 0.1.5. (without `rackup` gem), however it is no longer supported.
|
42
|
+
|
41
43
|
## Usage
|
42
44
|
|
43
45
|
If you are working with Rails application, add configuration like below in spec/support/system_testing_helper.rb:
|
@@ -20,12 +20,19 @@ module Rack
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
# https://github.com/rack/
|
27
|
-
|
23
|
+
begin
|
24
|
+
# Disable SIGINT handler in Rackup::Server.
|
25
|
+
require 'rackup/server'
|
26
|
+
# https://github.com/rack/rackup/blob/main/lib/rackup/server.rb#L333
|
27
|
+
Rackup::Server.prepend(Rack::TestServer::SignalTrapInterceptor)
|
28
|
+
rescue LoadError
|
29
|
+
# Disable SIGINT handler in Rack::Server.
|
30
|
+
# https://github.com/rack/rack/blob/2.2.3/lib/rack/server.rb#L319
|
31
|
+
require 'rack/server'
|
32
|
+
Rack::Server.prepend(Rack::TestServer::SignalTrapInterceptor)
|
33
|
+
end
|
28
34
|
|
29
35
|
# Mainly inteded to disable SIGINT handler in Puma.
|
30
36
|
# https://github.com/puma/puma/blob/v5.5.0/lib/puma/launcher.rb#L485
|
37
|
+
# https://github.com/puma/puma/blob/v6.4.2/lib/puma/launcher.rb#L441
|
31
38
|
Signal.singleton_class.prepend(Rack::TestServer::SignalTrapInterceptor)
|
data/rack-test_server.gemspec
CHANGED
@@ -23,12 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.required_ruby_version = '>= 2.
|
26
|
+
spec.required_ruby_version = '>= 2.4'
|
27
27
|
spec.add_dependency 'rack'
|
28
|
+
spec.add_dependency 'rackup'
|
28
29
|
spec.add_development_dependency 'minitest'
|
29
30
|
spec.add_development_dependency 'puma'
|
30
31
|
spec.add_development_dependency 'rake'
|
31
32
|
spec.add_development_dependency 'sinatra'
|
32
|
-
spec.add_development_dependency 'thin'
|
33
33
|
spec.add_development_dependency 'webrick'
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-test_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -25,13 +25,13 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rackup
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: puma
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: sinatra
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: '2.
|
143
|
+
version: '2.4'
|
144
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
146
|
- - ">="
|