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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50cafe21c0b3f5ed6b29fe6d7099cb3597c08c6082cc76919280671b4f4c0c6d
4
- data.tar.gz: 361cad94d3eec69321daa40e05f6c1aaa5c49fa474387e97e8b1a19e724e4692
3
+ metadata.gz: 612f8d39d751eed9e5feea86fa2e13410db39212516781b27123df10b734e617
4
+ data.tar.gz: 8452e8012d6030e6df8939affbc360ba9821856caec1a67880156214b672d9b9
5
5
  SHA512:
6
- metadata.gz: dc2805fc35956abf21aebdf26e461d50bcc712702f67c66fb12e408e8bea1e3fa4b301d4af65ff6c6c5fe814358451694db88f7ba5656a8295aa53e5ad48385a
7
- data.tar.gz: 1f7df6fdde7bb8a5dee4318d3df256981726cdbba8d1e2aeec149e94699200782b86cb496a85ac63ca1e69b3b6e0e5c63db894600ff5f0957d8331d726e11da0
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
- self.method == Methods::HEAD
55
+ @method == Methods::HEAD
56
56
  end
57
57
 
58
58
  def connect?
59
- self.method == Methods::CONNECT
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)
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Protocol
22
22
  module HTTP
23
- VERSION = "0.12.2"
23
+ VERSION = "0.12.3"
24
24
  end
25
25
  end
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.2
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-14 00:00:00.000000000 Z
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.4
131
+ rubygems_version: 3.0.3
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Provides abstractions to handle HTTP protocols.