zabbixapi 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d821fad6072067f4fcfb5a664165e19624b661f
4
- data.tar.gz: 1f1a9adde080dbabc46a9333cd88bdf0d7328944
3
+ metadata.gz: 2734200ca0b6c573e6830ef2123d7ab8efb07095
4
+ data.tar.gz: 55c0ba98d8d8465c97006ac5718246f25293c3ce
5
5
  SHA512:
6
- metadata.gz: c451bf0f57555ddda1827d8b73851614b7b04a2cd657788f30b7919a2d571ca468c9f90ff48922d316a9d7c7678e78c6888fbc5a492445568bc8eca3f848fb6f
7
- data.tar.gz: 658565fe62621c59b5ed9d742b36cb71c1f11f8306c97f9715e2e4957e21a840587d5d0d81dbb4ea6cda4d1fef2cf7525672e8b1602b8073b23be720d93aa8bc
6
+ metadata.gz: 5b95307bb8ebee4a7625f4085fbc6c8db28dc7d84080ff0ab7d3448219c5914fd87e99ca413fe692fd7b272c22f6c81d63ec29b1f2dd580485a49e5f5703793c
7
+ data.tar.gz: 213f659237904eec7adff7c01f6b55e6cd5a88f1ad7937606789ebaf967b800941bd3b926d241223837d455cba659686c19e486b590fe918ce95068a493027d2
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ language:
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - 2.1.1
6
+ - 2.1
7
7
  before_script:
8
8
  - wget -qO - http://obs.express42.com/project_root:/zabbix2.4/precise/Release.key | sudo apt-key add -
9
9
  - echo "deb http://obs.express42.com/project_root:/zabbix2.4/precise/ ./" | sudo tee /etc/apt/sources.list.d/zabbix.list
data/README.md CHANGED
@@ -28,7 +28,7 @@ We support only three last versions of zabbix (2.0, 2.2 and 2.4), so you should
28
28
 
29
29
  ## Installation
30
30
  ```
31
- gem install zabbixapi -v 2.4.0
31
+ gem install zabbixapi -v 2.4.1
32
32
  ```
33
33
 
34
34
  ## Getting Started
@@ -25,9 +25,5 @@ class ZabbixApi
25
25
  raise "Can't call indentify here"
26
26
  end
27
27
 
28
- def array_flag
29
- false
30
- end
31
-
32
28
  end
33
29
  end
@@ -5,7 +5,7 @@ class ZabbixApi
5
5
  log "[DEBUG] Call create with parametrs: #{data.inspect}"
6
6
 
7
7
  data_with_default = default_options.empty? ? data : merge_params(default_options, data)
8
- data_create = array_flag ? [data_with_default] : data_with_default
8
+ data_create = [data_with_default]
9
9
  result = @client.api_request(:method => "#{method_name}.create", :params => data_create)
10
10
  parse_keys result
11
11
  end
@@ -13,7 +13,7 @@ class ZabbixApi
13
13
  def delete(data)
14
14
  log "[DEBUG] Call delete with parametrs: #{data.inspect}"
15
15
 
16
- data_delete = array_flag ? [data] : [key.to_sym => data]
16
+ data_delete = [data]
17
17
  result = @client.api_request(:method => "#{method_name}.delete", :params => data_delete)
18
18
  parse_keys result
19
19
  end
@@ -38,7 +38,7 @@ class ZabbixApi
38
38
  log "[DEBUG] Equal keys #{dump} and #{data}, skip update"
39
39
  item_id
40
40
  else
41
- data_update = array_flag ? [data] : data
41
+ data_update = [data]
42
42
  result = @client.api_request(:method => "#{method_name}.update", :params => data_update)
43
43
  parse_keys result
44
44
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Graphs < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "graph"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class HostGroups < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "hostgroup"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Hosts < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "host"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Items < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "item"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Mediatypes < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "mediatype"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Proxies < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "proxy"
10
6
  end
@@ -40,8 +40,8 @@ class ZabbixApi
40
40
  hsize = data[:hsize] || 3
41
41
  valign = data[:valign] || 2
42
42
  halign = data[:halign] || 2
43
- rowspan = data[:rowspan] || 0
44
- colspan = data[:colspan] || 0
43
+ rowspan = data[:rowspan] || 1
44
+ colspan = data[:colspan] || 1
45
45
  height = data[:height] || 320 # default 320
46
46
  width = data[:width] || 200 # default 200
47
47
  vsize = data[:vsize] || [1, (graphids.size/hsize).to_i].max
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Templates < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "template"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Triggers < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "trigger"
10
6
  end
@@ -1,10 +1,6 @@
1
1
  class ZabbixApi
2
2
  class Usergroups < Basic
3
3
 
4
- def array_flag
5
- true
6
- end
7
-
8
4
  def method_name
9
5
  "usergroup"
10
6
  end
@@ -1,9 +1,5 @@
1
1
  class ZabbixApi
2
2
  class Usermacros < Basic
3
- def array_flag
4
- true
5
- end
6
-
7
3
  def indentify
8
4
  "macro"
9
5
  end
@@ -1,3 +1,3 @@
1
1
  class ZabbixApi
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
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: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev D.V.