ordrin 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. data/lib/ordrin/api_helper.rb +2 -8
  2. metadata +2 -2
@@ -50,16 +50,10 @@ module Ordrin
50
50
  end
51
51
  res = http.start {|http| http.request(req)}
52
52
  #error if not OK response
53
- res.value
54
53
  result = JSON.parse(res.body)
55
54
  if result.is_a? Hash
56
- if result.has_key?('_error') and result['_error']!=0
57
- if result.has_key?('text')
58
- raise result['msg']
59
- else
60
- raise ({msg: result["msg"], text: result["text"]})
61
- end
62
- result
55
+ if (result.has_key?('_error') and result['_error']!=0) or (result.has_key?('_err') and result['_err']!=0)
56
+ raise res.body
63
57
  end
64
58
  end
65
59
  result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ordrin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-13 00:00:00.000000000 Z
12
+ date: 2014-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json-schema