autotest-notification 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -3
- data/autotest-notification.gemspec +12 -12
- data/bin/an-install +1 -0
- data/lib/autotest_notification.rb +24 -29
- metadata +37 -86
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
gem 'hoe', '>= 2.
|
2
|
+
gem 'hoe', '>= 2.8.0'
|
3
3
|
require 'hoe'
|
4
4
|
require 'fileutils'
|
5
5
|
require './lib/autotest_notification.rb'
|
@@ -14,8 +14,7 @@ $hoe = Hoe.spec 'autotest-notification.rb' do
|
|
14
14
|
self.developer 'Carlos Brando', 'eduardobrando@gmail.com'
|
15
15
|
self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
16
16
|
self.rubyforge_name = self.name # TODO this is default value
|
17
|
-
self.extra_deps = [['autotest','~> 4.
|
18
|
-
|
17
|
+
self.extra_deps = [['autotest-standalone','~> 4.5']]
|
19
18
|
end
|
20
19
|
|
21
20
|
require 'newgem/tasks'
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{autotest-notification}
|
5
|
-
s.version = "2.3.
|
5
|
+
s.version = "2.3.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Carlos Brando"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-12-22}
|
10
10
|
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.}
|
11
11
|
s.email = ["eduardobrando@gmail.com"]
|
12
12
|
s.executables = ["an-install", "an-uninstall", "playsound"]
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.post_install_message = %q{PostInstall.txt}
|
17
17
|
s.rdoc_options = ["--main", "README.rdoc"]
|
18
18
|
s.require_paths = ["lib"]
|
19
|
-
s.rubyforge_project = %q{autotest-notification
|
19
|
+
s.rubyforge_project = %q{autotest-notification}
|
20
20
|
s.rubygems_version = %q{1.3.7}
|
21
21
|
s.summary = %q{This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.}
|
22
22
|
s.test_files = ["test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_mac.rb", "test/autotest_notification/test_windows.rb", "test/test_autotest_notification.rb", "test/test_helper.rb"]
|
@@ -26,17 +26,17 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.specification_version = 3
|
27
27
|
|
28
28
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
29
|
-
s.add_runtime_dependency(%q<autotest>, ["~> 4.
|
30
|
-
s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
|
31
|
-
s.add_development_dependency(%q<hoe>, [">= 2.6.0"])
|
29
|
+
s.add_runtime_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
30
|
+
# s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
|
31
|
+
# s.add_development_dependency(%q<hoe>, [">= 2.6.0"])
|
32
32
|
else
|
33
|
-
s.add_dependency(%q<autotest>, ["~> 4.
|
34
|
-
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
35
|
-
s.add_dependency(%q<hoe>, [">= 2.6.0"])
|
33
|
+
s.add_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
34
|
+
# s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
35
|
+
# s.add_dependency(%q<hoe>, [">= 2.6.0"])
|
36
36
|
end
|
37
37
|
else
|
38
|
-
s.add_dependency(%q<autotest>, ["~> 4.
|
39
|
-
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
40
|
-
s.add_dependency(%q<hoe>, [">= 2.6.0"])
|
38
|
+
s.add_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
39
|
+
# s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
40
|
+
# s.add_dependency(%q<hoe>, [">= 2.6.0"])
|
41
41
|
end
|
42
42
|
end
|
data/bin/an-install
CHANGED
@@ -92,6 +92,7 @@ end
|
|
92
92
|
|
93
93
|
f = File.new("#{autotest_path}/.autotest", "w")
|
94
94
|
f.write "# ~.autotest\n"
|
95
|
+
f.write "require 'rubygems'\n"
|
95
96
|
f.write "require 'autotest_notification'\n"
|
96
97
|
f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
|
97
98
|
f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
|
@@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__))
|
|
3
3
|
|
4
4
|
module AutotestNotification
|
5
5
|
|
6
|
-
VERSION = '2.3.
|
6
|
+
VERSION = '2.3.2'
|
7
7
|
|
8
8
|
class Config
|
9
9
|
|
@@ -27,39 +27,34 @@ module AutotestNotification
|
|
27
27
|
end
|
28
28
|
|
29
29
|
Autotest.add_hook :ran_command do |at|
|
30
|
+
lines = autotest.results.map { |s| s.gsub(/(\e.*?m|\n)/, '') } # remove escape sequences
|
31
|
+
lines.reject! { |line| !line.match(/\d+\s+(seed|example|test|scenario|step)s?/) } # isolate result numbers
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
else
|
34
|
-
at.results.split("\n").last
|
33
|
+
lines.each do |line|
|
34
|
+
%w{ test assertion error example pending failure }.each { |x| instance_variable_set "@#{x}s", line[/(\d+) #{x}/, 1].to_i }
|
35
35
|
end
|
36
36
|
|
37
|
-
if
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
code = 31
|
49
|
-
msg = "1 exception occurred"
|
50
|
-
@failures = 1
|
51
|
-
end
|
52
|
-
|
53
|
-
if @failures > 0 || @errors > 0
|
54
|
-
notify "FAIL", msg, Config.fail_image, @tests + @examples, @failures + @errors, 2
|
55
|
-
elsif PENDING && @pendings > 0
|
56
|
-
notify "Pending", msg, Config.pending_image, @tests + @examples, @failures + @errors, 1
|
57
|
-
else
|
58
|
-
notify "Pass", msg, Config.success_image, @tests + @examples, 0, -2
|
59
|
-
end
|
37
|
+
if @tests
|
38
|
+
code = 31 if @failures > 0 || @errors > 0
|
39
|
+
msg = unit_test_message(@tests, @assertions, @failures, @errors)
|
40
|
+
elsif @examples
|
41
|
+
code = (@failures > 0) ? 31 : (@pendings > 0) ? 33 : 32
|
42
|
+
msg = rspec_message(@examples, @failures, @pendings)
|
43
|
+
else
|
44
|
+
code = 31
|
45
|
+
msg = "1 exception occurred"
|
46
|
+
@failures = 1
|
47
|
+
end
|
60
48
|
|
61
|
-
|
49
|
+
if @failures > 0 || @errors > 0
|
50
|
+
notify "FAIL", msg, Config.fail_image, @tests + @examples, @failures + @errors, 2
|
51
|
+
elsif PENDING && @pendings > 0
|
52
|
+
notify "Pending", msg, Config.pending_image, @tests + @examples, @failures + @errors, 1
|
53
|
+
else
|
54
|
+
notify "Pass", msg, Config.success_image, @tests + @examples, 0, -2
|
62
55
|
end
|
56
|
+
|
57
|
+
puts "\e[#{code}m#{'=' * 80}\e[0m\n\n"
|
63
58
|
end
|
64
59
|
|
65
60
|
Autotest.add_hook :ran_features do |at|
|
metadata
CHANGED
@@ -1,86 +1,44 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: autotest-notification
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 3
|
9
|
-
- 1
|
10
|
-
version: 2.3.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.3.2
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Carlos Brando
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2010-08-02 00:00:00 -03:00
|
12
|
+
date: 2010-12-22 00:00:00.000000000 -02:00
|
19
13
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
name: autotest
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: autotest-standalone
|
17
|
+
requirement: &2165795860 !ruby/object:Gem::Requirement
|
25
18
|
none: false
|
26
|
-
requirements:
|
19
|
+
requirements:
|
27
20
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 4
|
32
|
-
- 3
|
33
|
-
version: "4.3"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4.5'
|
34
23
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rubyforge
|
38
24
|
prerelease: false
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 7
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 0
|
48
|
-
- 4
|
49
|
-
version: 2.0.4
|
50
|
-
type: :development
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: hoe
|
54
|
-
prerelease: false
|
55
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
-
none: false
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 23
|
61
|
-
segments:
|
62
|
-
- 2
|
63
|
-
- 6
|
64
|
-
- 0
|
65
|
-
version: 2.6.0
|
66
|
-
type: :development
|
67
|
-
version_requirements: *id003
|
68
|
-
description: This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
|
69
|
-
email:
|
25
|
+
version_requirements: *2165795860
|
26
|
+
description: This gem set the autotest (ZenTest) to send messages to software as Growl,
|
27
|
+
LibNotify, and Snarl, displaying a window with the results.
|
28
|
+
email:
|
70
29
|
- eduardobrando@gmail.com
|
71
|
-
executables:
|
30
|
+
executables:
|
72
31
|
- an-install
|
73
32
|
- an-uninstall
|
74
33
|
- playsound
|
75
34
|
extensions: []
|
76
|
-
|
77
|
-
extra_rdoc_files:
|
35
|
+
extra_rdoc_files:
|
78
36
|
- History.txt
|
79
37
|
- License.txt
|
80
38
|
- Manifest.txt
|
81
39
|
- PostInstall.txt
|
82
40
|
- website/index.txt
|
83
|
-
files:
|
41
|
+
files:
|
84
42
|
- History.txt
|
85
43
|
- License.txt
|
86
44
|
- Manifest.txt
|
@@ -140,39 +98,32 @@ files:
|
|
140
98
|
has_rdoc: true
|
141
99
|
homepage: http://github.com/carlosbrando/autotest-notification/
|
142
100
|
licenses: []
|
143
|
-
|
144
101
|
post_install_message: PostInstall.txt
|
145
|
-
rdoc_options:
|
102
|
+
rdoc_options:
|
146
103
|
- --main
|
147
104
|
- README.rdoc
|
148
|
-
require_paths:
|
105
|
+
require_paths:
|
149
106
|
- lib
|
150
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
108
|
none: false
|
152
|
-
requirements:
|
153
|
-
- -
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
|
156
|
-
|
157
|
-
- 0
|
158
|
-
version: "0"
|
159
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
114
|
none: false
|
161
|
-
requirements:
|
162
|
-
- -
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
|
165
|
-
segments:
|
166
|
-
- 0
|
167
|
-
version: "0"
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
168
119
|
requirements: []
|
169
|
-
|
170
|
-
|
171
|
-
rubygems_version: 1.3.7
|
120
|
+
rubyforge_project: autotest-notification
|
121
|
+
rubygems_version: 1.6.2
|
172
122
|
signing_key:
|
173
123
|
specification_version: 3
|
174
|
-
summary: This gem set the autotest (ZenTest) to send messages to software as Growl,
|
175
|
-
|
124
|
+
summary: This gem set the autotest (ZenTest) to send messages to software as Growl,
|
125
|
+
LibNotify, and Snarl, displaying a window with the results.
|
126
|
+
test_files:
|
176
127
|
- test/autotest_notification/test_cygwin.rb
|
177
128
|
- test/autotest_notification/test_linux.rb
|
178
129
|
- test/autotest_notification/test_mac.rb
|