Skip to content

Commit

Permalink
several fixes for things that were botched on #200
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Dorman committed Aug 8, 2014
1 parent 26662df commit 0830a6f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/puppet/provider/sensu_check/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0830a6f

Please sign in to comment.