feathr 0.1.1 → 0.1.2

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: 2256a0d60c2d8d229f0f34bbffe656211d096dac
4
- data.tar.gz: a58974b968d528996f57bf3bd3a03ffe34b8fa40
3
+ metadata.gz: 3a40e8c88614604f39a284e2d31d39c4389dadad
4
+ data.tar.gz: 2ae3f8fd58a058eac3f1718de7af9c3f6f19ba29
5
5
  SHA512:
6
- metadata.gz: '09bd14ac0f3005322e9ff7ba273d3af840702fe587f9c5e14cafd74539a5801948c3ffb088fd912dc3b6497afd558c2859becb3bb5d266689eaef3ad3b6277e2'
7
- data.tar.gz: 183a471a56815525bbeb85c2f0d4c1fb6ebb4f2dc09e21f9a0eebecbdfac5315c3743ed7e0069606f3d7dad6c9625b052e7a54a79c40a40556e9de2b4b682a8f
6
+ metadata.gz: 5ae3776f59040b43181e84e2740731cef6c861750cb8083324d4a331a116f5fed59f1baa73591153a9d4d49e926b4abf83fff83cfe6b7c03b0890468e4affa3c
7
+ data.tar.gz: 874e2d667d39aff9b08b12453e374c12f20e2744b837a0755ea583dade67ed89086c46837c5f9987809d46acdac4cf83d58c681161c5a4194f033deb0a97f350
@@ -8,7 +8,7 @@ GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  awesome_print (1.7.0)
11
- diff-lcs (1.2.5)
11
+ diff-lcs (1.3)
12
12
  httparty (0.14.0)
13
13
  multi_xml (>= 0.5.2)
14
14
  multi_xml (0.6.0)
@@ -1,7 +1,7 @@
1
1
  module Feathr
2
2
  module Api
3
3
 
4
- class FeathrError
4
+ class FeathrError < StandardError
5
5
 
6
6
  attr_accessor :status, :errors
7
7
 
@@ -9,6 +9,16 @@ module Feathr
9
9
  @status, @errors = status, errors
10
10
  end
11
11
 
12
+ def to_s
13
+ if errors.is_a? Hash
14
+ errors.map{ |k, v| "#{ k }: #{ v }" }.join('; ')
15
+ elsif errors.is_a? Array
16
+ errors.join('; ')
17
+ else
18
+ errors.to_s
19
+ end
20
+ end
21
+
12
22
  end
13
23
 
14
24
  end
@@ -69,7 +69,9 @@ module Feathr
69
69
  elsif response.success?
70
70
  response.parsed_response
71
71
  else
72
- Feathr::Api::FeathrError.new(status: response.code, errors: response.parsed_response)
72
+ raise Feathr::Api::FeathrError.new(
73
+ status: response.code,
74
+ errors: response.parsed_response)
73
75
  end
74
76
  end
75
77
 
@@ -1,3 +1,3 @@
1
1
  module Feathr
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feathr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Herman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-19 00:00:00.000000000 Z
11
+ date: 2017-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty