io-watch 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bin/io-watch +33 -0
- data/lib/io/watch/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '099aa403649b5214390198ad846a1d16819133b59b89389ef0a794641cf25c7a'
|
4
|
+
data.tar.gz: e39d0a107c35541524a0288334308292d09ed241a308db8afb9871ec5e696294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ee830e50e5f1475017af8e812c01ae3090a88c24c8628bdd06a2e5349dd24026f2ca0aef3c6212facc4f1e42b4fb31ad515024f2368fcbe2d7cc7f48aeed1a
|
7
|
+
data.tar.gz: 7c2132304930f5a1a7b403ae94ce41e8dc0993fedecb797b6e7d9fce3316b1846ecad15f8ecdaa166a360973e527155dcb87f37f7f3a809f8d3f9550bac023ac
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bin/io-watch
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'console'
|
4
|
+
require 'io/watch'
|
5
|
+
|
6
|
+
command = ARGV
|
7
|
+
pid = nil
|
8
|
+
signal = :INT
|
9
|
+
|
10
|
+
if command.first =~ /TERM|INT|KILL|QUIT|HUP/
|
11
|
+
signal = command.shift
|
12
|
+
end
|
13
|
+
|
14
|
+
if split = command.index('--')
|
15
|
+
roots = command.pop(split)
|
16
|
+
command.pop
|
17
|
+
else
|
18
|
+
roots = [Dir.pwd]
|
19
|
+
end
|
20
|
+
|
21
|
+
monitor = IO::Watch::Monitor.new(roots)
|
22
|
+
|
23
|
+
monitor.run do
|
24
|
+
if pid
|
25
|
+
Console.info(self, "Killing command...", pid: pid)
|
26
|
+
Process.kill(signal, pid)
|
27
|
+
Process.wait(pid)
|
28
|
+
end
|
29
|
+
|
30
|
+
Console.info(self, "Starting command...")
|
31
|
+
pid = Process.spawn(*command)
|
32
|
+
Console.info(self, "Started command", pid: pid)
|
33
|
+
end
|
data/lib/io/watch/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: io-watch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -41,11 +41,13 @@ date: 2024-06-28 00:00:00.000000000 Z
|
|
41
41
|
dependencies: []
|
42
42
|
description:
|
43
43
|
email:
|
44
|
-
executables:
|
44
|
+
executables:
|
45
|
+
- io-watch
|
45
46
|
extensions:
|
46
47
|
- ext/configure
|
47
48
|
extra_rdoc_files: []
|
48
49
|
files:
|
50
|
+
- bin/io-watch
|
49
51
|
- ext/configure
|
50
52
|
- ext/io/watch.c
|
51
53
|
- ext/io/watch/fsevent.c
|
metadata.gz.sig
CHANGED
Binary file
|