protocol-http 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protocol/http/response.rb +3 -4
- data/lib/protocol/http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f09f21ec0f58cdb5ea6f0135c686833d39c2260355a230cdf9bca63b84a1268e
|
4
|
+
data.tar.gz: b7faa73e9d9b69a99446b1d4dfc605d378c3117f7c3b0c53906ceb01fb612116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 657db7a829f855987fe16df6455452f26ed0919417538dde3c3e522799d11d549cb5886b9d9337c54e121ce3f1a7513c9538fed8cbb700e0b58883710886958a
|
7
|
+
data.tar.gz: fe70c838c983601b81ac968b43b95669f731d4ddcbeec2f4e02c4da7f605f0339739777a810478a3297da47c5099134546a81ac8897fc281759b67491a9a96fc
|
@@ -26,10 +26,9 @@ module Protocol
|
|
26
26
|
class Response
|
27
27
|
prepend Body::Reader
|
28
28
|
|
29
|
-
def initialize(version = nil, status = 200,
|
29
|
+
def initialize(version = nil, status = 200, headers = [], body = nil, protocol = nil)
|
30
30
|
@version = version
|
31
31
|
@status = status
|
32
|
-
@reason = reason
|
33
32
|
@headers = headers
|
34
33
|
@body = body
|
35
34
|
@protocol = protocol
|
@@ -80,7 +79,7 @@ module Protocol
|
|
80
79
|
def self.[](status, headers = [], body = nil, protocol = nil)
|
81
80
|
body = Body::Buffered.wrap(body)
|
82
81
|
|
83
|
-
self.new(nil, status,
|
82
|
+
self.new(nil, status, headers, body, protocol)
|
84
83
|
end
|
85
84
|
|
86
85
|
def self.for_exception(exception)
|
@@ -88,7 +87,7 @@ module Protocol
|
|
88
87
|
end
|
89
88
|
|
90
89
|
def to_s
|
91
|
-
"#{@status} #{@
|
90
|
+
"#{@status} #{@version}"
|
92
91
|
end
|
93
92
|
|
94
93
|
def to_ary
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
rubygems_version: 3.0.
|
126
|
+
rubygems_version: 3.0.2
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Provides abstractions to handle HTTP protocols.
|