guard-jasmine 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ page = require('webpage').create()
|
|
39
39
|
|
40
40
|
# Used to collect log messages for later assignment to the spec
|
41
41
|
#
|
42
|
-
currentSpecId =
|
42
|
+
currentSpecId = -1
|
43
43
|
logs = {}
|
44
44
|
|
45
45
|
# Add logs to the given suite
|
@@ -75,7 +75,7 @@ page.onConsoleMessage = (msg, line, source) ->
|
|
75
75
|
logs[currentSpecId] = []
|
76
76
|
|
77
77
|
else
|
78
|
-
logs[currentSpecId].push
|
78
|
+
logs[currentSpecId].push("#{ msg } in #{ source } (line #{ line })") if currentSpecId isnt -1
|
79
79
|
|
80
80
|
# Initialize the page before the JavaScript is run.
|
81
81
|
#
|
data/lib/guard/jasmine/runner.rb
CHANGED
@@ -145,26 +145,26 @@ module Guard
|
|
145
145
|
#
|
146
146
|
def evaluate_response(output, file, options)
|
147
147
|
json = output.read
|
148
|
-
result = {}
|
149
148
|
|
150
149
|
begin
|
151
150
|
result = MultiJson.decode(json)
|
151
|
+
|
152
|
+
if result['error']
|
153
|
+
notify_runtime_error(result, options)
|
154
|
+
else
|
155
|
+
result['file'] = file
|
156
|
+
notify_spec_result(result, options)
|
157
|
+
end
|
158
|
+
|
159
|
+
result
|
160
|
+
|
152
161
|
rescue Exception => e
|
153
162
|
Formatter.error("Cannot decode JSON from PhantomJS runner: #{ e.message }")
|
154
163
|
Formatter.error('Please report an issue at: https://github.com/netzpirat/guard-jasmine/issues')
|
155
|
-
Formatter.error(json)
|
164
|
+
Formatter.error("JSON response: #{ json }")
|
156
165
|
ensure
|
157
166
|
output.close
|
158
167
|
end
|
159
|
-
|
160
|
-
if result['error']
|
161
|
-
notify_runtime_error(result, options)
|
162
|
-
else
|
163
|
-
result['file'] = file
|
164
|
-
notify_spec_result(result, options)
|
165
|
-
end
|
166
|
-
|
167
|
-
result
|
168
168
|
end
|
169
169
|
|
170
170
|
# Notification when a system error happens that
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-jasmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Kessler
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-12 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: guard
|