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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 653b29f266cfb099925a570ce646dda069edb77aaf015c29c632621fdcc7a59e
4
- data.tar.gz: 3a5d8d458454ebc735346f9718e2629371474138d5f9b99e591bc3729ec5a574
3
+ metadata.gz: dd4dbc5493600c8a866575bf35aa8647cfc7db2bac5567facea21049349f37a8
4
+ data.tar.gz: 7abbb603d5f8939fdde602fda10358d74e3e52f5fc9027d941158900246831f8
5
5
  SHA512:
6
- metadata.gz: e185fe7663d9d12870dff5497fbc6cf4642e8ea8c5aec36a003040ea4525bfb45955cdad72eb47935cb78af3f4fc2bcc0ad651e5130cc3e6ecf240dda9e6d4de
7
- data.tar.gz: a95c03aa4ff2f15af918b778cc97e38b62c47065076fb391344b862a9753719e2a413f7738681817ebd6c224ae8be58ec2a887031b20e6a01d919cdb5b2783c9
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.4'
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'
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.1.4
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: 2022-07-18 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
@@ -25,13 +25,13 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: minitest
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: :development
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: puma
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: rake
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: sinatra
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: thin
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.3'
143
+ version: '2.4'
144
144
  required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="