forkr 0.1.5 → 0.1.6

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/forkr.gemspec +2 -6
  3. data/lib/forkr.rb +18 -2
  4. metadata +3 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3fe336abe0899e2eef7d722d55ad165efb4cfc9
4
- data.tar.gz: 18aaa3777dd55743fe873b9a51eee9e055f4e5f3
3
+ metadata.gz: 296b325468b389dccd6a7cbe882b7b6640a3d3a6
4
+ data.tar.gz: 9ee8107add29f14556346dbe34be3a5fde6111c0
5
5
  SHA512:
6
- metadata.gz: 9097997fb92d8ae974614681a99fa431dbfb055195e25d223d636d1b1117b49ec0c08c280d790fcd9a41d464b3e54f444b57153e4db5464cea70f5d9a3cfbad4
7
- data.tar.gz: 9c3ef4521cfab509fd9012a07177350e905fb03deee41e33f228155647ce0591ed0a07a7237c938644bb1229f812fc4e39bcb1567890bfb7ecfa9342d2c6d5a6
6
+ metadata.gz: 83a7313ee48f3d29f6db182608094c119f27bc2f2ea3efda79aaa0b55590722c0604b34d8247c79b5b375f00ba686caaaf6f651d85bd2b05e37626a366bc4cef
7
+ data.tar.gz: c5c4baaefa584790d1517570a68e52d6cf9dbcd459c2088d9edf6872daef95d0290945265a005cb8df4e3a77609b70a91f6ba8ab7e5f79eda942f18f54bca79c
data/forkr.gemspec CHANGED
@@ -1,13 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'forkr'
3
- s.version = '0.1.5'
3
+ s.version = '0.1.6'
4
4
  s.date = '2014-12-03'
5
5
  s.summary = "A pre-forking worker host - shamelessly inspired by unicorn."
6
- s.description = <<-DESCRIPTION
7
- Forkr is a preforking worker host, shamelessly inspired by unicorn.
8
-
9
- It exists to easily fork and scale ruby programs which aren't rack-based.
10
- DESCRIPTION
6
+ s.description = "Forkr is a preforking worker host, shamelessly inspired by unicorn. It exists to easily fork and scale ruby programs which aren't rack-based."
11
7
  s.authors = ["Trey Evans"]
12
8
  s.email = 'lewis.r.evans@gmail.com'
13
9
  s.files = ["lib/forkr.rb", "forkr.gemspec", "README.md"]
data/lib/forkr.rb CHANGED
@@ -1,6 +1,20 @@
1
1
  class Forkr
2
- attr_reader :master_pid, :child_count, :children
3
-
2
+
3
+ # The PID of the Forkr master
4
+ # @return [Fixnum]
5
+ attr_reader :master_pid
6
+
7
+ # The number of children I should maintain
8
+ # This can be adjusted up or down with the TTIN and TTOU signals.
9
+ # @return [Integer]
10
+ attr_reader :child_count
11
+
12
+ # Child process pids.
13
+ # @return [Array<Fixnum>]
14
+ attr_reader :children
15
+
16
+ # @param forklet [Object] the worker object
17
+ # @param num_kids [Integer] how many children to spawn
4
18
  def initialize(forklet, num_kids = 1)
5
19
  @worker_client = forklet
6
20
  @master_pid = $$
@@ -9,6 +23,8 @@ class Forkr
9
23
  @in_shutdown = false
10
24
  end
11
25
 
26
+ # Start the master, and spawn workers
27
+ # @return [nil]
12
28
  def run
13
29
  @inbound, @outbound = IO.pipe
14
30
  Signal.trap('CHLD') { dead_child }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forkr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Evans
@@ -10,10 +10,8 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |
14
- Forkr is a preforking worker host, shamelessly inspired by unicorn.
15
-
16
- It exists to easily fork and scale ruby programs which aren't rack-based.
13
+ description: Forkr is a preforking worker host, shamelessly inspired by unicorn. It
14
+ exists to easily fork and scale ruby programs which aren't rack-based.
17
15
  email: lewis.r.evans@gmail.com
18
16
  executables: []
19
17
  extensions: []