autotest-mac 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +0 -5
- data/PostInstall.txt +11 -20
- data/README.rdoc +27 -80
- data/Rakefile +2 -2
- data/lib/autotest-mac.rb +7 -89
- data/spec/autotest-mac_spec.rb +0 -10
- metadata +26 -10
- data/fsevent/fsevent_sleep +0 -0
- data/img/ruby_green.png +0 -0
- data/img/ruby_grey.png +0 -0
- data/img/ruby_red.png +0 -0
- data/img/ruby_yellow.png +0 -0
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/PostInstall.txt
CHANGED
@@ -1,30 +1,21 @@
|
|
1
1
|
|
2
2
|
+--------------------------------------------------------------------------+
|
3
3
|
| |
|
4
|
-
|
|
5
|
-
|
|
4
|
+
| Following the feedback from ZenTest devs and users, the autotest-mac |
|
5
|
+
| is now split in to separate gems which include some bugfixes and new |
|
6
|
+
| features: |
|
6
7
|
| |
|
7
|
-
|
|
8
|
+
| * autotest-fsevent |
|
9
|
+
| * autotest-growl |
|
8
10
|
| |
|
9
|
-
|
|
11
|
+
| Migration is easy, check out the README or the homepage for details: |
|
10
12
|
| |
|
11
|
-
| http://
|
13
|
+
| * http://www.bitcetera.com/products/autotest-mac |
|
14
|
+
| * http://github.com/svoop/autotest-mac/tree/master |
|
12
15
|
| |
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
| A glitch in Growl 1.1.4 on Mac OS X 10.5 prevents notifications from |
|
17
|
-
| being displayed randomly. A workaround is built into autotest-mac, |
|
18
|
-
| however, you have to perform some additional steps to make it work: |
|
19
|
-
| |
|
20
|
-
| Open “System Preferences -> Growl -> Network" and set the checkboxes |
|
21
|
-
| "Listen for incoming notifications" and "Allow remote application |
|
22
|
-
| registration”. Once the first notification has been displayed, you |
|
23
|
-
| can unset the latter checkbox again. |
|
24
|
-
| |
|
25
|
-
| For more information, feedback and bug submissions, please visit: |
|
26
|
-
| |
|
27
|
-
| See http://www.bitcetera.com/products/mac-autotest |
|
16
|
+
| This final release of autotest-mac is just a message and doesn't do |
|
17
|
+
| anything besided writing deprecation warnings to the terminal. You |
|
18
|
+
| should remove it now in favor of it's improved offspring gems. |
|
28
19
|
| |
|
29
20
|
+--------------------------------------------------------------------------+
|
30
21
|
|
data/README.rdoc
CHANGED
@@ -1,104 +1,51 @@
|
|
1
1
|
= Autotest Mac
|
2
2
|
|
3
|
-
|
4
|
-
* Issues and forum: https://forge.bitcetera.com/projects/show/autotest-mac
|
3
|
+
== SPLITUP:
|
5
4
|
|
6
|
-
|
5
|
+
Following the feedback from ZenTest devs and users, I've split autotest-mac
|
6
|
+
into two separate gems:
|
7
7
|
|
8
|
-
|
9
|
-
on Mac OS X. It's absolutely useless on any other platform.
|
8
|
+
=== autotest-fsevent
|
10
9
|
|
11
|
-
|
10
|
+
This gem teaches autotest to use FSEvent instead of filesystem polling.
|
12
11
|
|
13
|
-
|
12
|
+
http://www.bitcetera.com/products/autotest-mac
|
14
13
|
|
15
|
-
|
16
|
-
source code files. In other words: The filesytem is constantly being traversed
|
17
|
-
which causes quite some load on both the CPU and the harddrive. This is not
|
18
|
-
healthy for your Mac and if you are working on a portable computer, it will
|
19
|
-
drain your battery in no time. Apple has introduces FSEvent with Mac OS X 10.5
|
20
|
-
which is a very efficient way to have the operating system monitor file
|
21
|
-
alterations. This gem teaches autotest to use FSEvent and therefore be nice
|
22
|
-
to your Mac.
|
14
|
+
=== autotest-growl
|
23
15
|
|
24
|
-
|
25
|
-
|
16
|
+
Growl support bundled with ZenTest is scheduled to be removed in favor of
|
17
|
+
this gem which comes with more features and nice icons.
|
26
18
|
|
27
|
-
|
19
|
+
http://www.bitcetera.com/products/autotest-growl
|
28
20
|
|
29
|
-
|
30
|
-
can, however, scroll up and see the output of previous cycles. Furthermore,
|
31
|
-
autotest-mac configures autotest to display test (RSpec and Test::Unit) and
|
32
|
-
scenario (Cubumber) results as Growl notifications, decorated with a cute set
|
33
|
-
of colored ruby icons.
|
21
|
+
== REMOVED:
|
34
22
|
|
35
|
-
|
36
|
-
autotest-mac has to use a workaround which may cause issues if you are using
|
37
|
-
custom :waiting hooks.
|
23
|
+
One feature didn't make it in neither of the two new gems.
|
38
24
|
|
39
25
|
=== Exceptions
|
40
26
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
* .svn
|
45
|
-
* .hg
|
46
|
-
* .DS_Store
|
47
|
-
* ._*
|
48
|
-
* vendor
|
27
|
+
Adding path exceptions to the gem wasn't such a good idea to begin with. It's
|
28
|
+
better if you set them yourself and according to your needs in ~/.autotest.
|
29
|
+
Here is an example:
|
49
30
|
|
50
|
-
|
31
|
+
Autotest.add_hook :initialize do |autotest|
|
32
|
+
%w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
|
33
|
+
false
|
34
|
+
end
|
51
35
|
|
52
|
-
|
53
|
-
* Growl
|
54
|
-
* ZenTest >= 4.0.0
|
36
|
+
== UNINSTALL:
|
55
37
|
|
56
|
-
|
38
|
+
First uninstall the deprecated autotest-mac:
|
57
39
|
|
58
|
-
|
40
|
+
sudo gem uninstall autotest-mac
|
59
41
|
|
60
|
-
|
61
|
-
|
62
|
-
Then add the following line to the top of your ~/.autotest file:
|
42
|
+
And remove the following line from your ~/.autotest:
|
63
43
|
|
64
44
|
require 'autotest-mac'
|
65
45
|
|
66
|
-
|
67
|
-
http://growl.info
|
68
|
-
|
69
|
-
The growlnotify utility (located inside the Extras folder) must be installed
|
70
|
-
as well.
|
71
|
-
|
72
|
-
A glitch in Growl 1.1.4 on Mac OS X 10.5 randomly prevents some notifications
|
73
|
-
from being displayed. A workaround is built into autotest-mac, however, you
|
74
|
-
have to perform some additional steps to make it work:
|
75
|
-
|
76
|
-
Open “System Preferences -> Growl -> Network" and set the checkboxes "Listen
|
77
|
-
for incoming notifications" and "Allow remote application registration”. Once
|
78
|
-
the first notification has been displayed, you can unset the latter checkbox
|
79
|
-
again.
|
80
|
-
|
81
|
-
== LICENSE:
|
82
|
-
|
83
|
-
(The MIT License)
|
84
|
-
|
85
|
-
Copyright (c) 2009 Sven Schwyn
|
86
|
-
|
87
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
88
|
-
a copy of this software and associated documentation files (the
|
89
|
-
'Software'), to deal in the Software without restriction, including
|
90
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
91
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
92
|
-
permit persons to whom the Software is furnished to do so, subject to
|
93
|
-
the following conditions:
|
46
|
+
Then install it's offspring as described in the READMEs:
|
94
47
|
|
95
|
-
|
96
|
-
|
48
|
+
* autotest-fsevent: http://github.com/svoop/autotest-fsevent/tree/master
|
49
|
+
* autotest-growl: http://github.com/svoop/autotest-growl/tree/master
|
97
50
|
|
98
|
-
|
99
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
100
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
101
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
102
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
103
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
104
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
51
|
+
And optionally except some paths as mentioned above.
|
data/Rakefile
CHANGED
@@ -4,8 +4,8 @@ require File.dirname(__FILE__) + '/lib/autotest-mac'
|
|
4
4
|
|
5
5
|
$hoe = Hoe.new('autotest-mac', AutotestMac::VERSION) do |p|
|
6
6
|
p.developer('Sven Schwyn', 'ruby@bitcetera.com')
|
7
|
-
p.summary = %q{
|
8
|
-
p.description = %q{
|
7
|
+
p.summary = %q{Deprecated, use autotest-fsevent and autotest-growl instead.}
|
8
|
+
p.description = %q{Deprecated, use autotest-fsevent and autotest-growl instead.}
|
9
9
|
p.url = %q{http://www.bitcetera.com/products/autotest-mac}
|
10
10
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
11
11
|
p.post_install_message = File.read('PostInstall.txt')
|
data/lib/autotest-mac.rb
CHANGED
@@ -3,97 +3,15 @@ require 'autotest'
|
|
3
3
|
$:.unshift(File.dirname(__FILE__)) unless
|
4
4
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
5
5
|
|
6
|
-
unless RUBY_PLATFORM =~ /darwin/
|
7
|
-
puts "The autotest-mac gem is for Mac OS X only and thus useless on"
|
8
|
-
puts "this platform. Please uninstall it and try again."
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
|
12
6
|
module AutotestMac
|
13
7
|
|
14
|
-
VERSION = '0.1.
|
15
|
-
GEM_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
16
|
-
|
17
|
-
module Autotest::Growl
|
18
|
-
|
19
|
-
##
|
20
|
-
# Display a message through Growl.
|
21
|
-
def self.growl title, message, color, priority=0, stick=""
|
22
|
-
icon = File.join(GEM_DIR, 'img', "ruby_#{color}.png")
|
23
|
-
system "growlnotify -H localhost -n autotest --image '#{icon}' -p #{priority} -m #{message.inspect} '#{title}' #{stick}"
|
24
|
-
end
|
25
|
-
|
26
|
-
##
|
27
|
-
# Set the label and clear the terminal.
|
28
|
-
Autotest.add_hook :run_command do
|
29
|
-
@label = File.basename(Dir.pwd).upcase
|
30
|
-
@run_scenarios = false
|
31
|
-
print "\n"*2 + '-'*80 + "\n"*2
|
32
|
-
print "\e[2J\e[f" # clear the terminal
|
33
|
-
false
|
34
|
-
end
|
35
|
-
|
36
|
-
##
|
37
|
-
# Parse the test results and send them to Growl.
|
38
|
-
Autotest.add_hook :ran_command do |autotest|
|
39
|
-
gist = autotest.results.grep(/\d+\s+(example|test)s?/).map {|s| s.gsub(/(\e.*?m|\n)/, '') }.join(" / ")
|
40
|
-
if gist == ''
|
41
|
-
growl "#{@label} cannot run tests", '', 'grey'
|
42
|
-
else
|
43
|
-
if gist =~ /[1-9]\d*\s+(failure|error)/
|
44
|
-
growl "#{@label} fails some tests", "#{gist}", 'red'
|
45
|
-
elsif gist =~ /pending/
|
46
|
-
growl "#{@label} has pending tests", "#{gist}", 'yellow'
|
47
|
-
@run_scenarios = true
|
48
|
-
else
|
49
|
-
growl "#{@label} passes all tests", "#{gist}", 'green'
|
50
|
-
@run_scenarios = true
|
51
|
-
end
|
52
|
-
end
|
53
|
-
false
|
54
|
-
end
|
55
|
-
|
56
|
-
# FIXME: This is a temporary workaround until Cucumber is properly integrated!
|
57
|
-
Autotest.add_hook :waiting do |autotest|
|
58
|
-
if @run_scenarios
|
59
|
-
gist = autotest.results.grep(/\d+\s+(scenario|step)s?/).map {|s| s.gsub(/(\e.*?m|\n)/, '') }.join(" / ")
|
60
|
-
if gist == ''
|
61
|
-
growl "#{@label} cannot run scenarios", '', 'grey'
|
62
|
-
else
|
63
|
-
if gist =~ /failed/
|
64
|
-
growl "#{@label} fails some scenarios", "#{gist}", 'red'
|
65
|
-
elsif gist =~ /undefined/
|
66
|
-
growl "#{@label} has undefined scenarios", "#{gist}", 'yellow'
|
67
|
-
else
|
68
|
-
growl "#{@label} passes all scenarios", "#{gist}", 'green'
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
false
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
module Autotest::Mac
|
78
|
-
|
79
|
-
##
|
80
|
-
# Add some exceptions
|
81
|
-
Autotest.add_hook :initialize do |autotest|
|
82
|
-
%w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
|
83
|
-
false
|
84
|
-
end
|
85
|
-
|
86
|
-
##
|
87
|
-
# Use FSEvent if possible
|
88
|
-
Autotest.add_hook :waiting do |autotest|
|
89
|
-
if RUBY_PLATFORM.sub(/^.*?darwin(\d+).*$/, '\1').to_i >= 9 # Darwin 9 alias Mac OS X 10.5 or above only
|
90
|
-
`#{File.join(GEM_DIR, 'fsevent', 'fsevent_sleep')} '#{Dir.pwd}' 2>&1`
|
91
|
-
else
|
92
|
-
puts "\nautotest-mac: FSEvent not available, falling back to filesystem polling."
|
93
|
-
end
|
94
|
-
false
|
95
|
-
end
|
8
|
+
VERSION = '0.1.3'
|
96
9
|
|
97
|
-
|
10
|
+
puts
|
11
|
+
puts "DEPRECATION NOTE --------------------------------------------------"
|
12
|
+
puts "The autotest-mac gem has been deprecated in favor of it's offspring"
|
13
|
+
puts "autotest-fsevent and autotest-growl. For migration instructions see"
|
14
|
+
puts "http://www.bitcetera.com/products/autotest-mac"
|
15
|
+
puts
|
98
16
|
|
99
17
|
end
|
data/spec/autotest-mac_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autotest-mac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
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-05-
|
12
|
+
date: 2009-05-28 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 1.8.0
|
44
44
|
version:
|
45
|
-
description:
|
45
|
+
description: Deprecated, use autotest-fsevent and autotest-growl instead.
|
46
46
|
email:
|
47
47
|
- ruby@bitcetera.com
|
48
48
|
executables: []
|
@@ -60,11 +60,6 @@ files:
|
|
60
60
|
- PostInstall.txt
|
61
61
|
- README.rdoc
|
62
62
|
- Rakefile
|
63
|
-
- fsevent/fsevent_sleep
|
64
|
-
- img/ruby_green.png
|
65
|
-
- img/ruby_grey.png
|
66
|
-
- img/ruby_red.png
|
67
|
-
- img/ruby_yellow.png
|
68
63
|
- lib/autotest-mac.rb
|
69
64
|
- script/console
|
70
65
|
- script/destroy
|
@@ -77,7 +72,28 @@ has_rdoc: true
|
|
77
72
|
homepage: http://www.bitcetera.com/products/autotest-mac
|
78
73
|
licenses: []
|
79
74
|
|
80
|
-
post_install_message:
|
75
|
+
post_install_message: |+
|
76
|
+
|
77
|
+
+--------------------------------------------------------------------------+
|
78
|
+
| |
|
79
|
+
| Following the feedback from ZenTest devs and users, the autotest-mac |
|
80
|
+
| is now split in to separate gems which include some bugfixes and new |
|
81
|
+
| features: |
|
82
|
+
| |
|
83
|
+
| * autotest-fsevent |
|
84
|
+
| * autotest-growl |
|
85
|
+
| |
|
86
|
+
| Migration is easy, check out the README or the homepage for details: |
|
87
|
+
| |
|
88
|
+
| * http://www.bitcetera.com/products/autotest-mac |
|
89
|
+
| * http://github.com/svoop/autotest-mac/tree/master |
|
90
|
+
| |
|
91
|
+
| This final release of autotest-mac is just a message and doesn't do |
|
92
|
+
| anything besided writing deprecation warnings to the terminal. You |
|
93
|
+
| should remove it now in favor of it's improved offspring gems. |
|
94
|
+
| |
|
95
|
+
+--------------------------------------------------------------------------+
|
96
|
+
|
81
97
|
rdoc_options:
|
82
98
|
- --main
|
83
99
|
- README.rdoc
|
@@ -101,6 +117,6 @@ rubyforge_project: autotest-mac
|
|
101
117
|
rubygems_version: 1.3.3
|
102
118
|
signing_key:
|
103
119
|
specification_version: 3
|
104
|
-
summary:
|
120
|
+
summary: Deprecated, use autotest-fsevent and autotest-growl instead.
|
105
121
|
test_files: []
|
106
122
|
|
data/fsevent/fsevent_sleep
DELETED
Binary file
|
data/img/ruby_green.png
DELETED
Binary file
|
data/img/ruby_grey.png
DELETED
Binary file
|
data/img/ruby_red.png
DELETED
Binary file
|
data/img/ruby_yellow.png
DELETED
Binary file
|