apes 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +82 -0
- data/.travis-gemfile +15 -0
- data/.travis.yml +15 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +22 -0
- data/README.md +177 -0
- data/Rakefile +44 -0
- data/apes.gemspec +34 -0
- data/doc/Apes.html +130 -0
- data/doc/Apes/Concerns.html +127 -0
- data/doc/Apes/Concerns/Errors.html +1089 -0
- data/doc/Apes/Concerns/Pagination.html +636 -0
- data/doc/Apes/Concerns/Request.html +766 -0
- data/doc/Apes/Concerns/Response.html +940 -0
- data/doc/Apes/Controller.html +1100 -0
- data/doc/Apes/Errors.html +125 -0
- data/doc/Apes/Errors/AuthenticationError.html +133 -0
- data/doc/Apes/Errors/BadRequestError.html +157 -0
- data/doc/Apes/Errors/BaseError.html +320 -0
- data/doc/Apes/Errors/InvalidDataError.html +157 -0
- data/doc/Apes/Errors/MissingDataError.html +157 -0
- data/doc/Apes/Model.html +378 -0
- data/doc/Apes/PaginationCursor.html +2138 -0
- data/doc/Apes/RuntimeConfiguration.html +909 -0
- data/doc/Apes/Serializers.html +125 -0
- data/doc/Apes/Serializers/JSON.html +389 -0
- data/doc/Apes/Serializers/JWT.html +452 -0
- data/doc/Apes/Serializers/List.html +347 -0
- data/doc/Apes/UrlsParser.html +1432 -0
- data/doc/Apes/Validators.html +125 -0
- data/doc/Apes/Validators/BaseValidator.html +278 -0
- data/doc/Apes/Validators/BooleanValidator.html +494 -0
- data/doc/Apes/Validators/EmailValidator.html +350 -0
- data/doc/Apes/Validators/PhoneValidator.html +375 -0
- data/doc/Apes/Validators/ReferenceValidator.html +372 -0
- data/doc/Apes/Validators/TimestampValidator.html +640 -0
- data/doc/Apes/Validators/UuidValidator.html +372 -0
- data/doc/Apes/Validators/ZipCodeValidator.html +372 -0
- data/doc/Apes/Version.html +189 -0
- data/doc/ApplicationController.html +547 -0
- data/doc/Concerns.html +128 -0
- data/doc/Concerns/ErrorHandling.html +826 -0
- data/doc/Concerns/PaginationHandling.html +463 -0
- data/doc/Concerns/RequestHandling.html +512 -0
- data/doc/Concerns/ResponseHandling.html +579 -0
- data/doc/Errors.html +126 -0
- data/doc/Errors/AuthenticationError.html +123 -0
- data/doc/Errors/BadRequestError.html +147 -0
- data/doc/Errors/BaseError.html +289 -0
- data/doc/Errors/InvalidDataError.html +147 -0
- data/doc/Errors/MissingDataError.html +147 -0
- data/doc/Model.html +315 -0
- data/doc/PaginationCursor.html +764 -0
- data/doc/Serializers.html +126 -0
- data/doc/Serializers/JSON.html +253 -0
- data/doc/Serializers/JWT.html +253 -0
- data/doc/Serializers/List.html +245 -0
- data/doc/Validators.html +126 -0
- data/doc/Validators/BaseValidator.html +209 -0
- data/doc/Validators/BooleanValidator.html +391 -0
- data/doc/Validators/EmailValidator.html +298 -0
- data/doc/Validators/PhoneValidator.html +313 -0
- data/doc/Validators/ReferenceValidator.html +284 -0
- data/doc/Validators/TimestampValidator.html +476 -0
- data/doc/Validators/UuidValidator.html +310 -0
- data/doc/Validators/ZipCodeValidator.html +310 -0
- data/doc/_index.html +435 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +252 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +252 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +615 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/apes.rb +40 -0
- data/lib/apes/concerns/errors.rb +111 -0
- data/lib/apes/concerns/pagination.rb +81 -0
- data/lib/apes/concerns/request.rb +237 -0
- data/lib/apes/concerns/response.rb +74 -0
- data/lib/apes/controller.rb +77 -0
- data/lib/apes/errors.rb +38 -0
- data/lib/apes/model.rb +94 -0
- data/lib/apes/pagination_cursor.rb +152 -0
- data/lib/apes/runtime_configuration.rb +80 -0
- data/lib/apes/serializers.rb +88 -0
- data/lib/apes/urls_parser.rb +233 -0
- data/lib/apes/validators.rb +234 -0
- data/lib/apes/version.rb +24 -0
- data/spec/apes/concerns/errors_spec.rb +141 -0
- data/spec/apes/concerns/pagination_spec.rb +114 -0
- data/spec/apes/concerns/request_spec.rb +244 -0
- data/spec/apes/concerns/response_spec.rb +79 -0
- data/spec/apes/controller_spec.rb +54 -0
- data/spec/apes/errors_spec.rb +14 -0
- data/spec/apes/models_spec.rb +148 -0
- data/spec/apes/pagination_cursor_spec.rb +113 -0
- data/spec/apes/runtime_configuration_spec.rb +100 -0
- data/spec/apes/serializers_spec.rb +70 -0
- data/spec/apes/urls_parser_spec.rb +150 -0
- data/spec/apes/validators_spec.rb +237 -0
- data/spec/spec_helper.rb +30 -0
- data/views/_included.json.jbuilder +9 -0
- data/views/_pagination.json.jbuilder +9 -0
- data/views/collection.json.jbuilder +4 -0
- data/views/errors/400.json.jbuilder +9 -0
- data/views/errors/403.json.jbuilder +7 -0
- data/views/errors/404.json.jbuilder +6 -0
- data/views/errors/422.json.jbuilder +19 -0
- data/views/errors/500.json.jbuilder +12 -0
- data/views/errors/501.json.jbuilder +7 -0
- data/views/layouts/general.json.jbuilder +36 -0
- data/views/object.json.jbuilder +4 -0
- metadata +262 -0
@@ -0,0 +1,1100 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Apes::Controller
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Apes/Controller.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (C)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Apes.html" title="Apes (module)">Apes</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Controller</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Apes::Controller
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">ActionController::API</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">ActionController::API</li>
|
82
|
+
|
83
|
+
<li class="next">Apes::Controller</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dt class="r2">Includes:</dt>
|
96
|
+
<dd class="r2">ActionController::ImplicitRender, ActionView::Layouts, <span class='object_link'><a href="Concerns/Errors.html" title="Apes::Concerns::Errors (module)">Apes::Concerns::Errors</a></span>, <span class='object_link'><a href="Concerns/Pagination.html" title="Apes::Concerns::Pagination (module)">Apes::Concerns::Pagination</a></span>, <span class='object_link'><a href="Concerns/Request.html" title="Apes::Concerns::Request (module)">Apes::Concerns::Request</a></span>, <span class='object_link'><a href="Concerns/Response.html" title="Apes::Concerns::Response (module)">Apes::Concerns::Response</a></span></dd>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dt class="r1 last">Defined in:</dt>
|
103
|
+
<dd class="r1 last">lib/apes/controller.rb</dd>
|
104
|
+
|
105
|
+
</dl>
|
106
|
+
<div class="clear"></div>
|
107
|
+
|
108
|
+
<h2>Overview</h2><div class="docstring">
|
109
|
+
<div class="discussion">
|
110
|
+
<p>A ready to use controller for JSON API applications.</p>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
<h2>Constant Summary</h2>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>Constant Summary</h2>
|
125
|
+
|
126
|
+
<h3 class="inherited">Constants included
|
127
|
+
from <span class='object_link'><a href="Concerns/Errors.html" title="Apes::Concerns::Errors (module)">Apes::Concerns::Errors</a></span></h3>
|
128
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Errors.html#ERROR_HANDLERS-constant" title="Apes::Concerns::Errors::ERROR_HANDLERS (constant)">Apes::Concerns::Errors::ERROR_HANDLERS</a></span></p>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<h3 class="inherited">Constants included
|
133
|
+
from <span class='object_link'><a href="Concerns/Request.html" title="Apes::Concerns::Request (module)">Apes::Concerns::Request</a></span></h3>
|
134
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Request.html#CONTENT_TYPE-constant" title="Apes::Concerns::Request::CONTENT_TYPE (constant)">Apes::Concerns::Request::CONTENT_TYPE</a></span></p>
|
135
|
+
|
136
|
+
|
137
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
138
|
+
<ul class="summary">
|
139
|
+
|
140
|
+
<li class="public ">
|
141
|
+
<span class="summary_signature">
|
142
|
+
|
143
|
+
<a href="#current_account-instance_method" title="#current_account (instance method)">- (Object) <strong>current_account</strong> </a>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
</span>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<span class="note title readonly">readonly</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'><p>The current account making the request.</p>
|
163
|
+
</div></span>
|
164
|
+
|
165
|
+
</li>
|
166
|
+
|
167
|
+
|
168
|
+
<li class="public ">
|
169
|
+
<span class="summary_signature">
|
170
|
+
|
171
|
+
<a href="#cursor-instance_method" title="#cursor (instance method)">- (Apes::PaginationCursor) <strong>cursor</strong> </a>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
</span>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<span class="note title readonly">readonly</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'><p>The pagination cursor for this request.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#request_cursor-instance_method" title="#request_cursor (instance method)">- (Apes::PaginationCursor) <strong>request_cursor</strong> </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="note title readonly">readonly</span>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
<span class="summary_desc"><div class='inline'><p>The original pagination cursor sent from the client.</p>
|
219
|
+
</div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
</ul>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Concerns/Response.html" title="Apes::Concerns::Response (module)">Apes::Concerns::Response</a></span></h3>
|
231
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Response.html#included-instance_method" title="Apes::Concerns::Response#included (method)">#included</a></span></p>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<h2>
|
236
|
+
Instance Method Summary
|
237
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
238
|
+
</h2>
|
239
|
+
|
240
|
+
<ul class="summary">
|
241
|
+
|
242
|
+
<li class="public ">
|
243
|
+
<span class="summary_signature">
|
244
|
+
|
245
|
+
<a href="#default_url_options-instance_method" title="#default_url_options (instance method)">- (Hash) <strong>default_url_options</strong> </a>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</span>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<span class="summary_desc"><div class='inline'><p>Returns the default URL options for this request.</p>
|
260
|
+
</div></span>
|
261
|
+
|
262
|
+
</li>
|
263
|
+
|
264
|
+
|
265
|
+
<li class="public ">
|
266
|
+
<span class="summary_signature">
|
267
|
+
|
268
|
+
<a href="#handle_cors-instance_method" title="#handle_cors (instance method)">- (Object) <strong>handle_cors</strong> </a>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
</span>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<span class="summary_desc"><div class='inline'><p>Tiny handle to handle CORS OPTIONS requests.</p>
|
283
|
+
</div></span>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
<li class="public ">
|
289
|
+
<span class="summary_signature">
|
290
|
+
|
291
|
+
<a href="#render_error-instance_method" title="#render_error (instance method)">- (Object) <strong>render_error</strong>(status, errors) </a>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</span>
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<span class="summary_desc"><div class='inline'><p>Default handler to render errors.</p>
|
306
|
+
</div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
</ul>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Concerns/Errors.html" title="Apes::Concerns::Errors (module)">Apes::Concerns::Errors</a></span></h3>
|
324
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Errors.html#error_handle_bad_request-instance_method" title="Apes::Concerns::Errors#error_handle_bad_request (method)">#error_handle_bad_request</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_debug-instance_method" title="Apes::Concerns::Errors#error_handle_debug (method)">#error_handle_debug</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_exception-instance_method" title="Apes::Concerns::Errors#error_handle_exception (method)">#error_handle_exception</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_fordidden-instance_method" title="Apes::Concerns::Errors#error_handle_fordidden (method)">#error_handle_fordidden</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_general-instance_method" title="Apes::Concerns::Errors#error_handle_general (method)">#error_handle_general</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_invalid_data-instance_method" title="Apes::Concerns::Errors#error_handle_invalid_data (method)">#error_handle_invalid_data</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_missing_data-instance_method" title="Apes::Concerns::Errors#error_handle_missing_data (method)">#error_handle_missing_data</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_not_found-instance_method" title="Apes::Concerns::Errors#error_handle_not_found (method)">#error_handle_not_found</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_others-instance_method" title="Apes::Concerns::Errors#error_handle_others (method)">#error_handle_others</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_unknown_attribute-instance_method" title="Apes::Concerns::Errors#error_handle_unknown_attribute (method)">#error_handle_unknown_attribute</a></span>, <span class='object_link'><a href="Concerns/Errors.html#error_handle_validation-instance_method" title="Apes::Concerns::Errors#error_handle_validation (method)">#error_handle_validation</a></span>, <span class='object_link'><a href="Concerns/Errors.html#fail_request%21-instance_method" title="Apes::Concerns::Errors#fail_request! (method)">#fail_request!</a></span></p>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Concerns/Pagination.html" title="Apes::Concerns::Pagination (module)">Apes::Concerns::Pagination</a></span></h3>
|
335
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Pagination.html#paginate-instance_method" title="Apes::Concerns::Pagination#paginate (method)">#paginate</a></span>, <span class='object_link'><a href="Concerns/Pagination.html#pagination_field-instance_method" title="Apes::Concerns::Pagination#pagination_field (method)">#pagination_field</a></span>, <span class='object_link'><a href="Concerns/Pagination.html#pagination_skip%3F-instance_method" title="Apes::Concerns::Pagination#pagination_skip? (method)">#pagination_skip?</a></span>, <span class='object_link'><a href="Concerns/Pagination.html#pagination_supported%3F-instance_method" title="Apes::Concerns::Pagination#pagination_supported? (method)">#pagination_supported?</a></span>, <span class='object_link'><a href="Concerns/Pagination.html#pagination_url-instance_method" title="Apes::Concerns::Pagination#pagination_url (method)">#pagination_url</a></span></p>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Concerns/Response.html" title="Apes::Concerns::Response (module)">Apes::Concerns::Response</a></span></h3>
|
346
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Response.html#response_data-instance_method" title="Apes::Concerns::Response#response_data (method)">#response_data</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_include-instance_method" title="Apes::Concerns::Response#response_include (method)">#response_include</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_included-instance_method" title="Apes::Concerns::Response#response_included (method)">#response_included</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_links-instance_method" title="Apes::Concerns::Response#response_links (method)">#response_links</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_meta-instance_method" title="Apes::Concerns::Response#response_meta (method)">#response_meta</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_template_for-instance_method" title="Apes::Concerns::Response#response_template_for (method)">#response_template_for</a></span>, <span class='object_link'><a href="Concerns/Response.html#response_timestamp-instance_method" title="Apes::Concerns::Response#response_timestamp (method)">#response_timestamp</a></span></p>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Concerns/Request.html" title="Apes::Concerns::Request (module)">Apes::Concerns::Request</a></span></h3>
|
357
|
+
<p class="inherited"><span class='object_link'><a href="Concerns/Request.html#request_cast_attributes-instance_method" title="Apes::Concerns::Request#request_cast_attributes (method)">#request_cast_attributes</a></span>, <span class='object_link'><a href="Concerns/Request.html#request_extract_model-instance_method" title="Apes::Concerns::Request#request_extract_model (method)">#request_extract_model</a></span>, <span class='object_link'><a href="Concerns/Request.html#request_handle_cors-instance_method" title="Apes::Concerns::Request#request_handle_cors (method)">#request_handle_cors</a></span>, <span class='object_link'><a href="Concerns/Request.html#request_source_host-instance_method" title="Apes::Concerns::Request#request_source_host (method)">#request_source_host</a></span>, <span class='object_link'><a href="Concerns/Request.html#request_valid_content_type-instance_method" title="Apes::Concerns::Request#request_valid_content_type (method)">#request_valid_content_type</a></span>, <span class='object_link'><a href="Concerns/Request.html#request_validate-instance_method" title="Apes::Concerns::Request#request_validate (method)">#request_validate</a></span></p>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
<div id="instance_attr_details" class="attr_details">
|
363
|
+
<h2>Instance Attribute Details</h2>
|
364
|
+
|
365
|
+
|
366
|
+
<span id=""></span>
|
367
|
+
<div class="method_details first">
|
368
|
+
<h3 class="signature first" id="current_account-instance_method">
|
369
|
+
|
370
|
+
- (<tt>Object</tt>) <strong>current_account</strong> <span class="extras">(readonly)</span>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
</h3><div class="docstring">
|
377
|
+
<div class="discussion">
|
378
|
+
<p>Returns The current account making the request</p>
|
379
|
+
|
380
|
+
|
381
|
+
</div>
|
382
|
+
</div>
|
383
|
+
<div class="tags">
|
384
|
+
|
385
|
+
<p class="tag_title">Returns:</p>
|
386
|
+
<ul class="return">
|
387
|
+
|
388
|
+
<li>
|
389
|
+
|
390
|
+
|
391
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
—
|
396
|
+
<div class='inline'><p>The current account making the request</p>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
</li>
|
400
|
+
|
401
|
+
</ul>
|
402
|
+
|
403
|
+
</div><table class="source_code">
|
404
|
+
<tr>
|
405
|
+
<td>
|
406
|
+
<pre class="lines">
|
407
|
+
|
408
|
+
|
409
|
+
15
|
410
|
+
16
|
411
|
+
17
|
412
|
+
18
|
413
|
+
19
|
414
|
+
20
|
415
|
+
21
|
416
|
+
22
|
417
|
+
23
|
418
|
+
24
|
419
|
+
25
|
420
|
+
26
|
421
|
+
27
|
422
|
+
28
|
423
|
+
29
|
424
|
+
30
|
425
|
+
31
|
426
|
+
32
|
427
|
+
33
|
428
|
+
34
|
429
|
+
35
|
430
|
+
36
|
431
|
+
37
|
432
|
+
38
|
433
|
+
39
|
434
|
+
40
|
435
|
+
41
|
436
|
+
42
|
437
|
+
43
|
438
|
+
44
|
439
|
+
45
|
440
|
+
46
|
441
|
+
47
|
442
|
+
48
|
443
|
+
49
|
444
|
+
50
|
445
|
+
51
|
446
|
+
52
|
447
|
+
53
|
448
|
+
54
|
449
|
+
55
|
450
|
+
56
|
451
|
+
57
|
452
|
+
58
|
453
|
+
59
|
454
|
+
60
|
455
|
+
61
|
456
|
+
62
|
457
|
+
63
|
458
|
+
64
|
459
|
+
65
|
460
|
+
66
|
461
|
+
67
|
462
|
+
68
|
463
|
+
69
|
464
|
+
70
|
465
|
+
71
|
466
|
+
72
|
467
|
+
73
|
468
|
+
74
|
469
|
+
75
|
470
|
+
76</pre>
|
471
|
+
</td>
|
472
|
+
<td>
|
473
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 15</span>
|
474
|
+
|
475
|
+
<span class='kw'>class</span> <span class='const'>Controller</span> <span class='op'><</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>API</span>
|
476
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>ImplicitRender</span>
|
477
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>Layouts</span>
|
478
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Request</span>
|
479
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Response</span>
|
480
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Pagination</span>
|
481
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Errors</span>
|
482
|
+
|
483
|
+
<span class='id identifier rubyid_layout'>layout</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>general</span><span class='tstring_end'>"</span></span>
|
484
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_handle_cors</span>
|
485
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_validate</span>
|
486
|
+
|
487
|
+
<span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:current_account</span><span class='comma'>,</span> <span class='symbol'>:cursor</span><span class='comma'>,</span> <span class='symbol'>:request_cursor</span>
|
488
|
+
|
489
|
+
<span class='comment'># Exception handling
|
490
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>Exception</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:error_handle_exception</span>
|
491
|
+
<span class='comment'># This allows to avoid to declare all the views
|
492
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>MissingTemplate</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:render_default_views</span>
|
493
|
+
|
494
|
+
<span class='comment'># Returns the default URL options for this request.
|
495
|
+
</span> <span class='comment'># It ensures that the host is always included and that is set properly in development mode.
|
496
|
+
</span> <span class='comment'>#
|
497
|
+
</span> <span class='comment'># @return [Hash] Default URL options for the request.
|
498
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
|
499
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
|
500
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>RuntimeConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
|
501
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
502
|
+
<span class='kw'>end</span>
|
503
|
+
|
504
|
+
<span class='comment'># Tiny handle to handle CORS OPTIONS requests. It just renders nothing as headers are handle in Apes::Concerns::Response module.
|
505
|
+
</span> <span class='comment'>#
|
506
|
+
</span> <span class='comment'># To enable this route, add the following to the routes.rb:
|
507
|
+
</span> <span class='comment'>#
|
508
|
+
</span> <span class='comment'># # This is to enable AJAX cross domain
|
509
|
+
</span> <span class='comment'># match '*path', to: 'application#handle_cors', via: :options
|
510
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
|
511
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
|
512
|
+
<span class='kw'>end</span>
|
513
|
+
|
514
|
+
<span class='comment'># Default handler to render errors.
|
515
|
+
</span> <span class='comment'>#
|
516
|
+
</span> <span class='comment'># @param status [Symbol|Fixnum] The HTTP error code to return.
|
517
|
+
</span> <span class='comment'># @param errors [Array] The list of occurred errors.
|
518
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
|
519
|
+
<span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
|
520
|
+
<span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
|
521
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
|
522
|
+
<span class='kw'>end</span>
|
523
|
+
|
524
|
+
<span class='id identifier rubyid_private'>private</span>
|
525
|
+
|
526
|
+
<span class='comment'># :nodoc:
|
527
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_default_views'>render_default_views</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
528
|
+
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@objects</span><span class='rparen'>)</span>
|
529
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/collection</span><span class='tstring_end'>"</span></span>
|
530
|
+
<span class='kw'>elsif</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@object</span><span class='rparen'>)</span>
|
531
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/object</span><span class='tstring_end'>"</span></span>
|
532
|
+
<span class='kw'>else</span>
|
533
|
+
<span class='id identifier rubyid_error_handle_exception'>error_handle_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
534
|
+
<span class='kw'>end</span>
|
535
|
+
<span class='kw'>end</span>
|
536
|
+
<span class='kw'>end</span></pre>
|
537
|
+
</td>
|
538
|
+
</tr>
|
539
|
+
</table>
|
540
|
+
</div>
|
541
|
+
|
542
|
+
|
543
|
+
<span id=""></span>
|
544
|
+
<div class="method_details ">
|
545
|
+
<h3 class="signature " id="cursor-instance_method">
|
546
|
+
|
547
|
+
- (<tt><span class='object_link'><a href="PaginationCursor.html" title="Apes::PaginationCursor (class)">Apes::PaginationCursor</a></span></tt>) <strong>cursor</strong> <span class="extras">(readonly)</span>
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
</h3><div class="docstring">
|
554
|
+
<div class="discussion">
|
555
|
+
<p>Returns The pagination cursor for this request.</p>
|
556
|
+
|
557
|
+
|
558
|
+
</div>
|
559
|
+
</div>
|
560
|
+
<div class="tags">
|
561
|
+
|
562
|
+
<p class="tag_title">Returns:</p>
|
563
|
+
<ul class="return">
|
564
|
+
|
565
|
+
<li>
|
566
|
+
|
567
|
+
|
568
|
+
<span class='type'>(<tt><span class='object_link'><a href="PaginationCursor.html" title="Apes::PaginationCursor (class)">Apes::PaginationCursor</a></span></tt>)</span>
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
—
|
573
|
+
<div class='inline'><p>The pagination cursor for this request.</p>
|
574
|
+
</div>
|
575
|
+
|
576
|
+
</li>
|
577
|
+
|
578
|
+
</ul>
|
579
|
+
|
580
|
+
</div><table class="source_code">
|
581
|
+
<tr>
|
582
|
+
<td>
|
583
|
+
<pre class="lines">
|
584
|
+
|
585
|
+
|
586
|
+
15
|
587
|
+
16
|
588
|
+
17
|
589
|
+
18
|
590
|
+
19
|
591
|
+
20
|
592
|
+
21
|
593
|
+
22
|
594
|
+
23
|
595
|
+
24
|
596
|
+
25
|
597
|
+
26
|
598
|
+
27
|
599
|
+
28
|
600
|
+
29
|
601
|
+
30
|
602
|
+
31
|
603
|
+
32
|
604
|
+
33
|
605
|
+
34
|
606
|
+
35
|
607
|
+
36
|
608
|
+
37
|
609
|
+
38
|
610
|
+
39
|
611
|
+
40
|
612
|
+
41
|
613
|
+
42
|
614
|
+
43
|
615
|
+
44
|
616
|
+
45
|
617
|
+
46
|
618
|
+
47
|
619
|
+
48
|
620
|
+
49
|
621
|
+
50
|
622
|
+
51
|
623
|
+
52
|
624
|
+
53
|
625
|
+
54
|
626
|
+
55
|
627
|
+
56
|
628
|
+
57
|
629
|
+
58
|
630
|
+
59
|
631
|
+
60
|
632
|
+
61
|
633
|
+
62
|
634
|
+
63
|
635
|
+
64
|
636
|
+
65
|
637
|
+
66
|
638
|
+
67
|
639
|
+
68
|
640
|
+
69
|
641
|
+
70
|
642
|
+
71
|
643
|
+
72
|
644
|
+
73
|
645
|
+
74
|
646
|
+
75
|
647
|
+
76</pre>
|
648
|
+
</td>
|
649
|
+
<td>
|
650
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 15</span>
|
651
|
+
|
652
|
+
<span class='kw'>class</span> <span class='const'>Controller</span> <span class='op'><</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>API</span>
|
653
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>ImplicitRender</span>
|
654
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>Layouts</span>
|
655
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Request</span>
|
656
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Response</span>
|
657
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Pagination</span>
|
658
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Errors</span>
|
659
|
+
|
660
|
+
<span class='id identifier rubyid_layout'>layout</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>general</span><span class='tstring_end'>"</span></span>
|
661
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_handle_cors</span>
|
662
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_validate</span>
|
663
|
+
|
664
|
+
<span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:current_account</span><span class='comma'>,</span> <span class='symbol'>:cursor</span><span class='comma'>,</span> <span class='symbol'>:request_cursor</span>
|
665
|
+
|
666
|
+
<span class='comment'># Exception handling
|
667
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>Exception</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:error_handle_exception</span>
|
668
|
+
<span class='comment'># This allows to avoid to declare all the views
|
669
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>MissingTemplate</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:render_default_views</span>
|
670
|
+
|
671
|
+
<span class='comment'># Returns the default URL options for this request.
|
672
|
+
</span> <span class='comment'># It ensures that the host is always included and that is set properly in development mode.
|
673
|
+
</span> <span class='comment'>#
|
674
|
+
</span> <span class='comment'># @return [Hash] Default URL options for the request.
|
675
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
|
676
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
|
677
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>RuntimeConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
|
678
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
679
|
+
<span class='kw'>end</span>
|
680
|
+
|
681
|
+
<span class='comment'># Tiny handle to handle CORS OPTIONS requests. It just renders nothing as headers are handle in Apes::Concerns::Response module.
|
682
|
+
</span> <span class='comment'>#
|
683
|
+
</span> <span class='comment'># To enable this route, add the following to the routes.rb:
|
684
|
+
</span> <span class='comment'>#
|
685
|
+
</span> <span class='comment'># # This is to enable AJAX cross domain
|
686
|
+
</span> <span class='comment'># match '*path', to: 'application#handle_cors', via: :options
|
687
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
|
688
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
|
689
|
+
<span class='kw'>end</span>
|
690
|
+
|
691
|
+
<span class='comment'># Default handler to render errors.
|
692
|
+
</span> <span class='comment'>#
|
693
|
+
</span> <span class='comment'># @param status [Symbol|Fixnum] The HTTP error code to return.
|
694
|
+
</span> <span class='comment'># @param errors [Array] The list of occurred errors.
|
695
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
|
696
|
+
<span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
|
697
|
+
<span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
|
698
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
|
699
|
+
<span class='kw'>end</span>
|
700
|
+
|
701
|
+
<span class='id identifier rubyid_private'>private</span>
|
702
|
+
|
703
|
+
<span class='comment'># :nodoc:
|
704
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_default_views'>render_default_views</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
705
|
+
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@objects</span><span class='rparen'>)</span>
|
706
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/collection</span><span class='tstring_end'>"</span></span>
|
707
|
+
<span class='kw'>elsif</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@object</span><span class='rparen'>)</span>
|
708
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/object</span><span class='tstring_end'>"</span></span>
|
709
|
+
<span class='kw'>else</span>
|
710
|
+
<span class='id identifier rubyid_error_handle_exception'>error_handle_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
711
|
+
<span class='kw'>end</span>
|
712
|
+
<span class='kw'>end</span>
|
713
|
+
<span class='kw'>end</span></pre>
|
714
|
+
</td>
|
715
|
+
</tr>
|
716
|
+
</table>
|
717
|
+
</div>
|
718
|
+
|
719
|
+
|
720
|
+
<span id=""></span>
|
721
|
+
<div class="method_details ">
|
722
|
+
<h3 class="signature " id="request_cursor-instance_method">
|
723
|
+
|
724
|
+
- (<tt><span class='object_link'><a href="PaginationCursor.html" title="Apes::PaginationCursor (class)">Apes::PaginationCursor</a></span></tt>) <strong>request_cursor</strong> <span class="extras">(readonly)</span>
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
</h3><div class="docstring">
|
731
|
+
<div class="discussion">
|
732
|
+
<p>Returns The original pagination cursor sent from the client.</p>
|
733
|
+
|
734
|
+
|
735
|
+
</div>
|
736
|
+
</div>
|
737
|
+
<div class="tags">
|
738
|
+
|
739
|
+
<p class="tag_title">Returns:</p>
|
740
|
+
<ul class="return">
|
741
|
+
|
742
|
+
<li>
|
743
|
+
|
744
|
+
|
745
|
+
<span class='type'>(<tt><span class='object_link'><a href="PaginationCursor.html" title="Apes::PaginationCursor (class)">Apes::PaginationCursor</a></span></tt>)</span>
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
—
|
750
|
+
<div class='inline'><p>The original pagination cursor sent from the client.</p>
|
751
|
+
</div>
|
752
|
+
|
753
|
+
</li>
|
754
|
+
|
755
|
+
</ul>
|
756
|
+
|
757
|
+
</div><table class="source_code">
|
758
|
+
<tr>
|
759
|
+
<td>
|
760
|
+
<pre class="lines">
|
761
|
+
|
762
|
+
|
763
|
+
15
|
764
|
+
16
|
765
|
+
17
|
766
|
+
18
|
767
|
+
19
|
768
|
+
20
|
769
|
+
21
|
770
|
+
22
|
771
|
+
23
|
772
|
+
24
|
773
|
+
25
|
774
|
+
26
|
775
|
+
27
|
776
|
+
28
|
777
|
+
29
|
778
|
+
30
|
779
|
+
31
|
780
|
+
32
|
781
|
+
33
|
782
|
+
34
|
783
|
+
35
|
784
|
+
36
|
785
|
+
37
|
786
|
+
38
|
787
|
+
39
|
788
|
+
40
|
789
|
+
41
|
790
|
+
42
|
791
|
+
43
|
792
|
+
44
|
793
|
+
45
|
794
|
+
46
|
795
|
+
47
|
796
|
+
48
|
797
|
+
49
|
798
|
+
50
|
799
|
+
51
|
800
|
+
52
|
801
|
+
53
|
802
|
+
54
|
803
|
+
55
|
804
|
+
56
|
805
|
+
57
|
806
|
+
58
|
807
|
+
59
|
808
|
+
60
|
809
|
+
61
|
810
|
+
62
|
811
|
+
63
|
812
|
+
64
|
813
|
+
65
|
814
|
+
66
|
815
|
+
67
|
816
|
+
68
|
817
|
+
69
|
818
|
+
70
|
819
|
+
71
|
820
|
+
72
|
821
|
+
73
|
822
|
+
74
|
823
|
+
75
|
824
|
+
76</pre>
|
825
|
+
</td>
|
826
|
+
<td>
|
827
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 15</span>
|
828
|
+
|
829
|
+
<span class='kw'>class</span> <span class='const'>Controller</span> <span class='op'><</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>API</span>
|
830
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>ImplicitRender</span>
|
831
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>Layouts</span>
|
832
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Request</span>
|
833
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Response</span>
|
834
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Pagination</span>
|
835
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>Concerns</span><span class='op'>::</span><span class='const'>Errors</span>
|
836
|
+
|
837
|
+
<span class='id identifier rubyid_layout'>layout</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>general</span><span class='tstring_end'>"</span></span>
|
838
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_handle_cors</span>
|
839
|
+
<span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:request_validate</span>
|
840
|
+
|
841
|
+
<span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:current_account</span><span class='comma'>,</span> <span class='symbol'>:cursor</span><span class='comma'>,</span> <span class='symbol'>:request_cursor</span>
|
842
|
+
|
843
|
+
<span class='comment'># Exception handling
|
844
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>Exception</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:error_handle_exception</span>
|
845
|
+
<span class='comment'># This allows to avoid to declare all the views
|
846
|
+
</span> <span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>ActionView</span><span class='op'>::</span><span class='const'>MissingTemplate</span><span class='comma'>,</span> <span class='label'>with:</span> <span class='symbol'>:render_default_views</span>
|
847
|
+
|
848
|
+
<span class='comment'># Returns the default URL options for this request.
|
849
|
+
</span> <span class='comment'># It ensures that the host is always included and that is set properly in development mode.
|
850
|
+
</span> <span class='comment'>#
|
851
|
+
</span> <span class='comment'># @return [Hash] Default URL options for the request.
|
852
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
|
853
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
|
854
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>RuntimeConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
|
855
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
856
|
+
<span class='kw'>end</span>
|
857
|
+
|
858
|
+
<span class='comment'># Tiny handle to handle CORS OPTIONS requests. It just renders nothing as headers are handle in Apes::Concerns::Response module.
|
859
|
+
</span> <span class='comment'>#
|
860
|
+
</span> <span class='comment'># To enable this route, add the following to the routes.rb:
|
861
|
+
</span> <span class='comment'>#
|
862
|
+
</span> <span class='comment'># # This is to enable AJAX cross domain
|
863
|
+
</span> <span class='comment'># match '*path', to: 'application#handle_cors', via: :options
|
864
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
|
865
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
|
866
|
+
<span class='kw'>end</span>
|
867
|
+
|
868
|
+
<span class='comment'># Default handler to render errors.
|
869
|
+
</span> <span class='comment'>#
|
870
|
+
</span> <span class='comment'># @param status [Symbol|Fixnum] The HTTP error code to return.
|
871
|
+
</span> <span class='comment'># @param errors [Array] The list of occurred errors.
|
872
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
|
873
|
+
<span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
|
874
|
+
<span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
|
875
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
|
876
|
+
<span class='kw'>end</span>
|
877
|
+
|
878
|
+
<span class='id identifier rubyid_private'>private</span>
|
879
|
+
|
880
|
+
<span class='comment'># :nodoc:
|
881
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_render_default_views'>render_default_views</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
882
|
+
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@objects</span><span class='rparen'>)</span>
|
883
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/collection</span><span class='tstring_end'>"</span></span>
|
884
|
+
<span class='kw'>elsif</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@object</span><span class='rparen'>)</span>
|
885
|
+
<span class='id identifier rubyid_render'>render</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/object</span><span class='tstring_end'>"</span></span>
|
886
|
+
<span class='kw'>else</span>
|
887
|
+
<span class='id identifier rubyid_error_handle_exception'>error_handle_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
888
|
+
<span class='kw'>end</span>
|
889
|
+
<span class='kw'>end</span>
|
890
|
+
<span class='kw'>end</span></pre>
|
891
|
+
</td>
|
892
|
+
</tr>
|
893
|
+
</table>
|
894
|
+
</div>
|
895
|
+
|
896
|
+
</div>
|
897
|
+
|
898
|
+
|
899
|
+
<div id="instance_method_details" class="method_details_list">
|
900
|
+
<h2>Instance Method Details</h2>
|
901
|
+
|
902
|
+
|
903
|
+
<div class="method_details first">
|
904
|
+
<h3 class="signature first" id="default_url_options-instance_method">
|
905
|
+
|
906
|
+
- (<tt>Hash</tt>) <strong>default_url_options</strong>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
</h3><div class="docstring">
|
913
|
+
<div class="discussion">
|
914
|
+
<p>Returns the default URL options for this request.
|
915
|
+
It ensures that the host is always included and that is set properly in development mode.</p>
|
916
|
+
|
917
|
+
|
918
|
+
</div>
|
919
|
+
</div>
|
920
|
+
<div class="tags">
|
921
|
+
|
922
|
+
<p class="tag_title">Returns:</p>
|
923
|
+
<ul class="return">
|
924
|
+
|
925
|
+
<li>
|
926
|
+
|
927
|
+
|
928
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
—
|
933
|
+
<div class='inline'><p>Default URL options for the request.</p>
|
934
|
+
</div>
|
935
|
+
|
936
|
+
</li>
|
937
|
+
|
938
|
+
</ul>
|
939
|
+
|
940
|
+
</div><table class="source_code">
|
941
|
+
<tr>
|
942
|
+
<td>
|
943
|
+
<pre class="lines">
|
944
|
+
|
945
|
+
|
946
|
+
38
|
947
|
+
39
|
948
|
+
40
|
949
|
+
41
|
950
|
+
42</pre>
|
951
|
+
</td>
|
952
|
+
<td>
|
953
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 38</span>
|
954
|
+
|
955
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
|
956
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
|
957
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Apes</span><span class='op'>::</span><span class='const'>RuntimeConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
|
958
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
959
|
+
<span class='kw'>end</span></pre>
|
960
|
+
</td>
|
961
|
+
</tr>
|
962
|
+
</table>
|
963
|
+
</div>
|
964
|
+
|
965
|
+
<div class="method_details ">
|
966
|
+
<h3 class="signature " id="handle_cors-instance_method">
|
967
|
+
|
968
|
+
- (<tt>Object</tt>) <strong>handle_cors</strong>
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</h3><div class="docstring">
|
975
|
+
<div class="discussion">
|
976
|
+
<p>Tiny handle to handle CORS OPTIONS requests. It just renders nothing as headers are handle in Apes::Concerns::Response module.</p>
|
977
|
+
|
978
|
+
<p>To enable this route, add the following to the routes.rb:</p>
|
979
|
+
|
980
|
+
<pre class="code ruby"><code class="ruby"><span class='comment'># This is to enable AJAX cross domain
|
981
|
+
</span><span class='id identifier rubyid_match'>match</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*path</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>to:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application#handle_cors</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>via:</span> <span class='symbol'>:options</span>
|
982
|
+
</code></pre>
|
983
|
+
|
984
|
+
|
985
|
+
</div>
|
986
|
+
</div>
|
987
|
+
<div class="tags">
|
988
|
+
|
989
|
+
|
990
|
+
</div><table class="source_code">
|
991
|
+
<tr>
|
992
|
+
<td>
|
993
|
+
<pre class="lines">
|
994
|
+
|
995
|
+
|
996
|
+
50
|
997
|
+
51
|
998
|
+
52</pre>
|
999
|
+
</td>
|
1000
|
+
<td>
|
1001
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 50</span>
|
1002
|
+
|
1003
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
|
1004
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
|
1005
|
+
<span class='kw'>end</span></pre>
|
1006
|
+
</td>
|
1007
|
+
</tr>
|
1008
|
+
</table>
|
1009
|
+
</div>
|
1010
|
+
|
1011
|
+
<div class="method_details ">
|
1012
|
+
<h3 class="signature " id="render_error-instance_method">
|
1013
|
+
|
1014
|
+
- (<tt>Object</tt>) <strong>render_error</strong>(status, errors)
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
|
1019
|
+
|
1020
|
+
</h3><div class="docstring">
|
1021
|
+
<div class="discussion">
|
1022
|
+
<p>Default handler to render errors.</p>
|
1023
|
+
|
1024
|
+
|
1025
|
+
</div>
|
1026
|
+
</div>
|
1027
|
+
<div class="tags">
|
1028
|
+
<p class="tag_title">Parameters:</p>
|
1029
|
+
<ul class="param">
|
1030
|
+
|
1031
|
+
<li>
|
1032
|
+
|
1033
|
+
<span class='name'>status</span>
|
1034
|
+
|
1035
|
+
|
1036
|
+
<span class='type'>(<tt>Symbol|Fixnum</tt>)</span>
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
—
|
1041
|
+
<div class='inline'><p>The HTTP error code to return.</p>
|
1042
|
+
</div>
|
1043
|
+
|
1044
|
+
</li>
|
1045
|
+
|
1046
|
+
<li>
|
1047
|
+
|
1048
|
+
<span class='name'>errors</span>
|
1049
|
+
|
1050
|
+
|
1051
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
1052
|
+
|
1053
|
+
|
1054
|
+
|
1055
|
+
—
|
1056
|
+
<div class='inline'><p>The list of occurred errors.</p>
|
1057
|
+
</div>
|
1058
|
+
|
1059
|
+
</li>
|
1060
|
+
|
1061
|
+
</ul>
|
1062
|
+
|
1063
|
+
|
1064
|
+
</div><table class="source_code">
|
1065
|
+
<tr>
|
1066
|
+
<td>
|
1067
|
+
<pre class="lines">
|
1068
|
+
|
1069
|
+
|
1070
|
+
58
|
1071
|
+
59
|
1072
|
+
60
|
1073
|
+
61
|
1074
|
+
62</pre>
|
1075
|
+
</td>
|
1076
|
+
<td>
|
1077
|
+
<pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 58</span>
|
1078
|
+
|
1079
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
|
1080
|
+
<span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
|
1081
|
+
<span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
|
1082
|
+
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
|
1083
|
+
<span class='kw'>end</span></pre>
|
1084
|
+
</td>
|
1085
|
+
</tr>
|
1086
|
+
</table>
|
1087
|
+
</div>
|
1088
|
+
|
1089
|
+
</div>
|
1090
|
+
|
1091
|
+
</div>
|
1092
|
+
|
1093
|
+
<div id="footer">
|
1094
|
+
Generated on Sat Jun 4 12:41:54 2016 by
|
1095
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1096
|
+
0.8.7.6 (ruby-2.3.0).
|
1097
|
+
</div>
|
1098
|
+
|
1099
|
+
</body>
|
1100
|
+
</html>
|