Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion groem.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|

s.files = `git ls-files -c`.split("\n")
s.platform = Gem::Platform::RUBY
s.require_path = 'lib'
s.require_path = '.'
s.rubyforge_project = ''
s.required_rubygems_version = '>= 1.3.6'

Expand Down
4 changes: 3 additions & 1 deletion lib/groem/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def initialize(resp)
self.notification_id = resp[1][GNTP_NOTIFICATION_ID_KEY]
self.context = resp[2][GNTP_NOTIFICATION_CALLBACK_CONTEXT_KEY]
self.context_type = resp[2][GNTP_NOTIFICATION_CALLBACK_CONTEXT_TYPE_KEY]
self.callback_result = resp[2][GNTP_NOTIFICATION_CALLBACK_RESULT_KEY]
# On Growl OSX, we get CLOSED/CLICKED instead of CLOSE/CLICK
callback_result_key = resp[2][GNTP_NOTIFICATION_CALLBACK_RESULT_KEY]
self.callback_result = growlify_action(callback_result_key)
self.method = if self.status.to_i == 0
if self.callback_result
GNTP_CALLBACK_RESPONSE
Expand Down
9 changes: 7 additions & 2 deletions spec/shared/dummy_server_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ module DummyServerHelper
DEFAULT_PORT = Groem::Dummy::Server::DEFAULT_PORT

def self.fork_server(opts = {})
fork {
sleep(1)

pid = fork {
puts '-------------- server process fork ------------------'
Groem::Dummy::Server.reset_canned_responses
if opts[:register]
Expand All @@ -21,11 +23,14 @@ def self.fork_server(opts = {})
Groem::Dummy::Server.listen
}
puts '-------------- server process exiting -----------'
}
}
sleep(1)
pid
end

def self.kill_server(pid)
Process.kill("INT", pid)
#sleep(1)
end

end