guard-jshint-node 0.0.5 → 0.0.6

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 CHANGED
@@ -28,6 +28,10 @@ For configuration example, see [example/config.json](https://github.com/jshint/n
28
28
 
29
29
  ## Options
30
30
 
31
+ * `:executable # default => "jshint"`
32
+
33
+ Specify alternative path to the jshint command.
34
+
31
35
  * `:config # default => "jshint-config.json"`
32
36
 
33
37
  Specify path to config file.
@@ -40,4 +44,18 @@ If Growl messages should be displayed or not.
40
44
 
41
45
  guard 'jshint-node', :config => 'path/to/config.json' do
42
46
  watch(%r{^scripts\/.*\.js$})
43
- end
47
+ end
48
+
49
+ # Build & Test Install
50
+
51
+ bundle -V check
52
+ gem build -V guard-jshint-node.gemspec
53
+ gem check --verify guard-jshint-node-<VERSION>.gem
54
+
55
+ gem install --local -V guard-jshint-node-<VERSION>.gem
56
+ gem uninstall -a guard-jshint-node
57
+
58
+
59
+ # Running Tests
60
+
61
+ bundle exec rake
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module JshintNodeVersion
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -6,6 +6,7 @@ module Guard
6
6
 
7
7
  DEFAULT_OPTIONS = {
8
8
  :config => 'jshint-config.json',
9
+ :executable => 'jshint',
9
10
  :notify => true,
10
11
  }
11
12
 
@@ -24,8 +25,8 @@ module Guard
24
25
  def run_on_changes(paths)
25
26
  paths.each do |path|
26
27
 
27
- is_old_version = (Gem::Version.new(`jshint --version`) < Gem::Version.new('0.5.2'))
28
- results = `jshint #{path} --config #{@options[:config]}`
28
+ is_old_version = (Gem::Version.new(`#{@options[:executable]} --version`) < Gem::Version.new('0.5.2'))
29
+ results = `#{@options[:executable]} #{path} --config #{@options[:config]}`
29
30
 
30
31
  if (is_old_version and results.include? 'Lint Free!') or (!is_old_version and $?.to_i == 0) then
31
32
  if options[:notify]
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: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
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-06-23 00:00:00 Z
18
+ date: 2012-06-27 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: guard