guard-jslint-on-rails 0.0.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -0
- data/guard-jslint-on-rails.gemspec +2 -0
- data/lib/guard/jslint-on-rails.rb +11 -2
- metadata +25 -8
data/README.md
CHANGED
@@ -36,4 +36,14 @@ guard 'jslint-on-rails' do
|
|
36
36
|
end
|
37
37
|
```
|
38
38
|
|
39
|
+
### Optional Configuration Settings
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
# Guardfile
|
43
|
+
guard 'jslint-on-rails', :config => '/path/to/jslint.yml' do
|
44
|
+
end
|
45
|
+
|
46
|
+
:config - path to jslint.yml config file. default is config/jslint.yml
|
47
|
+
```
|
48
|
+
|
39
49
|
Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
|
@@ -5,7 +5,16 @@ require 'jslint'
|
|
5
5
|
|
6
6
|
module Guard
|
7
7
|
class JslintOnRails < Guard
|
8
|
-
VERSION = '0.0
|
8
|
+
VERSION = '0.2.0'
|
9
|
+
|
10
|
+
def initialize(watchers=[], options={})
|
11
|
+
super
|
12
|
+
@config_path = File.join(Dir.pwd, options[:config_path] || 'config/jslint.yml')
|
13
|
+
end
|
14
|
+
|
15
|
+
def start
|
16
|
+
UI.info "Guard::JsLintOnRails started using config: #{@config_path}"
|
17
|
+
end
|
9
18
|
|
10
19
|
def run_on_change(paths)
|
11
20
|
error = nil
|
@@ -13,7 +22,7 @@ module Guard
|
|
13
22
|
output = capture_output do
|
14
23
|
lint = ::JSLint::Lint.new(
|
15
24
|
:paths => paths,
|
16
|
-
:config_path =>
|
25
|
+
:config_path => @config_path
|
17
26
|
)
|
18
27
|
lint.run
|
19
28
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-jslint-on-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 2
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.8
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-14 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: guard
|
22
21
|
prerelease: false
|
22
|
+
name: guard
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
@@ -31,11 +31,11 @@ dependencies:
|
|
31
31
|
- 4
|
32
32
|
- 0
|
33
33
|
version: 0.4.0
|
34
|
-
type: :runtime
|
35
34
|
version_requirements: *id001
|
35
|
+
type: :runtime
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
name: jslint_on_rails
|
38
37
|
prerelease: false
|
38
|
+
name: jslint_on_rails
|
39
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
@@ -47,8 +47,25 @@ dependencies:
|
|
47
47
|
- 0
|
48
48
|
- 6
|
49
49
|
version: 1.0.6
|
50
|
-
type: :runtime
|
51
50
|
version_requirements: *id002
|
51
|
+
type: :runtime
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
prerelease: false
|
54
|
+
name: rake
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - "="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 11
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 9
|
64
|
+
- 2
|
65
|
+
- 2
|
66
|
+
version: 0.9.2.2
|
67
|
+
version_requirements: *id003
|
68
|
+
type: :development
|
52
69
|
description: Guard Javascript changes to ensure JSLint complience
|
53
70
|
email:
|
54
71
|
- ryan@codecrate.com
|