enveloop 0.1.5 → 0.1.6

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: 4de448ebf9699afceacb4f9bbe512de8743f4b65793850e991967b1724b52109
4
- data.tar.gz: f4b7c8e5418f394bf34ab7952c71dc48530ac9bd274de2b4e91c62af08c1f850
3
+ metadata.gz: 5a3906e5d57e00185b12ee7f3280bbbcf527520f99e0781d01d5d892b0b7237e
4
+ data.tar.gz: cd0b0620c7223c1039b2048c02956caf66804c36274b5da3fd034b981d5bcabd
5
5
  SHA512:
6
- metadata.gz: cd504a7f37f14c2a728d854c336ecd8b6ec7a8fca4190c259bbd67bb09de1ca57636b9c8c8a4913aa5a50871185110808c30de9216c99b4685b6821afd7a7e66
7
- data.tar.gz: 65a021f76297552af4e7edbb41f57b3334290c77812254a3fc7e0eeeaff53543f8ba55baa86161e8e1817cdfec43b18b707732ea42327791ff6bd051e6754113
6
+ metadata.gz: 02a7e12cb859a178afb988f01fe82f3f1b5301d9810c7bc42220b62e7ef32614a80e7cf60ffea5302cd3c42c52f36c7309a95c563ffcbe43ab2e7f34d2cd09c3
7
+ data.tar.gz: b6bfab95266eebaaf830839903411d4082ff19f18fdd28b83dcc66359d309311c11e589f8ecd63ff88a965a419ca7b09cc833211bc13eb943cd54c031cedc1f7
data/CHANGELOG.md CHANGED
@@ -26,3 +26,7 @@
26
26
  > ## Version 0.1.5
27
27
 
28
28
  * Use new `/messages` endpoint
29
+
30
+ > ## Version 0.1.6
31
+
32
+ * Raise ruby errors when an error is encountered in the API
@@ -27,6 +27,10 @@ module Enveloop
27
27
  req.body = data.to_json
28
28
  end
29
29
 
30
+ if response.status == 500
31
+ raise Enveloop::Error.new(JSON.parse(response.body)['error'])
32
+ end
33
+
30
34
  return MessageResponse.new(status: response.status, body: response.body)
31
35
  end
32
36
 
@@ -41,6 +45,10 @@ module Enveloop
41
45
 
42
46
  response = conn.get("/templates/#{template}")
43
47
 
48
+ if response.status == 500
49
+ raise Enveloop::Error.new(JSON.parse(response.body)['error'])
50
+ end
51
+
44
52
  return TemplateResponse.new(status: response.status, body: response.body)
45
53
  end
46
54
  end
@@ -1,3 +1,3 @@
1
1
  module Enveloop
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enveloop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Wyrosdick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-10 00:00:00.000000000 Z
11
+ date: 2023-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
- rubygems_version: 3.1.2
73
+ rubygems_version: 3.3.5
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Envelope API wrapper