bovem 3.0.5 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -3
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +4 -5
  5. data/.travis.yml +8 -6
  6. data/CHANGELOG.md +12 -0
  7. data/Gemfile +9 -8
  8. data/README.md +1 -1
  9. data/Rakefile +22 -6
  10. data/bovem.gemspec +5 -5
  11. data/doc/Bovem.html +10 -10
  12. data/doc/Bovem/Application.html +670 -318
  13. data/doc/Bovem/Command.html +1447 -1125
  14. data/doc/Bovem/CommandMethods.html +4 -4
  15. data/doc/Bovem/CommandMethods/Children.html +173 -179
  16. data/doc/Bovem/CommandMethods/Help.html +9 -9
  17. data/doc/Bovem/Configuration.html +239 -24
  18. data/doc/Bovem/Console.html +267 -128
  19. data/doc/Bovem/ConsoleMethods.html +4 -4
  20. data/doc/Bovem/ConsoleMethods/Interactions.html +57 -70
  21. data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +9 -9
  22. data/doc/Bovem/ConsoleMethods/Logging.html +258 -298
  23. data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +8 -8
  24. data/doc/Bovem/ConsoleMethods/Output.html +96 -118
  25. data/doc/Bovem/ConsoleMethods/StyleHandling.html +8 -8
  26. data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +26 -39
  27. data/doc/Bovem/Errors.html +4 -4
  28. data/doc/Bovem/Errors/Error.html +4 -4
  29. data/doc/Bovem/Errors/InvalidConfiguration.html +4 -4
  30. data/doc/Bovem/Errors/InvalidLogger.html +4 -4
  31. data/doc/Bovem/I18n.html +175 -0
  32. data/doc/Bovem/Logger.html +95 -83
  33. data/doc/Bovem/Option.html +669 -862
  34. data/doc/Bovem/Parser.html +10 -10
  35. data/doc/Bovem/ParserMethods.html +4 -4
  36. data/doc/Bovem/ParserMethods/General.html +4 -4
  37. data/doc/Bovem/ParserMethods/General/ClassMethods.html +26 -38
  38. data/doc/Bovem/Shell.html +169 -48
  39. data/doc/Bovem/ShellMethods.html +4 -4
  40. data/doc/Bovem/ShellMethods/Directories.html +46 -62
  41. data/doc/Bovem/ShellMethods/Execute.html +51 -99
  42. data/doc/Bovem/ShellMethods/General.html +4 -445
  43. data/doc/Bovem/ShellMethods/Read.html +56 -61
  44. data/doc/Bovem/ShellMethods/Write.html +22 -242
  45. data/doc/Bovem/Version.html +6 -6
  46. data/doc/_index.html +18 -18
  47. data/doc/class_list.html +6 -2
  48. data/doc/css/style.css +1 -0
  49. data/doc/file.README.html +5 -5
  50. data/doc/file_list.html +5 -1
  51. data/doc/frames.html +1 -1
  52. data/doc/index.html +5 -5
  53. data/doc/js/full_list.js +4 -1
  54. data/doc/method_list.html +161 -157
  55. data/doc/top-level-namespace.html +4 -4
  56. data/lib/bovem.rb +3 -4
  57. data/lib/bovem/application.rb +47 -39
  58. data/lib/bovem/command.rb +175 -193
  59. data/lib/bovem/configuration.rb +28 -29
  60. data/lib/bovem/console.rb +244 -171
  61. data/lib/bovem/errors.rb +1 -1
  62. data/lib/bovem/i18n.rb +18 -0
  63. data/lib/bovem/logger.rb +26 -26
  64. data/lib/bovem/option.rb +49 -58
  65. data/lib/bovem/parser.rb +174 -222
  66. data/lib/bovem/shell.rb +272 -320
  67. data/lib/bovem/version.rb +2 -2
  68. data/locales/en.yml +39 -38
  69. data/locales/it.yml +39 -38
  70. data/spec/bovem/application_spec.rb +6 -5
  71. data/spec/bovem/command_spec.rb +23 -23
  72. data/spec/bovem/console_spec.rb +101 -102
  73. data/spec/bovem/i18n_spec.rb +21 -0
  74. data/spec/bovem/logger_spec.rb +4 -4
  75. data/spec/bovem/option_spec.rb +43 -43
  76. data/spec/bovem/parser_spec.rb +13 -13
  77. data/spec/bovem/shell_spec.rb +106 -115
  78. data/spec/spec_helper.rb +19 -6
  79. metadata +14 -13
  80. data/doc/Bovem/Localizer.html +0 -376
  81. data/lib/bovem/localizer.rb +0 -27
  82. data/spec/coverage_helper.rb +0 -20
