Skip to content

Commit

Permalink
Merge pull request #94 from ericfode/fix-events
Browse files Browse the repository at this point in the history
made a mistake in formatting the json file for the watches
  • Loading branch information
reset committed Nov 25, 2014
2 parents 5a4e1a4 + 8e0f7e6 commit d9df9d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions resources/event_watch_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ def to_json

def to_hash
hash = {
type: "event"
watches:[
{
type: 'event',
name: name,
handler: handler
}
]
}
hash[:name] = name
hash[:handler] = handler unless handler.nil?
hash
end
10 changes: 7 additions & 3 deletions resources/key_watch_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ def to_json

def to_hash
hash = {
type: "key"
watches:[
{
type: 'key',
key: key,
handler: handler
}
]
}
hash[:key] = key
hash[:handler] = handler
hash
end

0 comments on commit d9df9d8

Please sign in to comment.