cliutils 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +11 -0
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/.yardoc/proxy_types +0 -0
  6. data/doc/CLIUtils/Configuration.html +373 -0
  7. data/doc/CLIUtils/Configurator.html +873 -0
  8. data/doc/CLIUtils/LoggerDelegator.html +560 -0
  9. data/doc/CLIUtils/Messenging.html +396 -0
  10. data/doc/CLIUtils/Prefs.html +609 -0
  11. data/doc/CLIUtils/PrettyIO.html +1333 -0
  12. data/doc/CLIUtils.html +131 -0
  13. data/doc/Hash.html +672 -0
  14. data/doc/Logger.html +233 -0
  15. data/doc/String.html +562 -0
  16. data/doc/_index.html +207 -0
  17. data/doc/class_list.html +54 -0
  18. data/doc/css/common.css +1 -0
  19. data/doc/css/full_list.css +57 -0
  20. data/doc/css/style.css +339 -0
  21. data/doc/file.README.html +415 -0
  22. data/doc/file_list.html +56 -0
  23. data/doc/frames.html +26 -0
  24. data/doc/index.html +415 -0
  25. data/doc/js/app.js +219 -0
  26. data/doc/js/full_list.js +178 -0
  27. data/doc/js/jquery.js +4 -0
  28. data/doc/method_list.html +389 -0
  29. data/doc/top-level-namespace.html +114 -0
  30. data/lib/cliutils/version.rb +1 -1
  31. metadata +29 -57
  32. data/.DS_Store +0 -0
  33. data/README.rdoc +0 -19
  34. data/html/CLIUtils/Configuration.html +0 -271
  35. data/html/CLIUtils/Configurator.html +0 -504
  36. data/html/CLIUtils/LoggerDelegator.html +0 -344
  37. data/html/CLIUtils/Messenging.html +0 -284
  38. data/html/CLIUtils/Prefs.html +0 -330
  39. data/html/CLIUtils/PrettyIO.html +0 -799
  40. data/html/CLIUtils.html +0 -112
  41. data/html/Hash.html +0 -453
  42. data/html/Logger.html +0 -183
  43. data/html/Object.html +0 -120
  44. data/html/README_md.html +0 -454
  45. data/html/String.html +0 -413
  46. data/html/created.rid +0 -13
  47. data/html/fonts/Lato-Light.ttf +0 -0
  48. data/html/fonts/Lato-LightItalic.ttf +0 -0
  49. data/html/fonts/Lato-Regular.ttf +0 -0
  50. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  51. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  52. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  53. data/html/fonts.css +0 -167
  54. data/html/images/add.png +0 -0
  55. data/html/images/arrow_up.png +0 -0
  56. data/html/images/brick.png +0 -0
  57. data/html/images/brick_link.png +0 -0
  58. data/html/images/bug.png +0 -0
  59. data/html/images/bullet_black.png +0 -0
  60. data/html/images/bullet_toggle_minus.png +0 -0
  61. data/html/images/bullet_toggle_plus.png +0 -0
  62. data/html/images/date.png +0 -0
  63. data/html/images/delete.png +0 -0
  64. data/html/images/find.png +0 -0
  65. data/html/images/loadingAnimation.gif +0 -0
  66. data/html/images/macFFBgHack.png +0 -0
  67. data/html/images/package.png +0 -0
  68. data/html/images/page_green.png +0 -0
  69. data/html/images/page_white_text.png +0 -0
  70. data/html/images/page_white_width.png +0 -0
  71. data/html/images/plugin.png +0 -0
  72. data/html/images/ruby.png +0 -0
  73. data/html/images/tag_blue.png +0 -0
  74. data/html/images/tag_green.png +0 -0
  75. data/html/images/transparent.png +0 -0
  76. data/html/images/wrench.png +0 -0
  77. data/html/images/wrench_orange.png +0 -0
  78. data/html/images/zoom.png +0 -0
  79. data/html/index.html +0 -455
  80. data/html/js/darkfish.js +0 -140
  81. data/html/js/jquery.js +0 -18
  82. data/html/js/navigation.js +0 -142
  83. data/html/js/search.js +0 -109
  84. data/html/js/search_index.js +0 -1
  85. data/html/js/searcher.js +0 -228
  86. data/html/rdoc.css +0 -580
  87. data/html/table_of_contents.html +0 -399
