File tree 6 files changed +62
-40
lines changed
6 files changed +62
-40
lines changed Original file line number Diff line number Diff line change @@ -30,43 +30,44 @@ jobs:
30
30
ruby :
31
31
- 2.6
32
32
- 2.7
33
- - 3.0
33
+ - " 3.0"
34
34
- 3.1
35
35
- 3.2
36
36
- 3.3
37
37
- 3.4
38
38
39
39
gemfile :
40
+ - gems/rack-v1.rb
40
41
- gems/rack-v2.rb
42
+ - gems/rack-v3.rb
41
43
42
44
include :
43
45
- experimental : false
44
46
os : macos
45
47
ruby : 3.4
46
48
gemfile : gems/rack-v2.rb
49
+ - experimental : false
50
+ os : macos
51
+ ruby : 3.4
52
+ gemfile : gems/rack-v3.rb
47
53
- experimental : true
48
54
os : ubuntu
49
55
ruby : head
50
56
gemfile : gems/rack-v2.rb
51
57
- experimental : true
52
58
os : ubuntu
53
- ruby : 2.7
54
- gemfile : gems/rack-v1.rb
55
- - experimental : true
56
- os : ubuntu
57
- ruby : 3.4
58
- gemfile : gems/rack-v2.rb
59
- - experimental : true
60
- os : ubuntu
61
- ruby : 3.4
59
+ ruby : head
62
60
gemfile : gems/rack-v3.rb
63
61
- experimental : true
64
62
os : ubuntu
65
63
ruby : 3.4
66
64
gemfile : gems/rack-head.rb
65
+ exclude :
66
+ - { ruby: 3.3, gemfile: gems/rack-v1.rb }
67
+ - { ruby: 3.4, gemfile: gems/rack-v1.rb }
67
68
68
69
steps :
69
- - uses : actions/checkout@v3
70
+ - uses : actions/checkout@v4
70
71
71
72
- uses : ruby/setup-ruby@v1
72
73
with :
Original file line number Diff line number Diff line change 3
3
eval_gemfile "../Gemfile"
4
4
5
5
gem 'rack' , github : 'rack/rack'
6
+ gem 'rackup'
Original file line number Diff line number Diff line change 3
3
eval_gemfile "../Gemfile"
4
4
5
5
gem 'rack' , "~> 3.0"
6
+ gem 'rackup'
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- require "thin"
4
- require "thin/server"
5
- require "thin/logging"
6
- require "thin/backends/tcp_server"
3
+ require 'rack/handler'
4
+ require_relative '../../thin/rackup/handler'
7
5
8
6
module Rack
9
7
module Handler
10
- class Thin
11
- def self . run ( app , **options )
12
- environment = ENV [ 'RACK_ENV' ] || 'development'
13
- default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
14
-
15
- host = options . delete ( :Host ) || default_host
16
- port = options . delete ( :Port ) || 8080
17
- args = [ host , port , app , options ]
18
-
19
- server = ::Thin ::Server . new ( *args )
20
- yield server if block_given?
21
-
22
- server . start
23
- end
24
-
25
- def self . valid_options
26
- environment = ENV [ 'RACK_ENV' ] || 'development'
27
- default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
28
-
29
- {
30
- "Host=HOST" => "Hostname to listen on (default: #{ default_host } )" ,
31
- "Port=PORT" => "Port to listen on (default: 8080)" ,
32
- }
33
- end
8
+ class Thin < ::Thin ::Rackup ::Handler
34
9
end
35
10
36
- register :thin , :: Rack :: Handler :: Thin
11
+ register :thin , Thin . to_s
37
12
end
38
13
end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'rackup/handler'
4
+ require_relative '../../thin/rackup/handler'
5
+
6
+ module Rackup
7
+ module Handler
8
+ class Thin < ::Thin ::Rackup ::Handler
9
+ end
10
+
11
+ register :thin , Thin
12
+ end
13
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ module Thin
4
+ module Rackup
5
+ class Handler
6
+ def self . run ( app , **options )
7
+ environment = ENV [ 'RACK_ENV' ] || 'development'
8
+ default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
9
+
10
+ host = options . delete ( :Host ) || default_host
11
+ port = options . delete ( :Port ) || 8080
12
+ args = [ host , port , app , options ]
13
+
14
+ server = ::Thin ::Server . new ( *args )
15
+ yield server if block_given?
16
+
17
+ server . start
18
+ end
19
+
20
+ def self . valid_options
21
+ environment = ENV [ 'RACK_ENV' ] || 'development'
22
+ default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
23
+
24
+ {
25
+ "Host=HOST" => "Hostname to listen on (default: #{ default_host } )" ,
26
+ "Port=PORT" => "Port to listen on (default: 8080)" ,
27
+ }
28
+ end
29
+ end
30
+ end
31
+ end
You can’t perform that action at this time.
0 commit comments