run_checker 0.1.1 → 0.1.2

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: 3a7e433e0161422009c2e733d836078d4a655a11
4
- data.tar.gz: 24d86f3ab5799f4693caf66da67553c4392198b6
3
+ metadata.gz: a3f8c279d057028c95a99becf231a7c7d22c9ef0
4
+ data.tar.gz: f92668491f33e6b82e496bd272dcaee18d764074
5
5
  SHA512:
6
- metadata.gz: d7c47902e7041512c369bb347ba7b59be235549ca32e453eaf2165e07a47ecd2cc1441c26993a99bb75400fb910c5b8f668823cbdbf61ff770d53273480a6765
7
- data.tar.gz: 0965b4127bca9e5ef99c399e3e363199ff4ee93be3ddd4d1a9300a34e59de60a8c1deed5da09a758857fc095e5ec1986f63323da2ddf59024dec0c5195a34fe0
6
+ metadata.gz: 464b206a2d19eca7fd195f6774ded4c64315aa164850c1d72966869e1545cece93d2c894153aa3a3f608c91fcc2f9e2307c21c3a0e6d211d403c36ff40826dd8
7
+ data.tar.gz: 4434cf99c2e32bdc0b5002cf800fee861a49934dd6336034a44e0b11dc6b3d93738dead2a6cf5c008cc5d142e69bfb8550e4be5c3f05bbd58f8685ba5b413f13
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -35,7 +35,7 @@ class RunChecker
35
35
  pid = f.read.chomp!.to_i
36
36
  end
37
37
 
38
- if exist_process(pid)
38
+ if 0 != pid && exist_process(pid)
39
39
  @logger.info("other process is running: pid(#{pid})")
40
40
  return false
41
41
  else
@@ -47,4 +47,9 @@ describe RunChecker do
47
47
 
48
48
  expect(File.exist?(@lock_file_path)).to eq(true)
49
49
  end
50
+
51
+ it 'empty file' do
52
+ FileUtils.touch(@lock_file_path)
53
+ expect(@run_checker.lock).to eq(true)
54
+ end
50
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - byplayer