rackup 0.1.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +22 -0
- data/lib/rack/handler.rb +7 -0
- data/lib/rack/server.rb +7 -0
- data/lib/rackup/handler.rb +23 -10
- data/lib/rackup/version.rb +1 -1
- data/lib/rackup.rb +2 -0
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2f461ce1898be20b5206f2e36164aed062a6ce123f283d84400ee8f70eff6af
|
4
|
+
data.tar.gz: d4f73f7cb37cc02ac841f5e7ceb15abcde390de3cb099872735249878fdcf1e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75a3501c7a1bcbe1faf527c280259bc582651c6bb205ad5f37328ad22555ae3d8f51f7ef66ca80ba8b6d72c8c62bcea26878a7f284dc6738efe005f40001c039
|
7
|
+
data.tar.gz: 887ad57cc40e6b4cc97b3476baed14276b37d07588018f874f807ea079d1c586decc5669760e18981e6d5d8497d05fc2d3cad28bdebb84dc4f7a4366b2b81d9e
|
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Released under the MIT license.
|
2
|
+
|
3
|
+
Copyright, 2007-2021, by [Leah Neukirchen](https://leahneukirchen.org).
|
4
|
+
Copyright, 2022, by [Samuel G. D. Williams](https://www.codeotaku.com).
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
data/lib/rack/handler.rb
ADDED
data/lib/rack/server.rb
ADDED
data/lib/rackup/handler.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'rack/handler'
|
4
|
-
|
5
3
|
module Rackup
|
6
4
|
# *Handlers* connect web servers with Rack.
|
7
5
|
#
|
@@ -11,9 +9,26 @@ module Rackup
|
|
11
9
|
# A second optional hash can be passed to include server-specific
|
12
10
|
# configuration.
|
13
11
|
module Handler
|
12
|
+
@handlers = {}
|
13
|
+
|
14
|
+
# Register a named handler class.
|
15
|
+
def self.register(name, klass)
|
16
|
+
if klass.is_a?(String)
|
17
|
+
warn "Calling Rackup::Handler.register with a string is deprecated, use the class/module itself.", uplevel: 1
|
18
|
+
|
19
|
+
klass = self.const_get(klass, false)
|
20
|
+
end
|
21
|
+
|
22
|
+
name = name.to_sym
|
23
|
+
|
24
|
+
@handlers[name] = klass
|
25
|
+
end
|
26
|
+
|
14
27
|
def self.[](name)
|
28
|
+
name = name.to_sym
|
29
|
+
|
15
30
|
begin
|
16
|
-
|
31
|
+
@handlers[name] || self.const_get(name, false)
|
17
32
|
rescue NameError
|
18
33
|
# Ignore.
|
19
34
|
end
|
@@ -28,17 +43,15 @@ module Rackup
|
|
28
43
|
return server
|
29
44
|
end
|
30
45
|
|
31
|
-
|
46
|
+
begin
|
47
|
+
require_handler("rackup/handler", name)
|
48
|
+
rescue LoadError
|
49
|
+
require_handler("rack/handler", name)
|
50
|
+
end
|
32
51
|
|
33
52
|
return self[name]
|
34
53
|
end
|
35
54
|
|
36
|
-
def self.register(name, klass)
|
37
|
-
name = name.to_sym
|
38
|
-
|
39
|
-
Rack::Handler.register(name, klass)
|
40
|
-
end
|
41
|
-
|
42
55
|
RACK_HANDLER = 'RACK_HANDLER'
|
43
56
|
RACKUP_HANDLER = 'RACKUP_HANDLER'
|
44
57
|
|
data/lib/rackup/version.rb
CHANGED
data/lib/rackup.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rackup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rack Contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0.beta1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.0.beta1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: webrick
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,11 +110,15 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
description:
|
112
112
|
email:
|
113
|
-
executables:
|
113
|
+
executables:
|
114
|
+
- rackup
|
114
115
|
extensions: []
|
115
116
|
extra_rdoc_files: []
|
116
117
|
files:
|
118
|
+
- LICENSE.md
|
117
119
|
- bin/rackup
|
120
|
+
- lib/rack/handler.rb
|
121
|
+
- lib/rack/server.rb
|
118
122
|
- lib/rackup.rb
|
119
123
|
- lib/rackup/handler.rb
|
120
124
|
- lib/rackup/handler/cgi.rb
|