pusher-platform 0.1.1 → 0.2.0

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: cb169e12b4e0f1f526790f8b67594f4383d0ebdf
4
- data.tar.gz: d032e28d45af802b0b622736ecc449122cad0ce7
3
+ metadata.gz: 32291000abdb919cc500b2056087a82cbfaa89ff
4
+ data.tar.gz: 4af86b24dd738937da180c700de4f9fa9c6b57b7
5
5
  SHA512:
6
- metadata.gz: a009f69e87c22cbbd489459bc5c9f57b66a473c2d4689641c2c13de2fef57c552eb590a2d700ff7672fcaf6ea011f45eaa62f640d441579898582e78e4eb9e62
7
- data.tar.gz: 3187448e10569e991806a306289149d16d4848cd660821c9b16d6446f51808303814fccde780237710f3a59d6c6dfc4590d9cce92cf902404b43de957b3c7743
6
+ metadata.gz: 8c29aac90982c3b4e4785df785a7a96a50749bfee6d74358ab487b18349afc0d9dd776e6913638fd4db396ee56a77a987cbbf6bd7becf548872ee817ea21d3ff
7
+ data.tar.gz: ff4514658c6d3adbb70b02e260857c8468423cb97def7d7b6bb5797e61cef7e7ebd6a4ee795ed173a25cc5b7a01049eb1443a3773c5d23b15eba436680e51cb7
@@ -34,12 +34,12 @@ module Pusher
34
34
  elsif response.status >= 300 && response.status <= 399
35
35
  raise "unsupported redirect response: #{response.status}"
36
36
  elsif response.status >= 400 && response.status <= 599
37
- error_body = begin
37
+ error_description = begin
38
38
  JSON.parse(response.body)
39
39
  rescue
40
40
  response.body
41
41
  end
42
- raise ErrorResponse.new(response.status, response.headers, error_body)
42
+ raise ErrorResponse.new(response.status, response.headers, error_description)
43
43
  else
44
44
  raise "unsupported response code: #{response.status}"
45
45
  end
@@ -1,15 +1,15 @@
1
1
  module Pusher
2
2
  class ErrorResponse < Error
3
- attr_accessor :status, :headers, :body
3
+ attr_accessor :status, :headers, :description
4
4
 
5
- def initialize(status, headers, body)
5
+ def initialize(status, headers, description)
6
6
  @status = status
7
7
  @headers = headers
8
- @body = body
8
+ @description = description
9
9
  end
10
10
 
11
11
  def to_s
12
- "Pusher::ErrorResponse: #{status} #{body}"
12
+ "Pusher::ErrorResponse: #{status} #{description}"
13
13
  end
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pusher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon