jshintrb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/jshintrb/jshinttask.rb +8 -0
- data/lib/jshintrb/version.rb +1 -1
- metadata +9 -9
data/README.md
CHANGED
@@ -69,5 +69,5 @@ If you pass `:defaults` as option, it is the same as if you pass following
|
|
69
69
|
## TODO
|
70
70
|
|
71
71
|
- add more tests
|
72
|
-
- add color reporter
|
73
|
-
- add cli
|
72
|
+
- add color reporter. Maybe [colorize](https://github.com/fazibear/colorize)
|
73
|
+
- add cli. Support same options as [jshint/node-jshint](https://github.com/jshint/node-jshint/blob/master/lib/cli.js)
|
data/lib/jshintrb/jshinttask.rb
CHANGED
@@ -27,11 +27,17 @@ module Jshintrb
|
|
27
27
|
# used, then the list of JavaScritp files is the union of the two.
|
28
28
|
attr_accessor :js_files
|
29
29
|
|
30
|
+
attr_accessor :exclude_pattern
|
31
|
+
|
32
|
+
attr_accessor :exclude_js_files
|
33
|
+
|
30
34
|
# Defines a new task, using the name +name+.
|
31
35
|
def initialize(name=:jshint)
|
32
36
|
@name = name
|
33
37
|
@pattern = nil
|
34
38
|
@js_files = nil
|
39
|
+
@exclude_pattern = nil
|
40
|
+
@exclude_js_files = nil
|
35
41
|
@options = nil
|
36
42
|
@fail_on_error = true
|
37
43
|
|
@@ -69,6 +75,8 @@ module Jshintrb
|
|
69
75
|
result = []
|
70
76
|
result += js_files.to_a if js_files
|
71
77
|
result += FileList[ pattern ].to_a if pattern
|
78
|
+
result -= exclude_js_files.to_a if js_files
|
79
|
+
result -= FileList[ exclude_pattern ].to_a if exclude_pattern
|
72
80
|
FileList[result]
|
73
81
|
end
|
74
82
|
end
|
data/lib/jshintrb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jshintrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &27109212 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *27109212
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &27108804 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *27108804
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: multi_json
|
38
|
-
requirement: &
|
38
|
+
requirement: &27108420 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *27108420
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: execjs
|
49
|
-
requirement: &
|
49
|
+
requirement: &27108048 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *27108048
|
58
58
|
description: Ruby wrapper for JSHint. The main difference from jshint gem it does
|
59
59
|
not depend on Java. Instead, it uses ExecJS
|
60
60
|
email:
|