rack-test_server 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6406dd22b7cccbc0b58ecc54464b265ebbdbd4ca006ccc09d736cd5435b66afd
4
- data.tar.gz: 916b218f513afcaea4266c3557ca514b1f39df726ff6bc01e7c9b6511c411b18
3
+ metadata.gz: dd4dbc5493600c8a866575bf35aa8647cfc7db2bac5567facea21049349f37a8
4
+ data.tar.gz: 7abbb603d5f8939fdde602fda10358d74e3e52f5fc9027d941158900246831f8
5
5
  SHA512:
6
- metadata.gz: 0ef53d8ef4627b0a4883e58743d62addadd1a83fce858eee9ce02ccde12058226410b7ff674e76cbdd21423fc5b8b903aec3f40dec12558d0fda5028cedc8795
7
- data.tar.gz: 47ffe65375c3dbc5c91a08a1286e79f6f35d58d7b78e62180faefa952c85569f3bef71a4a310fba9a8b3b65db8dba6184be6f2e9da4cb0c66243d293bec12c38
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
- require 'rack/server'
24
-
25
- # Disable SIGINT handler in Rack::Server.
26
- # https://github.com/rack/rack/blob/2.2.3/lib/rack/server.rb#L319
27
- Rack::Server.prepend(Rack::TestServer::SignalTrapInterceptor)
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  class TestServer
5
- VERSION = '0.1.5'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
@@ -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.3'
27
- spec.add_dependency 'rack', '>= 2', '< 3'
26
+ spec.required_ruby_version = '>= 2.4'
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.1.5
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: 2024-02-17 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -16,28 +16,22 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '3'
19
+ version: '0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '3'
26
+ version: '0'
33
27
  - !ruby/object:Gem::Dependency
34
- name: minitest
28
+ name: rackup
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
33
  version: '0'
40
- type: :development
34
+ type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
@@ -45,7 +39,7 @@ dependencies:
45
39
  - !ruby/object:Gem::Version
46
40
  version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
- name: puma
42
+ name: minitest
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - ">="
@@ -59,7 +53,7 @@ dependencies:
59
53
  - !ruby/object:Gem::Version
60
54
  version: '0'
61
55
  - !ruby/object:Gem::Dependency
62
- name: rake
56
+ name: puma
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - ">="
@@ -73,7 +67,7 @@ dependencies:
73
67
  - !ruby/object:Gem::Version
74
68
  version: '0'
75
69
  - !ruby/object:Gem::Dependency
76
- name: sinatra
70
+ name: rake
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - ">="
@@ -87,7 +81,7 @@ dependencies:
87
81
  - !ruby/object:Gem::Version
88
82
  version: '0'
89
83
  - !ruby/object:Gem::Dependency
90
- name: thin
84
+ name: sinatra
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
87
  - - ">="
@@ -146,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
140
  requirements:
147
141
  - - ">="
148
142
  - !ruby/object:Gem::Version
149
- version: '2.3'
143
+ version: '2.4'
150
144
  required_rubygems_version: !ruby/object:Gem::Requirement
151
145
  requirements:
152
146
  - - ">="