zabbixapi 0.1.5a3 → 0.1.5a4

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,8 +41,14 @@ module Zabbix
41
41
 
42
42
  unless ( response.empty? ) then
43
43
  result = []
44
- response.each_key() do |template_id|
45
- result << template_id
44
+ if response.kind_of? Hash
45
+ response.each_key() do |template_id|
46
+ result << template_id
47
+ end
48
+ elsif response.kind_of? Array
49
+ response.each do |template_info|
50
+ result << template_info['templateid']
51
+ end
46
52
  end
47
53
  else
48
54
  result = nil
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.5a3'
7
+ spec.version = '0.1.5a4'
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.5a3
4
+ version: 0.1.5a4
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors: