cliutils 1.0.2 → 1.0.3

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.yardoc/checksums +11 -11
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/Gemfile.lock +12 -33
  7. data/README.md +1 -1
  8. data/Rakefile +36 -31
  9. data/cliutils.gemspec +3 -2
  10. data/lib/cliutils/configuration.rb +13 -31
  11. data/lib/cliutils/configurator.rb +23 -62
  12. data/lib/cliutils/ext/Hash+Extensions.rb +39 -78
  13. data/lib/cliutils/ext/Logger+Extensions.rb +6 -11
  14. data/lib/cliutils/ext/String+Extensions.rb +25 -13
  15. data/lib/cliutils/logger-delegator.rb +15 -39
  16. data/lib/cliutils/messenging.rb +10 -28
  17. data/lib/cliutils/prefs.rb +18 -43
  18. data/lib/cliutils/pretty-io.rb +59 -127
  19. data/lib/cliutils/version.rb +2 -1
  20. data/lib/cliutils.rb +2 -0
  21. metadata +20 -32
  22. data/bin/cliutils +0 -38
  23. data/doc/CLIUtils/Configuration.html +0 -373
  24. data/doc/CLIUtils/Configurator.html +0 -873
  25. data/doc/CLIUtils/LoggerDelegator.html +0 -560
  26. data/doc/CLIUtils/Messenging.html +0 -396
  27. data/doc/CLIUtils/Prefs.html +0 -609
  28. data/doc/CLIUtils/PrettyIO.html +0 -1333
  29. data/doc/CLIUtils.html +0 -131
  30. data/doc/Hash.html +0 -672
  31. data/doc/Logger.html +0 -233
  32. data/doc/String.html +0 -562
  33. data/doc/_index.html +0 -207
  34. data/doc/class_list.html +0 -54
  35. data/doc/css/common.css +0 -1
  36. data/doc/css/full_list.css +0 -57
  37. data/doc/css/style.css +0 -339
  38. data/doc/file.README.html +0 -415
  39. data/doc/file_list.html +0 -56
  40. data/doc/frames.html +0 -26
  41. data/doc/index.html +0 -415
  42. data/doc/js/app.js +0 -219
  43. data/doc/js/full_list.js +0 -178
  44. data/doc/js/jquery.js +0 -4
  45. data/doc/method_list.html +0 -389
  46. data/doc/top-level-namespace.html +0 -114
