Skip to content

Commit

Permalink
Release 1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed May 9, 2012
1 parent 8ea5a93 commit 237fcbd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.3 - Mai 9, 2012

- [Issue #57](https://github.com/netzpirat/guard-jasmine/issues/57): Fix error trace notification.

## 1.1.2 - Mai 1, 2012

- Add timeout to availability checker.
Expand Down
12 changes: 7 additions & 5 deletions lib/guard/jasmine/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ def notify_spec_result(result, options)
time = result['stats']['time']
specs_plural = specs == 1 ? '' : 's'
failures_plural = failures == 1 ? '' : 's'

Formatter.info("\nFinished in #{ time } seconds")

message = "#{ specs } spec#{ specs_plural }, #{ failures } failure#{ failures_plural }"
full_message = "#{ message }\nin #{ time } seconds"
passed = failures == 0

if passed
report_specdoc(result, passed, options) if options[:specdoc] == :always
Formatter.success(message)
Expand All @@ -227,7 +227,7 @@ def notify_spec_result(result, options)
notify_errors(result, options)
Formatter.notify(full_message, :title => 'Jasmine suite failed', :image => :failed, :priority => 2) if options[:notification]
end

Formatter.info("Done.\n")
end

Expand Down Expand Up @@ -303,7 +303,9 @@ def report_specdoc_errors(spec, options, level)
if spec['errors'] && (options[:errors] == :always || (options[:errors] == :failure && !spec['passed']))
spec['errors'].each do |error|
if error['trace']
Formatter.spec_failed(indent(" ➜ Exception: #{ error['msg'] } in #{ error['trace']['file'] } on line #{ error['trace']['line'] }", level))
error['trace'].each do |trace|
Formatter.spec_failed(indent(" ➜ Exception: #{ error['msg'] } in #{ trace['file'] } on line #{ trace['line'] }", level))
end
else
Formatter.spec_failed(indent(" ➜ Exception: #{ error['msg'] }", level))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/guard/jasmine/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Guard
module JasmineVersion
# Guard::Jasmine version that is used for the Gem specification
VERSION = '1.1.2'
VERSION = '1.1.3'
end
end
8 changes: 4 additions & 4 deletions spec/guard/jasmine/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"errors": [
{
"msg": "Error message",
"trace" : {
"trace" : [{
"file": "/path/to/file.js",
"line": "255"
}
}]
}
],
"passed": false
Expand All @@ -71,10 +71,10 @@
"errors": [
{
"msg": "Another error message",
"trace" : {
"trace" : [{
"file": "/path/to/file.js",
"line": "255"
}
}]
}
]
}
Expand Down

0 comments on commit 237fcbd

Please sign in to comment.