my_tank_info 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/my_tank_info/resource.rb +3 -1
- data/lib/my_tank_info/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2d621c7a8a14148aacb4a0d76c5f5c0726ebe6858afc075144d375a0eae4c8c
|
4
|
+
data.tar.gz: fe65e36eb25268e2dc87a2c565a33a88442f1934d1a47e0d068f332221cbbef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9aa100a21c9dd859b23377e033a712e810103967fd6a620e7602a6a2fde99ccffa6524bb094bdaaa270aa6d05975d6f199f1bf496b06e3028c2ab14bf739f71
|
7
|
+
data.tar.gz: ca4e444c8d55fac4a35e7c74da75ef5f539c667098a33f0fb840ec43043efd1f18fe88d88ad03054ccc5b155f8170a325c9908cefec4f9d6ab7daef4b9287271
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## [1.1.0] - 2021-09-23
|
2
|
+
- Added a specific error class ``MyTankInfo::UnauthorizedError`` so that it's easier to identify and react to scenarios when your api_key is wrong or has expired
|
3
|
+
|
1
4
|
## [1.0.2] - 2021-09-21
|
2
5
|
- Add convenience methods for accessing UOM on TankReconciliationRecordCollection
|
3
6
|
- Fix bug that prevented tank reconciliation records from being updated
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -36,7 +36,7 @@ Once the token is generated it should be stored for use on all subsequent API re
|
|
36
36
|
Practically speaking you'll need to store the username/password for then account you'd like to access
|
37
37
|
so that you can periodically generate a new API token prior to expiration.
|
38
38
|
|
39
|
-
Alternatively you can have your code catch
|
39
|
+
Alternatively you can have your code catch ``MyTankInfo::UnauthorizedError`` errors and use that as a sign that a new API token is needed.
|
40
40
|
|
41
41
|
This is also the only call you can perform without providing an :api_key to the client
|
42
42
|
|
@@ -52,7 +52,7 @@ module MyTankInfo
|
|
52
52
|
when 400
|
53
53
|
raise Error, "Your request was malformed - #{message}"
|
54
54
|
when 401
|
55
|
-
raise
|
55
|
+
raise UnauthorizedError, "You did not supply valid authentication credentials - #{message}"
|
56
56
|
when 403
|
57
57
|
raise RequestForbiddenError, "You are not allowed to perform that action - #{message}"
|
58
58
|
when 404
|
@@ -67,6 +67,8 @@ module MyTankInfo
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
class UnauthorizedError < Error; end
|
71
|
+
|
70
72
|
class MissingRequiredAttributeError < Error; end
|
71
73
|
|
72
74
|
class RequestForbiddenError < Error; end
|
data/lib/my_tank_info/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_tank_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Keesling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|