notifier 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/notifier.rb +5 -0
- data/lib/notifier/gntp.rb +3 -3
- data/lib/notifier/growl.rb +1 -1
- data/lib/notifier/kdialog.rb +1 -1
- data/lib/notifier/knotify.rb +1 -1
- data/lib/notifier/notify_send.rb +1 -1
- data/lib/notifier/osd_cat.rb +1 -1
- data/lib/notifier/snarl.rb +1 -1
- data/lib/notifier/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/notifier.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "open3"
|
2
|
+
require "rbconfig"
|
2
3
|
|
3
4
|
module Notifier
|
4
5
|
autoload :Growl, "notifier/growl"
|
@@ -46,6 +47,10 @@ module Notifier
|
|
46
47
|
notifier && notifier.supported? ? notifier : nil
|
47
48
|
end
|
48
49
|
|
50
|
+
def os?(regex)
|
51
|
+
RUBY_PLATFORM =~ regex || RbConfig::CONFIG["host_os"] =~ regex
|
52
|
+
end
|
53
|
+
|
49
54
|
private
|
50
55
|
def classify(string)
|
51
56
|
string.gsub(/_(.)/sm) { "#{$1.upcase}" }.gsub(/^(.)/) { "#{$1.upcase}" }
|
data/lib/notifier/gntp.rb
CHANGED
@@ -13,9 +13,9 @@ module Notifier
|
|
13
13
|
|
14
14
|
def notify(options)
|
15
15
|
::GNTP.notify(
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
:title => options[:title],
|
17
|
+
:text => options[:message],
|
18
|
+
:icon => options[:image]
|
19
19
|
)
|
20
20
|
end
|
21
21
|
end
|
data/lib/notifier/growl.rb
CHANGED
data/lib/notifier/kdialog.rb
CHANGED
data/lib/notifier/knotify.rb
CHANGED
data/lib/notifier/notify_send.rb
CHANGED
data/lib/notifier/osd_cat.rb
CHANGED
data/lib/notifier/snarl.rb
CHANGED
data/lib/notifier/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash:
|
103
|
+
hash: -3729581669822386303
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash:
|
112
|
+
hash: -3729581669822386303
|
113
113
|
requirements:
|
114
114
|
- Growl, Libnotify, OSD, KDE (Knotify and Kdialog) or Snarl
|
115
115
|
rubyforge_project:
|