kharon 0.5.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +1 -0
  3. data/.rspec +2 -1
  4. data/Gemfile +1 -10
  5. data/Gemfile.lock +29 -16
  6. data/README.md +135 -26
  7. data/{kharon-0.0.1.gem → dist/kharon-0.0.1.gem} +0 -0
  8. data/{kharon-0.0.2.gem → dist/kharon-0.0.2.gem} +0 -0
  9. data/{kharon-0.0.3.gem → dist/kharon-0.0.3.gem} +0 -0
  10. data/{kharon-0.1.0.gem → dist/kharon-0.1.0.gem} +0 -0
  11. data/{kharon-0.2.0.gem → dist/kharon-0.2.0.gem} +0 -0
  12. data/{kharon-0.3.0.gem → dist/kharon-0.3.0.gem} +0 -0
  13. data/{kharon-0.3.1.gem → dist/kharon-0.3.1.gem} +0 -0
  14. data/{kharon-0.4.0.gem → dist/kharon-0.4.0.gem} +0 -0
  15. data/{kharon-0.5.0.gem → dist/kharon-0.5.0.gem} +0 -0
  16. data/dist/kharon-0.5.1.gem +0 -0
  17. data/doc/Kharon.html +364 -0
  18. data/doc/Kharon/Configuration.html +452 -0
  19. data/doc/Kharon/Errors.html +145 -0
  20. data/doc/Kharon/Errors/Validation.html +436 -0
  21. data/doc/Kharon/Handlers.html +144 -0
  22. data/doc/Kharon/Handlers/Exceptions.html +273 -0
  23. data/doc/Kharon/Handlers/Messages.html +425 -0
  24. data/doc/Kharon/Helpers.html +277 -0
  25. data/doc/Kharon/Validator.html +1962 -0
  26. data/doc/_index.html +187 -0
  27. data/doc/class_list.html +58 -0
  28. data/doc/css/common.css +1 -0
  29. data/doc/css/full_list.css +57 -0
  30. data/doc/css/style.css +339 -0
  31. data/doc/file.README.html +415 -0
  32. data/doc/file.results.html +1578 -0
  33. data/doc/file_list.html +63 -0
  34. data/doc/frames.html +26 -0
  35. data/doc/index.html +415 -0
  36. data/doc/js/app.js +219 -0
  37. data/doc/js/full_list.js +181 -0
  38. data/doc/js/jquery.js +4 -0
  39. data/doc/method_list.html +207 -0
  40. data/doc/top-level-namespace.html +112 -0
  41. data/kharon.gemspec +9 -1
  42. data/lib/kharon.rb +7 -11
  43. data/lib/kharon/errors.rb +7 -0
  44. data/lib/kharon/errors/validation.rb +2 -0
  45. data/lib/kharon/handlers.rb +8 -0
  46. data/lib/kharon/handlers/exceptions.rb +3 -1
  47. data/lib/kharon/handlers/messages.rb +11 -4
  48. data/lib/kharon/validator.rb +17 -5
  49. data/lib/kharon/version.rb +2 -1
  50. data/spec/lib/kharon/handlers/messages_spec.rb +11 -0
  51. data/spec/lib/kharon/validator_spec.rb +6 -0
  52. data/spec/results.html +1506 -0
  53. metadata +140 -20
  54. data/lib/kharon/configuration.rb +0 -28
  55. data/lib/kharon/helpers/validate.rb +0 -15
