test_notifier 0.0.1 → 0.0.2

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.
data/config/hoe.rb CHANGED
@@ -2,11 +2,9 @@ require 'test_notifier/version'
2
2
 
3
3
  AUTHOR = 'Nando Vieira' # can also be an array of Authors
4
4
  EMAIL = "fnando.vieira@gmail.com"
5
- DESCRIPTION = "Display system notifications (dbus, growl and snarl) after \
6
- running tests. It works on Mac OS X, Linux and Windows. Powerful when used \
7
- with Autotest ZenTest gem for Rails apps."
5
+ DESCRIPTION = "Display system notifications after running tests"
8
6
  GEM_NAME = 'test_notifier' # what ppl will type to install your gem
9
- RUBYFORGE_PROJECT = 'testnotifier' # The unix name for your project
7
+ RUBYFORGE_PROJECT = 'test_notifier' # The unix name for your project
10
8
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
11
9
  DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
12
10
 
data/lib/test_notifier.rb CHANGED
@@ -8,6 +8,9 @@ module Test
8
8
  module UI
9
9
  module Console
10
10
  class TestRunner
11
+ FAILED_TITLE = "FAILED"
12
+ PASSED_TITLE = "Passed"
13
+
11
14
  alias finished_original finished
12
15
 
13
16
  def finished(elapsed_time)
@@ -19,11 +22,11 @@ module Test
19
22
 
20
23
  if f > 0 || e > 0
21
24
  # test has failed or raised an error
22
- title = "FAIL"
25
+ title = FAILED_TITLE
23
26
  image = e > 0 ? "error.png" : "failure.png"
24
27
  elsif a > 0
25
28
  # everything's ok
26
- title = "Passed"
29
+ title = PASSED_TITLE
27
30
  image = "passed.png"
28
31
  else
29
32
  # no assertions
@@ -31,13 +34,14 @@ module Test
31
34
  end
32
35
 
33
36
  image = File.join(File.dirname(__FILE__), "test_notifier", "icons", image)
37
+ message = "#{t} tests, #{a} assertions, #{f} failures, #{e} errors"
34
38
 
35
39
  if RUBY_PLATFORM =~ /darwin/
36
- system("growlnotify -n test_notifier --image #{img} -p 2 -m #{@result.to_s} #{title}")
40
+ system("growlnotify -n test_notifier --image #{img} -p 2 -m #{message} #{title}")
37
41
  elsif RUBY_PLATFORM =~ /mswin/
38
- Snarl.show_message(title, @result.to_s, image)
42
+ Snarl.show_message(title, message, image)
39
43
  elsif RUBY_PLATFORM =~ /linux/
40
- system("notify-send -i #{image} #{title} \"#{@result.to_s}\"")
44
+ system("notify-send -i #{image} #{title} \"#{message}\"")
41
45
  end
42
46
  end
43
47
  end
@@ -2,7 +2,7 @@ module TestNotifier #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: test_notifier
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
6
+ version: 0.0.2
7
7
  date: 2007-10-17 00:00:00 -02:00
8
- summary: Display system notifications (dbus, growl and snarl) after running tests. It works on Mac OS X, Linux and Windows. Powerful when used with Autotest ZenTest gem for Rails apps.
8
+ summary: Display system notifications after running tests
9
9
  require_paths:
10
10
  - lib
11
11
  email: fnando.vieira@gmail.com
12
- homepage: http://testnotifier.rubyforge.org
13
- rubyforge_project: testnotifier
14
- description: Display system notifications (dbus, growl and snarl) after running tests. It works on Mac OS X, Linux and Windows. Powerful when used with Autotest ZenTest gem for Rails apps.
12
+ homepage: http://test_notifier.rubyforge.org
13
+ rubyforge_project: test_notifier
14
+ description: Display system notifications after running tests
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin