cliutils 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +48 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +288 -0
  8. data/README.rdoc +19 -0
  9. data/Rakefile +45 -0
  10. data/bin/cliutils +38 -0
  11. data/cliutils.gemspec +28 -0
  12. data/features/cli_manager.feature +13 -0
  13. data/features/step_definitions/cli_manager_steps.rb +1 -0
  14. data/features/support/env.rb +16 -0
  15. data/html/CLIUtils/Configuration.html +271 -0
  16. data/html/CLIUtils/Configurator.html +504 -0
  17. data/html/CLIUtils/LoggerDelegator.html +344 -0
  18. data/html/CLIUtils/Messenging.html +284 -0
  19. data/html/CLIUtils/Prefs.html +330 -0
  20. data/html/CLIUtils/PrettyIO.html +799 -0
  21. data/html/CLIUtils.html +112 -0
  22. data/html/Hash.html +453 -0
  23. data/html/Logger.html +183 -0
  24. data/html/Object.html +120 -0
  25. data/html/README_md.html +454 -0
  26. data/html/String.html +413 -0
  27. data/html/created.rid +13 -0
  28. data/html/fonts/Lato-Light.ttf +0 -0
  29. data/html/fonts/Lato-LightItalic.ttf +0 -0
  30. data/html/fonts/Lato-Regular.ttf +0 -0
  31. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  32. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  33. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  34. data/html/fonts.css +167 -0
  35. data/html/images/add.png +0 -0
  36. data/html/images/arrow_up.png +0 -0
  37. data/html/images/brick.png +0 -0
  38. data/html/images/brick_link.png +0 -0
  39. data/html/images/bug.png +0 -0
  40. data/html/images/bullet_black.png +0 -0
  41. data/html/images/bullet_toggle_minus.png +0 -0
  42. data/html/images/bullet_toggle_plus.png +0 -0
  43. data/html/images/date.png +0 -0
  44. data/html/images/delete.png +0 -0
  45. data/html/images/find.png +0 -0
  46. data/html/images/loadingAnimation.gif +0 -0
  47. data/html/images/macFFBgHack.png +0 -0
  48. data/html/images/package.png +0 -0
  49. data/html/images/page_green.png +0 -0
  50. data/html/images/page_white_text.png +0 -0
  51. data/html/images/page_white_width.png +0 -0
  52. data/html/images/plugin.png +0 -0
  53. data/html/images/ruby.png +0 -0
  54. data/html/images/tag_blue.png +0 -0
  55. data/html/images/tag_green.png +0 -0
  56. data/html/images/transparent.png +0 -0
  57. data/html/images/wrench.png +0 -0
  58. data/html/images/wrench_orange.png +0 -0
  59. data/html/images/zoom.png +0 -0
  60. data/html/index.html +455 -0
  61. data/html/js/darkfish.js +140 -0
  62. data/html/js/jquery.js +18 -0
  63. data/html/js/navigation.js +142 -0
  64. data/html/js/search.js +109 -0
  65. data/html/js/search_index.js +1 -0
  66. data/html/js/searcher.js +228 -0
  67. data/html/rdoc.css +580 -0
  68. data/html/table_of_contents.html +399 -0
  69. data/lib/.DS_Store +0 -0
  70. data/lib/cliutils/configuration.rb +48 -0
  71. data/lib/cliutils/configurator.rb +119 -0
  72. data/lib/cliutils/ext/Hash+Extensions.rb +145 -0
  73. data/lib/cliutils/ext/Logger+Extensions.rb +27 -0
  74. data/lib/cliutils/ext/String+Extensions.rb +26 -0
  75. data/lib/cliutils/logger-delegator.rb +66 -0
  76. data/lib/cliutils/messenging.rb +51 -0
  77. data/lib/cliutils/prefs.rb +116 -0
  78. data/lib/cliutils/pretty-io.rb +255 -0
  79. data/lib/cliutils/version.rb +3 -0
  80. data/lib/cliutils.rb +15 -0
  81. data/res/readme-images/messenger-types-1.png +0 -0
  82. data/res/readme-images/messenger-warn.png +0 -0
  83. data/res/readme-images/multi-logger.png +0 -0
  84. data/res/readme-images/prettyio-color-chart.png +0 -0
  85. data/res/readme-images/prettyio-gnarly-text.png +0 -0
  86. data/res/readme-images/prettyio-red-text.png +0 -0
  87. data/res/readme-images/prompting.png +0 -0
  88. data/res/readme-images/wrapping.png +0 -0
  89. data/test/configurator_test.rb +50 -0
  90. data/test/hash_extensions_test.rb +50 -0
  91. data/test/logger_extensions_test.rb +16 -0
  92. data/test/messenging_test.rb +53 -0
  93. data/test/prefs_test.rb +29 -0
  94. data/test/string_extesions_test.rb +14 -0
  95. data/test/test_files/prefstest.yaml +33 -0
  96. metadata +199 -0