@@ -0,0 +1,436 @@
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
+ Exception: Kharon::Errors::Validation
8
+
9
+ &mdash; 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#!Kharon/Errors/Validation.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 (V)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Kharon.html" title="Kharon (module)">Kharon</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Errors.html" title="Kharon::Errors (module)">Errors</a></span></span>
36
+ &raquo;
37
+ <span class="title">Validation</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>Exception: Kharon::Errors::Validation
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">Exception</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Exception</li>
82
+
83
+ <li class="next">Kharon::Errors::Validation</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/kharon/errors/validation.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Standard exception raised in case the exceptions are used, and there is an
108
+ error in the validation.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+ <p class="tag_title">Author:</p>
116
+ <ul class="author">
117
+
118
+ <li>
119
+
120
+
121
+
122
+
123
+
124
+ <div class='inline'>
125
+ <p>Vincent Courtois &lt;courtois.vincent@outlook.com&gt;</p>
126
+ </div>
127
+
128
+ </li>
129
+
130
+ </ul>
131
+
132
+ </div>
133
+
134
+
135
+
136
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
137
+ <ul class="summary">
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#error_hash-instance_method" title="#error_hash (instance method)">- (Hash) <strong>error_hash</strong> </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>The description of the encountered error as a Hash.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ </ul>
167
+
168
+
169
+
170
+
171
+
172
+ <h2>
173
+ Instance Method Summary
174
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
175
+ </h2>
176
+
177
+ <ul class="summary">
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Validation) <strong>initialize</strong>(error_hash) </a>
183
+
184
+
185
+
186
+ </span>
187
+
188
+
189
+ <span class="note title constructor">constructor</span>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <span class="summary_desc"><div class='inline'>
199
+ <p>Constructor of the class.</p>
200
+ </div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#message-instance_method" title="#message (instance method)">- (String) <strong>message</strong> </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'>
223
+ <p>Generates a JSON version of the encountered error description hash.</p>
224
+ </div></span>
225
+
226
+ </li>
227
+
228
+
229
+ </ul>
230
+
231
+
232
+
233
+ <div id="constructor_details" class="method_details_list">
234
+ <h2>Constructor Details</h2>
235
+
236
+ <div class="method_details first">
237
+ <h3 class="signature first" id="initialize-instance_method">
238
+
239
+ - (<tt><span class='object_link'><a href="" title="Kharon::Errors::Validation (class)">Validation</a></span></tt>) <strong>initialize</strong>(error_hash)
240
+
241
+
242
+
243
+
244
+
245
+ </h3><div class="docstring">
246
+ <div class="discussion">
247
+
248
+ <p>Constructor of the class.</p>
249
+
250
+
251
+ </div>
252
+ </div>
253
+ <div class="tags">
254
+ <p class="tag_title">Parameters:</p>
255
+ <ul class="param">
256
+
257
+ <li>
258
+
259
+ <span class='name'>error_hash</span>
260
+
261
+
262
+ <span class='type'>(<tt>Hash</tt>)</span>
263
+
264
+
265
+
266
+ &mdash;
267
+ <div class='inline'>
268
+ <p>the description of the encountered error as a Hash.</p>
269
+ </div>
270
+
271
+ </li>
272
+
273
+ </ul>
274
+
275
+
276
+ </div><table class="source_code">
277
+ <tr>
278
+ <td>
279
+ <pre class="lines">
280
+
281
+
282
+ 16
283
+ 17
284
+ 18</pre>
285
+ </td>
286
+ <td>
287
+ <pre class="code"><span class="info file"># File 'lib/kharon/errors/validation.rb', line 16</span>
288
+
289
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_error_hash'>error_hash</span><span class='rparen'>)</span>
290
+ <span class='ivar'>@error_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_error_hash'>error_hash</span>
291
+ <span class='kw'>end</span></pre>
292
+ </td>
293
+ </tr>
294
+ </table>
295
+ </div>
296
+
297
+ </div>
298
+
299
+ <div id="instance_attr_details" class="attr_details">
300
+ <h2>Instance Attribute Details</h2>
301
+
302
+
303
+ <span id="error_hash=-instance_method"></span>
304
+ <div class="method_details first">
305
+ <h3 class="signature first" id="error_hash-instance_method">
306
+
307
+ - (<tt>Hash</tt>) <strong>error_hash</strong>
308
+
309
+
310
+
311
+
312
+
313
+ </h3><div class="docstring">
314
+ <div class="discussion">
315
+
316
+ <p>Returns the description of the encountered error as a Hash.</p>
317
+
318
+
319
+ </div>
320
+ </div>
321
+ <div class="tags">
322
+
323
+ <p class="tag_title">Returns:</p>
324
+ <ul class="return">
325
+
326
+ <li>
327
+
328
+
329
+ <span class='type'>(<tt>Hash</tt>)</span>
330
+
331
+
332
+
333
+ &mdash;
334
+ <div class='inline'>
335
+ <p>the description of the encountered error as a Hash.</p>
336
+ </div>
337
+
338
+ </li>
339
+
340
+ </ul>
341
+
342
+ </div><table class="source_code">
343
+ <tr>
344
+ <td>
345
+ <pre class="lines">
346
+
347
+
348
+ </pre>
349
+ </td>
350
+ <td>
351
+ <pre class="code"><span class="info file"># File 'lib/kharon/errors/validation.rb', line 10</span>
352
+
353
+ </pre>
354
+ </td>
355
+ </tr>
356
+ </table>
357
+ </div>
358
+
359
+ </div>
360
+
361
+
362
+ <div id="instance_method_details" class="method_details_list">
363
+ <h2>Instance Method Details</h2>
364
+
365
+
366
+ <div class="method_details first">
367
+ <h3 class="signature first" id="message-instance_method">
368
+
369
+ - (<tt>String</tt>) <strong>message</strong>
370
+
371
+
372
+
373
+
374
+
375
+ </h3><div class="docstring">
376
+ <div class="discussion">
377
+
378
+ <p>Generates a JSON version of the encountered error description hash.</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>String</tt>)</span>
392
+
393
+
394
+
395
+ &mdash;
396
+ <div class='inline'>
397
+ <p>the JSON representation of an error.</p>
398
+ </div>
399
+
400
+ </li>
401
+
402
+ </ul>
403
+
404
+ </div><table class="source_code">
405
+ <tr>
406
+ <td>
407
+ <pre class="lines">
408
+
409
+
410
+ 22
411
+ 23
412
+ 24</pre>
413
+ </td>
414
+ <td>
415
+ <pre class="code"><span class="info file"># File 'lib/kharon/errors/validation.rb', line 22</span>
416
+
417
+ <span class='kw'>def</span> <span class='id identifier rubyid_message'>message</span>
418
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span><span class='lparen'>(</span><span class='id identifier rubyid_error_hash'>error_hash</span><span class='rparen'>)</span>
419
+ <span class='kw'>end</span></pre>
420
+ </td>
421
+ </tr>
422
+ </table>
423
+ </div>
424
+
425
+ </div>
426
+
427
+ </div>
428
+
429
+ <div id="footer">
430
+ Generated on Tue Sep 15 10:54:08 2015 by
431
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
432
+ 0.8.7.6 (ruby-1.9.3).
433
+ </div>
434
+
435
+ </body>
436
+ </html>
@@ -0,0 +1,144 @@
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
+ Module: Kharon::Handlers
8
+
9
+ &mdash; 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#!Kharon/Handlers.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 (H)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Kharon.html" title="Kharon (module)">Kharon</a></span></span>
36
+ &raquo;
37
+ <span class="title">Handlers</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>Module: Kharon::Handlers
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/kharon/handlers.rb<span class="defines">,<br />
83
+ lib/kharon/handlers/messages.rb,<br /> lib/kharon/handlers/exceptions.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>This module contains the error handlers available in the application.</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+ <p class="tag_title">Author:</p>
100
+ <ul class="author">
101
+
102
+ <li>
103
+
104
+
105
+
106
+
107
+
108
+ <div class='inline'>
109
+ <p>Vincent Courtois &lt;courtois.vincent@outlook.com&gt;</p>
110
+ </div>
111
+
112
+ </li>
113
+
114
+ </ul>
115
+
116
+ </div><h2>Defined Under Namespace</h2>
117
+ <p class="children">
118
+
119
+
120
+
121
+
122
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Handlers/Exceptions.html" title="Kharon::Handlers::Exceptions (class)">Exceptions</a></span>, <span class='object_link'><a href="Handlers/Messages.html" title="Kharon::Handlers::Messages (class)">Messages</a></span>
123
+
124
+
125
+ </p>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ </div>
136
+
137
+ <div id="footer">
138
+ Generated on Tue Sep 15 10:54:07 2015 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.7.6 (ruby-1.9.3).
141
+ </div>
142
+
143
+ </body>
144
+ </html>