haveapi-client 0.13.2 → 0.13.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: f393b4bd598933fa86daf57b825b87c570ba476206a22495eddb3dfe5a560801
4
- data.tar.gz: 67e329583d2c9482522bee0d1a837a7d2ee39fc6e4a353cc625340e1c63fd10a
3
+ metadata.gz: e9d415ea5340264305787c329a3f8bff4f8e90da4fc2d3b9a187c340131438c9
4
+ data.tar.gz: 678d54f49e930d20c9b033a4a2725bd7bda8a0f6efb5edd5d177b8ffdb0424c0
5
5
  SHA512:
6
- metadata.gz: b454405a2afe95220f02977e1864ac179f135005055f3cdfac76b913f3c177aed0a7574bedc236d6e09ef1c174a3250b1e42d884d3c5e9f3f93b578f5f222835
7
- data.tar.gz: baf5e025143dac440e303ee0238d2d509d90f851222d54c7a94e1ce6f3a693119a0bf6f887f156c64c3fa273e75165a47a0278e0abc29f206e60697d566f526b
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
- if @opts[:user] && @opts[:password]
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
@@ -1,6 +1,6 @@
1
1
  module HaveAPI
2
2
  module Client
3
3
  PROTOCOL_VERSION = '2.0'
4
- VERSION = '0.13.2'
4
+ VERSION = '0.13.3'
5
5
  end
6
6
  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.2
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: 2019-06-14 00:00:00.000000000 Z
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
- rubyforge_project:
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