zabbix-client 0.0.8 → 0.0.9

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: 97e009a0f9bd9e5a5e4d1c9ed23071ea7034ea54
4
- data.tar.gz: 855a219210659c86973708d77f8b7f62620b5a20
3
+ metadata.gz: 58e29e20ecf90e9441dd7c1d121de6a7a95e1ba1
4
+ data.tar.gz: f40d263ae3eca5d00bfade182dbc248673340dce
5
5
  SHA512:
6
- metadata.gz: 72a255c5b90ea8339bb4687e501c66cf8cdbc6647728916b21dd34d9facf8de95815813ff348062a090d38ecd5498628929494364ce8dac0a049b8932d3f9966
7
- data.tar.gz: 47c2eaa1d52cad22a4898531733d245a39946fc408937aeb8df3d1e098ec840b9928d89edb07e3b446f9604e80a6247d696be42cd261ee06c3e81d552169e538
6
+ metadata.gz: e7bea380ed3cbee8f9c89344e3f47684ec7e9d610fa4cf97eaa9232521c6a131d9341c77c5b671811fd68ef7cd97d9da5ee5cf30774be01fcbdc42041ae2bb1c
7
+ data.tar.gz: c834b14e225e2f9a8db252b0282917bce8667e40b209977e9795e8b6348f7b88750eaa9dc9b1047c70d52173184a66e801fd655298391512eb8d6d1598e880b5
@@ -92,7 +92,14 @@ class Zabbix::Client
92
92
  end
93
93
 
94
94
  response = h.request(request)
95
- JSON.parse(response.body)
95
+
96
+ begin
97
+ JSON.parse(response.body)
98
+ rescue JSON::ParserError
99
+ response.value
100
+ # Throw the following exception if no exception is thrown
101
+ raise response.code + ' ' + response.message.dump
102
+ end
96
103
  end
97
104
  end
98
105
 
@@ -1,5 +1,5 @@
1
1
  module Zabbix
2
2
  class Client
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-31 00:00:00.000000000 Z
11
+ date: 2014-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.4.1
78
+ rubygems_version: 2.0.14
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: This is a simple client of Zabbix API.