protocol-http 0.12.2 → 0.12.3
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/request.rb +3 -3
- data/lib/protocol/http/response.rb +8 -8
- 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: 612f8d39d751eed9e5feea86fa2e13410db39212516781b27123df10b734e617
|
4
|
+
data.tar.gz: 8452e8012d6030e6df8939affbc360ba9821856caec1a67880156214b672d9b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7138cc65436789faf0448ab30bd550bc2f733c37c06fec803e764127fea244b68bdcde6f6abab29b54f31b126e647c402071b18f5b8e47ff01d65069e604b8f2
|
7
|
+
data.tar.gz: 6dd655dec1ef6216811e1f03b30669c31d7e951c7a5195cec41f82cfdf665b3b1e6cd201d7b5418498ff2b116198b482a5c7f5fe47b4176819435890bed48bda
|
@@ -52,11 +52,11 @@ module Protocol
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def head?
|
55
|
-
|
55
|
+
@method == Methods::HEAD
|
56
56
|
end
|
57
57
|
|
58
58
|
def connect?
|
59
|
-
|
59
|
+
@method == Methods::CONNECT
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.[](method, path, headers, body)
|
@@ -66,7 +66,7 @@ module Protocol
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def idempotent?
|
69
|
-
method != Methods::POST && (body.nil? || body.empty?)
|
69
|
+
@method != Methods::POST && (@body.nil? || @body.empty?)
|
70
70
|
end
|
71
71
|
|
72
72
|
def to_s
|
@@ -45,35 +45,35 @@ module Protocol
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def continue?
|
48
|
-
status == 100
|
48
|
+
@status == 100
|
49
49
|
end
|
50
50
|
|
51
51
|
def success?
|
52
|
-
status >= 200 && status < 300
|
52
|
+
@status and @status >= 200 && @status < 300
|
53
53
|
end
|
54
54
|
|
55
55
|
def partial?
|
56
|
-
status == 206
|
56
|
+
@status == 206
|
57
57
|
end
|
58
58
|
|
59
59
|
def redirection?
|
60
|
-
status >= 300 && status < 400
|
60
|
+
@status and @status >= 300 && @status < 400
|
61
61
|
end
|
62
62
|
|
63
63
|
def preserve_method?
|
64
|
-
status == 307 || status == 308
|
64
|
+
@status == 307 || @status == 308
|
65
65
|
end
|
66
66
|
|
67
67
|
def failure?
|
68
|
-
status >= 400 && status < 600
|
68
|
+
@status and @status >= 400 && @status < 600
|
69
69
|
end
|
70
70
|
|
71
71
|
def bad_request?
|
72
|
-
status == 400
|
72
|
+
@status == 400
|
73
73
|
end
|
74
74
|
|
75
75
|
def server_failure?
|
76
|
-
status == 500
|
76
|
+
@status == 500
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.[](status, headers = [], body = nil, protocol = nil)
|
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.12.
|
4
|
+
version: 0.12.3
|
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-10-
|
11
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.0.
|
131
|
+
rubygems_version: 3.0.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Provides abstractions to handle HTTP protocols.
|