mamertes 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +15 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +6 -0
  4. data/.travis-gemfile +15 -0
  5. data/.travis.yml +10 -0
  6. data/.yardopts +1 -0
  7. data/Gemfile +21 -0
  8. data/README.md +126 -0
  9. data/Rakefile +29 -0
  10. data/doc/Mamertes.html +155 -0
  11. data/doc/Mamertes/Application.html +3057 -0
  12. data/doc/Mamertes/Command.html +7031 -0
  13. data/doc/Mamertes/CommandMethods.html +125 -0
  14. data/doc/Mamertes/CommandMethods/Children.html +1286 -0
  15. data/doc/Mamertes/CommandMethods/Help.html +209 -0
  16. data/doc/Mamertes/Error.html +631 -0
  17. data/doc/Mamertes/Localizer.html +376 -0
  18. data/doc/Mamertes/Option.html +6671 -0
  19. data/doc/Mamertes/Parser.html +276 -0
  20. data/doc/Mamertes/ParserMethods.html +125 -0
  21. data/doc/Mamertes/ParserMethods/General.html +134 -0
  22. data/doc/Mamertes/ParserMethods/General/ClassMethods.html +574 -0
  23. data/doc/Mamertes/Version.html +189 -0
  24. data/doc/_index.html +276 -0
  25. data/doc/class_list.html +54 -0
  26. data/doc/css/common.css +1 -0
  27. data/doc/css/full_list.css +57 -0
  28. data/doc/css/style.css +338 -0
  29. data/doc/file.README.html +198 -0
  30. data/doc/file_list.html +56 -0
  31. data/doc/frames.html +28 -0
  32. data/doc/index.html +198 -0
  33. data/doc/js/app.js +214 -0
  34. data/doc/js/full_list.js +178 -0
  35. data/doc/js/jquery.js +4 -0
  36. data/doc/method_list.html +509 -0
  37. data/doc/top-level-namespace.html +112 -0
  38. data/lib/mamertes.rb +18 -0
  39. data/lib/mamertes/application.rb +206 -0
  40. data/lib/mamertes/command.rb +529 -0
  41. data/lib/mamertes/option.rb +236 -0
  42. data/lib/mamertes/parser.rb +317 -0
  43. data/lib/mamertes/version.rb +24 -0
  44. data/locales/en.yml +40 -0
  45. data/locales/it.yml +40 -0
  46. data/mamertes.gemspec +30 -0
  47. data/spec/coverage_helper.rb +20 -0
  48. data/spec/mamertes/application_spec.rb +181 -0
  49. data/spec/mamertes/command_spec.rb +526 -0
  50. data/spec/mamertes/option_spec.rb +274 -0
  51. data/spec/mamertes/parser_spec.rb +126 -0
  52. data/spec/spec_helper.rb +15 -0
  53. metadata +115 -0
