guard-jshint-node 0.0.4 → 0.0.5
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.
- data/README.md +6 -4
- data/lib/guard/jshint-node/version.rb +1 -1
- data/lib/guard/jshint-node.rb +2 -2
- data/spec/guard/jshint-node_spec.rb +3 -3
- metadata +4 -4
data/README.md
CHANGED
@@ -10,19 +10,21 @@ Make sure you have [guard](http://github.com/guard/guard) and [jshint](http://gi
|
|
10
10
|
|
11
11
|
Install the gem with:
|
12
12
|
|
13
|
-
gem install guard-node
|
13
|
+
gem install guard-jshint-node
|
14
14
|
|
15
15
|
Or add it to your Gemfile:
|
16
16
|
|
17
|
-
gem 'guard-node
|
17
|
+
gem 'guard-jshint-node'
|
18
18
|
|
19
19
|
And then add a basic setup to your Guardfile:
|
20
20
|
|
21
|
-
guard init node
|
21
|
+
guard init jshint-node
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
For configuration example, see [example/config.json](
|
25
|
+
For configuration example, see [example/config.json](https://github.com/jshint/node-jshint/blob/master/example/defaults.json) and the available [options](http://www.jshint.com/options).
|
26
|
+
|
27
|
+
|
26
28
|
|
27
29
|
## Options
|
28
30
|
|
data/lib/guard/jshint-node.rb
CHANGED
@@ -20,8 +20,8 @@ module Guard
|
|
20
20
|
|
21
21
|
# Called on file(s) modifications that the Guard watches.
|
22
22
|
# @param [Array<String>] paths the changes files or paths
|
23
|
-
# @raise [:task_has_failed] when
|
24
|
-
def
|
23
|
+
# @raise [:task_has_failed] when run_on_changes has failed
|
24
|
+
def run_on_changes(paths)
|
25
25
|
paths.each do |path|
|
26
26
|
|
27
27
|
is_old_version = (Gem::Version.new(`jshint --version`) < Gem::Version.new('0.5.2'))
|
@@ -5,14 +5,14 @@ describe Guard::JshintNode do
|
|
5
5
|
|
6
6
|
subject { Guard::JshintNode.new }
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#run_on_changes" do
|
9
9
|
|
10
10
|
it "with good file" do
|
11
|
-
subject.
|
11
|
+
subject.run_on_changes(['spec/fixtures/good.js']).should == true
|
12
12
|
end
|
13
13
|
|
14
14
|
it "with bad file" do
|
15
|
-
subject.
|
15
|
+
subject.run_on_changes(['spec/fixtures/bad.js']).should == false
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-jshint-node
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrik Henningsson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-06-23 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: guard
|