@@ -4,12 +4,25 @@
4
4
  # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
5
  #
6
6
 
7
- require "rubygems"
8
7
  require "bundler/setup"
9
- require "bovem"
10
8
 
11
- RSpec.configure do |config|
12
- config.expect_with :rspec do |c|
13
- c.syntax = :expect
9
+ if ENV["COVERAGE"]
10
+ require "simplecov"
11
+ require "coveralls"
12
+
13
+ Coveralls.wear! if ENV["CI"]
14
+
15
+ SimpleCov.start do
16
+ root = Pathname.new(File.dirname(__FILE__)) + ".."
17
+
18
+ add_filter do |src_file|
19
+ path = Pathname.new(src_file.filename).relative_path_from(root).to_s
20
+ path !~ /^lib/
21
+ end
14
22
  end
15
- end
23
+ end
24
+
25
+ require "i18n"
26
+ ::I18n.enforce_available_locales = false
27
+ require File.dirname(__FILE__) + "/../lib/bovem"
28
+ Lazier::I18n.default_locale = :en
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bovem
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-08 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lazier
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.1
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.5.1
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: open4
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.3
33
+ version: '1.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.3
40
+ version: '1.3'
41
41
  description: A command line manager and a collection of utilities for developers.
42
42
  email:
43
43
  - shogun@cowtech.it
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
+ - ".rubocop.yml"
49
50
  - ".travis-gemfile"
50
51
  - ".travis.yml"
51
52
  - ".yardopts"
@@ -74,7 +75,7 @@ files:
74
75
  - doc/Bovem/Errors/Error.html
75
76
  - doc/Bovem/Errors/InvalidConfiguration.html
76
77
  - doc/Bovem/Errors/InvalidLogger.html
77
- - doc/Bovem/Localizer.html
78
+ - doc/Bovem/I18n.html
78
79
  - doc/Bovem/Logger.html
79
80
  - doc/Bovem/Option.html
80
81
  - doc/Bovem/Parser.html
@@ -109,7 +110,7 @@ files:
109
110
  - lib/bovem/configuration.rb
110
111
  - lib/bovem/console.rb
111
112
  - lib/bovem/errors.rb
112
- - lib/bovem/localizer.rb
113
+ - lib/bovem/i18n.rb
113
114
  - lib/bovem/logger.rb
114
115
  - lib/bovem/option.rb
115
116
  - lib/bovem/parser.rb
@@ -122,13 +123,13 @@ files:
122
123
  - spec/bovem/configuration_spec.rb
123
124
  - spec/bovem/console_spec.rb
124
125
  - spec/bovem/errors_spec.rb
126
+ - spec/bovem/i18n_spec.rb
125
127
  - spec/bovem/logger_spec.rb
126
128
  - spec/bovem/option_spec.rb
127
129
  - spec/bovem/parser_spec.rb
128
130
  - spec/bovem/shell_spec.rb
129
- - spec/coverage_helper.rb
130
131
  - spec/spec_helper.rb
131
- homepage: http://sw.cow.tc/bovem
132
+ homepage: http://sw.cowtech.it/bovem
132
133
  licenses:
133
134
  - MIT
