serverside 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +16 -0
- data/Rakefile +16 -1
- data/lib/serverside/caching.rb +56 -0
- data/lib/serverside/request.rb +8 -4
- data/lib/serverside/static.rb +29 -51
- data/test/functional/static_server.rb +7 -0
- data/test/spec/caching_spec.rb +101 -0
- data/test/spec/connection_spec.rb +0 -2
- data/test/unit/request_test.rb +31 -1
- data/test/unit/static_test.rb +21 -25
- metadata +30 -75
- data/doc/rdoc/classes/Daemon/Base.html +0 -148
- data/doc/rdoc/classes/Daemon/Cluster/PidFile.html +0 -230
- data/doc/rdoc/classes/Daemon/Cluster.html +0 -308
- data/doc/rdoc/classes/Daemon/PidFile.html +0 -178
- data/doc/rdoc/classes/Daemon.html +0 -253
- data/doc/rdoc/classes/Object.html +0 -151
- data/doc/rdoc/classes/Proc.html +0 -151
- data/doc/rdoc/classes/ServerSide/Application.html +0 -172
- data/doc/rdoc/classes/ServerSide/HTTP/Connection.html +0 -202
- data/doc/rdoc/classes/ServerSide/HTTP/Request.html +0 -768
- data/doc/rdoc/classes/ServerSide/HTTP/Server.html +0 -164
- data/doc/rdoc/classes/ServerSide/HTTP.html +0 -121
- data/doc/rdoc/classes/ServerSide/Router.html +0 -496
- data/doc/rdoc/classes/ServerSide/StaticFiles/Const.html +0 -204
- data/doc/rdoc/classes/ServerSide/StaticFiles.html +0 -282
- data/doc/rdoc/classes/ServerSide/Template.html +0 -200
- data/doc/rdoc/classes/ServerSide.html +0 -174
- data/doc/rdoc/classes/String.html +0 -212
- data/doc/rdoc/classes/Symbol.html +0 -158
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/CHANGELOG.html +0 -356
- data/doc/rdoc/files/COPYING.html +0 -129
- data/doc/rdoc/files/README.html +0 -199
- data/doc/rdoc/files/lib/serverside/application_rb.html +0 -109
- data/doc/rdoc/files/lib/serverside/cluster_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/connection_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/core_ext_rb.html +0 -107
- data/doc/rdoc/files/lib/serverside/daemon_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/request_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/routing_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/server_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/static_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/template_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside_rb.html +0 -131
- data/doc/rdoc/fr_class_index.html +0 -45
- data/doc/rdoc/fr_file_index.html +0 -40
- data/doc/rdoc/fr_method_index.html +0 -79
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.0
|
3
3
|
specification_version: 1
|
4
4
|
name: serverside
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2006-10-
|
6
|
+
version: 0.2.8
|
7
|
+
date: 2006-10-14 00:00:00 +02:00
|
8
8
|
summary: Performance-oriented web framework.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors:
|
29
30
|
- Sharon Rosner
|
30
31
|
files:
|
@@ -32,89 +33,43 @@ files:
|
|
32
33
|
- README
|
33
34
|
- Rakefile
|
34
35
|
- bin/serverside
|
35
|
-
- doc/rdoc
|
36
|
-
- doc/rdoc/created.rid
|
37
|
-
- doc/rdoc/rdoc-style.css
|
38
|
-
- doc/rdoc/files
|
39
|
-
- doc/rdoc/classes
|
40
|
-
- doc/rdoc/fr_file_index.html
|
41
|
-
- doc/rdoc/fr_class_index.html
|
42
|
-
- doc/rdoc/fr_method_index.html
|
43
|
-
- doc/rdoc/index.html
|
44
|
-
- doc/rdoc/files/README.html
|
45
|
-
- doc/rdoc/files/CHANGELOG.html
|
46
|
-
- doc/rdoc/files/COPYING.html
|
47
|
-
- doc/rdoc/files/lib
|
48
|
-
- doc/rdoc/files/lib/serverside_rb.html
|
49
|
-
- doc/rdoc/files/lib/serverside
|
50
|
-
- doc/rdoc/files/lib/serverside/server_rb.html
|
51
|
-
- doc/rdoc/files/lib/serverside/daemon_rb.html
|
52
|
-
- doc/rdoc/files/lib/serverside/application_rb.html
|
53
|
-
- doc/rdoc/files/lib/serverside/core_ext_rb.html
|
54
|
-
- doc/rdoc/files/lib/serverside/connection_rb.html
|
55
|
-
- doc/rdoc/files/lib/serverside/cluster_rb.html
|
56
|
-
- doc/rdoc/files/lib/serverside/static_rb.html
|
57
|
-
- doc/rdoc/files/lib/serverside/routing_rb.html
|
58
|
-
- doc/rdoc/files/lib/serverside/template_rb.html
|
59
|
-
- doc/rdoc/files/lib/serverside/request_rb.html
|
60
|
-
- doc/rdoc/classes/Symbol.html
|
61
|
-
- doc/rdoc/classes/Proc.html
|
62
|
-
- doc/rdoc/classes/Object.html
|
63
|
-
- doc/rdoc/classes/String.html
|
64
|
-
- doc/rdoc/classes/Daemon.html
|
65
|
-
- doc/rdoc/classes/Daemon
|
66
|
-
- doc/rdoc/classes/ServerSide.html
|
67
|
-
- doc/rdoc/classes/ServerSide
|
68
|
-
- doc/rdoc/classes/Daemon/PidFile.html
|
69
|
-
- doc/rdoc/classes/Daemon/Base.html
|
70
|
-
- doc/rdoc/classes/Daemon/Cluster.html
|
71
|
-
- doc/rdoc/classes/Daemon/Cluster
|
72
|
-
- doc/rdoc/classes/Daemon/Cluster/PidFile.html
|
73
|
-
- doc/rdoc/classes/ServerSide/StaticFiles.html
|
74
|
-
- doc/rdoc/classes/ServerSide/StaticFiles
|
75
|
-
- doc/rdoc/classes/ServerSide/Application.html
|
76
|
-
- doc/rdoc/classes/ServerSide/HTTP.html
|
77
|
-
- doc/rdoc/classes/ServerSide/HTTP
|
78
|
-
- doc/rdoc/classes/ServerSide/Template.html
|
79
|
-
- doc/rdoc/classes/ServerSide/Router.html
|
80
|
-
- doc/rdoc/classes/ServerSide/StaticFiles/Const.html
|
81
|
-
- doc/rdoc/classes/ServerSide/HTTP/Server.html
|
82
|
-
- doc/rdoc/classes/ServerSide/HTTP/Request.html
|
83
|
-
- doc/rdoc/classes/ServerSide/HTTP/Connection.html
|
84
|
-
- test/unit
|
85
|
-
- test/test_helper.rb
|
86
36
|
- test/functional
|
87
37
|
- test/spec
|
88
|
-
- test/
|
89
|
-
- test/unit
|
90
|
-
- test/unit/core_ext_test.rb
|
91
|
-
- test/unit/connection_test.rb
|
92
|
-
- test/unit/cluster_test.rb
|
93
|
-
- test/unit/static_test.rb
|
94
|
-
- test/unit/routing_test.rb
|
95
|
-
- test/unit/template_test.rb
|
96
|
-
- test/unit/request_test.rb
|
38
|
+
- test/test_helper.rb
|
39
|
+
- test/unit
|
97
40
|
- test/functional/primitive_static_server_test.rb
|
98
|
-
- test/functional/
|
99
|
-
- test/functional/static_profile.rb
|
100
|
-
- test/functional/static_rfuzz.rb
|
41
|
+
- test/functional/request_body_test.rb
|
101
42
|
- test/functional/routing_server.rb
|
102
43
|
- test/functional/routing_server_test.rb
|
103
|
-
- test/functional/
|
104
|
-
- test/
|
44
|
+
- test/functional/static_profile.rb
|
45
|
+
- test/functional/static_rfuzz.rb
|
46
|
+
- test/functional/static_server.rb
|
47
|
+
- test/functional/static_server_test.rb
|
48
|
+
- test/spec/caching_spec.rb
|
105
49
|
- test/spec/connection_spec.rb
|
106
|
-
-
|
50
|
+
- test/spec/core_ext_spec.rb
|
51
|
+
- test/unit/cluster_test.rb
|
52
|
+
- test/unit/connection_test.rb
|
53
|
+
- test/unit/core_ext_test.rb
|
54
|
+
- test/unit/daemon_test.rb
|
55
|
+
- test/unit/request_test.rb
|
56
|
+
- test/unit/routing_test.rb
|
57
|
+
- test/unit/server_test.rb
|
58
|
+
- test/unit/static_test.rb
|
59
|
+
- test/unit/template_test.rb
|
107
60
|
- lib/serverside
|
108
|
-
- lib/serverside
|
109
|
-
- lib/serverside/daemon.rb
|
61
|
+
- lib/serverside.rb
|
110
62
|
- lib/serverside/application.rb
|
111
|
-
- lib/serverside/
|
112
|
-
- lib/serverside/connection.rb
|
63
|
+
- lib/serverside/caching.rb
|
113
64
|
- lib/serverside/cluster.rb
|
114
|
-
- lib/serverside/
|
65
|
+
- lib/serverside/connection.rb
|
66
|
+
- lib/serverside/core_ext.rb
|
67
|
+
- lib/serverside/daemon.rb
|
68
|
+
- lib/serverside/request.rb
|
115
69
|
- lib/serverside/routing.rb
|
70
|
+
- lib/serverside/server.rb
|
71
|
+
- lib/serverside/static.rb
|
116
72
|
- lib/serverside/template.rb
|
117
|
-
- lib/serverside/request.rb
|
118
73
|
- CHANGELOG
|
119
74
|
test_files: []
|
120
75
|
|
@@ -1,148 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Daemon::Base</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Daemon::Base</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/serverside/daemon_rb.html">
|
59
|
-
lib/serverside/daemon.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="../Object.html">
|
69
|
-
Object
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="method-list">
|
88
|
-
<h3 class="section-bar">Methods</h3>
|
89
|
-
|
90
|
-
<div class="name-list">
|
91
|
-
<a href="#M000012">pid_fn</a>
|
92
|
-
</div>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
<!-- if includes -->
|
99
|
-
|
100
|
-
<div id="section">
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<!-- if method_list -->
|
110
|
-
<div id="methods">
|
111
|
-
<h3 class="section-bar">Public Class methods</h3>
|
112
|
-
|
113
|
-
<div id="method-M000012" class="method-detail">
|
114
|
-
<a name="M000012"></a>
|
115
|
-
|
116
|
-
<div class="method-heading">
|
117
|
-
<a href="#M000012" class="method-signature">
|
118
|
-
<span class="method-name">pid_fn</span><span class="method-args">()</span>
|
119
|
-
</a>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
<div class="method-description">
|
123
|
-
<p><a class="source-toggle" href="#"
|
124
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
125
|
-
<div class="method-source-code" id="M000012-source">
|
126
|
-
<pre>
|
127
|
-
<span class="ruby-comment cmt"># File lib/serverside/daemon.rb, line 8</span>
|
128
|
-
8: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pid_fn</span>
|
129
|
-
9: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">WorkingDirectory</span>, <span class="ruby-node">"#{name.gsub('::', '.').downcase}.pid"</span>)
|
130
|
-
10: <span class="ruby-keyword kw">end</span>
|
131
|
-
</pre>
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
|
136
|
-
|
137
|
-
</div>
|
138
|
-
|
139
|
-
|
140
|
-
</div>
|
141
|
-
|
142
|
-
|
143
|
-
<div id="validator-badges">
|
144
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
145
|
-
</div>
|
146
|
-
|
147
|
-
</body>
|
148
|
-
</html>
|
@@ -1,230 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Daemon::Cluster::PidFile</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Daemon::Cluster::PidFile</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/serverside/cluster_rb.html">
|
59
|
-
lib/serverside/cluster.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="../../Object.html">
|
69
|
-
Object
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
Stores and recalls pids for the child processes.
|
86
|
-
</p>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
</div>
|
92
|
-
|
93
|
-
<div id="method-list">
|
94
|
-
<h3 class="section-bar">Methods</h3>
|
95
|
-
|
96
|
-
<div class="name-list">
|
97
|
-
<a href="#M000019">delete</a>
|
98
|
-
<a href="#M000021">recall_pids</a>
|
99
|
-
<a href="#M000020">store_pid</a>
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
|
106
|
-
<!-- if includes -->
|
107
|
-
|
108
|
-
<div id="section">
|
109
|
-
|
110
|
-
|
111
|
-
<div id="constants-list">
|
112
|
-
<h3 class="section-bar">Constants</h3>
|
113
|
-
|
114
|
-
<div class="name-list">
|
115
|
-
<table summary="Constants">
|
116
|
-
<tr class="top-aligned-row context-row">
|
117
|
-
<td class="context-item-name">FN</td>
|
118
|
-
<td>=</td>
|
119
|
-
<td class="context-item-value">'serverside_cluster.pid'</td>
|
120
|
-
</tr>
|
121
|
-
</table>
|
122
|
-
</div>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<!-- if method_list -->
|
131
|
-
<div id="methods">
|
132
|
-
<h3 class="section-bar">Public Class methods</h3>
|
133
|
-
|
134
|
-
<div id="method-M000019" class="method-detail">
|
135
|
-
<a name="M000019"></a>
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<a href="#M000019" class="method-signature">
|
139
|
-
<span class="method-name">delete</span><span class="method-args">()</span>
|
140
|
-
</a>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<div class="method-description">
|
144
|
-
<p>
|
145
|
-
Deletes the cluster’s pid file.
|
146
|
-
</p>
|
147
|
-
<p><a class="source-toggle" href="#"
|
148
|
-
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
149
|
-
<div class="method-source-code" id="M000019-source">
|
150
|
-
<pre>
|
151
|
-
<span class="ruby-comment cmt"># File lib/serverside/cluster.rb, line 12</span>
|
152
|
-
12: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>
|
153
|
-
13: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-constant">FN</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-constant">FN</span>)
|
154
|
-
14: <span class="ruby-keyword kw">end</span>
|
155
|
-
</pre>
|
156
|
-
</div>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<div id="method-M000021" class="method-detail">
|
161
|
-
<a name="M000021"></a>
|
162
|
-
|
163
|
-
<div class="method-heading">
|
164
|
-
<a href="#M000021" class="method-signature">
|
165
|
-
<span class="method-name">recall_pids</span><span class="method-args">()</span>
|
166
|
-
</a>
|
167
|
-
</div>
|
168
|
-
|
169
|
-
<div class="method-description">
|
170
|
-
<p>
|
171
|
-
Recalls all child pids.
|
172
|
-
</p>
|
173
|
-
<p><a class="source-toggle" href="#"
|
174
|
-
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
175
|
-
<div class="method-source-code" id="M000021-source">
|
176
|
-
<pre>
|
177
|
-
<span class="ruby-comment cmt"># File lib/serverside/cluster.rb, line 22</span>
|
178
|
-
22: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">recall_pids</span>
|
179
|
-
23: <span class="ruby-identifier">pids</span> = []
|
180
|
-
24: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">FN</span>, <span class="ruby-value str">'r'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
181
|
-
25: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">f</span>.<span class="ruby-identifier">eof?</span>
|
182
|
-
26: <span class="ruby-identifier">pids</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">gets</span>.<span class="ruby-identifier">to_i</span>
|
183
|
-
27: <span class="ruby-keyword kw">end</span>
|
184
|
-
28: <span class="ruby-keyword kw">end</span>
|
185
|
-
29: <span class="ruby-identifier">pids</span>
|
186
|
-
30: <span class="ruby-keyword kw">end</span>
|
187
|
-
</pre>
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
<div id="method-M000020" class="method-detail">
|
193
|
-
<a name="M000020"></a>
|
194
|
-
|
195
|
-
<div class="method-heading">
|
196
|
-
<a href="#M000020" class="method-signature">
|
197
|
-
<span class="method-name">store_pid</span><span class="method-args">(pid)</span>
|
198
|
-
</a>
|
199
|
-
</div>
|
200
|
-
|
201
|
-
<div class="method-description">
|
202
|
-
<p>
|
203
|
-
Stores a pid in the cluster’s pid file.
|
204
|
-
</p>
|
205
|
-
<p><a class="source-toggle" href="#"
|
206
|
-
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
207
|
-
<div class="method-source-code" id="M000020-source">
|
208
|
-
<pre>
|
209
|
-
<span class="ruby-comment cmt"># File lib/serverside/cluster.rb, line 17</span>
|
210
|
-
17: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">store_pid</span>(<span class="ruby-identifier">pid</span>)
|
211
|
-
18: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">FN</span>, <span class="ruby-value str">'a'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">pid</span>}
|
212
|
-
19: <span class="ruby-keyword kw">end</span>
|
213
|
-
</pre>
|
214
|
-
</div>
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
|
218
|
-
|
219
|
-
</div>
|
220
|
-
|
221
|
-
|
222
|
-
</div>
|
223
|
-
|
224
|
-
|
225
|
-
<div id="validator-badges">
|
226
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
</body>
|
230
|
-
</html>
|