guard-jslint-on-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/jslint-on-rails.rb +2 -45
- metadata +3 -3
@@ -1,55 +1,12 @@
|
|
1
1
|
require 'guard'
|
2
2
|
require 'guard/guard'
|
3
3
|
|
4
|
-
puts 'loading'
|
5
4
|
module Guard
|
6
5
|
class JslintOnRails < Guard
|
7
|
-
VERSION = '0.0.
|
8
|
-
|
9
|
-
# def initialize(watchers = [], options = {})
|
10
|
-
# @process = nil
|
11
|
-
# @pid = nil
|
12
|
-
# @command = options[:command]
|
13
|
-
# @env = options[:env]
|
14
|
-
# @name = options[:name]
|
15
|
-
# @stop_signal = options[:stop_signal] || "TERM"
|
16
|
-
# super
|
17
|
-
# end
|
18
|
-
# def process_running?
|
19
|
-
# begin
|
20
|
-
# @pid ? ::Process.kill(0, @pid) : false
|
21
|
-
# rescue Errno::ESRCH => e
|
22
|
-
# false
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
# def start
|
26
|
-
# UI.info("Starting process #{@name}")
|
27
|
-
# @process = @env ? IO.popen([@env, @command]) : IO.popen(@command)
|
28
|
-
# UI.info("Started process #{@name}")
|
29
|
-
# @pid = @process.pid
|
30
|
-
# end
|
31
|
-
# def stop
|
32
|
-
# if @process
|
33
|
-
# UI.info("Stopping process #{@name}")
|
34
|
-
# ::Process.kill(@stop_signal, @process.pid)
|
35
|
-
# ::Process.waitpid(@pid) rescue Errno::ESRCH
|
36
|
-
# @process.close
|
37
|
-
# @pid = nil
|
38
|
-
# UI.info("Stopped process #{@name}")
|
39
|
-
# end
|
40
|
-
# end
|
41
|
-
# def reload
|
42
|
-
# stop
|
43
|
-
# start
|
44
|
-
# end
|
45
|
-
# def run_all
|
46
|
-
# true
|
47
|
-
# end
|
6
|
+
VERSION = '0.0.3'
|
48
7
|
|
49
8
|
def run_on_change(paths)
|
50
|
-
|
51
|
-
result = system "rake jslint paths=#{paths.join(',')}"
|
52
|
-
raise 'JSLint Failure' unless result
|
9
|
+
system "rake jslint paths=#{paths.join(',')}"
|
53
10
|
end
|
54
11
|
end
|
55
12
|
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|