From 0830a6fd9e8c69ea9bd995c9c8aa61b845a8652a Mon Sep 17 00:00:00 2001 From: Mike Dorman Date: Fri, 8 Aug 2014 11:25:40 -0600 Subject: [PATCH] several fixes for things that were botched on #200 --- lib/puppet/provider/sensu_check/json.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/puppet/provider/sensu_check/json.rb b/lib/puppet/provider/sensu_check/json.rb index 185f023f56..b237efdb92 100644 --- a/lib/puppet/provider/sensu_check/json.rb +++ b/lib/puppet/provider/sensu_check/json.rb @@ -40,7 +40,7 @@ def create # Optional arguments self.handlers = resource[:handlers] unless resource[:handlers].nil? self.occurrences = resource[:occurrences] unless resource[:occurrences].nil? - self.refresh = resource[:interval] unless resource[:interval].nil? + self.refresh = resource[:refresh] unless resource[:interval].nil? self.subscribers = resource[:subscribers] unless resource[:subscribers].nil? self.type = resource[:type] unless resource[:type].nil? self.standalone = resource[:standalone] unless resource[:standalone].nil? @@ -94,19 +94,19 @@ def handlers=(value) conf['checks'][resource[:name]]['handlers'] = value end def occurrences - conf['checks'][resource[:name]]['occurrences'] + conf['checks'][resource[:name]]['occurrences'].to_s end def occurrences=(value) - conf['checks'][resource[:name]]['occurrences'] = value + conf['checks'][resource[:name]]['occurrences'] = value.to_i end def refresh - conf['checks'][resource[:name]]['refresh'] + conf['checks'][resource[:name]]['refresh'].to_s end def refresh=(value) - conf['checks'][resource[:name]]['refresh'] = value + conf['checks'][resource[:name]]['refresh'] = value.to_i end def command