nimbox_ruby 0.3.0 → 0.3.1

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: ebb942aead342f307f29686fee9177a478124bd4
4
- data.tar.gz: 48eddfa7b134041bc1101767607a0bb4f96e4b88
3
+ metadata.gz: b44c883998517f1d6b563ff7b69168c8c325a994
4
+ data.tar.gz: 933ab78ee141b794f56bf8a61d1bead030f3a1d8
5
5
  SHA512:
6
- metadata.gz: 8d15a74ec4a38dc74542dcd0be34012cc4dba0bf2ae8b6e8129b304d9e3b8932cf0536ca5a6747c55a17753edd489d69185824bd0cc3a378f6a41588f9b67d67
7
- data.tar.gz: 1e1a954b09c143806236df18e2328f4bb03d7cfc22e5e298a7ec92f4a09233eda62e1ed5364701fe36b53fe200213357e2e8a78d513380849311ffcb3f4e30b4
6
+ metadata.gz: c21e1a8e1fc23326b13f6f34a1fce511be243b097a17291bcada4fa19aba944b5d49245b5c8ef5b606332f85f6ed3d6b00d4ed70db290f12c9087c1335d1bde8
7
+ data.tar.gz: 6b0268bae4e9477960571ca19d307616a2a11863eb472eed233e296d6666f8e21a97a6876fd7a9aa7bc5aab0c46bca2ece5bfee1ed6a83d6e276b33668d99b7c
@@ -1,5 +1,6 @@
1
1
  require 'rapidash'
2
2
  require_relative 'nimbox/version'
3
+ require_relative 'nimbox/response_error'
3
4
  require_relative 'nimbox/resources/people'
4
5
  require_relative 'nimbox/resources/consultations'
5
6
  require_relative 'nimbox/resources/diagnostics'
@@ -23,3 +23,4 @@ module Nimbox
23
23
  end
24
24
  end
25
25
  end
26
+ Rapidash.response_exception_class = Nimbox::ResponseError
@@ -0,0 +1,9 @@
1
+ module Nimbox
2
+ class ResponseError < Rapidash::ResponseError
3
+ def errors
4
+ return body if body.kind_of?(String)
5
+
6
+ body['errors'].to_a.map { |key, val| "#{key} #{val[0]}" }.join(', ')
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Nimbox
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbox_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amed Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-18 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,6 +130,7 @@ files:
130
130
  - lib/nimbox/resources/consultations.rb
131
131
  - lib/nimbox/resources/diagnostics.rb
132
132
  - lib/nimbox/resources/people.rb
133
+ - lib/nimbox/response_error.rb
133
134
  - lib/nimbox/version.rb
134
135
  - nimbox_ruby.gemspec
135
136
  homepage: https://github.com/amedrz/nimbox_ruby