Skip to content
Browse files

Remove file:// prefix from image path for GNTP

ruby_gtnp supports embedding image data directly in the notification
allowing remote notifications to display an image.

In practice, this change has been tested with Growl for Windows
receiving the notification and it behaves as expected, i.e. the image
appears in the notification.

This also likely resolves issue #231, as that involves Growl (for OSX)
refusing to download the images.
  • Loading branch information...
1 parent 815ca3d commit 2119448fa77d9dce07c487441efb0e747e1c5940 @jgrocho committed Jul 15, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/guard/notifiers/gntp.rb
  2. +3 −3 spec/guard/notifiers/gntp_spec.rb
View
2 lib/guard/notifiers/gntp.rb
@@ -104,7 +104,7 @@ def notify(type, title, message, image, options = { })
:name => type,
:title => title,
:text => message,
- :icon => "file://#{ image }"
+ :icon => image
}))
end
View
6 spec/guard/notifiers/gntp_spec.rb
@@ -87,7 +87,7 @@ def self.notify(options) end
:name => 'success',
:title => 'Welcome',
:text => 'Welcome to Guard',
- :icon => 'file:///tmp/welcome.png'
+ :icon => '/tmp/welcome.png'
})
subject.notify('success', 'Welcome', 'Welcome to Guard', '/tmp/welcome.png', { })
end
@@ -100,7 +100,7 @@ def self.notify(options) end
:name => 'pending',
:title => 'Waiting',
:text => 'Waiting for something',
- :icon => 'file:///tmp/wait.png'
+ :icon => '/tmp/wait.png'
})
subject.notify('pending', 'Waiting', 'Waiting for something', '/tmp/wait.png', {
:sticky => true,
@@ -113,7 +113,7 @@ def self.notify(options) end
:name => 'failed',
:title => 'Failed',
:text => 'Something failed',
- :icon => 'file:///tmp/fail.png'
+ :icon => '/tmp/fail.png'
})
subject.notify('failed', 'Failed', 'Something failed', '/tmp/fail.png', {
:name => 'custom',

0 comments on commit 2119448

Please sign in to comment.
Something went wrong with that request. Please try again.