@@ -1,396 +0,0 @@
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: CLIUtils::Messenging
8
-
9
- &mdash; Documentation by YARD 0.8.7.4
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#!CLIUtils/Messenging.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 (M)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../CLIUtils.html" title="CLIUtils (module)">CLIUtils</a></span></span>
36
- &raquo;
37
- <span class="title">Messenging</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: CLIUtils::Messenging
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
-
75
-
76
-
77
-
78
- <dt class="r1">Includes:</dt>
79
- <dd class="r1"><span class='object_link'><a href="PrettyIO.html" title="CLIUtils::PrettyIO (module)">PrettyIO</a></span></dd>
80
-
81
-
82
-
83
-
84
-
85
- <dt class="r2 last">Defined in:</dt>
86
- <dd class="r2 last">lib/cliutils/messenging.rb</dd>
87
-
88
- </dl>
89
- <div class="clear"></div>
90
-
91
- <h2>Overview</h2><div class="docstring">
92
- <div class="discussion">
93
-
94
- <h6 id="label-"></h6>
95
-
96
- <pre class="code ruby"><code class="ruby">CLIMessenger Module
97
- Outputs color-coordinated messages to a CLI
98
- ======================================================</code></pre>
99
-
100
-
101
- </div>
102
- </div>
103
- <div class="tags">
104
-
105
-
106
- </div>
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- <h2>
115
- Class Method Summary
116
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
117
- </h2>
118
-
119
- <ul class="summary">
120
-
121
- <li class="public ">
122
- <span class="summary_signature">
123
-
124
- <a href="#included-class_method" title="included (class method)">+ (Object) <strong>included</strong>(k) </a>
125
-
126
-
127
-
128
- </span>
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
- <span class="summary_desc"><div class='inline'>
139
- <h6 id="label-Methods++%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D++----------------------------------------------------++included+method.">Methods ==================================================== —————————————————- included method.</h6>
140
- </div></span>
141
-
142
- </li>
143
-
144
-
145
- </ul>
146
-
147
- <h2>
148
- Instance Method Summary
149
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
150
- </h2>
151
-
152
- <ul class="summary">
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#default_instance-instance_method" title="#default_instance (instance method)">- (Object) <strong>default_instance</strong> </a>
158
-
159
-
160
-
161
- </span>
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- <span class="summary_desc"><div class='inline'>
172
- <p>—————————————————- default_instance method.</p>
173
- </div></span>
174
-
175
- </li>
176
-
177
-
178
- <li class="public ">
179
- <span class="summary_signature">
180
-
181
- <a href="#messenger-instance_method" title="#messenger (instance method)">- (Object) <strong>messenger</strong> </a>
182
-
183
-
184
-
185
- </span>
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
- <span class="summary_desc"><div class='inline'>
196
- <p>—————————————————- messenger method.</p>
197
- </div></span>
198
-
199
- </li>
200
-
201
-
202
- </ul>
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
- <h3 class="inherited">Methods included from <span class='object_link'><a href="PrettyIO.html" title="CLIUtils::PrettyIO (module)">PrettyIO</a></span></h3>
215
- <p class="inherited"><span class='object_link'><a href="PrettyIO.html#color_chart-instance_method" title="CLIUtils::PrettyIO#color_chart (method)">#color_chart</a></span>, <span class='object_link'><a href="PrettyIO.html#debug-instance_method" title="CLIUtils::PrettyIO#debug (method)">#debug</a></span>, <span class='object_link'><a href="PrettyIO.html#error-instance_method" title="CLIUtils::PrettyIO#error (method)">#error</a></span>, <span class='object_link'><a href="PrettyIO.html#info-instance_method" title="CLIUtils::PrettyIO#info (method)">#info</a></span>, <span class='object_link'><a href="PrettyIO.html#info_block-instance_method" title="CLIUtils::PrettyIO#info_block (method)">#info_block</a></span>, <span class='object_link'><a href="PrettyIO.html#log-instance_method" title="CLIUtils::PrettyIO#log (method)">#log</a></span>, <span class='object_link'><a href="PrettyIO.html#prompt-instance_method" title="CLIUtils::PrettyIO#prompt (method)">#prompt</a></span>, <span class='object_link'><a href="PrettyIO.html#section-instance_method" title="CLIUtils::PrettyIO#section (method)">#section</a></span>, <span class='object_link'><a href="PrettyIO.html#section_block-instance_method" title="CLIUtils::PrettyIO#section_block (method)">#section_block</a></span>, <span class='object_link'><a href="PrettyIO.html#success-instance_method" title="CLIUtils::PrettyIO#success (method)">#success</a></span>, <span class='object_link'><a href="PrettyIO.html#warn-instance_method" title="CLIUtils::PrettyIO#warn (method)">#warn</a></span>, <span class='object_link'><a href="PrettyIO.html#wrap-class_method" title="CLIUtils::PrettyIO.wrap (method)">wrap</a></span>, <span class='object_link'><a href="PrettyIO.html#wrap_at-class_method" title="CLIUtils::PrettyIO.wrap_at (method)">wrap_at</a></span>, <span class='object_link'><a href="PrettyIO.html#wrap_limit-class_method" title="CLIUtils::PrettyIO.wrap_limit (method)">wrap_limit</a></span></p>
216
-
217
-
218
- <div id="class_method_details" class="method_details_list">
219
- <h2>Class Method Details</h2>
220
-
221
-
222
- <div class="method_details first">
223
- <h3 class="signature first" id="included-class_method">
224
-
225
- + (<tt>Object</tt>) <strong>included</strong>(k)
226
-
227
-
228
-
229
-
230
-
231
- </h3><div class="docstring">
232
- <div class="discussion">
233
-
234
- <h6 id="label-"></h6>
235
-
236
- <pre class="code ruby"><code class="ruby">Methods
237
- ====================================================
238
- ----------------------------------------------------
239
- included method
240
-
241
- Hook called when this module gets mixed in; extends
242
- the includer with the methods defined here.
243
- @param k The includer
244
- @return Void
245
- ----------------------------------------------------
246
- </code></pre>
247
-
248
-
249
- </div>
250
- </div>
251
- <div class="tags">
252
-
253
-
254
- </div><table class="source_code">
255
- <tr>
256
- <td>
257
- <pre class="lines">
258
-
259
-
260
- 20
261
- 21
262
- 22</pre>
263
- </td>
264
- <td>
265
- <pre class="code"><span class="info file"># File 'lib/cliutils/messenging.rb', line 20</span>
266
-
267
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_included'>included</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
268
- <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
269
- <span class='kw'>end</span></pre>
270
- </td>
271
- </tr>
272
- </table>
273
- </div>
274
-
275
- </div>
276
-
277
- <div id="instance_method_details" class="method_details_list">
278
- <h2>Instance Method Details</h2>
279
-
280
-
281
- <div class="method_details first">
282
- <h3 class="signature first" id="default_instance-instance_method">
283
-
284
- - (<tt>Object</tt>) <strong>default_instance</strong>
285
-
286
-
287
-
288
-
289
-
290
- </h3><div class="docstring">
291
- <div class="discussion">
292
- <hr>
293
-
294
- <pre class="code ruby"><code class="ruby">default_instance method
295
-
296
- Returns a default instance of LoggerDelegator that
297
- delegates to STDOUT only.
298
- @return LoggerDelegator
299
- ----------------------------------------------------</code></pre>
300
-
301
-
302
- </div>
303
- </div>
304
- <div class="tags">
305
-
306
-
307
- </div><table class="source_code">
308
- <tr>
309
- <td>
310
- <pre class="lines">
311
-
312
-
313
- 31
314
- 32
315
- 33
316
- 34
317
- 35
318
- 36
319
- 37
320
- 38</pre>
321
- </td>
322
- <td>
323
- <pre class="code"><span class="info file"># File 'lib/cliutils/messenging.rb', line 31</span>
324
-
325
- <span class='kw'>def</span> <span class='id identifier rubyid_default_instance'>default_instance</span>
326
- <span class='id identifier rubyid_stdout_logger'>stdout_logger</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>STDOUT</span><span class='rparen'>)</span>
327
- <span class='id identifier rubyid_stdout_logger'>stdout_logger</span><span class='period'>.</span><span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_datetime'>datetime</span><span class='comma'>,</span> <span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='op'>|</span>
328
- <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_severity'>severity</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
329
- <span class='kw'>end</span>
330
-
331
- <span class='const'>LoggerDelegator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_stdout_logger'>stdout_logger</span><span class='rparen'>)</span>
332
- <span class='kw'>end</span></pre>
333
- </td>
334
- </tr>
335
- </table>
336
- </div>
337
-
338
- <div class="method_details ">
339
- <h3 class="signature " id="messenger-instance_method">
340
-
341
- - (<tt>Object</tt>) <strong>messenger</strong>
342
-
343
-
344
-
345
-
346
-
347
- </h3><div class="docstring">
348
- <div class="discussion">
349
- <hr>
350
-
351
- <pre class="code ruby"><code class="ruby">messenger method
352
-
353
- Singleton method to return (or initialize, if needed)
354
- a LoggerDelegator.
355
- @return LoggerDelegator
356
- ----------------------------------------------------</code></pre>
357
-
358
-
359
- </div>
360
- </div>
361
- <div class="tags">
362
-
363
-
364
- </div><table class="source_code">
365
- <tr>
366
- <td>
367
- <pre class="lines">
368
-
369
-
370
- 47
371
- 48
372
- 49</pre>
373
- </td>
374
- <td>
375
- <pre class="code"><span class="info file"># File 'lib/cliutils/messenging.rb', line 47</span>
376
-
377
- <span class='kw'>def</span> <span class='id identifier rubyid_messenger'>messenger</span>
378
- <span class='ivar'>@messenger</span> <span class='op'>||=</span> <span class='id identifier rubyid_default_instance'>default_instance</span>
379
- <span class='kw'>end</span></pre>
380
- </td>
381
- </tr>
382
- </table>
383
- </div>
384
-
385
- </div>
386
-
387
- </div>
388
-
389
- <div id="footer">
390
- Generated on Sat Mar 29 17:22:03 2014 by
391
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
392
- 0.8.7.4 (ruby-2.1.0).
393
- </div>
394
-
395
- </body>
396
- </html>