carlosbrando-autotest-notification 1.9.0 → 1.9.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.
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{autotest-notification}
|
5
|
-
s.version = "1.9.
|
5
|
+
s.version = "1.9.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Carlos Brando", "Rodrigo Urubatan", "Alexandre da Silva", "Carlos J\303\272nior", "Davis Zanetti Cabral", "Marcos Tapaj\303\263s", "Thiago Pradi", "Oz\303\251ias Sant'ana", "Samuel Flores", "Diego Carrion"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-04-02}
|
10
10
|
s.description = %q{This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.}
|
11
11
|
s.email = ["autotest-notification@carlosbrando.com"]
|
12
12
|
s.executables = ["an-install", "an-uninstall", "playsound"]
|
@@ -6,8 +6,8 @@ module AutotestNotification
|
|
6
6
|
def notify(title, msg, img, total = 1, failures = 0)
|
7
7
|
img = get_image_path(img).strip
|
8
8
|
system "sncmd /m '#{title}' '#{msg}' '#{img}' /t #{Config.expiration_in_seconds}"
|
9
|
-
play(SUCCESS_SOUND)
|
10
|
-
play(FAILURE_SOUND)
|
9
|
+
play(SUCCESS_SOUND) if AutotestNotification.const_defined?("SUCCESS_SOUND") && !SUCCESS_SOUND.empty? && failures == 0
|
10
|
+
play(FAILURE_SOUND) if AutotestNotification.const_defined?("FAILURE_SOUND") && !FAILURE_SOUND.empty? && failures > 0
|
11
11
|
say(total, failures) if DOOM_EDITION
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ module AutotestNotification
|
|
6
6
|
|
7
7
|
def notify(title, msg, img, total = 1, failures = 0, priority = 0)
|
8
8
|
system "growlnotify -n autotest --image #{img} #{'-s ' if ((failures > 0) and STICKY)}-p #{priority} -m '#{msg}' -t #{title}"
|
9
|
-
play(SUCCESS_SOUND)
|
10
|
-
play(FAILURE_SOUND)
|
9
|
+
play(SUCCESS_SOUND) if AutotestNotification.const_defined?("SUCCESS_SOUND") && !SUCCESS_SOUND.empty? && failures == 0
|
10
|
+
play(FAILURE_SOUND) if AutotestNotification.const_defined?("FAILURE_SOUND") && !FAILURE_SOUND.empty? && failures > 0
|
11
11
|
say(total, failures) if SPEAKING
|
12
12
|
end
|
13
13
|
|
@@ -38,7 +38,7 @@ class TestMac < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_success_sound_is_played_when_specified_and_test_success
|
41
|
-
AutotestNotification.const_set :SUCCESS_SOUND, sound_path
|
41
|
+
AutotestNotification.const_set :SUCCESS_SOUND, sound_path
|
42
42
|
AutotestNotification::Mac.expects(:play).with(sound_path)
|
43
43
|
AutotestNotification::Mac.notify("title", "msg", "image", 1, 0)
|
44
44
|
end
|
@@ -16,7 +16,7 @@ class TestAutotestNotification < Test::Unit::TestCase
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_notify_when_os_is_cygwin
|
19
|
-
AutotestNotification::Cygwin.expects(:notify).with(@title, @msg, @image)
|
19
|
+
AutotestNotification::Cygwin.expects(:notify).with(@title, @msg, @image, @total, @failures)
|
20
20
|
verify_to("cygwin")
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carlosbrando-autotest-notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Brando
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2009-
|
21
|
+
date: 2009-04-02 00:00:00 -07:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|