r509-middleware-validity 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/R509.html +29 -20
- data/doc/R509/Middleware.html +30 -21
- data/doc/R509/Middleware/Validity.html +297 -20
- data/doc/_index.html +27 -23
- data/doc/class_list.html +11 -5
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +50 -44
- data/doc/file.README.html +38 -22
- data/doc/file_list.html +12 -6
- data/doc/frames.html +20 -5
- data/doc/index.html +38 -22
- data/doc/js/app.js +52 -43
- data/doc/js/full_list.js +14 -8
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +12 -6
- data/doc/top-level-namespace.html +27 -18
- data/lib/r509/middleware/validity/version.rb +1 -1
- metadata +41 -18
data/doc/R509.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: R509
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.8.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
18
19
|
relpath = '';
|
19
|
-
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="_index.html">Index (R)</a> »
|
34
|
+
<a href="_index.html">Index (R)</a> »
|
37
35
|
|
38
36
|
|
39
37
|
<span class="title">R509</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Module: R509
|
60
67
|
|
61
68
|
|
@@ -72,8 +79,8 @@
|
|
72
79
|
|
73
80
|
|
74
81
|
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/r509/
|
76
|
-
lib/r509/
|
82
|
+
<dd class="r1 last">lib/r509/middleware/validity.rb<span class="defines">,<br />
|
83
|
+
lib/r509/middleware/validity/version.rb</span>
|
77
84
|
</dd>
|
78
85
|
|
79
86
|
</dl>
|
@@ -81,11 +88,11 @@
|
|
81
88
|
|
82
89
|
<h2>Defined Under Namespace</h2>
|
83
90
|
<p class="children">
|
84
|
-
|
91
|
+
|
85
92
|
|
86
93
|
<strong class="modules">Modules:</strong> <span class='object_link'><a href="R509/Middleware.html" title="R509::Middleware (module)">Middleware</a></span>
|
87
94
|
|
88
|
-
|
95
|
+
|
89
96
|
|
90
97
|
|
91
98
|
</p>
|
@@ -96,12 +103,14 @@
|
|
96
103
|
|
97
104
|
|
98
105
|
|
106
|
+
|
107
|
+
|
99
108
|
</div>
|
100
|
-
|
109
|
+
|
101
110
|
<div id="footer">
|
102
|
-
Generated on
|
111
|
+
Generated on Thu Nov 8 14:49:20 2012 by
|
103
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
104
|
-
0.
|
113
|
+
0.8.3 (ruby-1.9.3).
|
105
114
|
</div>
|
106
115
|
|
107
116
|
</body>
|
data/doc/R509/Middleware.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: R509::Middleware
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.8.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../_index.html">Index (M)</a> »
|
34
|
+
<a href="../_index.html">Index (M)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Middleware</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Module: R509::Middleware
|
60
67
|
|
61
68
|
|
@@ -72,8 +79,8 @@
|
|
72
79
|
|
73
80
|
|
74
81
|
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/r509/
|
76
|
-
lib/r509/
|
82
|
+
<dd class="r1 last">lib/r509/middleware/validity.rb<span class="defines">,<br />
|
83
|
+
lib/r509/middleware/validity/version.rb</span>
|
77
84
|
</dd>
|
78
85
|
|
79
86
|
</dl>
|
@@ -81,9 +88,9 @@
|
|
81
88
|
|
82
89
|
<h2>Defined Under Namespace</h2>
|
83
90
|
<p class="children">
|
84
|
-
|
91
|
+
|
85
92
|
|
86
|
-
|
93
|
+
|
87
94
|
|
88
95
|
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Middleware/Validity.html" title="R509::Middleware::Validity (class)">Validity</a></span>
|
89
96
|
|
@@ -96,12 +103,14 @@
|
|
96
103
|
|
97
104
|
|
98
105
|
|
106
|
+
|
107
|
+
|
99
108
|
</div>
|
100
|
-
|
109
|
+
|
101
110
|
<div id="footer">
|
102
|
-
Generated on
|
111
|
+
Generated on Thu Nov 8 14:49:20 2012 by
|
103
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
104
|
-
0.
|
113
|
+
0.8.3 (ruby-1.9.3).
|
105
114
|
</div>
|
106
115
|
|
107
116
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
|
7
|
+
Class: R509::Middleware::Validity
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.8.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
@@ -26,37 +28,42 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../../_index.html">Index (V)</a> »
|
34
|
+
<a href="../../_index.html">Index (V)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../Middleware.html" title="R509::Middleware (module)">Middleware</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Validity</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
59
|
-
<div id="content"><h1>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: R509::Middleware::Validity
|
60
67
|
|
61
68
|
|
62
69
|
|
@@ -64,15 +71,36 @@
|
|
64
71
|
|
65
72
|
<dl class="box">
|
66
73
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">R509::Middleware::Validity</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
67
89
|
|
68
90
|
|
69
91
|
|
70
92
|
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2">Dependo::Mixin</dd>
|
95
|
+
|
96
|
+
|
71
97
|
|
72
98
|
|
73
99
|
|
74
100
|
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/r509/
|
101
|
+
<dd class="r1 last">lib/r509/middleware/validity.rb<span class="defines">,<br />
|
102
|
+
lib/r509/middleware/validity/version.rb</span>
|
103
|
+
</dd>
|
76
104
|
|
77
105
|
</dl>
|
78
106
|
<div class="clear"></div>
|
@@ -85,7 +113,7 @@
|
|
85
113
|
<dt id="VERSION-constant" class="">VERSION =
|
86
114
|
|
87
115
|
</dt>
|
88
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.
|
116
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.2</span><span class='tstring_end'>"</span></span></pre></dd>
|
89
117
|
|
90
118
|
</dl>
|
91
119
|
|
@@ -96,12 +124,261 @@
|
|
96
124
|
|
97
125
|
|
98
126
|
|
127
|
+
|
128
|
+
<h2>
|
129
|
+
Instance Method Summary
|
130
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
131
|
+
</h2>
|
132
|
+
|
133
|
+
<ul class="summary">
|
134
|
+
|
135
|
+
<li class="public ">
|
136
|
+
<span class="summary_signature">
|
137
|
+
|
138
|
+
<a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(env) </a>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
</span>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
153
|
+
|
154
|
+
</li>
|
155
|
+
|
156
|
+
|
157
|
+
<li class="public ">
|
158
|
+
<span class="summary_signature">
|
159
|
+
|
160
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Validity) <strong>initialize</strong>(app, redis = nil) </a>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</span>
|
165
|
+
|
166
|
+
|
167
|
+
<span class="note title constructor">constructor</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<span class="summary_desc"><div class='inline'>
|
177
|
+
<p>A new instance of Validity.</p>
|
178
|
+
</div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
</ul>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<div id="constructor_details" class="method_details_list">
|
188
|
+
<h2>Constructor Details</h2>
|
189
|
+
|
190
|
+
<div class="method_details first">
|
191
|
+
<h3 class="signature first" id="initialize-instance_method">
|
192
|
+
|
193
|
+
- (<tt><span class='object_link'><a href="" title="R509::Middleware::Validity (class)">Validity</a></span></tt>) <strong>initialize</strong>(app, redis = nil)
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</h3><div class="docstring">
|
200
|
+
<div class="discussion">
|
201
|
+
|
202
|
+
<p>A new instance of Validity</p>
|
203
|
+
|
204
|
+
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
<div class="tags">
|
208
|
+
|
209
|
+
|
210
|
+
</div><table class="source_code">
|
211
|
+
<tr>
|
212
|
+
<td>
|
213
|
+
<pre class="lines">
|
214
|
+
|
215
|
+
|
216
|
+
10
|
217
|
+
11
|
218
|
+
12
|
219
|
+
13
|
220
|
+
14
|
221
|
+
15
|
222
|
+
16
|
223
|
+
17</pre>
|
224
|
+
</td>
|
225
|
+
<td>
|
226
|
+
<pre class="code"><span class="info file"># File 'lib/r509/middleware/validity.rb', line 10</span>
|
227
|
+
|
228
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_app'>app</span><span class='comma'>,</span><span class='id identifier rubyid_redis'>redis</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
229
|
+
<span class='ivar'>@app</span> <span class='op'>=</span> <span class='id identifier rubyid_app'>app</span>
|
230
|
+
|
231
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_redis'>redis</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
232
|
+
<span class='id identifier rubyid_redis'>redis</span> <span class='op'>=</span> <span class='const'>Redis</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
233
|
+
<span class='kw'>end</span>
|
234
|
+
<span class='ivar'>@writer</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Redis</span><span class='op'>::</span><span class='const'>Writer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_redis'>redis</span><span class='rparen'>)</span>
|
235
|
+
<span class='kw'>end</span></pre>
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
</table>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
</div>
|
242
|
+
|
243
|
+
|
244
|
+
<div id="instance_method_details" class="method_details_list">
|
245
|
+
<h2>Instance Method Details</h2>
|
246
|
+
|
247
|
+
|
248
|
+
<div class="method_details first">
|
249
|
+
<h3 class="signature first" id="call-instance_method">
|
250
|
+
|
251
|
+
- (<tt>Object</tt>) <strong>call</strong>(env)
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</h3><table class="source_code">
|
258
|
+
<tr>
|
259
|
+
<td>
|
260
|
+
<pre class="lines">
|
261
|
+
|
262
|
+
|
263
|
+
19
|
264
|
+
20
|
265
|
+
21
|
266
|
+
22
|
267
|
+
23
|
268
|
+
24
|
269
|
+
25
|
270
|
+
26
|
271
|
+
27
|
272
|
+
28
|
273
|
+
29
|
274
|
+
30
|
275
|
+
31
|
276
|
+
32
|
277
|
+
33
|
278
|
+
34
|
279
|
+
35
|
280
|
+
36
|
281
|
+
37
|
282
|
+
38
|
283
|
+
39
|
284
|
+
40
|
285
|
+
41
|
286
|
+
42
|
287
|
+
43
|
288
|
+
44
|
289
|
+
45
|
290
|
+
46
|
291
|
+
47
|
292
|
+
48
|
293
|
+
49
|
294
|
+
50
|
295
|
+
51
|
296
|
+
52
|
297
|
+
53
|
298
|
+
54
|
299
|
+
55
|
300
|
+
56
|
301
|
+
57
|
302
|
+
58
|
303
|
+
59
|
304
|
+
60
|
305
|
+
61
|
306
|
+
62
|
307
|
+
63
|
308
|
+
64
|
309
|
+
65
|
310
|
+
66
|
311
|
+
67
|
312
|
+
68
|
313
|
+
69</pre>
|
314
|
+
</td>
|
315
|
+
<td>
|
316
|
+
<pre class="code"><span class="info file"># File 'lib/r509/middleware/validity.rb', line 19</span>
|
317
|
+
|
318
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
319
|
+
<span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@app</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
320
|
+
|
321
|
+
<span class='comment'># we only want to attempt to record validity if status is 200 and it's a call
|
322
|
+
</span> <span class='comment'># to the "/1/certificate/issue" path
|
323
|
+
</span> <span class='kw'>if</span> <span class='kw'>not</span> <span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/1\/certificate\/issue\/?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>200</span>
|
324
|
+
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
325
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_part'>part</span><span class='op'>|</span>
|
326
|
+
<span class='id identifier rubyid_body'>body</span> <span class='op'>+=</span> <span class='id identifier rubyid_part'>part</span>
|
327
|
+
<span class='kw'>end</span>
|
328
|
+
<span class='kw'>begin</span>
|
329
|
+
<span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:cert</span> <span class='op'>=></span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
330
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Writing serial: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'>, Issuer: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
331
|
+
<span class='ivar'>@writer</span><span class='period'>.</span><span class='id identifier rubyid_issue'>issue</span><span class='lparen'>(</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
332
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
333
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Writing failed</span><span class='tstring_end'>"</span></span>
|
334
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
335
|
+
<span class='kw'>end</span>
|
336
|
+
<span class='kw'>elsif</span> <span class='kw'>not</span> <span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/1\/certificate\/revoke\/?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>200</span>
|
337
|
+
<span class='kw'>begin</span>
|
338
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_params'>parse_params</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
339
|
+
|
340
|
+
<span class='id identifier rubyid_issuer'>issuer</span> <span class='op'>=</span> <span class='ivar'>@app</span><span class='period'>.</span><span class='id identifier rubyid_config_pool'>config_pool</span><span class='lbracket'>[</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ca</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
341
|
+
<span class='id identifier rubyid_serial'>serial</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>serial</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
342
|
+
<span class='id identifier rubyid_reason'>reason</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>reason</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='int'>0</span>
|
343
|
+
|
344
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Revoking serial: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_content'>, reason: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_reason'>reason</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
345
|
+
|
346
|
+
<span class='ivar'>@writer</span><span class='period'>.</span><span class='id identifier rubyid_revoke'>revoke</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span> <span class='id identifier rubyid_serial'>serial</span><span class='comma'>,</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span><span class='rparen'>)</span>
|
347
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
348
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Revoking failed: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
349
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
350
|
+
<span class='kw'>end</span>
|
351
|
+
<span class='kw'>elsif</span> <span class='kw'>not</span> <span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/1\/certificate\/unrevoke\/?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>200</span>
|
352
|
+
<span class='kw'>begin</span>
|
353
|
+
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_params'>parse_params</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
354
|
+
|
355
|
+
<span class='id identifier rubyid_issuer'>issuer</span> <span class='op'>=</span> <span class='ivar'>@app</span><span class='period'>.</span><span class='id identifier rubyid_config_pool'>config_pool</span><span class='lbracket'>[</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ca</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
356
|
+
<span class='id identifier rubyid_serial'>serial</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>serial</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
357
|
+
|
358
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unrevoking serial: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
359
|
+
|
360
|
+
<span class='ivar'>@writer</span><span class='period'>.</span><span class='id identifier rubyid_unrevoke'>unrevoke</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span> <span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
361
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
362
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unrevoking failed: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
363
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
364
|
+
<span class='kw'>end</span>
|
365
|
+
<span class='kw'>end</span>
|
366
|
+
|
367
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='rbracket'>]</span>
|
368
|
+
<span class='kw'>end</span></pre>
|
369
|
+
</td>
|
370
|
+
</tr>
|
371
|
+
</table>
|
99
372
|
</div>
|
100
373
|
|
374
|
+
</div>
|
375
|
+
|
376
|
+
</div>
|
377
|
+
|
101
378
|
<div id="footer">
|
102
|
-
Generated on
|
379
|
+
Generated on Thu Nov 8 14:49:20 2012 by
|
103
380
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
104
|
-
0.
|
381
|
+
0.8.3 (ruby-1.9.3).
|
105
382
|
</div>
|
106
383
|
|
107
384
|
</body>
|