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
data/html/Logger.html ADDED
@@ -0,0 +1,183 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Logger - 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-Logger-label-"></a>
62
+ <li><a href="#class-Logger-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
+
78
+
79
+ <!-- Method Quickref -->
80
+ <div id="method-list-section" class="nav-section">
81
+ <h3>Methods</h3>
82
+
83
+ <ul class="link-list" role="directory">
84
+
85
+ <li ><a href="#method-c-custom_level">::custom_level</a>
86
+
87
+ </ul>
88
+ </div>
89
+
90
+ </div>
91
+ </nav>
92
+
93
+ <main role="main" aria-labelledby="class-Logger">
94
+ <h1 id="class-Logger" class="class">
95
+ class Logger
96
+ </h1>
97
+
98
+ <section class="description">
99
+
100
+ <h6 id="class-Logger-label-"><span><a href="#class-Logger-label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
101
+
102
+ <p><a href="Logger.html">Logger</a> Class</p>
103
+
104
+ <h6 id="class-Logger-label-"><span><a href="#class-Logger-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-custom_level" class="method-detail ">
128
+
129
+ <div class="method-heading">
130
+ <span class="method-name">custom_level</span><span
131
+ class="method-args">(tag)</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
+ <hr>
141
+
142
+ <p><a href="Logger.html#method-c-custom_level">::custom_level</a> method</p>
143
+
144
+ <p>Creates a custom <a href="Logger.html">Logger</a> level based on the passed
145
+ tag. @param tag The <a href="Logger.html">Logger</a> level to create
146
+ @return Void</p>
147
+ <hr>
148
+
149
+
150
+
151
+
152
+ <div class="method-source-code" id="custom_level-source">
153
+ <pre><span class="ruby-comment"># File lib/cliutils/ext/Logger+Extensions.rb, line 15</span>
154
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">custom_level</span>(<span class="ruby-identifier">tag</span>)
155
+ <span class="ruby-constant">SEV_LABEL</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">tag</span>
156
+ <span class="ruby-identifier">idx</span> = <span class="ruby-constant">SEV_LABEL</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
157
+
158
+ <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">tag</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\W+/</span>, <span class="ruby-string">&#39;_&#39;</span>).<span class="ruby-identifier">to_sym</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">progname</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span><span class="ruby-operator">|</span>
159
+ <span class="ruby-identifier">add</span>(<span class="ruby-identifier">idx</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">progname</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
160
+ <span class="ruby-keyword">end</span>
161
+ <span class="ruby-keyword">end</span></pre>
162
+ </div>
163
+
164
+ </div>
165
+
166
+
167
+
168
+
169
+ </div>
170
+
171
+
172
+ </section>
173
+
174
+ </section>
175
+ </main>
176
+
177
+
178
+ <footer id="validator-badges" role="contentinfo">
179
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
180
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
181
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
182
+ </footer>
183
+
data/html/Object.html ADDED
@@ -0,0 +1,120 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Object - 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
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link">BasicObject
65
+
66
+ </div>
67
+
68
+ <div id="includes-section" class="nav-section">
69
+ <h3>Included Modules</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+
74
+ <li><a class="include" href="CLIUtils/Messenging.html">CLIUtils::Messenging</a>
75
+
76
+
77
+
78
+ <li><a class="include" href="CLIUtils/Configuration.html">CLIUtils::Configuration</a>
79
+
80
+
81
+ </ul>
82
+ </div>
83
+
84
+
85
+
86
+ </div>
87
+ </nav>
88
+
89
+ <main role="main" aria-labelledby="class-Object">
90
+ <h1 id="class-Object" class="class">
91
+ class Object
92
+ </h1>
93
+
94
+ <section class="description">
95
+
96
+ </section>
97
+
98
+
99
+
100
+
101
+ <section id="5Buntitled-5D" class="documentation-section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ </section>
112
+ </main>
113
+
114
+
115
+ <footer id="validator-badges" role="contentinfo">
116
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
117
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
118
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
119
+ </footer>
120
+