zabbixapi 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zabbixapi/base.rb +10 -5
- data/zabbixapi.gemspec +1 -1
- metadata +1 -1
data/lib/zabbixapi/base.rb
CHANGED
@@ -34,12 +34,12 @@ module Zabbix
|
|
34
34
|
@basic_auth = false #Disable basic_auth by default
|
35
35
|
|
36
36
|
@proxy_uri = nil
|
37
|
-
|
37
|
+
|
38
38
|
unless ENV['http_proxy'].nil?
|
39
39
|
@proxy_uri = URI.parse(ENV['http_proxy'])
|
40
|
-
@proxy_host = proxy_uri.host
|
41
|
-
@proxy_port = proxy_uri.port
|
42
|
-
@proxy_user, @proxy_pass = proxy_uri.userinfo.split(/:/) if proxy_uri.userinfo
|
40
|
+
@proxy_host = @proxy_uri.host
|
41
|
+
@proxy_port = @proxy_uri.port
|
42
|
+
@proxy_user, @proxy_pass = @proxy_uri.userinfo.split(/:/) if @proxy_uri.userinfo
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -116,7 +116,12 @@ module Zabbix
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
|
119
|
+
if response_body_hash['result'].class == TrueClass || response_body_hash['result'].class == FalseClass
|
120
|
+
return ""
|
121
|
+
else
|
122
|
+
return response_body_hash['result']
|
123
|
+
end
|
124
|
+
|
120
125
|
end
|
121
126
|
|
122
127
|
def send_request(message)
|
data/zabbixapi.gemspec
CHANGED