carlosbrando-autotest-notification 0.0.3 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest.txt +1 -0
- data/PostInstall.txt +5 -3
- data/README.txt +15 -10
- data/autotest-notification.gemspec +15 -13
- data/bin/an-install +2 -1
- data/bin/an-uninstall +46 -0
- data/config/hoe.rb +5 -5
- data/lib/autotest_notification.rb +11 -1
- data/lib/autotest_notification/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +16 -10
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/PostInstall.txt
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
|
-
For more information on autotest_notification, see http://
|
2
|
+
For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
To turn on the notifier you need to run the following command:
|
5
|
+
an-install
|
6
6
|
|
7
|
+
To turn off:
|
8
|
+
an-uninstall
|
7
9
|
|
data/README.txt
CHANGED
@@ -1,18 +1,14 @@
|
|
1
|
-
=
|
1
|
+
= The Autotest Notification Gem
|
2
2
|
|
3
|
-
* http://www.nomedojogo.com
|
3
|
+
* http://www.nomedojogo.com/2008/05/12/autotest-notification-gem/
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
|
7
|
+
This gem set the autotest (ZenTest) to send messages to software as Growl or LibNotify, displaying a window with the results.
|
8
8
|
|
9
9
|
== FEATURES/PROBLEMS:
|
10
10
|
|
11
|
-
*
|
12
|
-
|
13
|
-
== SYNOPSIS:
|
14
|
-
|
15
|
-
FIX (code sample of usage)
|
11
|
+
* Running on Mac (Growl), Linux (LibNotify) and Windows (Snarl).
|
16
12
|
|
17
13
|
== REQUIREMENTS:
|
18
14
|
|
@@ -20,8 +16,17 @@ Set the autotest to display messages through software such as Growl
|
|
20
16
|
|
21
17
|
== INSTALL:
|
22
18
|
|
23
|
-
sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com
|
24
|
-
|
19
|
+
$ sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com
|
20
|
+
|
21
|
+
Run it:
|
22
|
+
|
23
|
+
$ an-install
|
24
|
+
|
25
|
+
== Contributors
|
26
|
+
|
27
|
+
* carlosbrando
|
28
|
+
* simpsomboy
|
29
|
+
* urubatan
|
25
30
|
|
26
31
|
== LICENSE:
|
27
32
|
|
@@ -1,31 +1,33 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{autotest-notification}
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.7"
|
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"]
|
9
|
-
s.date = %q{2008-05-
|
10
|
-
s.
|
11
|
-
s.description = %q{Set the autotest to display messages through software such as Growl}
|
8
|
+
s.authors = ["Carlos Brando", "Rodrigo Urubatan", "Alexandre da Silva"]
|
9
|
+
s.date = %q{2008-05-12}
|
10
|
+
s.description = %q{Set the autotest to display messages on the operating system using software such as Growl and LibNotify.}
|
12
11
|
s.email = ["eduardobrando@gmail.com"]
|
13
|
-
s.executables = ["an-install"]
|
12
|
+
s.executables = ["an-install", "an-uninstall"]
|
14
13
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
|
15
|
-
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", "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", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb", "bin/an-install", "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", "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", "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"]
|
16
15
|
s.has_rdoc = true
|
17
|
-
s.homepage = %q{http://
|
16
|
+
s.homepage = %q{http://github.com/carlosbrando/autotest-notification/}
|
18
17
|
s.post_install_message = %q{
|
19
|
-
For more information on autotest_notification, see http://
|
18
|
+
For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
To turn on the notifier you need to run the following command:
|
21
|
+
an-install
|
23
22
|
|
23
|
+
To turn off:
|
24
|
+
an-uninstall
|
24
25
|
|
25
26
|
}
|
26
27
|
s.rdoc_options = ["--main", "README.txt"]
|
27
28
|
s.require_paths = ["lib"]
|
29
|
+
s.rubyforge_project = %q{}
|
28
30
|
s.rubygems_version = %q{1.1.1}
|
29
|
-
s.summary = %q{Set the autotest to display messages
|
31
|
+
s.summary = %q{Set the autotest to display messages on the operating system using software such as Growl and LibNotify.}
|
30
32
|
s.test_files = ["test/test_autotest_notification.rb", "test/test_helper.rb"]
|
31
|
-
end
|
33
|
+
end
|
data/bin/an-install
CHANGED
data/bin/an-uninstall
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Created on 2008-5-11.
|
4
|
+
# Copyright (c) 2008. All rights reserved.
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'rubygems'
|
8
|
+
rescue LoadError
|
9
|
+
# no rubygems to load, so we fail silently
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'optparse'
|
13
|
+
require 'ftools'
|
14
|
+
|
15
|
+
# NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
|
16
|
+
|
17
|
+
OPTIONS = {
|
18
|
+
:path => '~'
|
19
|
+
}
|
20
|
+
MANDATORY_OPTIONS = %w( )
|
21
|
+
|
22
|
+
parser = OptionParser.new do |opts|
|
23
|
+
opts.banner = <<BANNER
|
24
|
+
This application is wonderful because...
|
25
|
+
|
26
|
+
Usage: #{File.basename($0)} [options]
|
27
|
+
|
28
|
+
Options are:
|
29
|
+
BANNER
|
30
|
+
opts.separator ""
|
31
|
+
opts.on("-p", "--path=PATH", String,
|
32
|
+
"The root path for selecting files",
|
33
|
+
"Default: ~") { |OPTIONS[:path]| }
|
34
|
+
opts.on("-h", "--help",
|
35
|
+
"Show this help message.") { puts opts; exit }
|
36
|
+
opts.parse!(ARGV)
|
37
|
+
|
38
|
+
if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
|
39
|
+
puts opts; exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
path = OPTIONS[:path]
|
44
|
+
|
45
|
+
File.delete(File.expand_path(path) + "/.autotest")
|
46
|
+
puts "\nYou no longer receive notifications of your tests.\n"
|
data/config/hoe.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'autotest_notification/version'
|
2
2
|
|
3
|
-
AUTHOR =
|
3
|
+
AUTHOR = "Carlos Brando"
|
4
4
|
EMAIL = "eduardobrando@gmail.com"
|
5
|
-
DESCRIPTION = "Set the autotest to display messages
|
5
|
+
DESCRIPTION = "Set the autotest to display messages on the operating system using software such as Growl and LibNotify."
|
6
6
|
GEM_NAME = 'autotest-notification' # what ppl will type to install your gem
|
7
|
-
RUBYFORGE_PROJECT = '
|
8
|
-
HOMEPATH = "http
|
9
|
-
DOWNLOAD_PATH = "http://
|
7
|
+
RUBYFORGE_PROJECT = '' # The unix name for your project
|
8
|
+
HOMEPATH = "http://github.com/carlosbrando/autotest-notification/"
|
9
|
+
DOWNLOAD_PATH = "http://github.com/carlosbrando/autotest-notification/tarball/master"
|
10
10
|
EXTRA_DEPENDENCIES = [
|
11
11
|
# ['activesupport', '>= 1.3.1']
|
12
12
|
] # An array of rubygem dependencies [name, version]
|
@@ -13,7 +13,7 @@ module AutotestNotification
|
|
13
13
|
FAIL_IMAGE = "#{IMAGES_DIRECTORY}/fail.png"
|
14
14
|
|
15
15
|
Autotest.add_hook :ran_command do |at|
|
16
|
-
result = at.results.last
|
16
|
+
result = at.results.split("\n").last.to_s
|
17
17
|
if result
|
18
18
|
|
19
19
|
# Test::Unit
|
@@ -54,6 +54,11 @@ module AutotestNotification
|
|
54
54
|
notify_send(title, msg, img)
|
55
55
|
when /darwin/
|
56
56
|
growl(title, msg, img, pri)
|
57
|
+
when /cygwin/
|
58
|
+
img = `cygpath -m #{img}`
|
59
|
+
snarl(title, msg, img.strip)
|
60
|
+
when /mswin/
|
61
|
+
snarl(title, msg, img)
|
57
62
|
end
|
58
63
|
end
|
59
64
|
|
@@ -68,5 +73,10 @@ module AutotestNotification
|
|
68
73
|
def notify_send(title, msg, img)
|
69
74
|
system "notify-send -t #{EXPIRATION_IN_SECONDS * 1000} -i #{img} '#{title}' '#{msg}'"
|
70
75
|
end
|
76
|
+
|
77
|
+
def snarl(title, msg, img)
|
78
|
+
message = "sncmd /m '#{title}' '#{msg}' '#{img}' /t #{EXPIRATION_IN_SECONDS}"
|
79
|
+
system message
|
80
|
+
end
|
71
81
|
end
|
72
82
|
end
|
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">0.0.
|
36
|
+
<a href="http://rubyforge.org/projects/autotest_notification" class="numbers">0.0.7</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘autotest_notification’</h1>
|
39
39
|
|
metadata
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carlosbrando-autotest-notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Brando
|
8
|
+
- Rodrigo Urubatan
|
9
|
+
- Alexandre da Silva
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
13
|
|
12
|
-
date: 2008-05-
|
13
|
-
default_executable:
|
14
|
+
date: 2008-05-12 00:00:00 -07:00
|
15
|
+
default_executable:
|
14
16
|
dependencies: []
|
15
17
|
|
16
|
-
description: Set the autotest to display messages
|
18
|
+
description: Set the autotest to display messages on the operating system using software such as Growl and LibNotify.
|
17
19
|
email:
|
18
20
|
- eduardobrando@gmail.com
|
19
21
|
executables:
|
20
22
|
- an-install
|
23
|
+
- an-uninstall
|
21
24
|
extensions: []
|
22
25
|
|
23
26
|
extra_rdoc_files:
|
@@ -54,18 +57,21 @@ files:
|
|
54
57
|
- website/stylesheets/screen.css
|
55
58
|
- website/template.html.erb
|
56
59
|
- bin/an-install
|
60
|
+
- bin/an-uninstall
|
57
61
|
- images/pass.png
|
58
62
|
- images/fail.png
|
59
63
|
- autotest-notification.gemspec
|
60
64
|
has_rdoc: true
|
61
|
-
homepage: http://
|
65
|
+
homepage: http://github.com/carlosbrando/autotest-notification/
|
62
66
|
post_install_message: |+
|
63
67
|
|
64
|
-
For more information on autotest_notification, see http://
|
68
|
+
For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/
|
65
69
|
|
66
|
-
|
67
|
-
|
70
|
+
To turn on the notifier you need to run the following command:
|
71
|
+
an-install
|
68
72
|
|
73
|
+
To turn off:
|
74
|
+
an-uninstall
|
69
75
|
|
70
76
|
rdoc_options:
|
71
77
|
- --main
|
@@ -86,11 +92,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
92
|
version:
|
87
93
|
requirements: []
|
88
94
|
|
89
|
-
rubyforge_project:
|
95
|
+
rubyforge_project: ""
|
90
96
|
rubygems_version: 1.0.1
|
91
97
|
signing_key:
|
92
98
|
specification_version: 2
|
93
|
-
summary: Set the autotest to display messages
|
99
|
+
summary: Set the autotest to display messages on the operating system using software such as Growl and LibNotify.
|
94
100
|
test_files:
|
95
101
|
- test/test_autotest_notification.rb
|
96
102
|
- test/test_helper.rb
|