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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/feathr/api/feathr_error.rb +11 -1
- data/lib/feathr/client.rb +3 -1
- data/lib/feathr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a40e8c88614604f39a284e2d31d39c4389dadad
|
4
|
+
data.tar.gz: 2ae3f8fd58a058eac3f1718de7af9c3f6f19ba29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae3776f59040b43181e84e2740731cef6c861750cb8083324d4a331a116f5fed59f1baa73591153a9d4d49e926b4abf83fff83cfe6b7c03b0890468e4affa3c
|
7
|
+
data.tar.gz: 874e2d667d39aff9b08b12453e374c12f20e2744b837a0755ea583dade67ed89086c46837c5f9987809d46acdac4cf83d58c681161c5a4194f033deb0a97f350
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/feathr/client.rb
CHANGED
@@ -69,7 +69,9 @@ module Feathr
|
|
69
69
|
elsif response.success?
|
70
70
|
response.parsed_response
|
71
71
|
else
|
72
|
-
Feathr::Api::FeathrError.new(
|
72
|
+
raise Feathr::Api::FeathrError.new(
|
73
|
+
status: response.code,
|
74
|
+
errors: response.parsed_response)
|
73
75
|
end
|
74
76
|
end
|
75
77
|
|
data/lib/feathr/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|