134
135
  metadata: {}
@@ -140,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
142
  - - ">="
142
143
  - !ruby/object:Gem::Version
143
- version: 1.9.3
144
+ version: 2.3.0
144
145
  required_rubygems_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
147
  - - ">="
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  version: '0'
149
150
  requirements: []
150
151
  rubyforge_project: bovem
151
- rubygems_version: 2.2.2
152
+ rubygems_version: 2.5.1
152
153
  signing_key:
153
154
  specification_version: 4
154
155
  summary: A command line manager and a collection of utilities for developers.
@@ -158,10 +159,10 @@ test_files:
158
159
  - spec/bovem/configuration_spec.rb
159
160
  - spec/bovem/console_spec.rb
160
161
  - spec/bovem/errors_spec.rb
162
+ - spec/bovem/i18n_spec.rb
161
163
  - spec/bovem/logger_spec.rb
162
164
  - spec/bovem/option_spec.rb
163
165
  - spec/bovem/parser_spec.rb
164
166
  - spec/bovem/shell_spec.rb
165
- - spec/coverage_helper.rb
166
167
  - spec/spec_helper.rb
167
168
  has_rdoc:
@@ -1,376 +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
- Class: Bovem::Localizer
8
-
9
- &mdash; Documentation by YARD 0.8.7.3
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 (L)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span></span>
36
- &raquo;
37
- <span class="title">Localizer</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: Bovem::Localizer
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">Lazier::Localizer</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Lazier::Localizer</li>
82
-
83
- <li class="next">Bovem::Localizer</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
- <dt class="r2 last">Defined in:</dt>
99
- <dd class="r2 last">lib/bovem/localizer.rb</dd>
100
-
101
- </dl>
102
- <div class="clear"></div>
103
-
104
- <h2>Overview</h2><div class="docstring">
105
- <div class="discussion">
106
- <p>This class is used to localize strings inside classes methods.</p>
107
-
108
-
109
- </div>
110
- </div>
111
- <div class="tags">
112
-
113
-
114
- </div>
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
- <h2>
123
- Class Method Summary
124
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
125
- </h2>
126
-
127
- <ul class="summary">
128
-
129
- <li class="public ">
130
- <span class="summary_signature">
131
-
132
- <a href="#localize_on_locale-class_method" title="localize_on_locale (class method)">+ (String|R18n::Untranslated) <strong>localize_on_locale</strong>(locale, message, *args) </a>
133
-
134
-
135
-
136
- </span>
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
- <span class="summary_desc"><div class='inline'><p>Localize a message in a specified locale.</p>
147
- </div></span>
148
-
149
- </li>
150
-
151
-
152
- </ul>
153
-
154
- <h2>
155
- Instance Method Summary
156
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
157
- </h2>
158
-
159
- <ul class="summary">
160
-
161
- <li class="public ">
162
- <span class="summary_signature">
163
-
164
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Localizer) <strong>initialize</strong>(locale) </a>
165
-
166
-
167
-
168
- </span>
169
-
170
-
171
- <span class="note title constructor">constructor</span>
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
- <span class="summary_desc"><div class='inline'><p>Initialize a new localizer.</p>
181
- </div></span>
182
-
183
- </li>
184
-
185
-
186
- </ul>
187
-
188
-
189
-
190
- <div id="constructor_details" class="method_details_list">
191
- <h2>Constructor Details</h2>
192
-
193
- <div class="method_details first">
194
- <h3 class="signature first" id="initialize-instance_method">
195
-
196
- - (<tt><span class='object_link'><a href="" title="Bovem::Localizer (class)">Localizer</a></span></tt>) <strong>initialize</strong>(locale)
197
-
198
-
199
-
200
-
201
-
202
- </h3><div class="docstring">
203
- <div class="discussion">
204
- <p>Initialize a new localizer.</p>
205
-
206
-
207
- </div>
208
- </div>
209
- <div class="tags">
210
- <p class="tag_title">Parameters:</p>
211
- <ul class="param">
212
-
213
- <li>
214
-
215
- <span class='name'>locale</span>
216
-
217
-
218
- <span class='type'>(<tt>String|Symbol</tt>)</span>
219
-
220
-
221
-
222
- &mdash;
223
- <div class='inline'><p>The locale to use for localization.</p>
224
- </div>
225
-
226
- </li>
227
-
228
- </ul>
229
-
230
-
231
- </div><table class="source_code">
232
- <tr>
233
- <td>
234
- <pre class="lines">
235
-
236
-
237
- 13
238
- 14
239
- 15</pre>
240
- </td>
241
- <td>
242
- <pre class="code"><span class="info file"># File 'lib/bovem/localizer.rb', line 13</span>
243
-
244
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
245
- <span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bovem.application</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
246
- <span class='kw'>end</span></pre>
247
- </td>
248
- </tr>
249
- </table>
250
- </div>
251
-
252
- </div>
253
-
254
-
255
- <div id="class_method_details" class="method_details_list">
256
- <h2>Class Method Details</h2>
257
-
258
-
259
- <div class="method_details first">
260
- <h3 class="signature first" id="localize_on_locale-class_method">
261
-
262
- + (<tt>String|R18n::Untranslated</tt>) <strong>localize_on_locale</strong>(locale, message, *args)
263
-
264
-
265
-
266
-
267
-
268
- </h3><div class="docstring">
269
- <div class="discussion">
270
- <p>Localize a message in a specified locale.</p>
271
-
272
-
273
- </div>
274
- </div>
275
- <div class="tags">
276
- <p class="tag_title">Parameters:</p>
277
- <ul class="param">
278
-
279
- <li>
280
-
281
- <span class='name'>locale</span>
282
-
283
-
284
- <span class='type'>(<tt>String|Symbol</tt>)</span>
285
-
286
-
287
-
288
- &mdash;
289
- <div class='inline'><p>The locale to use for localization.</p>
290
- </div>
291
-
292
- </li>
293
-
294
- <li>
295
-
296
- <span class='name'>message</span>
297
-
298
-
299
- <span class='type'>(<tt>String|Symbol</tt>)</span>
300
-
301
-
302
-
303
- &mdash;
304
- <div class='inline'><p>The message to localize.</p>
305
- </div>
306
-
307
- </li>
308
-
309
- <li>
310
-
311
- <span class='name'>args</span>
312
-
313
-
314
- <span class='type'>(<tt>Array</tt>)</span>
315
-
316
-
317
-
318
- &mdash;
319
- <div class='inline'><p>Optional arguments to localize the message.</p>
320
- </div>
321
-
322
- </li>
323
-
324
- </ul>
325
-
326
- <p class="tag_title">Returns:</p>
327
- <ul class="return">
328
-
329
- <li>
330
-
331
-
332
- <span class='type'>(<tt>String|R18n::Untranslated</tt>)</span>
333
-
334
-
335
-
336
- &mdash;
337
- <div class='inline'><p>The localized message.</p>
338
- </div>
339
-
340
- </li>
341
-
342
- </ul>
343
-
344
- </div><table class="source_code">
345
- <tr>
346
- <td>
347
- <pre class="lines">
348
-
349
-
350
- 23
351
- 24
352
- 25</pre>
353
- </td>
354
- <td>
355
- <pre class="code"><span class="info file"># File 'lib/bovem/localizer.rb', line 23</span>
356
-
357
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize_on_locale'>localize_on_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
358
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
359
- <span class='kw'>end</span></pre>
360
- </td>
361
- </tr>
362
- </table>
363
- </div>
364
-
365
- </div>
366
-
367
- </div>
368
-
369
- <div id="footer">
370
- Generated on Sat Mar 8 10:27:44 2014 by
371
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
372
- 0.8.7.3 (ruby-2.1.0).
373
- </div>
374
-
375
- </body>
376
- </html>