eye 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +31 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +132 -0
- data/Rakefile +18 -0
- data/bin/eye +282 -0
- data/bin/loader_eye +56 -0
- data/examples/processes/em.rb +56 -0
- data/examples/processes/forking.rb +20 -0
- data/examples/processes/sample.rb +144 -0
- data/examples/rbenv.eye +11 -0
- data/examples/test.eye +65 -0
- data/examples/unicorn.eye +29 -0
- data/eye.gemspec +37 -0
- data/lib/eye.rb +25 -0
- data/lib/eye/application.rb +65 -0
- data/lib/eye/checker.rb +118 -0
- data/lib/eye/checker/cpu.rb +27 -0
- data/lib/eye/checker/file_ctime.rb +29 -0
- data/lib/eye/checker/file_size.rb +38 -0
- data/lib/eye/checker/http.rb +94 -0
- data/lib/eye/checker/memory.rb +27 -0
- data/lib/eye/checker/socket.rb +148 -0
- data/lib/eye/checker/validation.rb +49 -0
- data/lib/eye/child_process.rb +75 -0
- data/lib/eye/client.rb +32 -0
- data/lib/eye/control.rb +2 -0
- data/lib/eye/controller.rb +43 -0
- data/lib/eye/controller/commands.rb +64 -0
- data/lib/eye/controller/helpers.rb +61 -0
- data/lib/eye/controller/load.rb +224 -0
- data/lib/eye/controller/send_command.rb +88 -0
- data/lib/eye/controller/status.rb +136 -0
- data/lib/eye/dsl.rb +52 -0
- data/lib/eye/dsl/application_opts.rb +33 -0
- data/lib/eye/dsl/chain.rb +12 -0
- data/lib/eye/dsl/child_process_opts.rb +7 -0
- data/lib/eye/dsl/config_opts.rb +11 -0
- data/lib/eye/dsl/group_opts.rb +27 -0
- data/lib/eye/dsl/helpers.rb +12 -0
- data/lib/eye/dsl/main.rb +58 -0
- data/lib/eye/dsl/opts.rb +88 -0
- data/lib/eye/dsl/process_opts.rb +21 -0
- data/lib/eye/dsl/pure_opts.rb +132 -0
- data/lib/eye/dsl/validate.rb +41 -0
- data/lib/eye/group.rb +125 -0
- data/lib/eye/group/chain.rb +68 -0
- data/lib/eye/io/unix_server.rb +44 -0
- data/lib/eye/io/unix_socket.rb +39 -0
- data/lib/eye/loader.rb +13 -0
- data/lib/eye/logger.rb +80 -0
- data/lib/eye/process.rb +83 -0
- data/lib/eye/process/child.rb +61 -0
- data/lib/eye/process/commands.rb +256 -0
- data/lib/eye/process/config.rb +70 -0
- data/lib/eye/process/controller.rb +72 -0
- data/lib/eye/process/data.rb +46 -0
- data/lib/eye/process/monitor.rb +97 -0
- data/lib/eye/process/notify.rb +17 -0
- data/lib/eye/process/scheduler.rb +50 -0
- data/lib/eye/process/states.rb +92 -0
- data/lib/eye/process/states_history.rb +62 -0
- data/lib/eye/process/system.rb +60 -0
- data/lib/eye/process/trigger.rb +32 -0
- data/lib/eye/process/watchers.rb +67 -0
- data/lib/eye/server.rb +51 -0
- data/lib/eye/settings.rb +35 -0
- data/lib/eye/system.rb +145 -0
- data/lib/eye/system_resources.rb +83 -0
- data/lib/eye/trigger.rb +53 -0
- data/lib/eye/trigger/flapping.rb +24 -0
- data/lib/eye/utils.rb +5 -0
- data/lib/eye/utils/alive_array.rb +31 -0
- data/lib/eye/utils/celluloid_chain.rb +51 -0
- data/lib/eye/utils/leak_19.rb +7 -0
- data/lib/eye/utils/tail.rb +20 -0
- data/spec/checker/cpu_spec.rb +58 -0
- data/spec/checker/file_ctime_spec.rb +34 -0
- data/spec/checker/file_size_spec.rb +107 -0
- data/spec/checker/http_spec.rb +109 -0
- data/spec/checker/memory_spec.rb +64 -0
- data/spec/checker/socket_spec.rb +116 -0
- data/spec/checker_spec.rb +188 -0
- data/spec/child_process/child_process_spec.rb +46 -0
- data/spec/client_server_spec.rb +34 -0
- data/spec/controller/commands_spec.rb +92 -0
- data/spec/controller/controller_spec.rb +133 -0
- data/spec/controller/find_objects_spec.rb +150 -0
- data/spec/controller/group_spec.rb +110 -0
- data/spec/controller/intergration_spec.rb +327 -0
- data/spec/controller/load_spec.rb +326 -0
- data/spec/controller/races_spec.rb +70 -0
- data/spec/controller/stop_on_delete_spec.rb +157 -0
- data/spec/dsl/chain_spec.rb +140 -0
- data/spec/dsl/checks_spec.rb +202 -0
- data/spec/dsl/config_spec.rb +44 -0
- data/spec/dsl/dsl_spec.rb +73 -0
- data/spec/dsl/getter_spec.rb +223 -0
- data/spec/dsl/integration_spec.rb +311 -0
- data/spec/dsl/load_spec.rb +52 -0
- data/spec/dsl/process_spec.rb +330 -0
- data/spec/dsl/sub_procs_spec.rb +93 -0
- data/spec/dsl/with_server_spec.rb +104 -0
- data/spec/example/em.rb +57 -0
- data/spec/example/forking.rb +20 -0
- data/spec/example/sample.rb +154 -0
- data/spec/fixtures/dsl/0.rb +8 -0
- data/spec/fixtures/dsl/0a.rb +8 -0
- data/spec/fixtures/dsl/0c.rb +8 -0
- data/spec/fixtures/dsl/1.rb +5 -0
- data/spec/fixtures/dsl/bad.eye +6 -0
- data/spec/fixtures/dsl/configs/1.eye +3 -0
- data/spec/fixtures/dsl/configs/2.eye +1 -0
- data/spec/fixtures/dsl/configs/3.eye +1 -0
- data/spec/fixtures/dsl/configs/4.eye +3 -0
- data/spec/fixtures/dsl/empty.eye +20 -0
- data/spec/fixtures/dsl/include_test.eye +5 -0
- data/spec/fixtures/dsl/include_test/1.rb +6 -0
- data/spec/fixtures/dsl/include_test/ha.rb +4 -0
- data/spec/fixtures/dsl/include_test2.eye +5 -0
- data/spec/fixtures/dsl/integration.eye +30 -0
- data/spec/fixtures/dsl/integration2.eye +32 -0
- data/spec/fixtures/dsl/integration_locks.eye +30 -0
- data/spec/fixtures/dsl/integration_sor.eye +32 -0
- data/spec/fixtures/dsl/integration_sor2.eye +27 -0
- data/spec/fixtures/dsl/integration_sor3.eye +32 -0
- data/spec/fixtures/dsl/load.eye +25 -0
- data/spec/fixtures/dsl/load2.eye +7 -0
- data/spec/fixtures/dsl/load2_dup2.eye +13 -0
- data/spec/fixtures/dsl/load2_dup_pid.eye +7 -0
- data/spec/fixtures/dsl/load3.eye +10 -0
- data/spec/fixtures/dsl/load4.eye +7 -0
- data/spec/fixtures/dsl/load5.eye +8 -0
- data/spec/fixtures/dsl/load6.eye +17 -0
- data/spec/fixtures/dsl/load_dubls.eye +36 -0
- data/spec/fixtures/dsl/load_dup_ex_names.eye +15 -0
- data/spec/fixtures/dsl/load_error.eye +5 -0
- data/spec/fixtures/dsl/load_error_folder/load3.eye +10 -0
- data/spec/fixtures/dsl/load_error_folder/load4.eye +7 -0
- data/spec/fixtures/dsl/load_folder/load3.eye +10 -0
- data/spec/fixtures/dsl/load_folder/load4.eye +7 -0
- data/spec/fixtures/dsl/load_int.eye +8 -0
- data/spec/fixtures/dsl/load_int2.eye +13 -0
- data/spec/fixtures/dsl/load_logger.eye +26 -0
- data/spec/fixtures/dsl/load_logger2.eye +3 -0
- data/spec/fixtures/dsl/long_load.eye +5 -0
- data/spec/fixtures/dsl/subfolder1/proc1.rb +3 -0
- data/spec/fixtures/dsl/subfolder2.eye +9 -0
- data/spec/fixtures/dsl/subfolder2/common.rb +1 -0
- data/spec/fixtures/dsl/subfolder2/proc2.rb +3 -0
- data/spec/fixtures/dsl/subfolder2/sub/proc3.rb +6 -0
- data/spec/fixtures/dsl/subfolder3.eye +8 -0
- data/spec/fixtures/dsl/subfolder3/common.rb +1 -0
- data/spec/fixtures/dsl/subfolder3/proc4.rb +3 -0
- data/spec/fixtures/dsl/subfolder3/sub/proc5.rb +6 -0
- data/spec/fixtures/dsl/subfolder4.eye +6 -0
- data/spec/fixtures/dsl/subfolder4/a.rb +2 -0
- data/spec/fixtures/dsl/subfolder4/b.rb +1 -0
- data/spec/fixtures/dsl/subfolder4/c.rb +1 -0
- data/spec/mock_spec.rb +32 -0
- data/spec/process/checks/child_checks_spec.rb +79 -0
- data/spec/process/checks/cpu_spec.rb +114 -0
- data/spec/process/checks/ctime_spec.rb +43 -0
- data/spec/process/checks/fsize_spec.rb +22 -0
- data/spec/process/checks/http_spec.rb +52 -0
- data/spec/process/checks/intergration_spec.rb +32 -0
- data/spec/process/checks/memory_spec.rb +113 -0
- data/spec/process/child_process_spec.rb +125 -0
- data/spec/process/config_spec.rb +75 -0
- data/spec/process/controller_spec.rb +173 -0
- data/spec/process/monitoring_spec.rb +180 -0
- data/spec/process/restart_spec.rb +174 -0
- data/spec/process/scheduler_spec.rb +150 -0
- data/spec/process/start_spec.rb +261 -0
- data/spec/process/states_history_spec.rb +118 -0
- data/spec/process/stop_spec.rb +150 -0
- data/spec/process/system_spec.rb +100 -0
- data/spec/process/triggers/flapping_spec.rb +81 -0
- data/spec/process/update_config_spec.rb +63 -0
- data/spec/spec_helper.rb +120 -0
- data/spec/support/rr_celluloid.rb +36 -0
- data/spec/support/scheduler_hack.rb +16 -0
- data/spec/support/spec_support.rb +164 -0
- data/spec/system_resources_spec.rb +59 -0
- data/spec/system_spec.rb +170 -0
- data/spec/utils/alive_array_spec.rb +50 -0
- data/spec/utils/celluloid_chain_spec.rb +82 -0
- data/spec/utils/tail_spec.rb +21 -0
- metadata +558 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
3
|
+
|
4
|
+
describe "Eye::SystemResources" do
|
5
|
+
|
6
|
+
it "should get memory" do
|
7
|
+
x = Eye::SystemResources.memory($$)
|
8
|
+
x.should > 100
|
9
|
+
x.should < 300_000
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should get cpu" do
|
13
|
+
x = Eye::SystemResources.cpu($$)
|
14
|
+
x.should >= 0
|
15
|
+
x.should < 100
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should get start time" do
|
19
|
+
x = Eye::SystemResources.start_time($$)
|
20
|
+
x.length.should >= 5
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should get childs" do
|
24
|
+
x = Eye::SystemResources.childs($$)
|
25
|
+
x.is_a?(Array).should == true
|
26
|
+
x.first.should > 0
|
27
|
+
x.size.should > 0
|
28
|
+
x.all?{|c| c > 0 }.should == true
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should get cmd" do
|
32
|
+
Eye::Control.set_proc_line
|
33
|
+
x = Eye::SystemResources.cmd($$)
|
34
|
+
x.should match(/eye/)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should cache and update when interval" do
|
38
|
+
silence_warnings{ Eye::SystemResources::PsAxActor::UPDATE_INTERVAL = 2 }
|
39
|
+
|
40
|
+
x1 = Eye::SystemResources.cmd($$)
|
41
|
+
x2 = Eye::SystemResources.cmd($$)
|
42
|
+
x1.should == x2
|
43
|
+
|
44
|
+
sleep 1
|
45
|
+
x3 = Eye::SystemResources.cmd($$)
|
46
|
+
x1.should == x3
|
47
|
+
|
48
|
+
# change the cmd
|
49
|
+
$0 = "ruby rspec ..."
|
50
|
+
|
51
|
+
sleep 1.5
|
52
|
+
x4 = Eye::SystemResources.cmd($$)
|
53
|
+
x1.should == x4 # first value is old
|
54
|
+
|
55
|
+
x5 = Eye::SystemResources.cmd($$)
|
56
|
+
x1.should_not == x5 # seconds is new
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
data/spec/system_spec.rb
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
3
|
+
|
4
|
+
describe "Eye::System" do
|
5
|
+
|
6
|
+
it "pid_alive?" do
|
7
|
+
Eye::System.pid_alive?($$).should == true
|
8
|
+
Eye::System.pid_alive?(123456).should == false
|
9
|
+
Eye::System.pid_alive?(-122).should == false
|
10
|
+
Eye::System.pid_alive?(nil).should == false
|
11
|
+
end
|
12
|
+
|
13
|
+
it "ps_aux" do
|
14
|
+
h = Eye::System.ps_aux
|
15
|
+
h.size.should > 10
|
16
|
+
x = h[$$]
|
17
|
+
x.should be
|
18
|
+
x.is_a?(Hash).should be_true
|
19
|
+
x[:ppid].should > 1 # parent pid
|
20
|
+
x[:cpu].should >= 0 # proc
|
21
|
+
x[:rss].should > 1000 # memory
|
22
|
+
x[:start_time].length.should >= 5
|
23
|
+
end
|
24
|
+
|
25
|
+
it "prepare env" do
|
26
|
+
Eye::System.send(:prepare_env, {}).should include({})
|
27
|
+
Eye::System.send(:prepare_env, {:environment => {'A' => 'B'}}).should include({'A' => 'B'})
|
28
|
+
Eye::System.send(:prepare_env, {:environment => {'A' => 'B'}, :working_dir => "/tmp"}).should include({'A' => 'B', 'PWD' => '/tmp'})
|
29
|
+
|
30
|
+
r = Eye::System.send(:prepare_env, {:environment => {'A' => [], 'B' => {}, 'C' => nil, 'D' => 1, 'E' => '2'}})
|
31
|
+
r['A'].should == '[]'
|
32
|
+
r['B'].should == '{}'
|
33
|
+
r['C'].should == nil
|
34
|
+
r['D'].should == '1'
|
35
|
+
r['E'].should == '2'
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "daemonize" do
|
39
|
+
it "daemonize default" do
|
40
|
+
@pid = Eye::System.daemonize("ruby sample.rb", {:environment => {"ENV1" => "SECRET1", 'BLA' => {}},
|
41
|
+
:working_dir => C.p1[:working_dir], :stdout => @log})[:pid]
|
42
|
+
|
43
|
+
@pid.should > 0
|
44
|
+
|
45
|
+
# process should be alive
|
46
|
+
Eye::System.pid_alive?(@pid).should == true
|
47
|
+
|
48
|
+
sleep 4
|
49
|
+
|
50
|
+
# should capture log
|
51
|
+
data = File.read(@log)
|
52
|
+
data.should include("SECRET1")
|
53
|
+
data.should include("- tick")
|
54
|
+
end
|
55
|
+
|
56
|
+
it "daemonize empty" do
|
57
|
+
@pid = Eye::System.daemonize("ruby sample.rb", {:working_dir => C.p1[:working_dir]})[:pid]
|
58
|
+
|
59
|
+
# process should be alive
|
60
|
+
Eye::System.pid_alive?(@pid).should == true
|
61
|
+
end
|
62
|
+
|
63
|
+
it "daemonize empty" do
|
64
|
+
@pid = Eye::System.daemonize("echo 'some'", {:stdout => @log})[:pid]
|
65
|
+
|
66
|
+
sleep 0.3
|
67
|
+
|
68
|
+
data = File.read(@log)
|
69
|
+
data.should == "some\n"
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should add LANG env varible" do
|
73
|
+
mock(Process).spawn({"BLA"=>"1", "LANG"=>ENV_LANG}, 'echo', 'some', anything)
|
74
|
+
stub(Process).detach
|
75
|
+
|
76
|
+
@pid = Eye::System.daemonize("echo 'some'", {:stdout => @log, :environment => {"BLA" => "1"}})[:pid]
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "execute" do
|
81
|
+
it "sleep and exit" do
|
82
|
+
tm = Time.now
|
83
|
+
Eye::System.execute("sleep 1")
|
84
|
+
tm2 = Time.now
|
85
|
+
|
86
|
+
(tm2 - tm).should > 1.second
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
describe "send signal" do
|
91
|
+
it "send_signal to spec" do
|
92
|
+
Eye::System.send_signal($$, 0)[:status].should == :ok
|
93
|
+
end
|
94
|
+
|
95
|
+
it "send_signal to unexisted process" do
|
96
|
+
res = Eye::System.send_signal(-12234)
|
97
|
+
res[:status].should == :error
|
98
|
+
res[:message].should include("not found")
|
99
|
+
end
|
100
|
+
|
101
|
+
it "send_signal to daemon" do
|
102
|
+
@pid = Eye::System.daemonize("ruby sample.rb", {:working_dir => C.p1[:working_dir]})[:pid]
|
103
|
+
|
104
|
+
# process should be alive
|
105
|
+
Eye::System.pid_alive?(@pid).should == true
|
106
|
+
|
107
|
+
Eye::System.send_signal(@pid, :term)[:status].should == :ok
|
108
|
+
sleep 0.2
|
109
|
+
|
110
|
+
Eye::System.pid_alive?(@pid).should == false
|
111
|
+
end
|
112
|
+
|
113
|
+
it "catch signal in fork" do
|
114
|
+
@pid = Eye::System.daemonize("ruby sample.rb", {:working_dir => C.p1[:working_dir],
|
115
|
+
:stdout => @log})[:pid]
|
116
|
+
|
117
|
+
sleep 4
|
118
|
+
|
119
|
+
Eye::System.send_signal(@pid, :usr1)[:status].should == :ok
|
120
|
+
|
121
|
+
sleep 0.5
|
122
|
+
|
123
|
+
data = File.read(@log)
|
124
|
+
data.should include("USR1 sig")
|
125
|
+
end
|
126
|
+
|
127
|
+
it "signals transformation" do
|
128
|
+
mock(Process).kill('USR1', 123)
|
129
|
+
Eye::System.send_signal(123, :usr1)
|
130
|
+
|
131
|
+
mock(Process).kill('KILL', 123)
|
132
|
+
Eye::System.send_signal(123, :KILL)
|
133
|
+
|
134
|
+
mock(Process).kill('USR1', 123)
|
135
|
+
Eye::System.send_signal(123, 'usr1')
|
136
|
+
|
137
|
+
mock(Process).kill('KILL', 123)
|
138
|
+
Eye::System.send_signal(123, 'KILL')
|
139
|
+
|
140
|
+
mock(Process).kill(9, 123)
|
141
|
+
Eye::System.send_signal(123, 9)
|
142
|
+
|
143
|
+
mock(Process).kill(9, 123)
|
144
|
+
Eye::System.send_signal(123, '9')
|
145
|
+
|
146
|
+
mock(Process).kill(9, 123)
|
147
|
+
Eye::System.send_signal(123, '-9')
|
148
|
+
|
149
|
+
mock(Process).kill(9, 123)
|
150
|
+
Eye::System.send_signal(123, -9)
|
151
|
+
|
152
|
+
mock(Process).kill(0, 123)
|
153
|
+
Eye::System.send_signal(123, '0')
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
it "normalized_file" do
|
158
|
+
Eye::System.normalized_file("/tmp/1.rb").should == "/tmp/1.rb"
|
159
|
+
Eye::System.normalized_file("/tmp/1.rb", '/usr').should == "/tmp/1.rb"
|
160
|
+
|
161
|
+
Eye::System.normalized_file("tmp/1.rb").should == Dir.getwd + "/tmp/1.rb"
|
162
|
+
Eye::System.normalized_file("tmp/1.rb", '/usr').should == "/usr/tmp/1.rb"
|
163
|
+
|
164
|
+
Eye::System.normalized_file("./tmp/1.rb").should == Dir.getwd + "/tmp/1.rb"
|
165
|
+
Eye::System.normalized_file("./tmp/1.rb", '/usr/').should == "/usr/tmp/1.rb"
|
166
|
+
|
167
|
+
Eye::System.normalized_file("../tmp/1.rb", '/usr/').should == "/tmp/1.rb"
|
168
|
+
end
|
169
|
+
|
170
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
3
|
+
|
4
|
+
class AliveArrayActor
|
5
|
+
include Celluloid
|
6
|
+
|
7
|
+
attr_reader :name
|
8
|
+
|
9
|
+
def initialize(name)
|
10
|
+
@name = name
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "Eye::Utils::AliveArray" do
|
15
|
+
|
16
|
+
it "act like array" do
|
17
|
+
a = Eye::Utils::AliveArray.new([1,2,3])
|
18
|
+
a.size.should == 3
|
19
|
+
a.empty?.should == false
|
20
|
+
a << 4
|
21
|
+
a.pure.should == [1,2,3,4]
|
22
|
+
end
|
23
|
+
|
24
|
+
it "alive actions" do
|
25
|
+
a = AliveArrayActor.new('a')
|
26
|
+
b = AliveArrayActor.new('b'); b.terminate
|
27
|
+
c = AliveArrayActor.new('c')
|
28
|
+
|
29
|
+
l = Eye::Utils::AliveArray.new([a,b,c])
|
30
|
+
l.size.should == 3
|
31
|
+
l.map{|a| a.name}.sort.should == %w{a c}
|
32
|
+
|
33
|
+
l.detect{|c| c.name == 'a'}.name.should == 'a'
|
34
|
+
l.detect{|c| c.name == 'b'}.should == nil
|
35
|
+
|
36
|
+
l.any?{|c| c.name == 'a'}.should == true
|
37
|
+
l.any?{|c| c.name == 'b'}.should == false
|
38
|
+
|
39
|
+
l.include?(a).should == true
|
40
|
+
l.include?(b).should == false
|
41
|
+
|
42
|
+
l.sort_by(&:name).class.should == Eye::Utils::AliveArray
|
43
|
+
l.sort_by(&:name).pure.should == [a, c]
|
44
|
+
|
45
|
+
l.to_a.map{|c| c.name}.sort.should == %w{a c}
|
46
|
+
|
47
|
+
a.terminate
|
48
|
+
c.terminate
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
3
|
+
|
4
|
+
class TestActor
|
5
|
+
include Celluloid
|
6
|
+
|
7
|
+
attr_reader :m
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@m = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def a(tm = 0.1)
|
14
|
+
@m << :a
|
15
|
+
sleep tm
|
16
|
+
end
|
17
|
+
|
18
|
+
def b(tm = 0.1)
|
19
|
+
@m << :b
|
20
|
+
sleep tm
|
21
|
+
end
|
22
|
+
|
23
|
+
def c(tm = 0.1)
|
24
|
+
@m << :c
|
25
|
+
sleep tm
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "Eye::Utils::CelluloidChain" do
|
30
|
+
before :each do
|
31
|
+
@t = TestActor.new
|
32
|
+
@c = Eye::Utils::CelluloidChain.new(@t)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should chain" do
|
36
|
+
@c.add :a, 0.5
|
37
|
+
@c.add :b, 0.3
|
38
|
+
@c.add :c, 0.1
|
39
|
+
|
40
|
+
sleep 1
|
41
|
+
|
42
|
+
@t.m.should == [:a, :b, :c]
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should chain2" do
|
46
|
+
@c.add :c, 0.1
|
47
|
+
sleep 0.2
|
48
|
+
|
49
|
+
@c.add :a, 0.5
|
50
|
+
@c.add :b, 0.3
|
51
|
+
|
52
|
+
sleep 1
|
53
|
+
|
54
|
+
@t.m.should == [:c, :a, :b]
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should remove dups" do
|
58
|
+
@c.add :a
|
59
|
+
@c.add :b
|
60
|
+
@c.add :b
|
61
|
+
@c.add :c
|
62
|
+
@c.add_wo_dups :c
|
63
|
+
|
64
|
+
sleep 1
|
65
|
+
@t.m.should == [:a, :b, :b, :c]
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should remove dups" do
|
69
|
+
@c.add_wo_dups :a
|
70
|
+
@c.add_wo_dups :b
|
71
|
+
@c.add_wo_dups :b
|
72
|
+
@c.add_wo_dups :c
|
73
|
+
@c.add_wo_dups :c
|
74
|
+
@c.add_wo_dups :a
|
75
|
+
@c.add_wo_dups :c
|
76
|
+
@c.add_wo_dups :c
|
77
|
+
|
78
|
+
sleep 2
|
79
|
+
@t.m.should == [:a, :b, :c, :a, :c]
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
3
|
+
|
4
|
+
describe "Eye::Utils::Tail" do
|
5
|
+
subject{ Eye::Utils::Tail.new(5) }
|
6
|
+
|
7
|
+
it "should rotate" do
|
8
|
+
subject << 1
|
9
|
+
subject << 2
|
10
|
+
subject << 3
|
11
|
+
subject.push 4
|
12
|
+
subject.should == [1,2,3,4]
|
13
|
+
|
14
|
+
subject << 5
|
15
|
+
subject.should == [1,2,3,4,5]
|
16
|
+
|
17
|
+
subject << 6
|
18
|
+
subject.should == [2,3,4,5,6]
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,558 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eye
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.11
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Konstantin Makarchev
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-02-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: celluloid
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.12.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.12.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: celluloid-io
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.12.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.12.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: state_machine
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: activesupport
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 3.2.0
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 3.2.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: thor
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rake
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: simplecov
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: rr
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: ruby-graphviz
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: forking
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: fakeweb
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ! '>='
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
type: :development
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
- !ruby/object:Gem::Dependency
|
207
|
+
name: eventmachine
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ! '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
type: :development
|
215
|
+
prerelease: false
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ! '>='
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
222
|
+
description: Process monitoring tool. With Bluepill like config syntax. Requires MRI
|
223
|
+
Ruby >= 1.9.2. Uses Celluloid and Celluloid::IO.
|
224
|
+
email: kostya27@gmail.com
|
225
|
+
executables:
|
226
|
+
- eye
|
227
|
+
- loader_eye
|
228
|
+
extensions: []
|
229
|
+
extra_rdoc_files: []
|
230
|
+
files:
|
231
|
+
- .gitignore
|
232
|
+
- .rspec
|
233
|
+
- Gemfile
|
234
|
+
- LICENSE
|
235
|
+
- README.md
|
236
|
+
- Rakefile
|
237
|
+
- bin/eye
|
238
|
+
- bin/loader_eye
|
239
|
+
- examples/processes/em.rb
|
240
|
+
- examples/processes/forking.rb
|
241
|
+
- examples/processes/sample.rb
|
242
|
+
- examples/rbenv.eye
|
243
|
+
- examples/test.eye
|
244
|
+
- examples/unicorn.eye
|
245
|
+
- eye.gemspec
|
246
|
+
- lib/eye.rb
|
247
|
+
- lib/eye/application.rb
|
248
|
+
- lib/eye/checker.rb
|
249
|
+
- lib/eye/checker/cpu.rb
|
250
|
+
- lib/eye/checker/file_ctime.rb
|
251
|
+
- lib/eye/checker/file_size.rb
|
252
|
+
- lib/eye/checker/http.rb
|
253
|
+
- lib/eye/checker/memory.rb
|
254
|
+
- lib/eye/checker/socket.rb
|
255
|
+
- lib/eye/checker/validation.rb
|
256
|
+
- lib/eye/child_process.rb
|
257
|
+
- lib/eye/client.rb
|
258
|
+
- lib/eye/control.rb
|
259
|
+
- lib/eye/controller.rb
|
260
|
+
- lib/eye/controller/commands.rb
|
261
|
+
- lib/eye/controller/helpers.rb
|
262
|
+
- lib/eye/controller/load.rb
|
263
|
+
- lib/eye/controller/send_command.rb
|
264
|
+
- lib/eye/controller/status.rb
|
265
|
+
- lib/eye/dsl.rb
|
266
|
+
- lib/eye/dsl/application_opts.rb
|
267
|
+
- lib/eye/dsl/chain.rb
|
268
|
+
- lib/eye/dsl/child_process_opts.rb
|
269
|
+
- lib/eye/dsl/config_opts.rb
|
270
|
+
- lib/eye/dsl/group_opts.rb
|
271
|
+
- lib/eye/dsl/helpers.rb
|
272
|
+
- lib/eye/dsl/main.rb
|
273
|
+
- lib/eye/dsl/opts.rb
|
274
|
+
- lib/eye/dsl/process_opts.rb
|
275
|
+
- lib/eye/dsl/pure_opts.rb
|
276
|
+
- lib/eye/dsl/validate.rb
|
277
|
+
- lib/eye/group.rb
|
278
|
+
- lib/eye/group/chain.rb
|
279
|
+
- lib/eye/io/unix_server.rb
|
280
|
+
- lib/eye/io/unix_socket.rb
|
281
|
+
- lib/eye/loader.rb
|
282
|
+
- lib/eye/logger.rb
|
283
|
+
- lib/eye/process.rb
|
284
|
+
- lib/eye/process/child.rb
|
285
|
+
- lib/eye/process/commands.rb
|
286
|
+
- lib/eye/process/config.rb
|
287
|
+
- lib/eye/process/controller.rb
|
288
|
+
- lib/eye/process/data.rb
|
289
|
+
- lib/eye/process/monitor.rb
|
290
|
+
- lib/eye/process/notify.rb
|
291
|
+
- lib/eye/process/scheduler.rb
|
292
|
+
- lib/eye/process/states.rb
|
293
|
+
- lib/eye/process/states_history.rb
|
294
|
+
- lib/eye/process/system.rb
|
295
|
+
- lib/eye/process/trigger.rb
|
296
|
+
- lib/eye/process/watchers.rb
|
297
|
+
- lib/eye/server.rb
|
298
|
+
- lib/eye/settings.rb
|
299
|
+
- lib/eye/system.rb
|
300
|
+
- lib/eye/system_resources.rb
|
301
|
+
- lib/eye/trigger.rb
|
302
|
+
- lib/eye/trigger/flapping.rb
|
303
|
+
- lib/eye/utils.rb
|
304
|
+
- lib/eye/utils/alive_array.rb
|
305
|
+
- lib/eye/utils/celluloid_chain.rb
|
306
|
+
- lib/eye/utils/leak_19.rb
|
307
|
+
- lib/eye/utils/tail.rb
|
308
|
+
- spec/checker/cpu_spec.rb
|
309
|
+
- spec/checker/file_ctime_spec.rb
|
310
|
+
- spec/checker/file_size_spec.rb
|
311
|
+
- spec/checker/http_spec.rb
|
312
|
+
- spec/checker/memory_spec.rb
|
313
|
+
- spec/checker/socket_spec.rb
|
314
|
+
- spec/checker_spec.rb
|
315
|
+
- spec/child_process/child_process_spec.rb
|
316
|
+
- spec/client_server_spec.rb
|
317
|
+
- spec/controller/commands_spec.rb
|
318
|
+
- spec/controller/controller_spec.rb
|
319
|
+
- spec/controller/find_objects_spec.rb
|
320
|
+
- spec/controller/group_spec.rb
|
321
|
+
- spec/controller/intergration_spec.rb
|
322
|
+
- spec/controller/load_spec.rb
|
323
|
+
- spec/controller/races_spec.rb
|
324
|
+
- spec/controller/stop_on_delete_spec.rb
|
325
|
+
- spec/dsl/chain_spec.rb
|
326
|
+
- spec/dsl/checks_spec.rb
|
327
|
+
- spec/dsl/config_spec.rb
|
328
|
+
- spec/dsl/dsl_spec.rb
|
329
|
+
- spec/dsl/getter_spec.rb
|
330
|
+
- spec/dsl/integration_spec.rb
|
331
|
+
- spec/dsl/load_spec.rb
|
332
|
+
- spec/dsl/process_spec.rb
|
333
|
+
- spec/dsl/sub_procs_spec.rb
|
334
|
+
- spec/dsl/with_server_spec.rb
|
335
|
+
- spec/example/em.rb
|
336
|
+
- spec/example/forking.rb
|
337
|
+
- spec/example/sample.rb
|
338
|
+
- spec/fixtures/dsl/0.rb
|
339
|
+
- spec/fixtures/dsl/0a.rb
|
340
|
+
- spec/fixtures/dsl/0c.rb
|
341
|
+
- spec/fixtures/dsl/1.rb
|
342
|
+
- spec/fixtures/dsl/bad.eye
|
343
|
+
- spec/fixtures/dsl/configs/1.eye
|
344
|
+
- spec/fixtures/dsl/configs/2.eye
|
345
|
+
- spec/fixtures/dsl/configs/3.eye
|
346
|
+
- spec/fixtures/dsl/configs/4.eye
|
347
|
+
- spec/fixtures/dsl/empty.eye
|
348
|
+
- spec/fixtures/dsl/include_test.eye
|
349
|
+
- spec/fixtures/dsl/include_test/1.rb
|
350
|
+
- spec/fixtures/dsl/include_test/ha.rb
|
351
|
+
- spec/fixtures/dsl/include_test2.eye
|
352
|
+
- spec/fixtures/dsl/integration.eye
|
353
|
+
- spec/fixtures/dsl/integration2.eye
|
354
|
+
- spec/fixtures/dsl/integration_locks.eye
|
355
|
+
- spec/fixtures/dsl/integration_sor.eye
|
356
|
+
- spec/fixtures/dsl/integration_sor2.eye
|
357
|
+
- spec/fixtures/dsl/integration_sor3.eye
|
358
|
+
- spec/fixtures/dsl/load.eye
|
359
|
+
- spec/fixtures/dsl/load2.eye
|
360
|
+
- spec/fixtures/dsl/load2_dup2.eye
|
361
|
+
- spec/fixtures/dsl/load2_dup_pid.eye
|
362
|
+
- spec/fixtures/dsl/load3.eye
|
363
|
+
- spec/fixtures/dsl/load4.eye
|
364
|
+
- spec/fixtures/dsl/load5.eye
|
365
|
+
- spec/fixtures/dsl/load6.eye
|
366
|
+
- spec/fixtures/dsl/load_dubls.eye
|
367
|
+
- spec/fixtures/dsl/load_dup_ex_names.eye
|
368
|
+
- spec/fixtures/dsl/load_error.eye
|
369
|
+
- spec/fixtures/dsl/load_error_folder/load3.eye
|
370
|
+
- spec/fixtures/dsl/load_error_folder/load4.eye
|
371
|
+
- spec/fixtures/dsl/load_folder/load3.eye
|
372
|
+
- spec/fixtures/dsl/load_folder/load4.eye
|
373
|
+
- spec/fixtures/dsl/load_int.eye
|
374
|
+
- spec/fixtures/dsl/load_int2.eye
|
375
|
+
- spec/fixtures/dsl/load_logger.eye
|
376
|
+
- spec/fixtures/dsl/load_logger2.eye
|
377
|
+
- spec/fixtures/dsl/long_load.eye
|
378
|
+
- spec/fixtures/dsl/subfolder1/proc1.rb
|
379
|
+
- spec/fixtures/dsl/subfolder2.eye
|
380
|
+
- spec/fixtures/dsl/subfolder2/common.rb
|
381
|
+
- spec/fixtures/dsl/subfolder2/proc2.rb
|
382
|
+
- spec/fixtures/dsl/subfolder2/sub/proc3.rb
|
383
|
+
- spec/fixtures/dsl/subfolder3.eye
|
384
|
+
- spec/fixtures/dsl/subfolder3/common.rb
|
385
|
+
- spec/fixtures/dsl/subfolder3/proc4.rb
|
386
|
+
- spec/fixtures/dsl/subfolder3/sub/proc5.rb
|
387
|
+
- spec/fixtures/dsl/subfolder4.eye
|
388
|
+
- spec/fixtures/dsl/subfolder4/a.rb
|
389
|
+
- spec/fixtures/dsl/subfolder4/b.rb
|
390
|
+
- spec/fixtures/dsl/subfolder4/c.rb
|
391
|
+
- spec/mock_spec.rb
|
392
|
+
- spec/process/checks/child_checks_spec.rb
|
393
|
+
- spec/process/checks/cpu_spec.rb
|
394
|
+
- spec/process/checks/ctime_spec.rb
|
395
|
+
- spec/process/checks/fsize_spec.rb
|
396
|
+
- spec/process/checks/http_spec.rb
|
397
|
+
- spec/process/checks/intergration_spec.rb
|
398
|
+
- spec/process/checks/memory_spec.rb
|
399
|
+
- spec/process/child_process_spec.rb
|
400
|
+
- spec/process/config_spec.rb
|
401
|
+
- spec/process/controller_spec.rb
|
402
|
+
- spec/process/monitoring_spec.rb
|
403
|
+
- spec/process/restart_spec.rb
|
404
|
+
- spec/process/scheduler_spec.rb
|
405
|
+
- spec/process/start_spec.rb
|
406
|
+
- spec/process/states_history_spec.rb
|
407
|
+
- spec/process/stop_spec.rb
|
408
|
+
- spec/process/system_spec.rb
|
409
|
+
- spec/process/triggers/flapping_spec.rb
|
410
|
+
- spec/process/update_config_spec.rb
|
411
|
+
- spec/spec_helper.rb
|
412
|
+
- spec/support/rr_celluloid.rb
|
413
|
+
- spec/support/scheduler_hack.rb
|
414
|
+
- spec/support/spec_support.rb
|
415
|
+
- spec/system_resources_spec.rb
|
416
|
+
- spec/system_spec.rb
|
417
|
+
- spec/utils/alive_array_spec.rb
|
418
|
+
- spec/utils/celluloid_chain_spec.rb
|
419
|
+
- spec/utils/tail_spec.rb
|
420
|
+
homepage: http://github.com/kostya/eye
|
421
|
+
licenses:
|
422
|
+
- MIT
|
423
|
+
post_install_message:
|
424
|
+
rdoc_options: []
|
425
|
+
require_paths:
|
426
|
+
- lib
|
427
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
428
|
+
none: false
|
429
|
+
requirements:
|
430
|
+
- - ! '>='
|
431
|
+
- !ruby/object:Gem::Version
|
432
|
+
version: 1.9.2
|
433
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
434
|
+
none: false
|
435
|
+
requirements:
|
436
|
+
- - ! '>='
|
437
|
+
- !ruby/object:Gem::Version
|
438
|
+
version: 1.3.6
|
439
|
+
requirements: []
|
440
|
+
rubyforge_project:
|
441
|
+
rubygems_version: 1.8.24
|
442
|
+
signing_key:
|
443
|
+
specification_version: 3
|
444
|
+
summary: Process monitoring tool. With Bluepill like config syntax. Requires MRI Ruby
|
445
|
+
>= 1.9.2. Uses Celluloid and Celluloid::IO.
|
446
|
+
test_files:
|
447
|
+
- spec/checker/cpu_spec.rb
|
448
|
+
- spec/checker/file_ctime_spec.rb
|
449
|
+
- spec/checker/file_size_spec.rb
|
450
|
+
- spec/checker/http_spec.rb
|
451
|
+
- spec/checker/memory_spec.rb
|
452
|
+
- spec/checker/socket_spec.rb
|
453
|
+
- spec/checker_spec.rb
|
454
|
+
- spec/child_process/child_process_spec.rb
|
455
|
+
- spec/client_server_spec.rb
|
456
|
+
- spec/controller/commands_spec.rb
|
457
|
+
- spec/controller/controller_spec.rb
|
458
|
+
- spec/controller/find_objects_spec.rb
|
459
|
+
- spec/controller/group_spec.rb
|
460
|
+
- spec/controller/intergration_spec.rb
|
461
|
+
- spec/controller/load_spec.rb
|
462
|
+
- spec/controller/races_spec.rb
|
463
|
+
- spec/controller/stop_on_delete_spec.rb
|
464
|
+
- spec/dsl/chain_spec.rb
|
465
|
+
- spec/dsl/checks_spec.rb
|
466
|
+
- spec/dsl/config_spec.rb
|
467
|
+
- spec/dsl/dsl_spec.rb
|
468
|
+
- spec/dsl/getter_spec.rb
|
469
|
+
- spec/dsl/integration_spec.rb
|
470
|
+
- spec/dsl/load_spec.rb
|
471
|
+
- spec/dsl/process_spec.rb
|
472
|
+
- spec/dsl/sub_procs_spec.rb
|
473
|
+
- spec/dsl/with_server_spec.rb
|
474
|
+
- spec/example/em.rb
|
475
|
+
- spec/example/forking.rb
|
476
|
+
- spec/example/sample.rb
|
477
|
+
- spec/fixtures/dsl/0.rb
|
478
|
+
- spec/fixtures/dsl/0a.rb
|
479
|
+
- spec/fixtures/dsl/0c.rb
|
480
|
+
- spec/fixtures/dsl/1.rb
|
481
|
+
- spec/fixtures/dsl/bad.eye
|
482
|
+
- spec/fixtures/dsl/configs/1.eye
|
483
|
+
- spec/fixtures/dsl/configs/2.eye
|
484
|
+
- spec/fixtures/dsl/configs/3.eye
|
485
|
+
- spec/fixtures/dsl/configs/4.eye
|
486
|
+
- spec/fixtures/dsl/empty.eye
|
487
|
+
- spec/fixtures/dsl/include_test.eye
|
488
|
+
- spec/fixtures/dsl/include_test/1.rb
|
489
|
+
- spec/fixtures/dsl/include_test/ha.rb
|
490
|
+
- spec/fixtures/dsl/include_test2.eye
|
491
|
+
- spec/fixtures/dsl/integration.eye
|
492
|
+
- spec/fixtures/dsl/integration2.eye
|
493
|
+
- spec/fixtures/dsl/integration_locks.eye
|
494
|
+
- spec/fixtures/dsl/integration_sor.eye
|
495
|
+
- spec/fixtures/dsl/integration_sor2.eye
|
496
|
+
- spec/fixtures/dsl/integration_sor3.eye
|
497
|
+
- spec/fixtures/dsl/load.eye
|
498
|
+
- spec/fixtures/dsl/load2.eye
|
499
|
+
- spec/fixtures/dsl/load2_dup2.eye
|
500
|
+
- spec/fixtures/dsl/load2_dup_pid.eye
|
501
|
+
- spec/fixtures/dsl/load3.eye
|
502
|
+
- spec/fixtures/dsl/load4.eye
|
503
|
+
- spec/fixtures/dsl/load5.eye
|
504
|
+
- spec/fixtures/dsl/load6.eye
|
505
|
+
- spec/fixtures/dsl/load_dubls.eye
|
506
|
+
- spec/fixtures/dsl/load_dup_ex_names.eye
|
507
|
+
- spec/fixtures/dsl/load_error.eye
|
508
|
+
- spec/fixtures/dsl/load_error_folder/load3.eye
|
509
|
+
- spec/fixtures/dsl/load_error_folder/load4.eye
|
510
|
+
- spec/fixtures/dsl/load_folder/load3.eye
|
511
|
+
- spec/fixtures/dsl/load_folder/load4.eye
|
512
|
+
- spec/fixtures/dsl/load_int.eye
|
513
|
+
- spec/fixtures/dsl/load_int2.eye
|
514
|
+
- spec/fixtures/dsl/load_logger.eye
|
515
|
+
- spec/fixtures/dsl/load_logger2.eye
|
516
|
+
- spec/fixtures/dsl/long_load.eye
|
517
|
+
- spec/fixtures/dsl/subfolder1/proc1.rb
|
518
|
+
- spec/fixtures/dsl/subfolder2.eye
|
519
|
+
- spec/fixtures/dsl/subfolder2/common.rb
|
520
|
+
- spec/fixtures/dsl/subfolder2/proc2.rb
|
521
|
+
- spec/fixtures/dsl/subfolder2/sub/proc3.rb
|
522
|
+
- spec/fixtures/dsl/subfolder3.eye
|
523
|
+
- spec/fixtures/dsl/subfolder3/common.rb
|
524
|
+
- spec/fixtures/dsl/subfolder3/proc4.rb
|
525
|
+
- spec/fixtures/dsl/subfolder3/sub/proc5.rb
|
526
|
+
- spec/fixtures/dsl/subfolder4.eye
|
527
|
+
- spec/fixtures/dsl/subfolder4/a.rb
|
528
|
+
- spec/fixtures/dsl/subfolder4/b.rb
|
529
|
+
- spec/fixtures/dsl/subfolder4/c.rb
|
530
|
+
- spec/mock_spec.rb
|
531
|
+
- spec/process/checks/child_checks_spec.rb
|
532
|
+
- spec/process/checks/cpu_spec.rb
|
533
|
+
- spec/process/checks/ctime_spec.rb
|
534
|
+
- spec/process/checks/fsize_spec.rb
|
535
|
+
- spec/process/checks/http_spec.rb
|
536
|
+
- spec/process/checks/intergration_spec.rb
|
537
|
+
- spec/process/checks/memory_spec.rb
|
538
|
+
- spec/process/child_process_spec.rb
|
539
|
+
- spec/process/config_spec.rb
|
540
|
+
- spec/process/controller_spec.rb
|
541
|
+
- spec/process/monitoring_spec.rb
|
542
|
+
- spec/process/restart_spec.rb
|
543
|
+
- spec/process/scheduler_spec.rb
|
544
|
+
- spec/process/start_spec.rb
|
545
|
+
- spec/process/states_history_spec.rb
|
546
|
+
- spec/process/stop_spec.rb
|
547
|
+
- spec/process/system_spec.rb
|
548
|
+
- spec/process/triggers/flapping_spec.rb
|
549
|
+
- spec/process/update_config_spec.rb
|
550
|
+
- spec/spec_helper.rb
|
551
|
+
- spec/support/rr_celluloid.rb
|
552
|
+
- spec/support/scheduler_hack.rb
|
553
|
+
- spec/support/spec_support.rb
|
554
|
+
- spec/system_resources_spec.rb
|
555
|
+
- spec/system_spec.rb
|
556
|
+
- spec/utils/alive_array_spec.rb
|
557
|
+
- spec/utils/celluloid_chain_spec.rb
|
558
|
+
- spec/utils/tail_spec.rb
|