@@ -0,0 +1,276 @@
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
+ Class: Mamertes::Parser
8
+
9
+ &mdash; Documentation by YARD 0.8.6.2
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#!" + escape(window.location.href);
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 (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Mamertes.html" title="Mamertes (module)">Mamertes</a></span></span>
36
+ &raquo;
37
+ <span class="title">Parser</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>Class: Mamertes::Parser
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Mamertes::Parser</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2"><span class='object_link'><a href="ParserMethods/General.html" title="Mamertes::ParserMethods::General (module)">Mamertes::ParserMethods::General</a></span></dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/mamertes/parser.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+ <p>The parser for the command line.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <h2>
125
+ Instance Method Summary
126
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
127
+ </h2>
128
+
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#parse-instance_method" title="#parse (instance method)">- (Hash|NilClass) <strong>parse</strong>(command, args) </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'><p>Parses a command/application.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ </ul>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <div id="instance_method_details" class="method_details_list">
167
+ <h2>Instance Method Details</h2>
168
+
169
+
170
+ <div class="method_details first">
171
+ <h3 class="signature first" id="parse-instance_method">
172
+
173
+ - (<tt>Hash|NilClass</tt>) <strong>parse</strong>(command, args)
174
+
175
+
176
+
177
+
178
+
179
+ </h3><div class="docstring">
180
+ <div class="discussion">
181
+ <p>Parses a command/application.</p>
182
+
183
+
184
+ </div>
185
+ </div>
186
+ <div class="tags">
187
+ <p class="tag_title">Parameters:</p>
188
+ <ul class="param">
189
+
190
+ <li>
191
+
192
+ <span class='name'>command</span>
193
+
194
+
195
+ <span class='type'>(<tt><span class='object_link'><a href="Command.html" title="Mamertes::Command (class)">Command</a></span></tt>)</span>
196
+
197
+
198
+
199
+ &mdash;
200
+ <div class='inline'><p>The command or application to parse.</p>
201
+ </div>
202
+
203
+ </li>
204
+
205
+ <li>
206
+
207
+ <span class='name'>args</span>
208
+
209
+
210
+ <span class='type'>(<tt>Array</tt>)</span>
211
+
212
+
213
+
214
+ &mdash;
215
+ <div class='inline'><p>The arguments to parse.</p>
216
+ </div>
217
+
218
+ </li>
219
+
220
+ </ul>
221
+
222
+ <p class="tag_title">Returns:</p>
223
+ <ul class="return">
224
+
225
+ <li>
226
+
227
+
228
+ <span class='type'>(<tt>Hash|NilClass</tt>)</span>
229
+
230
+
231
+
232
+ &mdash;
233
+ <div class='inline'><p>An hash with <code>name</code> (of a subcommand to execute) and <code>args</code> keys if a valid subcommand is found, <code>nil</code> otherwise.</p>
234
+ </div>
235
+
236
+ </li>
237
+
238
+ </ul>
239
+
240
+ </div><table class="source_code">
241
+ <tr>
242
+ <td>
243
+ <pre class="lines">
244
+
245
+
246
+ 101
247
+ 102
248
+ 103
249
+ 104
250
+ 105</pre>
251
+ </td>
252
+ <td>
253
+ <pre class="code"><span class="info file"># File 'lib/mamertes/parser.rb', line 101</span>
254
+
255
+ <span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
256
+ <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
257
+ <span class='id identifier rubyid_forms'>forms</span><span class='comma'>,</span> <span class='id identifier rubyid_parser'>parser</span> <span class='op'>=</span> <span class='id identifier rubyid_create_parser'>create_parser</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
258
+ <span class='id identifier rubyid_perform_parsing'>perform_parsing</span><span class='lparen'>(</span><span class='id identifier rubyid_parser'>parser</span><span class='comma'>,</span> <span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_forms'>forms</span><span class='rparen'>)</span>
259
+ <span class='kw'>end</span></pre>
260
+ </td>
261
+ </tr>
262
+ </table>
263
+ </div>
264
+
265
+ </div>
266
+
267
+ </div>
268
+
269
+ <div id="footer">
270
+ Generated on Sat Aug 10 16:23:09 2013 by
271
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
272
+ 0.8.6.2 (ruby-1.9.3).
273
+ </div>
274
+
275
+ </body>
276
+ </html>
@@ -0,0 +1,125 @@
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: Mamertes::ParserMethods
8
+
9
+ &mdash; Documentation by YARD 0.8.6.2
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#!" + escape(window.location.href);
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 (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Mamertes.html" title="Mamertes (module)">Mamertes</a></span></span>
36
+ &raquo;
37
+ <span class="title">ParserMethods</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: Mamertes::ParserMethods
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/mamertes/parser.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>Methods for the <span class='object_link'><a href="Parser.html" title="Mamertes::Parser (class)">Parser</a></span> class.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div><h2>Defined Under Namespace</h2>
98
+ <p class="children">
99
+
100
+
101
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="ParserMethods/General.html" title="Mamertes::ParserMethods::General (module)">General</a></span>
102
+
103
+
104
+
105
+
106
+ </p>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="footer">
119
+ Generated on Sat Aug 10 16:23:08 2013 by
120
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
+ 0.8.6.2 (ruby-1.9.3).
122
+ </div>
123
+
124
+ </body>
125
+ </html>
@@ -0,0 +1,134 @@
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: Mamertes::ParserMethods::General
8
+
9
+ &mdash; Documentation by YARD 0.8.6.2
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#!" + escape(window.location.href);
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 (G)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Mamertes.html" title="Mamertes (module)">Mamertes</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ParserMethods.html" title="Mamertes::ParserMethods (module)">ParserMethods</a></span></span>
36
+ &raquo;
37
+ <span class="title">General</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: Mamertes::ParserMethods::General
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dt class="r2">Included in:</dt>
85
+ <dd class="r2"><span class='object_link'><a href="../Parser.html" title="Mamertes::Parser (class)">Mamertes::Parser</a></span></dd>
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/mamertes/parser.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>General methods.</p>
98
+
99
+
100
+ </div>
101
+ </div>
102
+ <div class="tags">
103
+
104
+
105
+ </div><h2>Defined Under Namespace</h2>
106
+ <p class="children">
107
+
108
+
109
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="General/ClassMethods.html" title="Mamertes::ParserMethods::General::ClassMethods (module)">ClassMethods</a></span>
110
+
111
+
112
+
113
+
114
+ </p>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ </div>
126
+
127
+ <div id="footer">
128
+ Generated on Sat Aug 10 16:23:08 2013 by
129
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
+ 0.8.6.2 (ruby-1.9.3).
131
+ </div>
132
+
133
+ </body>
134
+ </html>