autotest-growl 0.2.0 → 0.2.1
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.
- data/CHANGELOG.txt +5 -0
- data/README.rdoc +1 -0
- data/lib/autotest/growl.rb +7 -8
- metadata +2 -2
data/CHANGELOG.txt
CHANGED
data/README.rdoc
CHANGED
data/lib/autotest/growl.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'autotest'
|
3
|
+
require 'rbconfig'
|
3
4
|
require File.join(File.dirname(__FILE__), 'result')
|
4
5
|
|
5
6
|
##
|
@@ -73,20 +74,18 @@ module Autotest::Growl
|
|
73
74
|
def self.growl(title, message, icon, priority=0, stick="")
|
74
75
|
growl = File.join(GEM_PATH, 'growl', 'growlnotify')
|
75
76
|
image = File.join(@@image_dir, "#{icon}.png")
|
76
|
-
|
77
|
-
|
78
|
-
case platform
|
79
|
-
when /mswin|windows/i
|
80
|
-
growl += '.com'
|
81
|
-
system %(#{growl} #{message.inspect} /a:"Autotest" /r:"Autotest" /n:"Autotest" /i:"#{image}" /p:#{priority} /t:"#{title}")
|
82
|
-
when /darwin|mac os/i
|
77
|
+
case Config::CONFIG['host_os']
|
78
|
+
when /mac os|darwin/i
|
83
79
|
options = "-w -n Autotest --image '#{image}' -p #{priority} -m '#{message}' '#{title}' #{stick}"
|
84
80
|
options << " -H localhost" if @@remote_notification
|
85
81
|
system %(#{growl} #{options} &)
|
86
82
|
when /linux|bsd/i
|
87
83
|
system %(notify-send "#{title}" "#{message}" -i #{image} -t 5000)
|
84
|
+
when /windows|mswin|mingw/i
|
85
|
+
growl += '.com'
|
86
|
+
system %(#{growl} #{message.inspect} /a:"Autotest" /r:"Autotest" /n:"Autotest" /i:"#{image}" /p:#{priority} /t:"#{title}")
|
88
87
|
else
|
89
|
-
raise "#{
|
88
|
+
raise "#{Config::CONFIG['host_os']} is not supported by autotest-growl (feel free to submit a patch)"
|
90
89
|
end
|
91
90
|
end
|
92
91
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autotest-growl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-19 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|