protocol-rack 0.4.1 → 0.5.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: a51b0412866f66870722a8f62008d4e76df2ba1d613af62b94eea1a30618bd97
4
- data.tar.gz: 0cc84245f1dbb289cb1081f4c7c291a0bb3d69498b2d822290937418af7dc532
3
+ metadata.gz: e9ac7ef853c3b25a46b06d630fc29921d76e8ee0213554d94afa19efdb9ccd87
4
+ data.tar.gz: ce65dd607e37ee33c6f20ecd4b0fa5976634be40869ac9d0add4e197d43d8cd7
5
5
  SHA512:
6
- metadata.gz: ed7a6592a103ecc2f285aa51a83427f29b15fe95cd7488ce57f59878598b833765774db65c5f8563d67e2ac7fe1da01a5f6c58dda6c0e09b34cbdc5fa12d5384
7
- data.tar.gz: 8182ea7a512bec710d122cdf5ee4f4538b263ef03d2b7eb99130102126c536a58cd2057cf986a9336cad9169eabcffe61ed3c9560d912445a980cdc384311ee8
6
+ metadata.gz: 7ea217d520678401acc7d89d5a592e958bc47bcffc07439c02f4f52e2df89c0cf0391e2f6fbb6c6a94be7e2f31a0b2757d2ccc389a7ae72311e3f7a30f388c47
7
+ data.tar.gz: a9e4587094746830e41a449892bc19c9fb43c7d5625529f321f8e5e72e0422908703719b0bdd983f96ea18f1a13f6697dbd06e254aa62e554cabf3356d97ba61
checksums.yaml.gz.sig CHANGED
Binary file
@@ -17,6 +17,11 @@ module Protocol
17
17
  self.new(app)
18
18
  end
19
19
 
20
+ def self.parse_file(...)
21
+ # This is the old interface, which was changed in Rack 3.
22
+ ::Rack::Builder.parse_file(...).first
23
+ end
24
+
20
25
  # Initialize the rack adaptor middleware.
21
26
  # @parameter app [Object] The rack middleware.
22
27
  def initialize(app)
@@ -26,9 +31,9 @@ module Protocol
26
31
  end
27
32
 
28
33
  def logger
29
- Console.logger
34
+ Console
30
35
  end
31
-
36
+
32
37
  # Unwrap raw HTTP headers into the CGI-style expected by Rack middleware.
33
38
  #
34
39
  # Rack separates multiple headers with the same key, into a single field with multiple lines.
@@ -116,7 +121,7 @@ module Protocol
116
121
 
117
122
  return Response.wrap(env, status, headers, meta, body, request)
118
123
  rescue => exception
119
- Console.logger.error(self) {exception}
124
+ Console.error(self, exception)
120
125
 
121
126
  body&.close if body.respond_to?(:close)
122
127
 
@@ -87,7 +87,7 @@ module Protocol
87
87
 
88
88
  return Response.wrap(env, status, headers, meta, body, request)
89
89
  rescue => exception
90
- Console.logger.error(self) {exception}
90
+ Console.error(self, exception)
91
91
 
92
92
  body&.close if body.respond_to?(:close)
93
93
 
@@ -15,6 +15,10 @@ module Protocol
15
15
  self.new(app)
16
16
  end
17
17
 
18
+ def self.parse_file(...)
19
+ ::Rack::Builder.parse_file(...)
20
+ end
21
+
18
22
  def make_environment(request)
19
23
  request_path, query_string = request.path.split('?', 2)
20
24
  server_name, server_port = (request.authority || '').split(':', 2)
@@ -24,6 +24,10 @@ module Protocol
24
24
  def self.make_response(env, response)
25
25
  IMPLEMENTATION.make_response(env, response)
26
26
  end
27
+
28
+ def self.parse_file(...)
29
+ IMPLEMENTATION.parse_file(...)
30
+ end
27
31
  end
28
32
  end
29
33
  end
@@ -43,7 +43,7 @@ module Protocol
43
43
  ignored = headers.extract(HOP_HEADERS)
44
44
 
45
45
  unless ignored.empty?
46
- Console.logger.warn(self, "Ignoring protocol-level headers: #{ignored.inspect}")
46
+ Console.warn(self, "Ignoring hop headers!", ignored: ignored)
47
47
  end
48
48
 
49
49
  if hijack_body = meta['rack.hijack']
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module Rack
8
- VERSION = "0.4.1"
8
+ VERSION = "0.5.0"
9
9
  end
10
10
  end
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.4.1
4
+ version: 0.5.0
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-12-11 00:00:00.000000000 Z
41
+ date: 2024-04-03 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: protocol-http
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  requirements: []
113
- rubygems_version: 3.4.22
113
+ rubygems_version: 3.5.3
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: An implementation of the Rack protocol/specification.
metadata.gz.sig CHANGED
Binary file