io-watch 0.2.0 → 0.3.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 +27 -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: acb60fab33220f774934fac55057df2ecbcdb5227b9014313d9c541d23642cdd
|
4
|
+
data.tar.gz: ac530c9cd6e504669a07f96e21515ad968504fa89783e19d49bc250774db30c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 256a699bc203c6e0036a54c15ec914f4b197016d0ee35b31cdc160ddecc2ef334e176fefdf4cd4402f817c42994342b66f0e127da19aa0436285b4628c3bce36
|
7
|
+
data.tar.gz: 159434b858a76c0825207d438a408d45a5013733a83283213a97721769582407c18fd81482f7efca1fe5492d6ae11cf377355c4f4ea20c93ddf8501d55df291b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bin/io-watch
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'console'
|
4
|
+
require 'io/watch'
|
5
|
+
|
6
|
+
root = Dir.pwd
|
7
|
+
command = ARGV
|
8
|
+
pid = nil
|
9
|
+
signal = :INT
|
10
|
+
|
11
|
+
if command.first =~ /TERM|INT|KILL|QUIT|HUP/
|
12
|
+
signal = command.shift
|
13
|
+
end
|
14
|
+
|
15
|
+
monitor = IO::Watch::Monitor.new([root])
|
16
|
+
|
17
|
+
monitor.run do
|
18
|
+
if pid
|
19
|
+
Console.info(self, "Killing command...", pid: pid)
|
20
|
+
Process.kill(signal, pid)
|
21
|
+
Process.wait(pid)
|
22
|
+
end
|
23
|
+
|
24
|
+
Console.info(self, "Starting command...")
|
25
|
+
pid = Process.spawn(*command)
|
26
|
+
Console.info(self, "Started command", pid: pid)
|
27
|
+
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.3.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
|