pid_file_block 0.1.1 → 1.0.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 +4 -4
- data/README.md +2 -7
- data/lib/pid_file_block/application.rb +3 -3
- data/lib/pid_file_block/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4405c7f1e90fa339f17ca2ca4563b6a347aa3ee448d6f407adfd48d9540ee3c5
|
4
|
+
data.tar.gz: c78ed58f3e2b7b56220163de5d6f5428f147597c199c39c16934ffc596488539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68971cc16140b7480008e0395a9d248a66d5ae85d1443f8802679c8cf9b4b835f824823b60bd43f56e86d027fafec9f8d1bd0d62dd35bbf56aacadf1a99a21d
|
7
|
+
data.tar.gz: 9a41e96f179084570f0487dc018e8844cf1bd79c41079b3b5ffa3b59e7d67294422494c388197cc57e32449b22b45c55a505879acbdb2e2e249792e4848d45ca
|
data/README.md
CHANGED
@@ -82,15 +82,10 @@ Another way - use the PidFileBlock::Application
|
|
82
82
|
require 'pid_file_block'
|
83
83
|
require 'pid_file_block/application'
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
def self.run_application
|
88
|
-
# Put your code here
|
89
|
-
end
|
90
|
-
|
85
|
+
PidFileBlock::Application.run(piddir: '/run', pidfile: 'example.pid')
|
86
|
+
# Put your code here
|
91
87
|
end
|
92
88
|
|
93
|
-
MyApp.run(piddir: '/run', pidfile: 'example.pid')
|
94
89
|
|
95
90
|
```
|
96
91
|
|
@@ -6,8 +6,8 @@ class PidFileBlock
|
|
6
6
|
|
7
7
|
class Application
|
8
8
|
|
9
|
-
def self.run_application
|
10
|
-
end
|
9
|
+
# def self.run_application
|
10
|
+
# end
|
11
11
|
|
12
12
|
def self.do_exit(pid_file_block, exit_code)
|
13
13
|
pid_file_block.release if pid_file_block
|
@@ -29,7 +29,7 @@ class PidFileBlock
|
|
29
29
|
pid_file_block = PidFileBlock.new(piddir: piddir, pidfile: pidfile)
|
30
30
|
begin
|
31
31
|
pid_file_block.open do
|
32
|
-
|
32
|
+
yield
|
33
33
|
end
|
34
34
|
rescue PidFileBlock::ProcessExistsError
|
35
35
|
STDERR.puts "Error: process exists (see pid in file #{pid_file_block.pid_file_full_name})."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pid_file_block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kharitonov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|