jslint-johnson 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jslint-johnson/rake_task.rb +3 -0
- data/lib/jslint-johnson/version.rb +1 -1
- data/test/test_task.rb +4 -2
- metadata +4 -4
@@ -50,6 +50,9 @@ module JSLintJohnson
|
|
50
50
|
|
51
51
|
# print a summary of failed files
|
52
52
|
formatter.summary(files_to_run, lint_result)
|
53
|
+
|
54
|
+
# raise an exception if there are errors
|
55
|
+
raise "jslint suite failed" unless lint_result.empty?
|
53
56
|
end
|
54
57
|
|
55
58
|
# assign the description to the rake task
|
data/test/test_task.rb
CHANGED
@@ -104,7 +104,9 @@ class TestTask < Test::Unit::TestCase
|
|
104
104
|
task.output_stream = StringIO.new(result, "w+")
|
105
105
|
end
|
106
106
|
|
107
|
-
|
107
|
+
assert_raise RuntimeError do
|
108
|
+
Rake.application.lookup("lint").invoke
|
109
|
+
end
|
108
110
|
|
109
111
|
assert_equal erb_fixture("cli-invalid-expected-output"), result
|
110
112
|
end
|
@@ -117,7 +119,7 @@ class TestTask < Test::Unit::TestCase
|
|
117
119
|
task.output_stream = StringIO.new(result, "w+")
|
118
120
|
end
|
119
121
|
|
120
|
-
Rake.application.lookup("lint").invoke
|
122
|
+
Rake.application.lookup("lint").invoke rescue # exception raised because of failing suite
|
121
123
|
|
122
124
|
assert_equal erb_fixture("cli-suite-expected-output"), result
|
123
125
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jslint-johnson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- William Howard
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-24 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: johnson
|