http2 0.0.33 → 0.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http2.rb +0 -1
- data/lib/http2/response.rb +1 -1
- data/spec/http2/response_spec.rb +24 -4
- data/spec/spec_helper.rb +1 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c71528bc092c75bb6c6ec82ec5dc2dd8ca73bc7836ca235a8f66f7a8be26bd
|
4
|
+
data.tar.gz: 8eb7666d2020f5a38ae91c45d38f11cf772f136cb8a30c17c104d96743a6d967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9411f817d1409689d895e01a6bb8cc22fe07f04c4e1b3ce03649ef23680da7dbc52fe3427c13171106453f3b08dc3e9f84cab938c1154bca0611e720d41e7c6e
|
7
|
+
data.tar.gz: b1214c3a8936c7fb605b731ed0b638a4aad0185890c3b58f4d083ac8ec950d3fe565e0bc863a29b3888d4e7762ed2b2e14237e5d2a51f2ba424fa50faa2cecdb
|
data/lib/http2.rb
CHANGED
data/lib/http2/response.rb
CHANGED
data/spec/http2/response_spec.rb
CHANGED
@@ -15,10 +15,30 @@ describe Http2::Response do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
describe "#json?" do
|
19
|
+
it "returns true for 'application/json'" do
|
20
|
+
with_http do |http|
|
21
|
+
res = http.get("json_test.rhtml")
|
22
|
+
|
23
|
+
expect(res).to receive(:content_type).and_return("application/json")
|
24
|
+
expect(res.json?).to eq true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it "returns true for 'application/json'" do
|
29
|
+
with_http do |http|
|
30
|
+
res = http.get("json_test.rhtml")
|
31
|
+
expect(res.json?).to eq true
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns true for 'application/json'" do
|
36
|
+
with_http do |http|
|
37
|
+
res = http.post(url: "json_test.rhtml", post: {test: "test2"})
|
38
|
+
|
39
|
+
expect(res).to receive(:content_type).and_return("application/json; charset=utf-8")
|
40
|
+
expect(res.json?).to eq true
|
41
|
+
end
|
22
42
|
end
|
23
43
|
end
|
24
44
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: string-cases
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: hayabusa
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,7 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
212
|
- !ruby/object:Gem::Version
|
199
213
|
version: '0'
|
200
214
|
requirements: []
|
201
|
-
|
215
|
+
rubyforge_project:
|
216
|
+
rubygems_version: 2.7.9
|
202
217
|
signing_key:
|
203
218
|
specification_version: 4
|
204
219
|
summary: A lightweight framework for doing http-connections in Ruby. Supports cookies,
|