autotest-notification 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{autotest-notification}
5
- s.version = "2.3.0"
5
+ s.version = "2.3.1"
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"]
@@ -27,8 +27,13 @@ module AutotestNotification
27
27
  end
28
28
 
29
29
  Autotest.add_hook :ran_command do |at|
30
- result = at.results.is_a?(Array) ? at.results.last : at.results.split("\n").last
31
-
30
+
31
+ result = if at.results.is_a?(Array)
32
+ at.results.last == "\n" ? at.results[-2] : at.results.last
33
+ else
34
+ at.results.split("\n").last
35
+ end
36
+
32
37
  if result
33
38
  %w{ test assertion error example pending failure }.each { |x| instance_variable_set "@#{x}s", result[/(\d+) #{x}/, 1].to_i }
34
39
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest-notification
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 0
10
- version: 2.3.0
9
+ - 1
10
+ version: 2.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Carlos Brando