zabbixapi 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/zabbixapi/base.rb +10 -5
  2. data/zabbixapi.gemspec +1 -1
  3. metadata +1 -1
@@ -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
- return response_body_hash['result']
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
@@ -4,7 +4,7 @@ require 'rake'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
 
7
- spec.version = '0.2.0'
7
+ spec.version = '0.3.0'
8
8
  spec.name = 'zabbixapi'
9
9
  spec.summary = 'Ruby module for work with zabbix api.'
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbixapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: