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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efa7c983d78d6c1d68fa71e376a13b2ed2db99ce1fcef3d8210bebc96b186db4
4
- data.tar.gz: c810f3f37cc027965dd6a5076b794f4131e758481c6e7171e1eec1c671292d06
3
+ metadata.gz: acb60fab33220f774934fac55057df2ecbcdb5227b9014313d9c541d23642cdd
4
+ data.tar.gz: ac530c9cd6e504669a07f96e21515ad968504fa89783e19d49bc250774db30c8
5
5
  SHA512:
6
- metadata.gz: 986d7995fe323c601b30927c3f098e602102b836719a938d218de2453d0493c9bd02835252e535a20e76f2c121429e14d97b8e22f50a5c63f1944904ad99c95b
7
- data.tar.gz: 11a66c4f726382a9738c624b87fba567875fcdac9034985e3ebf9d0f8da635a20a3859861d86029f3d6967009707a5ca315859cf4d9771f77b9d0062eb472be8
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
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Watch
8
- VERSION = '0.2.0'
8
+ VERSION = '0.3.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.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