filewatcher 1.1.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: ed73f2615aeb5418438bb443abc274bc2cd8279f
4
- data.tar.gz: 716e8b582f81531d486c1a281149da1702a044b7
3
+ metadata.gz: 805761615b226e14eb6431116a32bdc34e8b13cf
4
+ data.tar.gz: 4c1523220b4c242d33750e145091e1e2568766ac
5
5
  SHA512:
6
- metadata.gz: b37524eaae72f8eaaad40766e4e1793ec5766ebe7dd454e310eb98ba54745c59ecbc8358ea2045e335d242c84d6e48ef5bc1d0718b75546af481bd221f25c5d9
7
- data.tar.gz: 50690825a35a747dce1491d7f3f77a2edf135797551ca625cdeeafb08efd31caada6e982de54fde6bdad88d4ae934b92bb66d29605a7d74e181bc5d059f9d367
6
+ metadata.gz: 6d6f196a0ce277f920732a6c4ff0071b82e5b6eb3cf0683834041e973bb3a10a6c914aba6495d0bbbdfd83d241f983f697b45aa8ddd62ad9c973e3b4294fbffa
7
+ data.tar.gz: 7a75c0bb5e79efa44207f20052f8907790e2292195f65336f3d06303a8618ebe84fc658e32fec8333da461d7ccc979c74df061c735692ff7dd2647fac70b0f91
@@ -52,6 +52,7 @@ child_pid = nil
52
52
 
53
53
  def restart(pid, env, cmd)
54
54
  begin
55
+ raise Errno::ESRCH unless pid
55
56
  Process.kill(9, pid)
56
57
  Process.wait(pid)
57
58
  rescue Errno::ESRCH
@@ -3,5 +3,5 @@
3
3
  require_relative '../filewatcher'
4
4
 
5
5
  class Filewatcher
6
- VERSION = '1.1.0'.freeze
6
+ VERSION = '1.1.1'.freeze
7
7
  end
@@ -339,5 +339,16 @@ describe Filewatcher do
339
339
 
340
340
  File.exist?(ShellWatchRun::ENV_FILE).should.be.false
341
341
  end
342
+
343
+ it 'should work with restart option' do
344
+ swr = ShellWatchRun.new(
345
+ options: { restart: true }
346
+ )
347
+
348
+ swr.run
349
+
350
+ File.exist?(ShellWatchRun::ENV_FILE).should.be.true
351
+ File.read(ShellWatchRun::ENV_FILE).should.equal 'watched'
352
+ end
342
353
  end
343
354
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filewatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Flemming
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2018-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon