carlosbrando-autotest-notification 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -1
- data/Manifest.txt +9 -1
- data/README.txt +1 -1
- data/autotest-notification.gemspec +4 -4
- data/bin/playsound +0 -0
- data/lib/autotest_notification/doom.rb +10 -2
- data/lib/autotest_notification/mac.rb +7 -5
- data/lib/autotest_notification/version.rb +1 -1
- data/lib/autotest_notification.rb +1 -1
- data/sounds/doom/0.wav +0 -0
- data/sounds/doom/1.wav +0 -0
- data/sounds/doom/2.wav +0 -0
- data/sounds/doom/3.wav +0 -0
- data/sounds/doom/4.wav +0 -0
- data/sounds/doom/5.wav +0 -0
- data/sounds/doom/6.wav +0 -0
- metadata +11 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -34,6 +34,7 @@ website/stylesheets/screen.css
|
|
34
34
|
website/template.html.erb
|
35
35
|
bin/an-install
|
36
36
|
bin/an-uninstall
|
37
|
+
bin/playsound
|
37
38
|
images/pass.png
|
38
39
|
images/fail.png
|
39
40
|
autotest-notification.gemspec
|
@@ -43,4 +44,11 @@ images/doom/doom_2.png
|
|
43
44
|
images/doom/doom_3.png
|
44
45
|
images/doom/doom_4.png
|
45
46
|
images/doom/doom_5.png
|
46
|
-
images/doom/doom_6.png
|
47
|
+
images/doom/doom_6.png
|
48
|
+
sounds/doom/0.wav
|
49
|
+
sounds/doom/1.wav
|
50
|
+
sounds/doom/2.wav
|
51
|
+
sounds/doom/3.wav
|
52
|
+
sounds/doom/4.wav
|
53
|
+
sounds/doom/5.wav
|
54
|
+
sounds/doom/6.wav
|
data/README.txt
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{autotest-notification}
|
3
|
-
s.version = "1.
|
3
|
+
s.version = "1.3.0"
|
4
4
|
|
5
5
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
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"]
|
9
|
-
s.date = %q{2008-06-
|
9
|
+
s.date = %q{2008-06-18}
|
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 = ["eduardobrando@gmail.com"]
|
12
|
-
s.executables = ["an-install", "an-uninstall"]
|
12
|
+
s.executables = ["an-install", "an-uninstall", "playsound"]
|
13
13
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
|
14
|
-
s.files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "config/hoe.rb", "config/requirements.rb", "lib/autotest_notification.rb", "lib/autotest_notification/version.rb", "lib/autotest_notification/linux.rb", "lib/autotest_notification/windows.rb", "lib/autotest_notification/cygwin.rb", "lib/autotest_notification/mac.rb", "lib/autotest_notification/doom.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/test_autotest_notification.rb", "test/test_helper.rb", "test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_windows.rb", "test/autotest_notification/test_mac.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb", "bin/an-install", "bin/an-uninstall", "images/pass.png", "images/fail.png", "autotest-notification.gemspec", "images/doom/doom_0.png", "images/doom/doom_1.png", "images/doom/doom_2.png", "images/doom/doom_3.png", "images/doom/doom_4.png", "images/doom/doom_5.png", "images/doom/doom_6.png"]
|
14
|
+
s.files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "config/hoe.rb", "config/requirements.rb", "lib/autotest_notification.rb", "lib/autotest_notification/version.rb", "lib/autotest_notification/linux.rb", "lib/autotest_notification/windows.rb", "lib/autotest_notification/cygwin.rb", "lib/autotest_notification/mac.rb", "lib/autotest_notification/doom.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/test_autotest_notification.rb", "test/test_helper.rb", "test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_windows.rb", "test/autotest_notification/test_mac.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb", "bin/an-install", "bin/an-uninstall", "bin/playsound", "images/pass.png", "images/fail.png", "autotest-notification.gemspec", "images/doom/doom_0.png", "images/doom/doom_1.png", "images/doom/doom_2.png", "images/doom/doom_3.png", "images/doom/doom_4.png", "images/doom/doom_5.png", "images/doom/doom_6.png", "sounds/doom/0.wav", "sounds/doom/1.wav", "sounds/doom/2.wav", "sounds/doom/3.wav", "sounds/doom/4.wav", "sounds/doom/5.wav", "sounds/doom/6.wav"]
|
15
15
|
s.has_rdoc = true
|
16
16
|
s.homepage = %q{http://github.com/carlosbrando/autotest-notification/}
|
17
17
|
s.post_install_message = %q{
|
data/bin/playsound
ADDED
Binary file
|
@@ -2,9 +2,17 @@ module AutotestNotification
|
|
2
2
|
class Doom
|
3
3
|
class << self
|
4
4
|
def image(total, failures)
|
5
|
-
percent
|
6
|
-
"#{IMAGES_DIRECTORY}/doom/doom_#{percent}.png"
|
5
|
+
"#{IMAGES_DIRECTORY}/doom/doom_#{percent(total, failures)}.png"
|
7
6
|
end
|
7
|
+
|
8
|
+
def play_sound(total, failures)
|
9
|
+
`#{File.expand_path(File.dirname(__FILE__) + "/../../bin/")}/playsound #{File.expand_path(File.dirname(__FILE__) + "/../../sounds/doom/")}/#{percent(total, failures)}.wav`
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
def percent(total, failures)
|
14
|
+
percent = failures.zero? ? 0 : ((5 * failures) / total) + 1
|
15
|
+
end
|
8
16
|
end
|
9
17
|
end
|
10
18
|
end
|
@@ -3,20 +3,22 @@ module AutotestNotification
|
|
3
3
|
@last_test_failed = false
|
4
4
|
|
5
5
|
class << self
|
6
|
-
|
6
|
+
|
7
|
+
def notify(title, msg, img, total = 1, failures = 0, pri = 0)
|
7
8
|
system "growlnotify -n autotest --image #{img} -p #{pri} -m '#{msg}' #{title}"
|
8
|
-
say(failures) if SPEAKING
|
9
|
+
say(total, failures) if SPEAKING
|
9
10
|
end
|
10
11
|
|
11
|
-
def say(failures)
|
12
|
+
def say(total, failures)
|
12
13
|
if failures > 0
|
13
|
-
system("say #{failures} test#{'s' unless failures == 1} failed.")
|
14
|
+
DOOM_EDITION ? Doom.play_sound(total, failures) : system("say #{failures} test#{'s' unless failures == 1} failed.")
|
14
15
|
@last_test_failed = true
|
15
16
|
elsif @last_test_failed
|
16
|
-
system("say All tests passed successfully.")
|
17
|
+
DOOM_EDITION ? Doom.play_sound(total, failures) : system("say All tests passed successfully.")
|
17
18
|
@last_test_failed = false
|
18
19
|
end
|
19
20
|
end
|
21
|
+
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -46,7 +46,7 @@ module AutotestNotification
|
|
46
46
|
when /linux/
|
47
47
|
Linux.notify(title, msg, img, failures)
|
48
48
|
when /darwin/
|
49
|
-
Mac.notify(title, msg, img, failures, pri)
|
49
|
+
Mac.notify(title, msg, img, total, failures, pri)
|
50
50
|
when /cygwin/
|
51
51
|
Cygwin.notify(title, msg, img)
|
52
52
|
when /mswin/
|
data/sounds/doom/0.wav
ADDED
Binary file
|
data/sounds/doom/1.wav
ADDED
Binary file
|
data/sounds/doom/2.wav
ADDED
Binary file
|
data/sounds/doom/3.wav
ADDED
Binary file
|
data/sounds/doom/4.wav
ADDED
Binary file
|
data/sounds/doom/5.wav
ADDED
Binary file
|
data/sounds/doom/6.wav
ADDED
Binary file
|
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Brando
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2008-06-
|
17
|
+
date: 2008-06-18 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -32,6 +32,7 @@ email:
|
|
32
32
|
executables:
|
33
33
|
- an-install
|
34
34
|
- an-uninstall
|
35
|
+
- playsound
|
35
36
|
extensions: []
|
36
37
|
|
37
38
|
extra_rdoc_files:
|
@@ -78,6 +79,7 @@ files:
|
|
78
79
|
- website/template.html.erb
|
79
80
|
- bin/an-install
|
80
81
|
- bin/an-uninstall
|
82
|
+
- bin/playsound
|
81
83
|
- images/pass.png
|
82
84
|
- images/fail.png
|
83
85
|
- autotest-notification.gemspec
|
@@ -88,6 +90,13 @@ files:
|
|
88
90
|
- images/doom/doom_4.png
|
89
91
|
- images/doom/doom_5.png
|
90
92
|
- images/doom/doom_6.png
|
93
|
+
- sounds/doom/0.wav
|
94
|
+
- sounds/doom/1.wav
|
95
|
+
- sounds/doom/2.wav
|
96
|
+
- sounds/doom/3.wav
|
97
|
+
- sounds/doom/4.wav
|
98
|
+
- sounds/doom/5.wav
|
99
|
+
- sounds/doom/6.wav
|
91
100
|
has_rdoc: true
|
92
101
|
homepage: http://github.com/carlosbrando/autotest-notification/
|
93
102
|
post_install_message: |+
|