tapajos-autotest-notification 1.1.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +13 -1
- data/Manifest.txt +9 -1
- data/README.txt +5 -1
- data/autotest-notification.gemspec +6 -6
- data/bin/an-install +10 -2
- data/bin/playsound +0 -0
- data/config/hoe.rb +1 -1
- data/images/doom/doom_0.png +0 -0
- data/images/doom/doom_1.png +0 -0
- data/images/doom/doom_2.png +0 -0
- data/images/doom/doom_3.png +0 -0
- data/images/doom/doom_4.png +0 -0
- data/images/doom/doom_5.png +0 -0
- data/images/doom/doom_6.png +0 -0
- data/lib/autotest_notification.rb +4 -1
- data/lib/autotest_notification/doom.rb +25 -0
- data/lib/autotest_notification/linux.rb +23 -19
- data/lib/autotest_notification/mac.rb +6 -9
- data/lib/autotest_notification/version.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
- data/website/index.html +1 -1
- metadata +21 -2
data/History.txt
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
|
1
|
+
1.4.0 - Jun 18, 2008
|
2
|
+
* Special Doom Edition for Linux (ozsantana)
|
3
|
+
|
4
|
+
1.3.1 - Jun 18, 2008
|
5
|
+
* Added backup to old .autotest file (tchandy)
|
6
|
+
|
7
|
+
1.3.0 - Jun 18, 2008
|
8
|
+
* Added Doom sounds.
|
9
|
+
|
10
|
+
1.2.0 - Jun 17, 2008
|
11
|
+
* Special Doom Edition
|
12
|
+
|
13
|
+
1.1.2
|
2
14
|
* Refactoring code.
|
3
15
|
|
4
16
|
* 1.1.1
|
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
@@ -65,6 +65,8 @@ Independent of operating system you are using, you must install the ZenTest:
|
|
65
65
|
If you want to be notified with voice of the test results, instal espeak [http://espeak.sourceforge.net/] too, it is not needed.
|
66
66
|
And when running an-install, pass a "-s" switch, when you do not want voices notifications anymore, just run it again without the "-s" switch.
|
67
67
|
|
68
|
+
To hear the sounds of Doom Edition, you need the mplayer [http://www.mplayerhq.hu/design7/dload.html] installed.
|
69
|
+
|
68
70
|
|
69
71
|
== INSTALL:
|
70
72
|
|
@@ -85,7 +87,7 @@ To turn off the notifier:
|
|
85
87
|
|
86
88
|
== Special Doom Edition
|
87
89
|
|
88
|
-
$ an-install --doom
|
90
|
+
$ an-install --doom --speaking
|
89
91
|
|
90
92
|
== CONTRIBUTORS:
|
91
93
|
|
@@ -95,6 +97,8 @@ To turn off the notifier:
|
|
95
97
|
* chjunior [http://tas.milk-it.net]
|
96
98
|
* daviscabral [http://blog.impactmedia.com.br]
|
97
99
|
* tapajos [http://www.improveit.com.br/tapajos]
|
100
|
+
* tchandy [http://tchandy.wordpress.com]
|
101
|
+
* ozsantana [http://blog.iconcreative.net/]
|
98
102
|
|
99
103
|
|
100
104
|
== LICENSE:
|
@@ -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.4.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
|
-
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-
|
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"]
|
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", "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"]
|
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{
|
@@ -32,4 +32,4 @@ To turn off:
|
|
32
32
|
s.test_files = ["test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_mac.rb", "test/autotest_notification/test_windows.rb", "test/test_autotest_notification.rb", "test/test_helper.rb"]
|
33
33
|
|
34
34
|
s.add_dependency(%q<ZenTest>, [">= 3.9.2"])
|
35
|
-
end
|
35
|
+
end
|
data/bin/an-install
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Created on 2008-5-11.
|
4
4
|
# Copyright (c) 2008. All rights reserved.
|
5
5
|
|
@@ -55,11 +55,19 @@ end
|
|
55
55
|
|
56
56
|
path = OPTIONS[:path]
|
57
57
|
|
58
|
-
|
58
|
+
autotest_path = File.expand_path(path)
|
59
|
+
|
60
|
+
if File.exists?("#{autotest_path}/.autotest")
|
61
|
+
puts "\nYou Already have a .autotest file, renamed to .autotest.backup"
|
62
|
+
FileUtils.cp "#{autotest_path}/.autotest", "#{autotest_path}/.autotest.backup"
|
63
|
+
end
|
64
|
+
|
65
|
+
f = File.new("#{autotest_path}/.autotest", "w")
|
59
66
|
f.write "# ~.autotest\n"
|
60
67
|
f.write "require 'autotest_notification'\n"
|
61
68
|
f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
|
62
69
|
f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
|
63
70
|
f.close
|
71
|
+
|
64
72
|
puts "\nAs from now all tests will be notified automatically."
|
65
73
|
puts "" # a blank line
|
data/bin/playsound
ADDED
Binary file
|
data/config/hoe.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'autotest_notification/version'
|
2
2
|
|
3
|
-
AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior, Davis Zanetti Cabral, Marcos Tapajós"
|
3
|
+
AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior, Davis Zanetti Cabral, Marcos Tapajós, Thiago Pradi, Ozéias Sant'ana"
|
4
4
|
EMAIL = "eduardobrando@gmail.com"
|
5
5
|
DESCRIPTION = "This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results."
|
6
6
|
GEM_NAME = 'autotest-notification' # what ppl will type to install your gem
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -39,9 +39,12 @@ module AutotestNotification
|
|
39
39
|
|
40
40
|
class << self
|
41
41
|
def notify(title, msg, img = SUCCESS_IMAGE, total = 1, failures = 0, pri = 0)
|
42
|
+
|
43
|
+
img = Doom.image(total, failures) if DOOM_EDITION
|
44
|
+
|
42
45
|
case RUBY_PLATFORM
|
43
46
|
when /linux/
|
44
|
-
Linux.notify(title, msg, img, failures)
|
47
|
+
Linux.notify(title, msg, img, total, failures)
|
45
48
|
when /darwin/
|
46
49
|
Mac.notify(title, msg, img, total, failures, pri)
|
47
50
|
when /cygwin/
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module AutotestNotification
|
2
|
+
class Doom
|
3
|
+
class << self
|
4
|
+
def image(total, failures)
|
5
|
+
"#{IMAGES_DIRECTORY}/doom/doom_#{percent(total, failures)}.png"
|
6
|
+
end
|
7
|
+
|
8
|
+
def play_sound(total, failures)
|
9
|
+
sound_file = "#{File.expand_path(File.dirname(__FILE__) + "/../../sounds/doom/")}/#{percent(total, failures)}.wav"
|
10
|
+
|
11
|
+
case RUBY_PLATFORM
|
12
|
+
when /darwin/
|
13
|
+
`#{File.expand_path(File.dirname(__FILE__) + "/../../bin/")}/playsound #{sound_file}`
|
14
|
+
when /linux/
|
15
|
+
system("/usr/bin/mplayer #{sound_file}")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
def percent(total, failures)
|
21
|
+
percent = failures.zero? ? 0 : ((5 * failures) / total) + 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -2,7 +2,7 @@ module AutotestNotification
|
|
2
2
|
class Linux
|
3
3
|
class << self
|
4
4
|
|
5
|
-
def notify(title, msg, img, failures=0)
|
5
|
+
def notify(title, msg, img, total = 1, failures = 0)
|
6
6
|
if has_notify?
|
7
7
|
notify_send(title, msg, img)
|
8
8
|
elsif has_zenity?
|
@@ -11,10 +11,23 @@ module AutotestNotification
|
|
11
11
|
kdialog(title, msg, img)
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
say(total, failures) if SPEAKING
|
15
15
|
end
|
16
16
|
|
17
17
|
protected
|
18
|
+
|
19
|
+
def has_notify?
|
20
|
+
system "which notify-send 2> /dev/null"
|
21
|
+
end
|
22
|
+
|
23
|
+
def has_kdialog?
|
24
|
+
system "which kdialog 2> /dev/null"
|
25
|
+
end
|
26
|
+
|
27
|
+
def has_zenity?
|
28
|
+
system "which zenity 2> /dev/null"
|
29
|
+
end
|
30
|
+
|
18
31
|
def notify_send(title, msg, img)
|
19
32
|
system "notify-send -t #{EXPIRATION_IN_SECONDS * 1000} -i #{img} '#{title}' '#{msg}'"
|
20
33
|
end
|
@@ -27,25 +40,16 @@ module AutotestNotification
|
|
27
40
|
system "zenity --info --text='#{msg}' --title='#{title}'"
|
28
41
|
end
|
29
42
|
|
30
|
-
def
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
43
|
+
def say(total, failures)
|
44
|
+
if failures > 0
|
45
|
+
DOOM_EDITION ? Doom.play_sound(total, failures) : system("/usr/bin/espeak '#{failures} test#{'s' unless failures == 1} failed'")
|
46
|
+
else
|
47
|
+
DOOM_EDITION ? Doom.play_sound(total, failures) : system("/usr/bin/espeak 'All tests passed successfully'")
|
35
48
|
end
|
49
|
+
rescue
|
50
|
+
puts "You need the #{DOOM_EDITION ? 'mplayer' : 'espeak'} installed to hear the sounds."
|
36
51
|
end
|
37
|
-
|
38
|
-
def has_zenity?
|
39
|
-
system "which zenity 2> /dev/null"
|
40
|
-
end
|
41
|
-
|
42
|
-
def has_notify?
|
43
|
-
system "which notify-send 2> /dev/null"
|
44
|
-
end
|
45
|
-
|
46
|
-
def has_kdialog?
|
47
|
-
system "which kdialog 2> /dev/null"
|
48
|
-
end
|
52
|
+
|
49
53
|
end
|
50
54
|
end
|
51
55
|
end
|
@@ -1,27 +1,24 @@
|
|
1
1
|
module AutotestNotification
|
2
2
|
class Mac
|
3
|
-
|
4
3
|
@last_test_failed = false
|
5
4
|
|
6
5
|
class << self
|
7
|
-
|
6
|
+
|
8
7
|
def notify(title, msg, img, total = 1, failures = 0, pri = 0)
|
9
|
-
img = Doom.image(total, failures) if DOOM_EDITION
|
10
|
-
|
11
8
|
system "growlnotify -n autotest --image #{img} -p #{pri} -m '#{msg}' #{title}"
|
12
|
-
say(failures) if SPEAKING
|
9
|
+
say(total, failures) if SPEAKING
|
13
10
|
end
|
14
11
|
|
15
|
-
def say(failures)
|
12
|
+
def say(total, failures)
|
16
13
|
if failures > 0
|
17
|
-
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.")
|
18
15
|
@last_test_failed = true
|
19
16
|
elsif @last_test_failed
|
20
|
-
system("say All tests passed successfully.")
|
17
|
+
DOOM_EDITION ? Doom.play_sound(total, failures) : system("say All tests passed successfully.")
|
21
18
|
@last_test_failed = false
|
22
19
|
end
|
23
20
|
end
|
24
|
-
|
21
|
+
|
25
22
|
end
|
26
23
|
end
|
27
24
|
end
|
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
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>autotest_notification</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/autotest_notification"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/autotest_notification" class="numbers">1.
|
36
|
+
<a href="http://rubyforge.org/projects/autotest_notification" class="numbers">1.4.0</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘autotest_notification’</h1>
|
39
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapajos-autotest-notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Brando
|
@@ -10,11 +10,13 @@ authors:
|
|
10
10
|
- "Carlos J\xC3\xBAnior"
|
11
11
|
- Davis Zanetti Cabral
|
12
12
|
- "Marcos Tapaj\xC3\xB3s"
|
13
|
+
- Thiago Pradi
|
14
|
+
- "Oz\xC3\xA9ias Sant'ana"
|
13
15
|
autorequire:
|
14
16
|
bindir: bin
|
15
17
|
cert_chain: []
|
16
18
|
|
17
|
-
date: 2008-
|
19
|
+
date: 2008-06-18 00:00:00 -07:00
|
18
20
|
default_executable:
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
@@ -32,6 +34,7 @@ email:
|
|
32
34
|
executables:
|
33
35
|
- an-install
|
34
36
|
- an-uninstall
|
37
|
+
- playsound
|
35
38
|
extensions: []
|
36
39
|
|
37
40
|
extra_rdoc_files:
|
@@ -56,6 +59,7 @@ files:
|
|
56
59
|
- lib/autotest_notification/windows.rb
|
57
60
|
- lib/autotest_notification/cygwin.rb
|
58
61
|
- lib/autotest_notification/mac.rb
|
62
|
+
- lib/autotest_notification/doom.rb
|
59
63
|
- script/console
|
60
64
|
- script/destroy
|
61
65
|
- script/generate
|
@@ -77,9 +81,24 @@ files:
|
|
77
81
|
- website/template.html.erb
|
78
82
|
- bin/an-install
|
79
83
|
- bin/an-uninstall
|
84
|
+
- bin/playsound
|
80
85
|
- images/pass.png
|
81
86
|
- images/fail.png
|
82
87
|
- autotest-notification.gemspec
|
88
|
+
- images/doom/doom_0.png
|
89
|
+
- images/doom/doom_1.png
|
90
|
+
- images/doom/doom_2.png
|
91
|
+
- images/doom/doom_3.png
|
92
|
+
- images/doom/doom_4.png
|
93
|
+
- images/doom/doom_5.png
|
94
|
+
- images/doom/doom_6.png
|
95
|
+
- sounds/doom/0.wav
|
96
|
+
- sounds/doom/1.wav
|
97
|
+
- sounds/doom/2.wav
|
98
|
+
- sounds/doom/3.wav
|
99
|
+
- sounds/doom/4.wav
|
100
|
+
- sounds/doom/5.wav
|
101
|
+
- sounds/doom/6.wav
|
83
102
|
has_rdoc: true
|
84
103
|
homepage: http://github.com/carlosbrando/autotest-notification/
|
85
104
|
post_install_message: |+
|