carlosbrando-autotest-notification 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +9 -1
- data/README.txt +4 -0
- data/autotest-notification.gemspec +4 -4
- data/bin/an-install +9 -3
- 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 +7 -4
- data/lib/autotest_notification/doom.rb +10 -0
- data/lib/autotest_notification/mac.rb +4 -1
- data/lib/autotest_notification/version.rb +2 -2
- data/website/index.html +2 -2
- metadata +10 -2
data/Manifest.txt
CHANGED
@@ -12,6 +12,7 @@ lib/autotest_notification/linux.rb
|
|
12
12
|
lib/autotest_notification/windows.rb
|
13
13
|
lib/autotest_notification/cygwin.rb
|
14
14
|
lib/autotest_notification/mac.rb
|
15
|
+
lib/autotest_notification/doom.rb
|
15
16
|
script/console
|
16
17
|
script/destroy
|
17
18
|
script/generate
|
@@ -35,4 +36,11 @@ bin/an-install
|
|
35
36
|
bin/an-uninstall
|
36
37
|
images/pass.png
|
37
38
|
images/fail.png
|
38
|
-
autotest-notification.gemspec
|
39
|
+
autotest-notification.gemspec
|
40
|
+
images/doom/doom_0.png
|
41
|
+
images/doom/doom_1.png
|
42
|
+
images/doom/doom_2.png
|
43
|
+
images/doom/doom_3.png
|
44
|
+
images/doom/doom_4.png
|
45
|
+
images/doom/doom_5.png
|
46
|
+
images/doom/doom_6.png
|
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.2.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-
|
9
|
+
s.date = %q{2008-06-17}
|
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
12
|
s.executables = ["an-install", "an-uninstall"]
|
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", "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"]
|
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
@@ -16,7 +16,8 @@ require 'ftools'
|
|
16
16
|
|
17
17
|
OPTIONS = {
|
18
18
|
:path => '~',
|
19
|
-
:speaking => false
|
19
|
+
:speaking => false,
|
20
|
+
:doom => false
|
20
21
|
}
|
21
22
|
MANDATORY_OPTIONS = %w( )
|
22
23
|
|
@@ -35,8 +36,12 @@ BANNER
|
|
35
36
|
"Default: ~") { |OPTIONS[:path]| }
|
36
37
|
|
37
38
|
opts.on("-s", "--speaking",
|
38
|
-
|
39
|
-
|
39
|
+
"If a test failed, the computer will speak.",
|
40
|
+
"For all plataforms.") { |OPTIONS[:speaking]| OPTIONS[:speaking] = true }
|
41
|
+
|
42
|
+
opts.on("-d", "--doom",
|
43
|
+
"Special Doom Edition.",
|
44
|
+
"Only for Mac.") { |OPTIONS[:doom]| OPTIONS[:doom] = true }
|
40
45
|
|
41
46
|
opts.on("-h", "--help",
|
42
47
|
"Show this help message.") { puts opts; exit }
|
@@ -54,6 +59,7 @@ f = File.new(File.expand_path(path) + "/.autotest", "w")
|
|
54
59
|
f.write "# ~.autotest\n"
|
55
60
|
f.write "require 'autotest_notification'\n"
|
56
61
|
f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
|
62
|
+
f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
|
57
63
|
f.close
|
58
64
|
puts "\nAs from now all tests will be notified automatically."
|
59
65
|
puts "" # a blank line
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__))
|
2
|
-
%w{ linux mac windows cygwin }.each { |x| require "autotest_notification/#{x}" }
|
2
|
+
%w{ linux mac windows cygwin doom }.each { |x| require "autotest_notification/#{x}" }
|
3
3
|
|
4
4
|
module AutotestNotification
|
5
5
|
IMAGES_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../images/")
|
@@ -28,9 +28,9 @@ module AutotestNotification
|
|
28
28
|
end
|
29
29
|
|
30
30
|
if @failures > 0 || @errors > 0
|
31
|
-
notify "FAIL", msg, FAIL_IMAGE, @failures + @errors, 2
|
31
|
+
notify "FAIL", msg, FAIL_IMAGE, @tests + @examples, @failures + @errors, 2
|
32
32
|
else
|
33
|
-
notify "Pass", msg, SUCCESS_IMAGE
|
33
|
+
notify "Pass", msg, SUCCESS_IMAGE, @tests + @examples
|
34
34
|
end
|
35
35
|
|
36
36
|
puts "\e[#{code}m#{'=' * 80}\e[0m\n\n"
|
@@ -38,7 +38,10 @@ module AutotestNotification
|
|
38
38
|
end
|
39
39
|
|
40
40
|
class << self
|
41
|
-
def notify(title, msg, img = SUCCESS_IMAGE, failures = 0, pri = 0)
|
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
47
|
Linux.notify(title, msg, img, failures)
|
@@ -5,8 +5,11 @@ module AutotestNotification
|
|
5
5
|
class << self
|
6
6
|
def notify(title, msg, img, failures = 0, pri = 0)
|
7
7
|
system "growlnotify -n autotest --image #{img} -p #{pri} -m '#{msg}' #{title}"
|
8
|
+
say(failures) if SPEAKING
|
9
|
+
end
|
8
10
|
|
9
|
-
|
11
|
+
def say(failures)
|
12
|
+
if failures > 0
|
10
13
|
system("say #{failures} test#{'s' unless failures == 1} failed.")
|
11
14
|
@last_test_failed = true
|
12
15
|
elsif @last_test_failed
|
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.2.0</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘autotest_notification’</h1>
|
39
39
|
|
@@ -130,7 +130,7 @@ rake install_gem</pre>
|
|
130
130
|
|
131
131
|
<p>Comments are welcome. Send an email to <a href="mailto:eduardobrando@gmail.com">Carlos Brando</a> via the <a href="http://groups.google.com/group/autotest_notification">forum</a></p>
|
132
132
|
<p class="coda">
|
133
|
-
<a href="FIXME email">FIXME full name</a>,
|
133
|
+
<a href="FIXME email">FIXME full name</a>, 15th June 2008<br>
|
134
134
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
135
135
|
</p>
|
136
136
|
</div>
|
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.2.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-
|
17
|
+
date: 2008-06-17 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/autotest_notification/windows.rb
|
57
57
|
- lib/autotest_notification/cygwin.rb
|
58
58
|
- lib/autotest_notification/mac.rb
|
59
|
+
- lib/autotest_notification/doom.rb
|
59
60
|
- script/console
|
60
61
|
- script/destroy
|
61
62
|
- script/generate
|
@@ -80,6 +81,13 @@ files:
|
|
80
81
|
- images/pass.png
|
81
82
|
- images/fail.png
|
82
83
|
- autotest-notification.gemspec
|
84
|
+
- images/doom/doom_0.png
|
85
|
+
- images/doom/doom_1.png
|
86
|
+
- images/doom/doom_2.png
|
87
|
+
- images/doom/doom_3.png
|
88
|
+
- images/doom/doom_4.png
|
89
|
+
- images/doom/doom_5.png
|
90
|
+
- images/doom/doom_6.png
|
83
91
|
has_rdoc: true
|
84
92
|
homepage: http://github.com/carlosbrando/autotest-notification/
|
85
93
|
post_install_message: |+
|