public
Rubygem
Description: This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
Homepage: http://www.nomedojogo.com/
Clone URL: git://github.com/carlosbrando/autotest-notification.git
Added --pending option to an-install
lucasuyezu (author)
Thu Oct 02 13:08:09 -0700 2008
commit  7d20bb8fe0c3efb646703d6a5eedb0885f7ad756
tree    0e0e27bf5e47039c6768c6c3cba3a865a312b18a
parent  09dbc81a7e3f09f217e93f62d125521ee1f57f9e
...
 
 
 
1
2
3
...
1
2
3
4
5
6
0
@@ -1,3 +1,6 @@
0
+1.5.0 - Oct 02, 2008
0
+ * If an-install is run with --pending, shows a yellow warning when there are no errors/failures but there are pending specs. (lucasuyezu)
0
+
0
 1.4.0 - Jun 18, 2008
0
   * Special Doom Edition for Linux (ozsantana)
0
 
...
37
38
39
 
40
41
42
...
37
38
39
40
41
42
43
0
@@ -37,6 +37,7 @@ bin/an-uninstall
0
 bin/playsound
0
 images/pass.png
0
 images/fail.png
0
+images/pending.png
0
 autotest-notification.gemspec
0
 images/doom/doom_0.png
0
 images/doom/doom_1.png
...
89
90
91
 
 
 
 
92
93
94
...
99
100
101
 
102
103
104
...
89
90
91
92
93
94
95
96
97
98
...
103
104
105
106
107
108
109
0
@@ -89,6 +89,10 @@ To turn off the notifier:
0
 
0
   $ an-install --doom --speaking
0
 
0
+== Showing a yellow warning image when there are no errors/failures but there are pending specs
0
+
0
+ $ an-install --pending
0
+
0
 == CONTRIBUTORS:
0
 
0
 * carlosbrando [http://www.nomedojogo.com]
0
@@ -99,6 +103,7 @@ To turn off the notifier:
0
 * tapajos [http://www.improveit.com.br/tapajos]
0
 * tchandy [http://tchandy.wordpress.com]
0
 * ozsantana [http://blog.iconcreative.net/]
0
+* lucasuyezu [http://xucros.com]
0
 
0
 
0
 == LICENSE:
...
1
2
3
 
4
5
6
7
8
 
9
10
11
12
13
14
 
15
16
17
...
1
2
 
3
4
5
6
7
 
8
9
10
11
12
13
 
14
15
16
17
0
@@ -1,17 +1,17 @@
0
 Gem::Specification.new do |s|
0
   s.name = %q{autotest-notification}
0
- s.version = "1.4.0"
0
+ s.version = "1.5.0"
0
 
0
   s.specification_version = 2 if s.respond_to? :specification_version=
0
 
0
   s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
0
- 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"]
0
+ 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", "Lucas Uyezu"]
0
   s.date = %q{2008-06-18}
0
   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.}
0
   s.email = ["eduardobrando@gmail.com"]
0
   s.executables = ["an-install", "an-uninstall", "playsound"]
0
   s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
0
- 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"]
0
+ 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", "images/pending.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"]
0
   s.has_rdoc = true
0
   s.homepage = %q{http://github.com/carlosbrando/autotest-notification/}
0
   s.post_install_message = %q{
...
17
18
19
20
 
 
21
22
23
...
43
44
45
 
 
 
 
46
47
48
...
67
68
69
 
70
71
72
...
17
18
19
 
20
21
22
23
24
...
44
45
46
47
48
49
50
51
52
53
...
72
73
74
75
76
77
78
0
@@ -17,7 +17,8 @@ require 'ftools'
0
 OPTIONS = {
0
   :path => '~',
0
   :speaking => false,
0
- :doom => false
0
+ :doom => false,
0
+ :pending => false
0
 }
0
 MANDATORY_OPTIONS = %w( )
0
 
0
@@ -43,6 +44,10 @@ BANNER
0
           "Special Doom Edition.",
0
           "Only for Mac.") { |OPTIONS[:doom]| OPTIONS[:doom] = true }
0
           
0
+ opts.on("--pending",
0
+ "Shows a different image when there are no errors/failures but there are pending specs.",
0
+ "Only for Mac.") { |OPTIONS[:pending]| OPTIONS[:pending] = true }
0
+
0
   opts.on("-h", "--help",
0
           "Show this help message.") { puts opts; exit }
0
           
0
@@ -67,6 +72,7 @@ f.write "# ~.autotest\n"
0
 f.write "require 'autotest_notification'\n"
0
 f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
0
 f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
0
+f.write("PENDING = #{OPTIONS[:pending]}\n")
0
 f.close
0
 
0
 puts "\nAs from now all tests will be notified automatically."
...
5
6
7
 
8
9
10
...
29
30
31
 
 
32
33
34
...
5
6
7
8
9
10
11
...
30
31
32
33
34
35
36
37
0
@@ -5,6 +5,7 @@ module AutotestNotification
0
   IMAGES_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../images/")
0
   SUCCESS_IMAGE = "#{IMAGES_DIRECTORY}/pass.png"
0
   FAIL_IMAGE = "#{IMAGES_DIRECTORY}/fail.png"
0
+ PENDING_IMAGE = "#{IMAGES_DIRECTORY}/pending.png"
0
 
0
   EXPIRATION_IN_SECONDS = 3
0
 
0
@@ -29,6 +30,8 @@ module AutotestNotification
0
 
0
       if @failures > 0 || @errors > 0
0
         notify "FAIL", msg, FAIL_IMAGE, @tests + @examples, @failures + @errors, 2
0
+ elsif PENDING && @pendings > 0
0
+ notify "Pending", msg, PENDING_IMAGE, @tests + @examples, @failures + @errors, 2
0
       else
0
         notify "Pass", msg, SUCCESS_IMAGE, @tests + @examples
0
       end
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 module AutotestNotification #:nodoc:
0
   module VERSION #:nodoc:
0
     MAJOR = 1
0
- MINOR = 4
0
+ MINOR = 5
0
     TINY = 0
0
 
0
     STRING = [MAJOR, MINOR, TINY].join('.')
...
15
16
17
 
 
 
 
 
18
19
...
15
16
17
18
19
20
21
22
23
24
0
@@ -15,5 +15,10 @@ class TestMac < Test::Unit::TestCase
0
     AutotestNotification::Mac.notify("title", "msg", "image", 1)
0
   end
0
 
0
+ def test_notify_with_pending
0
+ Object.const_set :PENDING, true
0
+ AutotestNotification::Mac.expects(:system).with("growlnotify -n autotest --image image -p 0 -m 'msg' title")
0
+ AutotestNotification::Mac.notify("title", "msg", "image", 1)
0
+ end
0
 end
0
 

Comments

    No one has commented yet.