autotest-growl 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/README.rdoc +9 -10
- data/autotest-growl.gemspec +5 -5
- data/lib/autotest-growl.rb +1 -1
- data/lib/autotest/growl.rb +12 -8
- metadata +3 -3
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -24,12 +24,6 @@ configured otherwise). Don't worry though, it's still possible to scroll up
|
|
24
24
|
to see the output of previous cycles - at least on the Terminal.app from
|
25
25
|
Apple.
|
26
26
|
|
27
|
-
=== Ruby 1.9.1 Note
|
28
|
-
|
29
|
-
For the moment, autotest growl doesn't seem to work on Ruby 1.9.1. Fixing this
|
30
|
-
might take a while though as autotest itself is currently misbehaving on Ruby
|
31
|
-
1.9 - at least on my setup.
|
32
|
-
|
33
27
|
== REQUIREMENTS:
|
34
28
|
|
35
29
|
* Growl >= 1.1.5 (Mac OS X) or >= 2.0b18 (Windows)
|
@@ -54,9 +48,13 @@ Windows: http://growlforwindows.com
|
|
54
48
|
|
55
49
|
=== Custom Icons
|
56
50
|
|
57
|
-
Using your own set of icons is pretty simple.
|
58
|
-
|
59
|
-
|
51
|
+
Using your own set of icons is pretty simple. Images should be named as
|
52
|
+
follows: passed.png, pending.png, failed.png, error.png and info.png.
|
53
|
+
|
54
|
+
Place these images in a directory of your choosing and specify its
|
55
|
+
location in your ~/.autotest:
|
56
|
+
|
57
|
+
Autotest::Growl::image_dir = File.join(ENV['HOME'], '.autotest-growl')
|
60
58
|
|
61
59
|
=== Don't Clear the Terminal
|
62
60
|
|
@@ -131,7 +129,7 @@ You can install the bleeding-edge version as follows:
|
|
131
129
|
sudo gem uninstall autotest-growl
|
132
130
|
sudo gem install svoop-autotest-growl --source http://gems.github.com
|
133
131
|
|
134
|
-
Bleeding-edge gems
|
132
|
+
Bleeding-edge gems contain a fourth version digit group (e.g. the .8 in
|
135
133
|
0.1.5.8) to make sure Github builds the gem whenever new code is committed.
|
136
134
|
If there is no fourth version digit group, the edge version is identical
|
137
135
|
to the stable version from Rubyforge.
|
@@ -153,6 +151,7 @@ Thanks to the following folks who have contributed to this project:
|
|
153
151
|
* Graham Savage
|
154
152
|
* Karl O'Keeffe
|
155
153
|
* Konstantin Haase
|
154
|
+
* J. Edward Dewyea
|
156
155
|
|
157
156
|
== LICENSE:
|
158
157
|
|
data/autotest-growl.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{autotest-growl}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Sven Schwyn"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-10-09}
|
10
10
|
s.description = %q{This gem aims to improve support for Growl notification by ZenTest's autotest. It comes with a nice colored Ruby icon set and - for now - supports Cucumber by means of a workaround.}
|
11
11
|
s.email = ["ruby@bitcetera.com"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt"]
|
@@ -43,13 +43,13 @@ http://www.bitcetera.com/products/autotest-growl
|
|
43
43
|
|
44
44
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
45
45
|
s.add_runtime_dependency(%q<ZenTest>, [">= 4.1.3"])
|
46
|
-
s.add_development_dependency(%q<hoe>, [">= 2.3.
|
46
|
+
s.add_development_dependency(%q<hoe>, [">= 2.3.3"])
|
47
47
|
else
|
48
48
|
s.add_dependency(%q<ZenTest>, [">= 4.1.3"])
|
49
|
-
s.add_dependency(%q<hoe>, [">= 2.3.
|
49
|
+
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
50
50
|
end
|
51
51
|
else
|
52
52
|
s.add_dependency(%q<ZenTest>, [">= 4.1.3"])
|
53
|
-
s.add_dependency(%q<hoe>, [">= 2.3.
|
53
|
+
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
54
54
|
end
|
55
55
|
end
|
data/lib/autotest-growl.rb
CHANGED
data/lib/autotest/growl.rb
CHANGED
@@ -26,6 +26,7 @@ module Autotest::Growl
|
|
26
26
|
@@clear_terminal = true
|
27
27
|
@@hide_label = false
|
28
28
|
@@show_modified_files = false
|
29
|
+
@@image_dir = File.join(GEM_PATH, 'img')
|
29
30
|
|
30
31
|
##
|
31
32
|
# Whether to use remote or local notificaton (default).
|
@@ -57,22 +58,25 @@ module Autotest::Growl
|
|
57
58
|
@@show_modified_files = boolean
|
58
59
|
end
|
59
60
|
|
61
|
+
##
|
62
|
+
# Directory where notification icons can be found
|
63
|
+
def self.image_dir=(path)
|
64
|
+
@@image_dir = path
|
65
|
+
end
|
66
|
+
|
60
67
|
##
|
61
68
|
# Display a message through Growl.
|
62
69
|
def self.growl(title, message, icon, priority=0, stick="")
|
63
70
|
growl = File.join(GEM_PATH, 'growl', 'growlnotify')
|
64
|
-
image = File.join(
|
65
|
-
image = File.join(GEM_PATH, 'img', "#{icon}.png") unless File.exists?(image)
|
71
|
+
image = File.join(@@image_dir, "#{icon}.png")
|
66
72
|
case RUBY_PLATFORM
|
67
73
|
when /mswin/
|
68
74
|
growl += '.com'
|
69
75
|
system %(#{growl} #{message.inspect} /a:"Autotest" /r:"Autotest" /n:"Autotest" /i:"#{image}" /p:#{priority} /t:"#{title}")
|
70
76
|
when /darwin/
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
system %(#{growl} -w -n Autotest --image '#{image}' -p #{priority} -m '#{message}' '#{title}' #{stick} &)
|
75
|
-
end
|
77
|
+
options = "-w -n Autotest --image '#{image}' -p #{priority} -m '#{message}' '#{title}' #{stick}"
|
78
|
+
options << " -H localhost" if @@remote_notification
|
79
|
+
system %(#{growl} #{options} &)
|
76
80
|
else
|
77
81
|
raise "#{RUBY_PLATFORM} is not supported by autotest-growl"
|
78
82
|
end
|
@@ -127,7 +131,7 @@ module Autotest::Growl
|
|
127
131
|
else
|
128
132
|
growl @label + 'Could not run tests.', '', 'error', 2
|
129
133
|
end
|
130
|
-
@
|
134
|
+
@ran_tests = true
|
131
135
|
end
|
132
136
|
false
|
133
137
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autotest-growl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-09 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.
|
33
|
+
version: 2.3.3
|
34
34
|
version:
|
35
35
|
description: This gem aims to improve support for Growl notification by ZenTest's autotest. It comes with a nice colored Ruby icon set and - for now - supports Cucumber by means of a workaround.
|
36
36
|
email:
|