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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b693b3fb17f115a6f52aeb7da5bf4ae85e33fc1ca73ad0da80706662eea145eb
4
- data.tar.gz: 4247223843e8731087e4a01d3426cb8a26f87fe4897c302561fffc29e4e5e4d7
3
+ metadata.gz: 4405c7f1e90fa339f17ca2ca4563b6a347aa3ee448d6f407adfd48d9540ee3c5
4
+ data.tar.gz: c78ed58f3e2b7b56220163de5d6f5428f147597c199c39c16934ffc596488539
5
5
  SHA512:
6
- metadata.gz: fe77e37bff0d4b65182db0dbafa0d8744adc94d0baca392ed32a675bc4dfe1cc5631cbe8147a05370b73c0ea5044a5981bf33ae6ee141235530188986de9b818
7
- data.tar.gz: 997dd255185343fd9a40a58a00bfb0d6a7e96cc71291ed112fca4efac3a9d042700ca58db9e16debd64eae4a954d8f3769291c2e0664eb287c7e5c2c29dc00cf
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
- class MyApp < PidFileBlock::Application
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
- run_application
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})."
@@ -1,5 +1,5 @@
1
1
  class PidFileBlock
2
2
  module Version
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "1.0.0".freeze
4
4
  end
5
5
  end
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.1.1
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-05 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler