zabbixapi 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,8 +32,8 @@ module Zabbix
32
32
 
33
33
  @debug = false # Disable debug by default
34
34
  @basic_auth = false #Disable basic_auth by default
35
-
36
- if ENV['http_proxy'].nil?
35
+
36
+ unless ENV['http_proxy'].nil?
37
37
  @proxy_uri = URI.parse(ENV['http_proxy'])
38
38
  @proxy_host = proxy_uri.host
39
39
  @proxy_port = proxy_uri.port
@@ -55,7 +55,7 @@ module Zabbix
55
55
  if @proxy_uri.nil?
56
56
  http = Net::HTTP.new(uri.host, uri.port)
57
57
  else
58
- http = Net::HTTP.new(uri.host, uri.port, @proxy_host, @proxy_port, @proxy_user, @proxy_pass)
58
+ http = Net::HTTP.Proxy(@proxy_host, @proxy_port, @proxy_user, @proxy_pass).new(uri.host, uri.port)
59
59
  end
60
60
 
61
61
  if uri.scheme == "https"
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.1.8'
7
+ spec.version = '0.1.9'
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.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: