passworks 2.0.3 → 2.0.4

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
  SHA1:
3
- metadata.gz: 4d7e2ee6c6e59b1cf631ac126267597f58b56cf2
4
- data.tar.gz: e2630db18d08ea6abbb0c24a303f52b601bf404a
3
+ metadata.gz: 6c9a52ef135e6248e310aefc0bd5399dfc6c04ca
4
+ data.tar.gz: 4b0d51ebaf8970a37bd46872d48a923df9b7ef85
5
5
  SHA512:
6
- metadata.gz: a1db6971e9502f7197a81f6ab04aabbd71e82a0fa6fe79fc1b897d21e0ceb15592b2290f571704e5bbf8c6de4493b4b0bc9bf230e6cf2bbefeec37301b69940e
7
- data.tar.gz: 8e0c103e7bc590ef274ef4b0b2c56c653e98a74f2fb13e0caff38b9074c303b1fb2b3d009b86b8154f96ef074bf49cdfe93d9c0af7483e644c7e3c50f24d307b
6
+ metadata.gz: 5eef19d266c8fef98cc21a428570299d7ff0ad338b745700af674310a18fe7947cb76b371efacc5c514cdbbad33282e5c7f3b1ca16f5efe423ec057114de1d20
7
+ data.tar.gz: 356221a9d0fdf678813003b65b3ef1e745f6efdcba7b18096f81ca663c2b05713121cf0eb3ad211fa1ef16950efbf26327a9981c82cbc41dac43d04394550ea9
@@ -3,6 +3,9 @@
3
3
  This file is a manually maintained list of changes for each release. Feel free to add your
4
4
  changes here when sending pull requests. Also send corrections if you spot any mistakes.
5
5
 
6
+ ## v2.0.4 (2015-12-18)
7
+ * Better exception and error handling
8
+
6
9
  ## v2.0.3 (2015-12-09)
7
10
  * Added campaign resource's merge call, for propagating campaign pass data changes
8
11
  to all of it's passes.
@@ -47,7 +47,7 @@ module Passworks
47
47
 
48
48
  private
49
49
  def error_400(response)
50
- "#{response[:method].to_s.upcase} #{response[:url].to_s}: #{response[:status]} - #{error_body(response)}"
50
+ "#{response[:method].to_s.upcase} #{response[:url].to_s}: #{response[:status]}\n#{error_body(response)}"
51
51
  end
52
52
 
53
53
  def error_500(response, short_description, long_description)
@@ -63,8 +63,8 @@ module Passworks
63
63
 
64
64
  if body.nil?
65
65
  nil
66
- elsif body['message']
67
- "(#{body['error_code']}) #{body['message']}"
66
+ elsif body['errors']
67
+ body['errors'].collect{ |k,v| "#{k}: #{v.join(',')}" }.join("\n")
68
68
  end
69
69
  end
70
70
 
@@ -1,3 +1,3 @@
1
1
  module Passworks
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Mendes
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-10 00:00:00.000000000 Z
13
+ date: 2015-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday