spool 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +10 -1
- data/README.md +5 -5
- data/Rakefile +8 -1
- data/lib/spool/pool.rb +116 -55
- data/lib/spool/spawner.rb +9 -29
- data/lib/spool/version.rb +2 -2
- data/spec/coverage_helper.rb +1 -4
- data/spec/dsl_spec.rb +1 -1
- data/spec/minitest_helper.rb +2 -8
- data/spec/pool_spec.rb +52 -19
- data/spool.gemspec +9 -7
- metadata +81 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cd28f69dbcc9fa880576478edc6c7da20bfe41c
|
4
|
+
data.tar.gz: fbd79a844212f9e8d3c77e2f9ea6da765ecfd339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffbdf6dbf85151a900a0e916a63c939cd545e7b9a3be53375de57b66ef4d0dd9967abc0019e368104bc7e83b91c7ea1ff57a52c902bd78ede03528d2a4fc5d4d
|
7
|
+
data.tar.gz: 3f5cdd7df01709e49ad1de4d79c2be498d48df165c0a6b20f8b3ab2e7f4530519bbed0202bec5fc4b4e9eba16b14a0773b13d626f12bbab9ab08e51091261092
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 2.
|
1
|
+
ruby 2.1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Spool
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/spool.
|
4
|
-
[![Build Status](https://travis-ci.org/gabynaiman/spool.
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/gabynaiman/spool/badge.
|
6
|
-
[![Code Climate](https://codeclimate.com/github/gabynaiman/spool.
|
7
|
-
[![Dependency Status](https://gemnasium.com/gabynaiman/spool.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/spool.svg)](https://rubygems.org/gems/spool)
|
4
|
+
[![Build Status](https://travis-ci.org/gabynaiman/spool.svg?branch=master)](https://travis-ci.org/gabynaiman/spool)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/gabynaiman/spool/badge.svg?branch=master)](https://coveralls.io/r/gabynaiman/spool?branch=master)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/gabynaiman/spool.svg)](https://codeclimate.com/github/gabynaiman/spool)
|
7
|
+
[![Dependency Status](https://gemnasium.com/gabynaiman/spool.svg)](https://gemnasium.com/gabynaiman/spool)
|
8
8
|
|
9
9
|
Manage and keep alive pool of processes
|
10
10
|
|
data/Rakefile
CHANGED
@@ -3,8 +3,15 @@ require 'rake/testtask'
|
|
3
3
|
|
4
4
|
Rake::TestTask.new(:spec) do |t|
|
5
5
|
t.libs << 'spec'
|
6
|
-
t.
|
6
|
+
t.libs << 'lib'
|
7
|
+
t.pattern = ENV['DIR'] ? File.join(ENV['DIR'], '**', '*_spec.rb') : 'spec/**/*_spec.rb'
|
7
8
|
t.verbose = false
|
9
|
+
t.warning = false
|
10
|
+
t.loader = nil if ENV['TEST']
|
11
|
+
ENV['TEST'], ENV['LINE'] = ENV['TEST'].split(':') if ENV['TEST'] && !ENV['LINE']
|
12
|
+
t.options = ''
|
13
|
+
t.options << "--name=/#{ENV['NAME']}/ " if ENV['NAME']
|
14
|
+
t.options << "-l #{ENV['LINE']} " if ENV['LINE'] && ENV['TEST']
|
8
15
|
end
|
9
16
|
|
10
17
|
desc 'Console'
|
data/lib/spool/pool.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Spool
|
2
2
|
class Pool
|
3
3
|
|
4
|
+
CHECK_TIMEOUT = 0.01
|
5
|
+
|
4
6
|
SIGNALS = {
|
5
7
|
INT: :stop!,
|
6
8
|
TERM: :stop!,
|
@@ -11,24 +13,32 @@ module Spool
|
|
11
13
|
TTOU: :decr
|
12
14
|
}
|
13
15
|
|
14
|
-
attr_reader :configuration, :
|
16
|
+
attr_reader :configuration, :processes
|
15
17
|
|
16
18
|
def initialize(configuration=nil, &block)
|
17
19
|
@configuration = configuration || DSL.configure(&block)
|
18
20
|
@processes = []
|
19
|
-
@
|
21
|
+
@running = false
|
22
|
+
@actions_queue = []
|
20
23
|
end
|
21
24
|
|
22
|
-
def
|
23
|
-
@
|
25
|
+
def running?
|
26
|
+
@running
|
24
27
|
end
|
25
28
|
|
26
29
|
def stopped?
|
27
|
-
!
|
30
|
+
!running?
|
31
|
+
end
|
32
|
+
|
33
|
+
[:incr, :decr, :reload, :restart, :stop, :stop!].each do |method|
|
34
|
+
define_method method do |*args|
|
35
|
+
actions_queue.push(name: "_#{method}".to_sym, args: args)
|
36
|
+
nil
|
37
|
+
end
|
28
38
|
end
|
29
39
|
|
30
40
|
def start
|
31
|
-
@
|
41
|
+
@running = true
|
32
42
|
|
33
43
|
handle_signals
|
34
44
|
|
@@ -37,65 +47,45 @@ module Spool
|
|
37
47
|
configuration.processes.times.map do
|
38
48
|
processes << Spawner.spawn(configuration)
|
39
49
|
end
|
40
|
-
logger.info(self.class) { "SPOOL START childrens: #{processes.map(&:pid)}" }
|
41
|
-
|
42
|
-
while @started
|
43
|
-
check_status
|
44
|
-
sleep 0.05
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def stop(timeout=0)
|
49
|
-
logger.info(self.class) { "SPOOL STOP" }
|
50
|
-
stop_processes processes
|
51
|
-
Timeout.timeout(timeout) { wait_for_stopped processes }
|
52
|
-
rescue Timeout::Error
|
53
|
-
logger.error(self.class) { "ERROR IN SPOOL STOP. Timeout error" }
|
54
|
-
ensure
|
55
|
-
stop!
|
56
|
-
end
|
57
|
-
|
58
|
-
def stop!
|
59
|
-
@started = false
|
60
|
-
logger.info(self.class) { "SPOOL STOP! kill this children (#{processes.map(&:pid)})" }
|
61
|
-
processes.each { |p| p.send_signal configuration.kill_signal}
|
62
|
-
wait_for_stopped processes
|
63
|
-
processes.clear
|
64
|
-
File.delete configuration.pid_file if File.exists? configuration.pid_file
|
65
|
-
end
|
66
50
|
|
67
|
-
|
68
|
-
configuration.processes += count
|
69
|
-
end
|
51
|
+
logger.info(self.class) { "SPOOL START childrens: #{processes.map(&:pid)}" }
|
70
52
|
|
71
|
-
|
72
|
-
|
73
|
-
|
53
|
+
while running?
|
54
|
+
action = actions_queue.pop
|
55
|
+
|
56
|
+
if action
|
57
|
+
logger.info(self.class) { "Starting action #{action[:name]} with params: [#{action[:args].join(', ')}]" }
|
58
|
+
send action[:name], *action[:args]
|
59
|
+
end
|
74
60
|
|
75
|
-
|
76
|
-
|
77
|
-
|
61
|
+
if running?
|
62
|
+
check_status
|
63
|
+
sleep CHECK_TIMEOUT
|
64
|
+
end
|
65
|
+
end
|
78
66
|
|
79
|
-
|
80
|
-
logger.info(self.class) { "RESTART" }
|
81
|
-
stop_processes processes
|
67
|
+
logger.info(self.class) { "Spool finished successfully!" }
|
82
68
|
end
|
83
69
|
|
84
70
|
private
|
85
71
|
|
72
|
+
attr_reader :actions_queue
|
73
|
+
|
86
74
|
def handle_signals
|
87
75
|
SIGNALS.each do |signal, event|
|
88
|
-
Signal.trap(signal)
|
76
|
+
Signal.trap(signal) do
|
77
|
+
logger.info(self.class) { "Signal #{signal} received. Current state of actions queue is:\n#{format_actions_queue}" }
|
78
|
+
send event
|
79
|
+
end
|
89
80
|
end
|
90
81
|
end
|
91
82
|
|
92
|
-
def check_status
|
93
|
-
return if stopped?
|
94
|
-
|
95
|
-
stop_processes processes.select(&configuration.restart_condition)
|
83
|
+
def check_status
|
96
84
|
processes.delete_if { |p| !p.alive? }
|
85
|
+
|
86
|
+
to_restart = processes.select(&configuration.restart_condition)
|
87
|
+
stop_processes to_restart
|
97
88
|
|
98
|
-
return if stopped?
|
99
89
|
if configuration.processes > processes.count
|
100
90
|
logger.info(self.class) { "Initialize new children: #{processes.map(&:pid)}" }
|
101
91
|
|
@@ -103,8 +93,7 @@ module Spool
|
|
103
93
|
processes << Spawner.spawn(configuration)
|
104
94
|
end
|
105
95
|
|
106
|
-
logger.info(self.class) { "
|
107
|
-
|
96
|
+
logger.info(self.class) { "New children: #{processes.map(&:pid)}" }
|
108
97
|
elsif configuration.processes < processes.count
|
109
98
|
logger.info(self.class) { "Kill childrens: #{processes.map(&:pid)}" }
|
110
99
|
|
@@ -116,12 +105,72 @@ module Spool
|
|
116
105
|
logger.info(self.class) { "After kill childrens: #{processes.map(&:pid)}" }
|
117
106
|
end
|
118
107
|
|
119
|
-
rescue
|
120
|
-
|
108
|
+
rescue Exception => e
|
109
|
+
log_error e
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
def _incr(count=1)
|
114
|
+
configuration.processes += count
|
115
|
+
end
|
116
|
+
|
117
|
+
def _decr(count=1)
|
118
|
+
configuration.processes -= count
|
119
|
+
configuration.processes = 0 if configuration.processes < 0
|
120
|
+
end
|
121
|
+
|
122
|
+
def _reload
|
123
|
+
@configuration = DSL.configure configuration.source_file if configuration.source_file
|
124
|
+
end
|
125
|
+
|
126
|
+
def _restart
|
127
|
+
logger.info(self.class) { "RESTART" }
|
128
|
+
stop_processes processes
|
129
|
+
end
|
130
|
+
|
131
|
+
def _stop(timeout=0)
|
132
|
+
logger.info(self.class) { "SPOOL STOP" }
|
133
|
+
|
134
|
+
stop_processes processes
|
135
|
+
Timeout.timeout(timeout) { wait_for_stopped processes }
|
136
|
+
rescue Timeout::Error
|
137
|
+
logger.error(self.class) { "ERROR IN SPOOL STOP. Timeout error" }
|
138
|
+
ensure
|
139
|
+
_stop!
|
140
|
+
@running = false
|
141
|
+
end
|
142
|
+
|
143
|
+
def _stop!
|
144
|
+
logger.info(self.class) { "SPOOL STOP! kill this children (#{processes.map(&:pid)})" }
|
145
|
+
|
146
|
+
processes.each do |p|
|
147
|
+
begin
|
148
|
+
p.send_signal(configuration.kill_signal) if p.alive?
|
149
|
+
rescue Datacenter::Shell::CommandError => e
|
150
|
+
if p.alive?
|
151
|
+
log_error e
|
152
|
+
else
|
153
|
+
logger.info(self.class) { "Signal KILL was sent to #{p.pid} but process was already dead" }
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
wait_for_stopped processes
|
159
|
+
|
160
|
+
processes.clear
|
161
|
+
|
162
|
+
File.delete configuration.pid_file if File.exist? configuration.pid_file
|
163
|
+
@running = false
|
121
164
|
end
|
122
165
|
|
123
166
|
def stop_processes(processes_list)
|
124
|
-
processes_list.each
|
167
|
+
processes_list.each do |p|
|
168
|
+
begin
|
169
|
+
p.send_signal configuration.stop_signal
|
170
|
+
rescue Exception => e
|
171
|
+
log_error e
|
172
|
+
end
|
173
|
+
end
|
125
174
|
end
|
126
175
|
|
127
176
|
def wait_for_stopped(processes)
|
@@ -134,6 +183,18 @@ module Spool
|
|
134
183
|
configuration.logger
|
135
184
|
end
|
136
185
|
|
186
|
+
def log_error(error)
|
187
|
+
logger.error(self.class) { "#{error.message}\n#{error.backtrace.join("\n")}" }
|
188
|
+
end
|
189
|
+
|
190
|
+
def format_actions_queue
|
191
|
+
return "EMPTY" if actions_queue.empty?
|
192
|
+
|
193
|
+
actions_queue.map.with_index do |action, index|
|
194
|
+
"#{index+1} => #{a[:name]}"
|
195
|
+
end.join("\n")
|
196
|
+
end
|
197
|
+
|
137
198
|
end
|
138
199
|
|
139
200
|
end
|
data/lib/spool/spawner.rb
CHANGED
@@ -9,48 +9,28 @@ module Spool
|
|
9
9
|
|
10
10
|
def spawn
|
11
11
|
base_file = File.join Dir.tmpdir, SecureRandom.uuid
|
12
|
-
pid_file = "#{base_file}.pid"
|
13
12
|
out_file = "#{base_file}.out"
|
14
|
-
|
13
|
+
command = configuration.command.strip
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
pid = Process.spawn configuration.env,
|
16
|
+
"exec #{command}",
|
17
|
+
chdir: configuration.dir,
|
18
|
+
out: out_file,
|
19
|
+
err: out_file
|
21
20
|
|
22
|
-
|
23
|
-
"sh #{script_file}",
|
24
|
-
chdir: configuration.dir,
|
25
|
-
out: out_file,
|
26
|
-
err: out_file
|
27
|
-
|
28
|
-
pid = wait_for_pid pid_file
|
21
|
+
Process.detach pid
|
29
22
|
|
30
23
|
Datacenter::Process.new(pid).tap do |process|
|
31
|
-
raise "Invalid command: #{
|
24
|
+
raise "Invalid command: #{command}\n#{IO.read(out_file)}" unless process.alive?
|
32
25
|
end
|
33
26
|
|
34
27
|
ensure
|
35
|
-
|
36
|
-
File.delete filename if File.exists? filename
|
37
|
-
end
|
28
|
+
File.delete out_file if File.exist? out_file
|
38
29
|
end
|
39
30
|
|
40
31
|
def self.spawn(configuration)
|
41
32
|
new(configuration).spawn
|
42
33
|
end
|
43
34
|
|
44
|
-
private
|
45
|
-
|
46
|
-
def wait_for_pid(pid_file)
|
47
|
-
Timeout.timeout(60) do
|
48
|
-
until File.exists?(pid_file); end
|
49
|
-
IO.read(pid_file).to_i
|
50
|
-
end
|
51
|
-
rescue Timeout::Error
|
52
|
-
nil
|
53
|
-
end
|
54
|
-
|
55
35
|
end
|
56
36
|
end
|
data/lib/spool/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Spool
|
2
|
-
VERSION = '0.
|
3
|
-
end
|
2
|
+
VERSION = '1.0.0'
|
3
|
+
end
|
data/spec/coverage_helper.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'coveralls'
|
3
3
|
|
4
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
5
|
-
SimpleCov::Formatter::HTMLFormatter,
|
6
|
-
Coveralls::SimpleCov::Formatter
|
7
|
-
]
|
4
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
|
8
5
|
SimpleCov.start
|
data/spec/dsl_spec.rb
CHANGED
data/spec/minitest_helper.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
require 'coverage_helper'
|
2
2
|
require 'minitest/autorun'
|
3
|
-
require '
|
3
|
+
require 'minitest/colorin'
|
4
4
|
require 'spool'
|
5
5
|
require 'pry-nav'
|
6
|
-
require 'benchmark'
|
7
|
-
|
8
|
-
Turn.config do |c|
|
9
|
-
c.format = :pretty
|
10
|
-
c.natural = true
|
11
|
-
c.ansi = true
|
12
|
-
end
|
6
|
+
require 'benchmark'
|
data/spec/pool_spec.rb
CHANGED
@@ -2,10 +2,16 @@ require 'minitest_helper'
|
|
2
2
|
|
3
3
|
describe Spool::Pool do
|
4
4
|
|
5
|
+
SLEEP_TIME = 0.01
|
6
|
+
|
5
7
|
after do
|
6
8
|
@pool.stop! if @pool
|
7
9
|
machine = Datacenter::Machine.new
|
8
|
-
|
10
|
+
begin
|
11
|
+
machine.processes('ruby -e').each {|p| p.send_signal :KILL}
|
12
|
+
rescue
|
13
|
+
# All processes dead. I hope
|
14
|
+
end
|
9
15
|
end
|
10
16
|
|
11
17
|
def start_pool(&block)
|
@@ -13,6 +19,7 @@ describe Spool::Pool do
|
|
13
19
|
t = Thread.new { pool.start }
|
14
20
|
t.abort_on_exception = true
|
15
21
|
while pool.processes.count < pool.configuration.processes
|
22
|
+
sleep 0.01
|
16
23
|
end
|
17
24
|
end
|
18
25
|
end
|
@@ -32,14 +39,17 @@ describe Spool::Pool do
|
|
32
39
|
stop_signal :TERM
|
33
40
|
end
|
34
41
|
|
35
|
-
pool.must_be :
|
42
|
+
pool.must_be :running?
|
36
43
|
pool.processes.count.must_equal 1
|
37
44
|
pool.processes[0].must_be :alive?
|
38
45
|
|
39
46
|
process = pool.processes[0]
|
40
|
-
|
41
47
|
pool.stop
|
42
48
|
|
49
|
+
while pool.running?
|
50
|
+
sleep SLEEP_TIME
|
51
|
+
end
|
52
|
+
|
43
53
|
pool.must_be :stopped?
|
44
54
|
pool.processes.must_be_empty
|
45
55
|
process.wont_be :alive?
|
@@ -51,7 +61,7 @@ describe Spool::Pool do
|
|
51
61
|
command 'ruby -e "loop do; sleep 1; end"'
|
52
62
|
end
|
53
63
|
|
54
|
-
pool.must_be :
|
64
|
+
pool.must_be :running?
|
55
65
|
pool.processes.count.must_equal 1
|
56
66
|
pool.processes[0].must_be :alive?
|
57
67
|
|
@@ -59,6 +69,10 @@ describe Spool::Pool do
|
|
59
69
|
|
60
70
|
pool.stop!
|
61
71
|
|
72
|
+
while pool.running?
|
73
|
+
sleep SLEEP_TIME
|
74
|
+
end
|
75
|
+
|
62
76
|
pool.must_be :stopped?
|
63
77
|
pool.processes.must_be_empty
|
64
78
|
process.wont_be :alive?
|
@@ -73,10 +87,13 @@ describe Spool::Pool do
|
|
73
87
|
original_process = pool.processes[0]
|
74
88
|
original_process.send_signal :KILL
|
75
89
|
|
90
|
+
begin
|
91
|
+
sleep SLEEP_TIME
|
92
|
+
new_pid = pool.processes.any? ? pool.processes[0].pid : original_process.pid
|
93
|
+
end while original_process.pid == new_pid
|
94
|
+
|
76
95
|
original_process.wont_be :alive?
|
77
96
|
|
78
|
-
until pool.processes[0] && pool.processes[0].pid != original_process.pid; end
|
79
|
-
|
80
97
|
pool.processes.count.must_equal 1
|
81
98
|
pool.processes[0].must_be :alive?
|
82
99
|
end
|
@@ -93,10 +110,12 @@ describe Spool::Pool do
|
|
93
110
|
original_pids = pool.processes.map(&:pid)
|
94
111
|
|
95
112
|
pool.restart
|
113
|
+
|
114
|
+
begin
|
115
|
+
sleep SLEEP_TIME
|
116
|
+
new_pids = (pool.processes.count == 2) ? pool.processes.map(&:pid) : original_pids
|
117
|
+
end until (original_pids & new_pids).empty?
|
96
118
|
|
97
|
-
until pool.processes.count == 2 && pool.processes[0].pid != original_pids[0] && pool.processes[1].pid != original_pids[1]; end
|
98
|
-
|
99
|
-
pool.processes.count.must_equal 2
|
100
119
|
pool.processes.each { |p| p.must_be :alive?}
|
101
120
|
end
|
102
121
|
|
@@ -109,7 +128,12 @@ describe Spool::Pool do
|
|
109
128
|
|
110
129
|
process = pool.processes[0]
|
111
130
|
|
112
|
-
Benchmark.realtime
|
131
|
+
Benchmark.realtime do
|
132
|
+
pool.stop 0.1
|
133
|
+
while pool.running?
|
134
|
+
sleep SLEEP_TIME
|
135
|
+
end
|
136
|
+
end.must_be :<, 1
|
113
137
|
|
114
138
|
pool.must_be :stopped?
|
115
139
|
pool.processes.must_be_empty
|
@@ -145,7 +169,16 @@ describe Spool::Pool do
|
|
145
169
|
|
146
170
|
it 'Change process when satisfied stop condition' do
|
147
171
|
file_name = File.expand_path 'used_memory.log'
|
148
|
-
ruby_command =
|
172
|
+
ruby_command = %Q{
|
173
|
+
require 'datacenter'
|
174
|
+
Signal.trap(:TERM) do
|
175
|
+
File.write('#{file_name}', 'Finished')
|
176
|
+
exit 0
|
177
|
+
end
|
178
|
+
a = 50_000_000.times.to_a
|
179
|
+
loop do
|
180
|
+
end
|
181
|
+
}
|
149
182
|
|
150
183
|
pool = start_pool do
|
151
184
|
processes 1
|
@@ -154,18 +187,18 @@ describe Spool::Pool do
|
|
154
187
|
stop_signal :TERM
|
155
188
|
end
|
156
189
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
sleep
|
161
|
-
|
190
|
+
original_process = pool.processes[0]
|
191
|
+
|
192
|
+
begin
|
193
|
+
sleep SLEEP_TIME
|
194
|
+
new_pid = pool.processes.any? ? pool.processes[0].pid : original_process.pid
|
195
|
+
end while original_process.pid == new_pid
|
162
196
|
|
163
|
-
|
197
|
+
text_file = File.read(file_name)
|
164
198
|
File.delete(file_name)
|
165
199
|
|
166
|
-
|
200
|
+
text_file.must_equal 'Finished'
|
167
201
|
pool.processes.count.must_equal 1
|
168
|
-
pool.processes[0].pid.wont_equal process.pid
|
169
202
|
end
|
170
203
|
|
171
204
|
it 'Reload config' do
|
data/spool.gemspec
CHANGED
@@ -18,13 +18,15 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'datacenter', '~> 0.
|
21
|
+
spec.add_dependency 'datacenter', '~> 0.4', '>= 0.4.4'
|
22
22
|
spec.add_dependency 'mono_logger'
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
25
|
-
spec.add_development_dependency 'rake'
|
26
|
-
spec.add_development_dependency 'minitest', '~>
|
27
|
-
spec.add_development_dependency '
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency '
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
25
|
+
spec.add_development_dependency 'rake', '~> 11.0'
|
26
|
+
spec.add_development_dependency 'minitest', '~> 5.0', '< 5.11'
|
27
|
+
spec.add_development_dependency 'minitest-colorin', '~> 0.1'
|
28
|
+
spec.add_development_dependency 'minitest-line', '~> 0.6'
|
29
|
+
spec.add_development_dependency 'simplecov', '~> 0.12'
|
30
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
31
|
+
spec.add_development_dependency 'pry-nav', '~> 0.2'
|
30
32
|
end
|
metadata
CHANGED
@@ -1,127 +1,167 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: datacenter
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.4'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.4.4
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.4'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
32
|
+
version: 0.4.4
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: mono_logger
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- -
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- -
|
44
|
+
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
46
|
version: '0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - ~>
|
51
|
+
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
53
|
+
version: '1.12'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - ~>
|
58
|
+
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
60
|
+
version: '1.12'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rake
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- -
|
65
|
+
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
67
|
+
version: '11.0'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- -
|
72
|
+
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
74
|
+
version: '11.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: minitest
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - ~>
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '5.0'
|
82
|
+
- - "<"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '5.11'
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '5.0'
|
92
|
+
- - "<"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '5.11'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: minitest-colorin
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
74
100
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
101
|
+
version: '0.1'
|
76
102
|
type: :development
|
77
103
|
prerelease: false
|
78
104
|
version_requirements: !ruby/object:Gem::Requirement
|
79
105
|
requirements:
|
80
|
-
- - ~>
|
106
|
+
- - "~>"
|
81
107
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
108
|
+
version: '0.1'
|
83
109
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
110
|
+
name: minitest-line
|
85
111
|
requirement: !ruby/object:Gem::Requirement
|
86
112
|
requirements:
|
87
|
-
- - ~>
|
113
|
+
- - "~>"
|
88
114
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
115
|
+
version: '0.6'
|
90
116
|
type: :development
|
91
117
|
prerelease: false
|
92
118
|
version_requirements: !ruby/object:Gem::Requirement
|
93
119
|
requirements:
|
94
|
-
- - ~>
|
120
|
+
- - "~>"
|
95
121
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
122
|
+
version: '0.6'
|
97
123
|
- !ruby/object:Gem::Dependency
|
98
124
|
name: simplecov
|
99
125
|
requirement: !ruby/object:Gem::Requirement
|
100
126
|
requirements:
|
101
|
-
- -
|
127
|
+
- - "~>"
|
102
128
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
129
|
+
version: '0.12'
|
104
130
|
type: :development
|
105
131
|
prerelease: false
|
106
132
|
version_requirements: !ruby/object:Gem::Requirement
|
107
133
|
requirements:
|
108
|
-
- -
|
134
|
+
- - "~>"
|
109
135
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
136
|
+
version: '0.12'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: coveralls
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0.8'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0.8'
|
111
151
|
- !ruby/object:Gem::Dependency
|
112
152
|
name: pry-nav
|
113
153
|
requirement: !ruby/object:Gem::Requirement
|
114
154
|
requirements:
|
115
|
-
- -
|
155
|
+
- - "~>"
|
116
156
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
157
|
+
version: '0.2'
|
118
158
|
type: :development
|
119
159
|
prerelease: false
|
120
160
|
version_requirements: !ruby/object:Gem::Requirement
|
121
161
|
requirements:
|
122
|
-
- -
|
162
|
+
- - "~>"
|
123
163
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
164
|
+
version: '0.2'
|
125
165
|
description: ''
|
126
166
|
email:
|
127
167
|
- gnaiman@keepcon.com
|
@@ -130,11 +170,11 @@ executables:
|
|
130
170
|
extensions: []
|
131
171
|
extra_rdoc_files: []
|
132
172
|
files:
|
133
|
-
- .coveralls.yml
|
134
|
-
- .gitignore
|
135
|
-
- .ruby-gemset
|
136
|
-
- .ruby-version
|
137
|
-
- .travis.yml
|
173
|
+
- ".coveralls.yml"
|
174
|
+
- ".gitignore"
|
175
|
+
- ".ruby-gemset"
|
176
|
+
- ".ruby-version"
|
177
|
+
- ".travis.yml"
|
138
178
|
- Gemfile
|
139
179
|
- LICENSE.txt
|
140
180
|
- README.md
|
@@ -164,17 +204,17 @@ require_paths:
|
|
164
204
|
- lib
|
165
205
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
206
|
requirements:
|
167
|
-
- -
|
207
|
+
- - ">="
|
168
208
|
- !ruby/object:Gem::Version
|
169
209
|
version: '0'
|
170
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
211
|
requirements:
|
172
|
-
- -
|
212
|
+
- - ">="
|
173
213
|
- !ruby/object:Gem::Version
|
174
214
|
version: '0'
|
175
215
|
requirements: []
|
176
216
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.
|
217
|
+
rubygems_version: 2.6.14
|
178
218
|
signing_key:
|
179
219
|
specification_version: 4
|
180
220
|
summary: Manage and keep alive pool of processes
|