protocol-rack 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/rack/adapter/generic.rb +16 -0
- data/lib/protocol/rack/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33a02fca6186127b6390f9189b87c312dd05ec7b3351ad31ca75698a30c82097
|
4
|
+
data.tar.gz: d58cafc1f71296ed6d68bf09ceeaf945d8ba1785f701623b0139d8f81adb553d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6460132af99298b1cfb02635af9874050cf6c95c11083a1c6dd5ea884fbe1940d0f3efcea0bfcdbe2040023795bb6ca40046fea8149e55f8c03ca73a76227371
|
7
|
+
data.tar.gz: 05ee66f991ad3cd77b4e0937100523c346f2af359ad310591c15286ebccdbad3c01effdb7d79a049aa5f548e595f2c941e69c802e7ed550c75602acf0f48e910
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -78,6 +78,12 @@ module Protocol
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
def make_environment(request)
|
82
|
+
{
|
83
|
+
request: request
|
84
|
+
}
|
85
|
+
end
|
86
|
+
|
81
87
|
# Build a rack `env` from the incoming request and apply it to the rack middleware.
|
82
88
|
#
|
83
89
|
# @parameter request [Protocol::HTTP::Request] The incoming request.
|
@@ -86,6 +92,16 @@ module Protocol
|
|
86
92
|
|
87
93
|
status, headers, body = @app.call(env)
|
88
94
|
|
95
|
+
# The status must always be an integer.
|
96
|
+
unless status.is_a?(Integer)
|
97
|
+
raise ArgumentError, "Status must be an integer!"
|
98
|
+
end
|
99
|
+
|
100
|
+
# Headers must always be a hash or equivalent.
|
101
|
+
unless headers
|
102
|
+
raise ArgumentError, "Headers must not be nil!"
|
103
|
+
end
|
104
|
+
|
89
105
|
headers, meta = self.wrap_headers(headers)
|
90
106
|
|
91
107
|
return Response.wrap(env, status, headers, meta, body, request)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
40
|
-----END CERTIFICATE-----
|
41
|
-
date: 2023-06-
|
41
|
+
date: 2023-06-11 00:00:00.000000000 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: protocol-http
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
\�I�H���;�jV�%FX�7���o-&�.3�Kl�6*@��11���{;�d�u;���bw��'��|i�ԟ�%��4�cWۼ�9)��1,T
|
2
|
+
��|��Ie���frcs�H��+�ȵv-ymB��(Q �*�K����X��gg%�"!=�>9���Ē
|