haveapi-client 0.13.2 → 0.13.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9d415ea5340264305787c329a3f8bff4f8e90da4fc2d3b9a187c340131438c9
|
|
4
|
+
data.tar.gz: 678d54f49e930d20c9b033a4a2725bd7bda8a0f6efb5edd5d177b8ffdb0424c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c77561672d6b40484361db5a46e7dacd21be5afa6c9c1609194c3d9e38f3ee0a3547aabb2b0e11ba7db1d3384f89e347df52bcc8ab14901fd941737dd00c570a
|
|
7
|
+
data.tar.gz: a6314cae9ee7f0a63a0f164f3033b071c303fd57545361525f3860d5d0444963a14ed303aa8421535256ec88c7391ead84ac7fae2b835e5136b046465db2763b
|
|
@@ -112,12 +112,8 @@ module HaveAPI::Client::Authentication
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def check_validity
|
|
115
|
-
if @valid_to && @valid_to < Time.now
|
|
116
|
-
|
|
117
|
-
request_token
|
|
118
|
-
else
|
|
119
|
-
raise AuthenticationFailed.new('token expired')
|
|
120
|
-
end
|
|
115
|
+
if @valid_to && @valid_to < Time.now && @opts[:user] && @opts[:password]
|
|
116
|
+
request_token
|
|
121
117
|
end
|
|
122
118
|
end
|
|
123
119
|
|
|
@@ -153,6 +153,9 @@ module HaveAPI::Client
|
|
|
153
153
|
rescue RestClient::ResourceNotFound => e
|
|
154
154
|
response = parse(e.http_body)
|
|
155
155
|
|
|
156
|
+
rescue RestClient::BadRequest => e
|
|
157
|
+
response = parse(e.http_body)
|
|
158
|
+
|
|
156
159
|
rescue => e
|
|
157
160
|
return error("Fatal API error: #{e.inspect}")
|
|
158
161
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haveapi-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jakub Skokan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 1970-01-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -198,8 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
198
198
|
- !ruby/object:Gem::Version
|
|
199
199
|
version: '0'
|
|
200
200
|
requirements: []
|
|
201
|
-
|
|
202
|
-
rubygems_version: 2.7.6.2
|
|
201
|
+
rubygems_version: 3.0.6
|
|
203
202
|
signing_key:
|
|
204
203
|
specification_version: 4
|
|
205
204
|
summary: Ruby API and CLI for HaveAPI
|