kharon 0.5.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,452 @@
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: Kharon::Configuration
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/Configuration.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> &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">Configuration</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: Kharon::Configuration
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">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Kharon::Configuration</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2">Singleton</dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/kharon/configuration.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Simple wrapper for the configuration.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+ <p class="tag_title">Author:</p>
117
+ <ul class="author">
118
+
119
+ <li>
120
+
121
+
122
+
123
+
124
+
125
+ <div class='inline'>
126
+ <p>Vincent Courtois &lt;courtois.vincent@outlook.com&gt;</p>
127
+ </div>
128
+
129
+ </li>
130
+
131
+ </ul>
132
+
133
+ </div>
134
+
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="#configuration-instance_method" title="#configuration (instance method)">- (Object) <strong>configuration</strong> </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'>
161
+ <p>Returns the value of attribute configuration.</p>
162
+ </div></span>
163
+
164
+ </li>
165
+
166
+
167
+ </ul>
168
+
169
+
170
+
171
+
172
+
173
+ <h2>
174
+ Instance Method Summary
175
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
176
+ </h2>
177
+
178
+ <ul class="summary">
179
+
180
+ <li class="public ">
181
+ <span class="summary_signature">
182
+
183
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Configuration) <strong>initialize</strong> </a>
184
+
185
+
186
+
187
+ </span>
188
+
189
+
190
+ <span class="note title constructor">constructor</span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'>
200
+ <p>Constructor of the configuration, initializes default values for each
201
+ usable key.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#use_exceptions-instance_method" title="#use_exceptions (instance method)">- (Object) <strong>use_exceptions</strong>(use = true) </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'></div></span>
225
+
226
+ </li>
227
+
228
+
229
+ <li class="public ">
230
+ <span class="summary_signature">
231
+
232
+ <a href="#uses_exceptions%3F-instance_method" title="#uses_exceptions? (instance method)">- (Boolean) <strong>uses_exceptions?</strong> </a>
233
+
234
+
235
+
236
+ </span>
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <span class="summary_desc"><div class='inline'></div></span>
247
+
248
+ </li>
249
+
250
+
251
+ </ul>
252
+
253
+
254
+
255
+ <div id="constructor_details" class="method_details_list">
256
+ <h2>Constructor Details</h2>
257
+
258
+ <div class="method_details first">
259
+ <h3 class="signature first" id="initialize-instance_method">
260
+
261
+ - (<tt><span class='object_link'><a href="" title="Kharon::Configuration (class)">Configuration</a></span></tt>) <strong>initialize</strong>
262
+
263
+
264
+
265
+
266
+
267
+ </h3><div class="docstring">
268
+ <div class="discussion">
269
+
270
+ <p>Constructor of the configuration, initializes default values for each
271
+ usable key.</p>
272
+
273
+
274
+ </div>
275
+ </div>
276
+ <div class="tags">
277
+
278
+
279
+ </div><table class="source_code">
280
+ <tr>
281
+ <td>
282
+ <pre class="lines">
283
+
284
+
285
+ 14
286
+ 15
287
+ 16
288
+ 17
289
+ 18</pre>
290
+ </td>
291
+ <td>
292
+ <pre class="code"><span class="info file"># File 'lib/kharon/configuration.rb', line 14</span>
293
+
294
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
295
+ <span class='ivar'>@configuration</span> <span class='op'>=</span> <span class='lbrace'>{</span>
296
+ <span class='label'>exceptions:</span> <span class='kw'>true</span>
297
+ <span class='rbrace'>}</span>
298
+ <span class='kw'>end</span></pre>
299
+ </td>
300
+ </tr>
301
+ </table>
302
+ </div>
303
+
304
+ </div>
305
+
306
+ <div id="instance_attr_details" class="attr_details">
307
+ <h2>Instance Attribute Details</h2>
308
+
309
+
310
+ <span id="configuration=-instance_method"></span>
311
+ <div class="method_details first">
312
+ <h3 class="signature first" id="configuration-instance_method">
313
+
314
+ - (<tt>Object</tt>) <strong>configuration</strong>
315
+
316
+
317
+
318
+
319
+
320
+ </h3><div class="docstring">
321
+ <div class="discussion">
322
+
323
+ <p>Returns the value of attribute configuration</p>
324
+
325
+
326
+ </div>
327
+ </div>
328
+ <div class="tags">
329
+
330
+
331
+ </div><table class="source_code">
332
+ <tr>
333
+ <td>
334
+ <pre class="lines">
335
+
336
+
337
+ 11
338
+ 12
339
+ 13</pre>
340
+ </td>
341
+ <td>
342
+ <pre class="code"><span class="info file"># File 'lib/kharon/configuration.rb', line 11</span>
343
+
344
+ <span class='kw'>def</span> <span class='id identifier rubyid_configuration'>configuration</span>
345
+ <span class='ivar'>@configuration</span>
346
+ <span class='kw'>end</span></pre>
347
+ </td>
348
+ </tr>
349
+ </table>
350
+ </div>
351
+
352
+ </div>
353
+
354
+
355
+ <div id="instance_method_details" class="method_details_list">
356
+ <h2>Instance Method Details</h2>
357
+
358
+
359
+ <div class="method_details first">
360
+ <h3 class="signature first" id="use_exceptions-instance_method">
361
+
362
+ - (<tt>Object</tt>) <strong>use_exceptions</strong>(use = true)
363
+
364
+
365
+
366
+
367
+
368
+ </h3><table class="source_code">
369
+ <tr>
370
+ <td>
371
+ <pre class="lines">
372
+
373
+
374
+ 20
375
+ 21
376
+ 22</pre>
377
+ </td>
378
+ <td>
379
+ <pre class="code"><span class="info file"># File 'lib/kharon/configuration.rb', line 20</span>
380
+
381
+ <span class='kw'>def</span> <span class='id identifier rubyid_use_exceptions'>use_exceptions</span><span class='lparen'>(</span><span class='id identifier rubyid_use'>use</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
382
+ <span class='ivar'>@configuration</span><span class='lbracket'>[</span><span class='symbol'>:exceptions</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_use'>use</span>
383
+ <span class='kw'>end</span></pre>
384
+ </td>
385
+ </tr>
386
+ </table>
387
+ </div>
388
+
389
+ <div class="method_details ">
390
+ <h3 class="signature " id="uses_exceptions?-instance_method">
391
+
392
+ - (<tt>Boolean</tt>) <strong>uses_exceptions?</strong>
393
+
394
+
395
+
396
+
397
+
398
+ </h3><div class="docstring">
399
+ <div class="discussion">
400
+
401
+
402
+ </div>
403
+ </div>
404
+ <div class="tags">
405
+
406
+ <p class="tag_title">Returns:</p>
407
+ <ul class="return">
408
+
409
+ <li>
410
+
411
+
412
+ <span class='type'>(<tt>Boolean</tt>)</span>
413
+
414
+
415
+
416
+ </li>
417
+
418
+ </ul>
419
+
420
+ </div><table class="source_code">
421
+ <tr>
422
+ <td>
423
+ <pre class="lines">
424
+
425
+
426
+ 24
427
+ 25
428
+ 26</pre>
429
+ </td>
430
+ <td>
431
+ <pre class="code"><span class="info file"># File 'lib/kharon/configuration.rb', line 24</span>
432
+
433
+ <span class='kw'>def</span> <span class='id identifier rubyid_uses_exceptions?'>uses_exceptions?</span>
434
+ <span class='ivar'>@configuration</span><span class='lbracket'>[</span><span class='symbol'>:exceptions</span><span class='rbracket'>]</span>
435
+ <span class='kw'>end</span></pre>
436
+ </td>
437
+ </tr>
438
+ </table>
439
+ </div>
440
+
441
+ </div>
442
+
443
+ </div>
444
+
445
+ <div id="footer">
446
+ Generated on Thu Jun 11 09:41:23 2015 by
447
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
448
+ 0.8.7.6 (ruby-1.9.3).
449
+ </div>
450
+
451
+ </body>
452
+ </html>
@@ -0,0 +1,145 @@
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::Errors
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.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 (E)</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">Errors</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::Errors
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/errors.rb<span class="defines">,<br />
83
+ lib/kharon/errors/validation.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 class representing custom errors raised whithin
93
+ the application.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+ <p class="tag_title">Author:</p>
101
+ <ul class="author">
102
+
103
+ <li>
104
+
105
+
106
+
107
+
108
+
109
+ <div class='inline'>
110
+ <p>Vincent Courtois &lt;courtois.vincent@outlook.com&gt;</p>
111
+ </div>
112
+
113
+ </li>
114
+
115
+ </ul>
116
+
117
+ </div><h2>Defined Under Namespace</h2>
118
+ <p class="children">
119
+
120
+
121
+
122
+
123
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Errors/Validation.html" title="Kharon::Errors::Validation (class)">Validation</a></span>
124
+
125
+
126
+ </p>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ </div>
137
+
138
+ <div id="footer">
139
+ Generated on Tue Sep 15 10:54:07 2015 by
140
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
141
+ 0.8.7.6 (ruby-1.9.3).
142
+ </div>
143
+
144
+ </body>
145
+ </html>