zabbix-client 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/lib/zabbix/client/client.rb +8 -1
- data/lib/zabbix/client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58e29e20ecf90e9441dd7c1d121de6a7a95e1ba1
|
|
4
|
+
data.tar.gz: f40d263ae3eca5d00bfade182dbc248673340dce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7bea380ed3cbee8f9c89344e3f47684ec7e9d610fa4cf97eaa9232521c6a131d9341c77c5b671811fd68ef7cd97d9da5ee5cf30774be01fcbdc42041ae2bb1c
|
|
7
|
+
data.tar.gz: c834b14e225e2f9a8db252b0282917bce8667e40b209977e9795e8b6348f7b88750eaa9dc9b1047c70d52173184a66e801fd655298391512eb8d6d1598e880b5
|
data/lib/zabbix/client/client.rb
CHANGED
|
@@ -92,7 +92,14 @@ class Zabbix::Client
|
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
response = h.request(request)
|
|
95
|
-
|
|
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
|
|
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.
|
|
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-
|
|
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.
|
|
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.
|