Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several fixes for things that were botched on #200 #217

Merged
merged 1 commit into from
Aug 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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