essential 0.9.1 → 0.9.2

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
  SHA1:
3
- metadata.gz: 0294238d2f9124a97f0c5c0c32f36a38280fc357
4
- data.tar.gz: f26dba74bc362acf8f9cb59af12a6b7fb95ed560
3
+ metadata.gz: 295b7657588d2a1be35f1f74f663c11885979e5c
4
+ data.tar.gz: 3f61f6377dc13ca9ab38c30fe8ac8e3c633146cd
5
5
  SHA512:
6
- metadata.gz: 136ca9cff95bde947f462bd8c5a8f02a407868d1720c5cb47761cefb59e84ee19a889733ebb346d94dc4a8cd3c79d46071ca2c05f2923713bf1fa332e70995b0
7
- data.tar.gz: 3c8d1bf4e9424b0a2c89b36552f357ba9872a615e536339174d4a2917447f2f45b54f4499dd6cdfb02915571a57348ca96a9261cbd83b2ff37aff7187c3adc7c
6
+ metadata.gz: a7404fb9fb0d0a7ac1e97903264ba5e520a655e79fb1f90186dac7b6a265b314dddc47cc81fff7828509dc0bc00f222d5349edd88a067f5c2136966eae6f7b6a
7
+ data.tar.gz: 0e2008027043c94d50a4dd6d2d4dda51a28988f91c9a41837704fc086ca3d59df2f3d495a14ae871f72715215d9bd830a0f22039614ca635a5271242fdaf7422
@@ -2,7 +2,7 @@ module Essential
2
2
  class APIError < StandardError
3
3
  private_class_method :new
4
4
 
5
- attr_reader :http_status, :body
5
+ attr_reader :http_status, :body, :response
6
6
  attr_reader :type, :message, :code, :params
7
7
 
8
8
  def self.from_exception(e)
@@ -12,7 +12,8 @@ module Essential
12
12
  when RestClient::ExceptionWithResponse
13
13
  new(
14
14
  http_status: e.http_code,
15
- body: e.http_body
15
+ body: e.http_body,
16
+ response: e.response
16
17
  )
17
18
  when RestClient::Exception
18
19
  new(http_status: e.http_code)
@@ -22,8 +23,9 @@ module Essential
22
23
  end
23
24
  end
24
25
 
25
- def initialize(http_status: nil, body: nil)
26
+ def initialize(http_status: nil, body: nil, response: nil)
26
27
  @http_status = http_status
28
+ @response = response
27
29
 
28
30
  if body
29
31
  begin
@@ -1,3 +1,3 @@
1
1
  module Essential
2
- VERSION = '0.9.1'.freeze
2
+ VERSION = '0.9.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: essential
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Ribera