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,373 +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::Configuration
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/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="../CLIUtils.html" title="CLIUtils (module)">CLIUtils</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>Module: CLIUtils::Configuration
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/cliutils/configuration.rb</dd>
83
-
84
- </dl>
85
- <div class="clear"></div>
86
-
87
- <h2>Overview</h2><div class="docstring">
88
- <div class="discussion">
89
-
90
- <h6 id="label-"></h6>
91
-
92
- <pre class="code ruby"><code class="ruby">Configuration Class
93
-
94
- Manages any configuration values and the flat YAML file
95
- into which they get stored.
96
- ======================================================</code></pre>
97
-
98
-
99
- </div>
100
- </div>
101
- <div class="tags">
102
-
103
-
104
- </div>
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <h2>
113
- Class Method Summary
114
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
115
- </h2>
116
-
117
- <ul class="summary">
118
-
119
- <li class="public ">
120
- <span class="summary_signature">
121
-
122
- <a href="#included-class_method" title="included (class method)">+ (Object) <strong>included</strong>(k) </a>
123
-
124
-
125
-
126
- </span>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <span class="summary_desc"><div class='inline'>
137
- <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>
138
- </div></span>
139
-
140
- </li>
141
-
142
-
143
- </ul>
144
-
145
- <h2>
146
- Instance Method Summary
147
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
148
- </h2>
149
-
150
- <ul class="summary">
151
-
152
- <li class="public ">
153
- <span class="summary_signature">
154
-
155
- <a href="#configuration-instance_method" title="#configuration (instance method)">- (Object) <strong>configuration</strong> </a>
156
-
157
-
158
-
159
- </span>
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
- <span class="summary_desc"><div class='inline'>
170
- <p>—————————————————- configuration method.</p>
171
- </div></span>
172
-
173
- </li>
174
-
175
-
176
- <li class="public ">
177
- <span class="summary_signature">
178
-
179
- <a href="#load_configuration-instance_method" title="#load_configuration (instance method)">- (Object) <strong>load_configuration</strong>(path) </a>
180
-
181
-
182
-
183
- </span>
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
- <span class="summary_desc"><div class='inline'>
194
- <p>—————————————————- load_configuration method.</p>
195
- </div></span>
196
-
197
- </li>
198
-
199
-
200
- </ul>
201
-
202
-
203
-
204
-
205
- <div id="class_method_details" class="method_details_list">
206
- <h2>Class Method Details</h2>
207
-
208
-
209
- <div class="method_details first">
210
- <h3 class="signature first" id="included-class_method">
211
-
212
- + (<tt>Object</tt>) <strong>included</strong>(k)
213
-
214
-
215
-
216
-
217
-
218
- </h3><div class="docstring">
219
- <div class="discussion">
220
-
221
- <h6 id="label-"></h6>
222
-
223
- <pre class="code ruby"><code class="ruby">Methods
224
- ====================================================
225
- ----------------------------------------------------
226
- included method
227
-
228
- Hook called when this module gets mixed in; extends
229
- the includer with the methods defined here.
230
- @param k The includer
231
- @return Void
232
- ----------------------------------------------------
233
- </code></pre>
234
-
235
-
236
- </div>
237
- </div>
238
- <div class="tags">
239
-
240
-
241
- </div><table class="source_code">
242
- <tr>
243
- <td>
244
- <pre class="lines">
245
-
246
-
247
- 22
248
- 23
249
- 24</pre>
250
- </td>
251
- <td>
252
- <pre class="code"><span class="info file"># File 'lib/cliutils/configuration.rb', line 22</span>
253
-
254
- <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>
255
- <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>
256
- <span class='kw'>end</span></pre>
257
- </td>
258
- </tr>
259
- </table>
260
- </div>
261
-
262
- </div>
263
-
264
- <div id="instance_method_details" class="method_details_list">
265
- <h2>Instance Method Details</h2>
266
-
267
-
268
- <div class="method_details first">
269
- <h3 class="signature first" id="configuration-instance_method">
270
-
271
- - (<tt>Object</tt>) <strong>configuration</strong>
272
-
273
-
274
-
275
-
276
-
277
- </h3><div class="docstring">
278
- <div class="discussion">
279
- <hr>
280
-
281
- <pre class="code ruby"><code class="ruby">configuration method
282
-
283
- Singleton method to return (or initialize, if needed)
284
- a Configurator.
285
- @return Configurator
286
- ----------------------------------------------------</code></pre>
287
-
288
-
289
- </div>
290
- </div>
291
- <div class="tags">
292
-
293
-
294
- </div><table class="source_code">
295
- <tr>
296
- <td>
297
- <pre class="lines">
298
-
299
-
300
- 33
301
- 34
302
- 35</pre>
303
- </td>
304
- <td>
305
- <pre class="code"><span class="info file"># File 'lib/cliutils/configuration.rb', line 33</span>
306
-
307
- <span class='kw'>def</span> <span class='id identifier rubyid_configuration'>configuration</span>
308
- <span class='ivar'>@configuration</span> <span class='op'>||=</span> <span class='const'>Configurator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>~/.default-cliutils</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
309
- <span class='kw'>end</span></pre>
310
- </td>
311
- </tr>
312
- </table>
313
- </div>
314
-
315
- <div class="method_details ">
316
- <h3 class="signature " id="load_configuration-instance_method">
317
-
318
- - (<tt>Object</tt>) <strong>load_configuration</strong>(path)
319
-
320
-
321
-
322
-
323
-
324
- </h3><div class="docstring">
325
- <div class="discussion">
326
- <hr>
327
-
328
- <pre class="code ruby"><code class="ruby">load_configuration method
329
-
330
- Initializes a Configurator with the passed filepath.
331
- @param path The path to the config file
332
- @return Void
333
- ----------------------------------------------------</code></pre>
334
-
335
-
336
- </div>
337
- </div>
338
- <div class="tags">
339
-
340
-
341
- </div><table class="source_code">
342
- <tr>
343
- <td>
344
- <pre class="lines">
345
-
346
-
347
- 44
348
- 45
349
- 46</pre>
350
- </td>
351
- <td>
352
- <pre class="code"><span class="info file"># File 'lib/cliutils/configuration.rb', line 44</span>
353
-
354
- <span class='kw'>def</span> <span class='id identifier rubyid_load_configuration'>load_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
355
- <span class='ivar'>@configuration</span> <span class='op'>=</span> <span class='const'>Configurator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
356
- <span class='kw'>end</span></pre>
357
- </td>
358
- </tr>
359
- </table>
360
- </div>
361
-
362
- </div>
363
-
364
- </div>
365
-
366
- <div id="footer">
367
- Generated on Sat Mar 29 17:22:03 2014 by
368
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
369
- 0.8.7.4 (ruby-2.1.0).
370
- </div>
371
-
372
- </body>
373
- </html>