@@ -0,0 +1,271 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module CLIUtils::Configuration - 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="module">
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="#module-CLIUtils::Configuration-label-"></a>
62
+ <li><a href="#module-CLIUtils::Configuration-label-"></a>
63
+ </ul>
64
+ </div>
65
+
66
+
67
+ <div id="class-metadata">
68
+
69
+
70
+
71
+
72
+ <!-- Method Quickref -->
73
+ <div id="method-list-section" class="nav-section">
74
+ <h3>Methods</h3>
75
+
76
+ <ul class="link-list" role="directory">
77
+
78
+ <li ><a href="#method-c-included">::included</a>
79
+
80
+ <li ><a href="#method-i-configuration">#configuration</a>
81
+
82
+ <li ><a href="#method-i-load_configuration">#load_configuration</a>
83
+
84
+ </ul>
85
+ </div>
86
+
87
+ </div>
88
+ </nav>
89
+
90
+ <main role="main" aria-labelledby="module-CLIUtils::Configuration">
91
+ <h1 id="module-CLIUtils::Configuration" class="module">
92
+ module CLIUtils::Configuration
93
+ </h1>
94
+
95
+ <section class="description">
96
+
97
+ <h6 id="module-CLIUtils::Configuration-label-"><span><a href="#module-CLIUtils::Configuration-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
98
+
99
+ <p><a href="Configuration.html">Configuration</a> Class</p>
100
+
101
+ <p>Manages any configuration values and the flat YAML file into which they get
102
+ stored.</p>
103
+
104
+ <h6 id="module-CLIUtils::Configuration-label-"><span><a href="#module-CLIUtils::Configuration-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
105
+
106
+ </section>
107
+
108
+
109
+
110
+
111
+ <section id="5Buntitled-5D" class="documentation-section">
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
122
+ <header>
123
+ <h3>Public Class Methods</h3>
124
+ </header>
125
+
126
+
127
+ <div id="method-c-included" class="method-detail ">
128
+
129
+ <div class="method-heading">
130
+ <span class="method-name">included</span><span
131
+ class="method-args">(k)</span>
132
+
133
+ <span class="method-click-advice">click to toggle source</span>
134
+
135
+ </div>
136
+
137
+
138
+ <div class="method-description">
139
+
140
+ <h6 id="method-c-included-label-"><span><a href="#method-c-included-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
141
+
142
+ <p>Methods</p>
143
+
144
+ <h6 id="method-c-included-label-"><span><a href="#method-c-included-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
145
+ <hr>
146
+
147
+ <p>included method</p>
148
+
149
+ <p>Hook called when this module gets mixed in; extends the includer with the
150
+ methods defined here. @param k The includer @return Void</p>
151
+ <hr>
152
+
153
+
154
+
155
+
156
+ <div class="method-source-code" id="included-source">
157
+ <pre><span class="ruby-comment"># File lib/cliutils/configuration.rb, line 22</span>
158
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">k</span>)
159
+ <span class="ruby-identifier">k</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-keyword">self</span>)
160
+ <span class="ruby-keyword">end</span></pre>
161
+ </div>
162
+
163
+ </div>
164
+
165
+
166
+
167
+
168
+ </div>
169
+
170
+
171
+ </section>
172
+
173
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
174
+ <header>
175
+ <h3>Public Instance Methods</h3>
176
+ </header>
177
+
178
+
179
+ <div id="method-i-configuration" class="method-detail ">
180
+
181
+ <div class="method-heading">
182
+ <span class="method-name">configuration</span><span
183
+ class="method-args">()</span>
184
+
185
+ <span class="method-click-advice">click to toggle source</span>
186
+
187
+ </div>
188
+
189
+
190
+ <div class="method-description">
191
+
192
+ <hr>
193
+
194
+ <p>configuration method</p>
195
+
196
+ <p>Singleton method to return (or initialize, if needed) a <a
197
+ href="Configurator.html">Configurator</a>. @return <a
198
+ href="Configurator.html">Configurator</a></p>
199
+ <hr>
200
+
201
+
202
+
203
+
204
+ <div class="method-source-code" id="configuration-source">
205
+ <pre><span class="ruby-comment"># File lib/cliutils/configuration.rb, line 33</span>
206
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">configuration</span>
207
+ <span class="ruby-ivar">@configuration</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Configurator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;~/.default-cliutils&#39;</span>)
208
+ <span class="ruby-keyword">end</span></pre>
209
+ </div>
210
+
211
+ </div>
212
+
213
+
214
+
215
+
216
+ </div>
217
+
218
+
219
+ <div id="method-i-load_configuration" class="method-detail ">
220
+
221
+ <div class="method-heading">
222
+ <span class="method-name">load_configuration</span><span
223
+ class="method-args">(path)</span>
224
+
225
+ <span class="method-click-advice">click to toggle source</span>
226
+
227
+ </div>
228
+
229
+
230
+ <div class="method-description">
231
+
232
+ <hr>
233
+
234
+ <p><a
235
+ href="Configuration.html#method-i-load_configuration">#load_configuration</a>
236
+ method</p>
237
+
238
+ <p>Initializes a <a href="Configurator.html">Configurator</a> with the passed
239
+ filepath. @param path The path to the config file @return Void</p>
240
+ <hr>
241
+
242
+
243
+
244
+
245
+ <div class="method-source-code" id="load_configuration-source">
246
+ <pre><span class="ruby-comment"># File lib/cliutils/configuration.rb, line 44</span>
247
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">load_configuration</span>(<span class="ruby-identifier">path</span>)
248
+ <span class="ruby-ivar">@configuration</span> = <span class="ruby-constant">Configurator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
249
+ <span class="ruby-keyword">end</span></pre>
250
+ </div>
251
+
252
+ </div>
253
+
254
+
255
+
256
+
257
+ </div>
258
+
259
+
260
+ </section>
261
+
262
+ </section>
263
+ </main>
264
+
265
+
266
+ <footer id="validator-badges" role="contentinfo">
267
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
268
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
269
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
270
+ </footer>
271
+