io-watch 0.2.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efa7c983d78d6c1d68fa71e376a13b2ed2db99ce1fcef3d8210bebc96b186db4
4
- data.tar.gz: c810f3f37cc027965dd6a5076b794f4131e758481c6e7171e1eec1c671292d06
3
+ metadata.gz: '099aa403649b5214390198ad846a1d16819133b59b89389ef0a794641cf25c7a'
4
+ data.tar.gz: e39d0a107c35541524a0288334308292d09ed241a308db8afb9871ec5e696294
5
5
  SHA512:
6
- metadata.gz: 986d7995fe323c601b30927c3f098e602102b836719a938d218de2453d0493c9bd02835252e535a20e76f2c121429e14d97b8e22f50a5c63f1944904ad99c95b
7
- data.tar.gz: 11a66c4f726382a9738c624b87fba567875fcdac9034985e3ebf9d0f8da635a20a3859861d86029f3d6967009707a5ca315859cf4d9771f77b9d0062eb472be8
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
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Watch
8
- VERSION = '0.2.0'
8
+ VERSION = '0.4.0'
9
9
  end
10
10
  end
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.2.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