zabbixapi 0.5.2b → 0.5.2b2

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,20 +47,18 @@ class ZabbixApi
47
47
  data[:expression] = data[:expression].gsub(/{.*\:/,"{") #TODO ugly regexp
48
48
  data.delete(:templateid)
49
49
 
50
- log "[DEBUG] expression: #{expression}\n data: #{data[:expression]}"
50
+ log "[DEBUG] expression: #{dump[:expression]}\n data: #{data[:expression]}"
51
51
 
52
52
  if hash_equals?(dump, data)
53
53
  log "[DEBUG] Equal keys #{dump} and #{data}, skip update"
54
54
  item_id
55
55
  else
56
56
  data[:expression] = old_expression
57
- data_update = array_flag ? [data] : data
58
- data_update.delete(:triggerid)
59
57
  # disable old trigger
60
58
  log "[DEBUG] disable :" + @client.api_request(:method => "#{method_name}.update", :params => [{:triggerid=> data[:triggerid], :status => "1" }]).inspect
61
59
  # create new trigger
62
- result = @client.api_request(:method => "#{method_name}.update", :params => data_update)
63
- parse_keys result
60
+ data.delete(:triggerid)
61
+ create(data)
64
62
  end
65
63
 
66
64
  end
@@ -1,3 +1,3 @@
1
1
  class ZabbixApi
2
- VERSION = "0.5.2b"
2
+ VERSION = "0.5.2b2"
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: 0.5.2b
4
+ version: 0.5.2b2
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  segments:
81
81
  - 0
82
- hash: -1246375744194541697
82
+ hash: 3153601881555273577
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements: