notifier 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ module Notifier
6
6
  autoload :Kdialog, "notifier/kdialog"
7
7
  autoload :NotifySend, "notifier/notify_send"
8
8
  autoload :Placebo, "notifier/placebo"
9
+ autoload :Version, "notifier/version"
9
10
 
10
11
  extend self
11
12
 
@@ -23,7 +24,7 @@ module Notifier
23
24
 
24
25
  def notifiers
25
26
  constants.collect do |name|
26
- const_get(name) unless name.to_s == "Placebo"
27
+ const_get(name) unless %w[Placebo Version].include?(name.to_s)
27
28
  end.compact + [Placebo]
28
29
  end
29
30
 
@@ -11,10 +11,16 @@ module Notifier
11
11
 
12
12
  def notify(options)
13
13
  register
14
+ command = %W[
15
+ growlnotify
16
+ --name=test_notifier
17
+ --image='#{options[:image]}'
18
+ --priority=2
19
+ --message='#{options[:message]}'
20
+ '#{options[:title]}'
21
+ ].join(" ")
14
22
 
15
- Thread.new do
16
- `growlnotify -n test_notifier --image #{options[:image]} -p 2 -m '#{options[:message]}' -t '#{options[:title]}'`
17
- end
23
+ Thread.new { `#{command}` }
18
24
  end
19
25
 
20
26
  def register
@@ -7,9 +7,13 @@ module Notifier
7
7
  end
8
8
 
9
9
  def notify(options)
10
- Thread.new do
11
- `kdialog --title #{options[:title]} --passivepopup \"#{options[:message]}\" 5`
12
- end
10
+ command = %W[
11
+ kdialog
12
+ --title='#{options[:title]}'
13
+ --passivepopup='#{options[:message]}' 5
14
+ ].join(" ")
15
+
16
+ Thread.new { `#{command}` }
13
17
  end
14
18
  end
15
19
  end
@@ -2,7 +2,7 @@ module Notifier
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nando Vieira
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-19 00:00:00 -02:00
17
+ date: 2010-12-26 00:00:00 -02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency