httpsensible 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/httpsensible/client/response.rb +1 -1
- data/lib/httpsensible/client.rb +12 -0
- data/lib/httpsensible/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43e4e734cb0dd2e3f35946764a2f7d8fccd462ad58f75a94abf8f38996e82c90
|
|
4
|
+
data.tar.gz: 704cf714dc7cb7c6d1da85fd278e012c223319b71518c3afda48f6490944aae0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b3bbb009276d320331a875d23fdfdf250f4550f8daac0697b154c5e3b89dd5f5cadf0eae548792fbd0c4eed776dbe28d36698652b1c85d35a80981f6cba92ea
|
|
7
|
+
data.tar.gz: fea550fc6f43b98c9d67ae1686da64aff5aac155bde484bbdb2d8fb1d083d399d6ab1395c548301e06b4609a63e768ea1a8496788eeb6839924fca03a45f1592
|
data/CHANGELOG.md
CHANGED
|
@@ -36,7 +36,7 @@ module Httpsensible
|
|
|
36
36
|
# sig { params(response: T.any(HTTPX::Response, HTTPX::ErrorResponse)).returns(T::Boolean) }
|
|
37
37
|
def unavailable?
|
|
38
38
|
return true if @response.nil?
|
|
39
|
-
return
|
|
39
|
+
return true unless (200..299).cover?(response.status)
|
|
40
40
|
|
|
41
41
|
case @response
|
|
42
42
|
when HTTPX::Response
|
data/lib/httpsensible/client.rb
CHANGED
|
@@ -23,6 +23,18 @@ module Httpsensible
|
|
|
23
23
|
.with_headers(headers)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
# TODO: test this
|
|
27
|
+
def with_plugin(plugin)
|
|
28
|
+
@client = @client.plugin(plugin)
|
|
29
|
+
self
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# TODO: test this
|
|
33
|
+
def with_authentication(authentication)
|
|
34
|
+
@client = @client.authentication(authentication)
|
|
35
|
+
self
|
|
36
|
+
end
|
|
37
|
+
|
|
26
38
|
def with_headers(headers)
|
|
27
39
|
@client = @client.with(headers: headers)
|
|
28
40
|
self
|
data/lib/httpsensible/version.rb
CHANGED