zbxapi 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/zbxapi.rb +4 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2875a49d1ac86922d840ba86955f8f29e0ee6c20
4
- data.tar.gz: dd930c750c1fe6c3274623b73c425de79fda60f9
3
+ metadata.gz: 88ef5fabf6b47c81073ee97d551d2dd6f7b7a40f
4
+ data.tar.gz: 3633af6eae3cd25cf5aeca8b4aba490c39a6fb5c
5
5
  SHA512:
6
- metadata.gz: 72464276ff6455cdb961917c96aff7ea542b69f1125c24d8317c02fe6b1f372ee8bb4aa8af38b9680f6dbd693f1313cfe9e8ff1ce577cdb9f63d9c0a519c1952
7
- data.tar.gz: 99f7beb1db9f7103ba84c5d75b33dbeb1439939afe41479e4d22888e3df350cec5183ae773f3fc2e0eec78e947fd4fcc4cf2420860fb3f82f03a7620cd794b24
6
+ metadata.gz: dcf4b2b1306f21755a4504e12fc1fadeebfc4333a5affda34e7b8cfd48fee1e63a741d50826b74836f573346b28b0f53c752c8611c1907d37f6d257d39a953f2
7
+ data.tar.gz: eee2dbb07f1b22cb7063fd6a687514c66057c3a5bf411274e029d530fbe8afd5de18ce39029c186bea599817caac7c8a6634468cfcfae16f3341637e294190dc
data/zbxapi.rb CHANGED
@@ -125,7 +125,8 @@ class ZabbixAPI
125
125
  if options.has_key?:http_timeout
126
126
  @http_timeout=options[:http_timeout]
127
127
  else
128
- @http_timeout=true
128
+ #if not set, default http read_timeout=60
129
+ @http_timeout=nil
129
130
  end
130
131
 
131
132
  #Generate the list of sub objects dynamically, from all objects
@@ -377,6 +378,8 @@ class ZabbixAPI
377
378
  if !@verify_ssl
378
379
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @url.class==URI::HTTPS
379
380
  end
381
+ http.read_timeout=@http_timeout unless @http_timeout.nil?
382
+
380
383
  http
381
384
  end
382
385
 
@@ -431,12 +434,6 @@ class ZabbixAPI
431
434
  raise ZbxAPI_GeneralError.new("Unable to connect to #{@url.host}: \"#{e}\"", :retry=>false)
432
435
  end
433
436
  end
434
-
435
- def setup_connection
436
- @http=Net::HTTP.new(@url.host, @url.port)
437
- http.use_ssl=true if @url.class==URI::HTTPS
438
- http.timeout=@http_timeout
439
- end
440
437
  end
441
438
 
442
439
  #******************************************************************************
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zbxapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - A. Nelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-27 00:00:00.000000000 Z
11
+ date: 2014-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json