jslint-johnson 1.0.3 → 1.0.4

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.
@@ -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
@@ -3,7 +3,7 @@ module JSLintJohnson
3
3
  module Version
4
4
  MAJOR = 1
5
5
  MINOR = 0
6
- PATCH = 3
6
+ PATCH = 4
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -104,7 +104,9 @@ class TestTask < Test::Unit::TestCase
104
104
  task.output_stream = StringIO.new(result, "w+")
105
105
  end
106
106
 
107
- Rake.application.lookup("lint").invoke
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: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
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-22 00:00:00 Z
18
+ date: 2011-08-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: johnson