@@ -1,330 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class CLIUtils::Prefs - CLIUtils</title>
8
-
9
- <link href="../fonts.css" rel="stylesheet">
10
- <link href="../rdoc.css" rel="stylesheet">
11
-
12
- <script type="text/javascript">
13
- var rdoc_rel_prefix = "../";
14
- </script>
15
-
16
- <script src="../js/jquery.js"></script>
17
- <script src="../js/navigation.js"></script>
18
- <script src="../js/search_index.js"></script>
19
- <script src="../js/search.js"></script>
20
- <script src="../js/searcher.js"></script>
21
- <script src="../js/darkfish.js"></script>
22
-
23
-
24
- <body id="top" role="document" class="class">
25
- <nav role="navigation">
26
- <div id="project-navigation">
27
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
- <h2>
29
- <a href="../index.html" rel="home">Home</a>
30
- </h2>
31
-
32
- <div id="table-of-contents-navigation">
33
- <a href="../table_of_contents.html#pages">Pages</a>
34
- <a href="../table_of_contents.html#classes">Classes</a>
35
- <a href="../table_of_contents.html#methods">Methods</a>
36
- </div>
37
- </div>
38
-
39
- <div id="search-section" role="search" class="project-section initially-hidden">
40
- <form action="#" method="get" accept-charset="utf-8">
41
- <div id="search-field-wrapper">
42
- <input id="search-field" role="combobox" aria-label="Search"
43
- aria-autocomplete="list" aria-controls="search-results"
44
- type="text" name="search" placeholder="Search" spellcheck="false"
45
- title="Type to search, Up and Down to navigate, Enter to load">
46
- </div>
47
-
48
- <ul id="search-results" aria-label="Search Results"
49
- aria-busy="false" aria-expanded="false"
50
- aria-atomic="false" class="initially-hidden"></ul>
51
- </form>
52
- </div>
53
-
54
- </div>
55
-
56
-
57
- <div class="nav-section">
58
- <h3>Table of Contents</h3>
59
-
60
- <ul class="link-list" role="directory">
61
- <li><a href="#class-CLIUtils::Prefs-label-"></a>
62
- <li><a href="#class-CLIUtils::Prefs-label-"></a>
63
- </ul>
64
- </div>
65
-
66
-
67
- <div id="class-metadata">
68
-
69
- <div id="parent-class-section" class="nav-section">
70
- <h3>Parent</h3>
71
-
72
-
73
- <p class="link">Object
74
-
75
- </div>
76
-
77
- <div id="includes-section" class="nav-section">
78
- <h3>Included Modules</h3>
79
-
80
- <ul class="link-list">
81
-
82
-
83
- <li><a class="include" href="PrettyIO.html">CLIUtils::PrettyIO</a>
84
-
85
-
86
- </ul>
87
- </div>
88
-
89
-
90
- <!-- Method Quickref -->
91
- <div id="method-list-section" class="nav-section">
92
- <h3>Methods</h3>
93
-
94
- <ul class="link-list" role="directory">
95
-
96
- <li ><a href="#method-c-new">::new</a>
97
-
98
- <li ><a href="#method-i-ask">#ask</a>
99
-
100
- </ul>
101
- </div>
102
-
103
- </div>
104
- </nav>
105
-
106
- <main role="main" aria-labelledby="class-CLIUtils::Prefs">
107
- <h1 id="class-CLIUtils::Prefs" class="class">
108
- class CLIUtils::Prefs
109
- </h1>
110
-
111
- <section class="description">
112
-
113
- <h6 id="class-CLIUtils::Prefs-label-"><span><a href="#class-CLIUtils::Prefs-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
114
-
115
- <p>PrefManager Class</p>
116
-
117
- <p>Engine to derive preferences from a YAML file, deliver those to a user via
118
- a prompt, and collect the results.</p>
119
-
120
- <h6 id="class-CLIUtils::Prefs-label-"><span><a href="#class-CLIUtils::Prefs-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
121
-
122
- </section>
123
-
124
-
125
-
126
-
127
- <section id="5Buntitled-5D" class="documentation-section">
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- <section class="attribute-method-details" class="method-section">
136
- <header>
137
- <h3>Attributes</h3>
138
- </header>
139
-
140
-
141
- <div id="attribute-i-answers" class="method-detail">
142
- <div class="method-heading attribute-method-heading">
143
- <span class="method-name">answers</span><span
144
- class="attribute-access-type">[R]</span>
145
- </div>
146
-
147
- <div class="method-description">
148
-
149
- <h6 id="attribute-i-answers-label-"><span><a href="#attribute-i-answers-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
150
-
151
- <p>Attributes</p>
152
-
153
- <h6 id="attribute-i-answers-label-"><span><a href="#attribute-i-answers-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
154
-
155
- </div>
156
- </div>
157
-
158
- <div id="attribute-i-config_path" class="method-detail">
159
- <div class="method-heading attribute-method-heading">
160
- <span class="method-name">config_path</span><span
161
- class="attribute-access-type">[R]</span>
162
- </div>
163
-
164
- <div class="method-description">
165
-
166
- <h6 id="attribute-i-config_path-label-"><span><a href="#attribute-i-config_path-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
167
-
168
- <p>Attributes</p>
169
-
170
- <h6 id="attribute-i-config_path-label-"><span><a href="#attribute-i-config_path-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
171
-
172
- </div>
173
- </div>
174
-
175
- <div id="attribute-i-prompts" class="method-detail">
176
- <div class="method-heading attribute-method-heading">
177
- <span class="method-name">prompts</span><span
178
- class="attribute-access-type">[R]</span>
179
- </div>
180
-
181
- <div class="method-description">
182
-
183
- <h6 id="attribute-i-prompts-label-"><span><a href="#attribute-i-prompts-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
184
-
185
- <p>Attributes</p>
186
-
187
- <h6 id="attribute-i-prompts-label-"><span><a href="#attribute-i-prompts-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
188
-
189
- </div>
190
- </div>
191
-
192
- </section>
193
-
194
-
195
-
196
- <section id="public-class-5Buntitled-5D-method-details" class="method-section">
197
- <header>
198
- <h3>Public Class Methods</h3>
199
- </header>
200
-
201
-
202
- <div id="method-c-new" class="method-detail ">
203
-
204
- <div class="method-heading">
205
- <span class="method-name">new</span><span
206
- class="method-args">(data)</span>
207
-
208
- <span class="method-click-advice">click to toggle source</span>
209
-
210
- </div>
211
-
212
-
213
- <div class="method-description">
214
-
215
- <h6 id="method-c-new-label-"><span><a href="#method-c-new-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
216
-
217
- <p>Methods</p>
218
-
219
- <h6 id="method-c-new-label-"><span><a href="#method-c-new-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
220
- <hr>
221
-
222
- <p>initialize method</p>
223
-
224
- <p>Reads prompt data from YAML file. @return Void</p>
225
- <hr>
226
-
227
-
228
-
229
-
230
- <div class="method-source-code" id="new-source">
231
- <pre><span class="ruby-comment"># File lib/cliutils/prefs.rb, line 24</span>
232
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data</span>)
233
- <span class="ruby-ivar">@answers</span> = []
234
- <span class="ruby-ivar">@prompts</span> = {}
235
-
236
- <span class="ruby-keyword">case</span> <span class="ruby-identifier">data</span>
237
- <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>
238
- <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">data</span>)
239
- <span class="ruby-ivar">@config_path</span> = <span class="ruby-identifier">data</span>
240
-
241
- <span class="ruby-identifier">prompts</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">data</span>)
242
- <span class="ruby-ivar">@prompts</span>.<span class="ruby-identifier">deep_merge!</span>(<span class="ruby-identifier">prompts</span>).<span class="ruby-identifier">deep_symbolize_keys!</span>
243
- <span class="ruby-keyword">else</span>
244
- <span class="ruby-identifier">fail</span> <span class="ruby-node">&quot;Invalid configuration file: #{ yaml_path }&quot;</span>
245
- <span class="ruby-keyword">end</span>
246
- <span class="ruby-keyword">when</span> <span class="ruby-constant">Array</span>
247
- <span class="ruby-ivar">@config_path</span> = <span class="ruby-keyword">nil</span>
248
-
249
- <span class="ruby-identifier">prompts</span> = {<span class="ruby-value">:prompts</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">data</span>}
250
- <span class="ruby-ivar">@prompts</span>.<span class="ruby-identifier">deep_merge!</span>(<span class="ruby-identifier">prompts</span>).<span class="ruby-identifier">deep_symbolize_keys!</span>
251
- <span class="ruby-keyword">else</span>
252
- <span class="ruby-identifier">fail</span> <span class="ruby-string">&#39;Invalid configuration data&#39;</span>
253
- <span class="ruby-keyword">end</span>
254
- <span class="ruby-keyword">end</span></pre>
255
- </div>
256
-
257
- </div>
258
-
259
-
260
-
261
-
262
- </div>
263
-
264
-
265
- </section>
266
-
267
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
268
- <header>
269
- <h3>Public Instance Methods</h3>
270
- </header>
271
-
272
-
273
- <div id="method-i-ask" class="method-detail ">
274
-
275
- <div class="method-heading">
276
- <span class="method-name">ask</span><span
277
- class="method-args">()</span>
278
-
279
- <span class="method-click-advice">click to toggle source</span>
280
-
281
- </div>
282
-
283
-
284
- <div class="method-description">
285
-
286
- <hr>
287
-
288
- <p>ask method</p>
289
-
290
- <p>Runs through all of the prompt questions and collects answers from the
291
- user. Note that all questions w/o requirements are examined first; once
292
- those are complete, questions w/ requirements are examined. @return Void</p>
293
- <hr>
294
-
295
-
296
-
297
-
298
- <div class="method-source-code" id="ask-source">
299
- <pre><span class="ruby-comment"># File lib/cliutils/prefs.rb, line 57</span>
300
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">ask</span>
301
- <span class="ruby-ivar">@prompts</span>[<span class="ruby-value">:prompts</span>].<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span>[<span class="ruby-value">:requirements</span>] }.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
302
- <span class="ruby-identifier">_deliver_prompt</span>(<span class="ruby-identifier">p</span>)
303
- <span class="ruby-keyword">end</span>
304
-
305
- <span class="ruby-ivar">@prompts</span>[<span class="ruby-value">:prompts</span>].<span class="ruby-identifier">find_all</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span>[<span class="ruby-value">:requirements</span>] }.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
306
- <span class="ruby-identifier">_deliver_prompt</span>(<span class="ruby-identifier">p</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">_requirements_fulfilled?</span>(<span class="ruby-identifier">p</span>)
307
- <span class="ruby-keyword">end</span>
308
- <span class="ruby-keyword">end</span></pre>
309
- </div>
310
-
311
- </div>
312
-
313
-
314
-
315
-
316
- </div>
317
-
318
-
319
- </section>
320
-
321
- </section>
322
- </main>
323
-
324
-
325
- <footer id="validator-badges" role="contentinfo">
326
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
327
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
328
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
329
- </footer>
330
-