doing 2.1.0pre → 2.1.4pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +13 -9
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +42 -10
  6. data/Gemfile.lock +23 -1
  7. data/README.md +1 -1
  8. data/Rakefile +2 -0
  9. data/bin/doing +421 -156
  10. data/doc/Array.html +1 -1
  11. data/doc/Doing/Color.html +1 -1
  12. data/doc/Doing/Completion.html +1 -1
  13. data/doc/Doing/Configuration.html +81 -90
  14. data/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  15. data/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  16. data/doc/Doing/Errors/DoingStandardError.html +1 -1
  17. data/doc/Doing/Errors/EmptyInput.html +1 -1
  18. data/doc/Doing/Errors/NoResults.html +1 -1
  19. data/doc/Doing/Errors/PluginException.html +1 -1
  20. data/doc/Doing/Errors/UserCancelled.html +1 -1
  21. data/doc/Doing/Errors/WrongCommand.html +1 -1
  22. data/doc/Doing/Errors.html +1 -1
  23. data/doc/Doing/Hooks.html +1 -1
  24. data/doc/Doing/Item.html +84 -20
  25. data/doc/Doing/Items.html +35 -1
  26. data/doc/Doing/LogAdapter.html +1 -1
  27. data/doc/Doing/Note.html +1 -1
  28. data/doc/Doing/Pager.html +1 -1
  29. data/doc/Doing/Plugins.html +1 -1
  30. data/doc/Doing/Prompt.html +70 -18
  31. data/doc/Doing/Section.html +1 -1
  32. data/doc/Doing/Util.html +16 -4
  33. data/doc/Doing/WWID.html +27 -147
  34. data/doc/Doing.html +3 -3
  35. data/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  36. data/doc/GLI/Commands.html +1 -1
  37. data/doc/GLI.html +1 -1
  38. data/doc/Hash.html +1 -1
  39. data/doc/Status.html +1 -1
  40. data/doc/String.html +344 -4
  41. data/doc/Symbol.html +1 -1
  42. data/doc/Time.html +70 -2
  43. data/doc/_index.html +125 -4
  44. data/doc/class_list.html +1 -1
  45. data/doc/file.README.html +2 -2
  46. data/doc/index.html +2 -2
  47. data/doc/method_list.html +537 -193
  48. data/doc/top-level-namespace.html +2 -2
  49. data/doing.gemspec +2 -0
  50. data/doing.rdoc +276 -75
  51. data/lib/completion/doing.bash +20 -20
  52. data/lib/doing/boolean_term_parser.rb +86 -0
  53. data/lib/doing/configuration.rb +36 -19
  54. data/lib/doing/item.rb +102 -9
  55. data/lib/doing/items.rb +6 -0
  56. data/lib/doing/phrase_parser.rb +124 -0
  57. data/lib/doing/plugins/export/template_export.rb +29 -2
  58. data/lib/doing/prompt.rb +21 -11
  59. data/lib/doing/string.rb +47 -3
  60. data/lib/doing/string_chronify.rb +85 -0
  61. data/lib/doing/time.rb +32 -0
  62. data/lib/doing/util.rb +2 -5
  63. data/lib/doing/util_backup.rb +235 -0
  64. data/lib/doing/version.rb +1 -1
  65. data/lib/doing/wwid.rb +224 -124
  66. data/lib/doing.rb +7 -0
  67. metadata +46 -2
data/doc/String.html CHANGED
@@ -99,14 +99,16 @@
99
99
 
100
100
  <dl>
101
101
  <dt>Defined in:</dt>
102
- <dd>lib/doing/string.rb</dd>
102
+ <dd>lib/doing/string.rb<span class="defines">,<br />
103
+ lib/doing/string_chronify.rb</span>
104
+ </dd>
103
105
  </dl>
104
106
 
105
107
  </div>
106
108
 
107
109
  <h2>Overview</h2><div class="docstring">
108
110
  <div class="discussion">
109
- <p>String helpers</p>
111
+ <p>Chronify methods for strings</p>
110
112
 
111
113
 
112
114
  </div>
@@ -138,6 +140,28 @@
138
140
  <li class="public ">
139
141
  <span class="summary_signature">
140
142
 
143
+ <a href="#add_at-instance_method" title="#add_at (instance method)">#<strong>add_at</strong> &#x21d2; Object </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="summary_desc"><div class='inline'></div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
141
165
  <a href="#add_tags-instance_method" title="#add_tags (instance method)">#<strong>add_tags</strong>(tags, remove: false) &#x21d2; Object </a>
142
166
 
143
167
 
@@ -199,6 +223,52 @@
199
223
  <span class="summary_desc"><div class='inline'><p>Capitalize on the first character on string.</p>
200
224
  </div></span>
201
225
 
226
+ </li>
227
+
228
+
229
+ <li class="public ">
230
+ <span class="summary_signature">
231
+
232
+ <a href="#chronify-instance_method" title="#chronify (instance method)">#<strong>chronify</strong>(**options) &#x21d2; DateTime </a>
233
+
234
+
235
+
236
+ </span>
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <span class="summary_desc"><div class='inline'><p>Converts input string into a Time object when input takes on the following formats: - interval format e.g.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#chronify_qty-instance_method" title="#chronify_qty (instance method)">#<strong>chronify_qty</strong> &#x21d2; Integer </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <span class="summary_desc"><div class='inline'><p>Converts simple strings into seconds that can be added to a Time object.</p>
270
+ </div></span>
271
+
202
272
  </li>
203
273
 
204
274
 
@@ -648,6 +718,28 @@
648
718
 
649
719
 
650
720
 
721
+ <span class="summary_desc"><div class='inline'></div></span>
722
+
723
+ </li>
724
+
725
+
726
+ <li class="public ">
727
+ <span class="summary_signature">
728
+
729
+ <a href="#pluralize-instance_method" title="#pluralize (instance method)">#<strong>pluralize</strong>(number) &#x21d2; Object </a>
730
+
731
+
732
+
733
+ </span>
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
651
743
  <span class="summary_desc"><div class='inline'></div></span>
652
744
 
653
745
  </li>
@@ -716,6 +808,28 @@
716
808
 
717
809
 
718
810
 
811
+ <span class="summary_desc"><div class='inline'></div></span>
812
+
813
+ </li>
814
+
815
+
816
+ <li class="public ">
817
+ <span class="summary_signature">
818
+
819
+ <a href="#simple_wrap-instance_method" title="#simple_wrap (instance method)">#<strong>simple_wrap</strong>(width) &#x21d2; Object </a>
820
+
821
+
822
+
823
+ </span>
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
719
833
  <span class="summary_desc"><div class='inline'></div></span>
720
834
 
721
835
  </li>
@@ -965,6 +1079,28 @@
965
1079
 
966
1080
 
967
1081
 
1082
+ <span class="summary_desc"><div class='inline'></div></span>
1083
+
1084
+ </li>
1085
+
1086
+
1087
+ <li class="public ">
1088
+ <span class="summary_signature">
1089
+
1090
+ <a href="#wildcard_to_rx-instance_method" title="#wildcard_to_rx (instance method)">#<strong>wildcard_to_rx</strong> &#x21d2; Object </a>
1091
+
1092
+
1093
+
1094
+ </span>
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
968
1104
  <span class="summary_desc"><div class='inline'></div></span>
969
1105
 
970
1106
  </li>
@@ -1014,7 +1150,19 @@
1014
1150
 
1015
1151
 
1016
1152
  <div class="method_details first">
1017
- <h3 class="signature first" id="add_tags-instance_method">
1153
+ <h3 class="signature first" id="add_at-instance_method">
1154
+
1155
+ #<strong>add_at</strong> &#x21d2; <tt>Object</tt>
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+ </h3>
1162
+ </div>
1163
+
1164
+ <div class="method_details ">
1165
+ <h3 class="signature " id="add_tags-instance_method">
1018
1166
 
1019
1167
  #<strong>add_tags</strong>(tags, remove: false) &#x21d2; <tt>Object</tt>
1020
1168
 
@@ -1073,6 +1221,162 @@
1073
1221
 
1074
1222
  </ul>
1075
1223
 
1224
+ </div>
1225
+ </div>
1226
+
1227
+ <div class="method_details ">
1228
+ <h3 class="signature " id="chronify-instance_method">
1229
+
1230
+ #<strong>chronify</strong>(**options) &#x21d2; <tt>DateTime</tt>
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ </h3><div class="docstring">
1237
+ <div class="discussion">
1238
+ <p>Converts input string into a Time object when input
1239
+ takes on the following formats:
1240
+ - interval format e.g. &#39;1d2h30m&#39;, &#39;45m&#39;
1241
+ etc.
1242
+ - a semantic phrase e.g. &#39;yesterday
1243
+ 5:30pm&#39;
1244
+ - a strftime e.g. &#39;2016-03-15 15:32:04
1245
+ PDT&#39;</p>
1246
+
1247
+
1248
+ </div>
1249
+ </div>
1250
+ <div class="tags">
1251
+ <p class="tag_title">Parameters:</p>
1252
+ <ul class="param">
1253
+
1254
+ <li>
1255
+
1256
+ <span class='name'>options</span>
1257
+
1258
+
1259
+ <span class='type'></span>
1260
+
1261
+
1262
+
1263
+ &mdash;
1264
+ <div class='inline'><p>Additional options</p>
1265
+ </div>
1266
+
1267
+ </li>
1268
+
1269
+ </ul>
1270
+
1271
+
1272
+
1273
+
1274
+ <p class="tag_title">Options Hash (<tt>**options</tt>):</p>
1275
+ <ul class="option">
1276
+
1277
+ <li>
1278
+ <span class="name">:future</span>
1279
+ <span class="type">(<tt>Boolean</tt>)</span>
1280
+ <span class="default">
1281
+
1282
+ </span>
1283
+
1284
+ &mdash; <div class='inline'><p>assume future date
1285
+ (default: false)</p>
1286
+ </div>
1287
+
1288
+ </li>
1289
+
1290
+ <li>
1291
+ <span class="name">:guess</span>
1292
+ <span class="type">(<tt><span class='object_link'><a href="Symbol.html" title="Symbol (class)">Symbol</a></span></tt>)</span>
1293
+ <span class="default">
1294
+
1295
+ </span>
1296
+
1297
+ &mdash; <div class='inline'><p>:begin or :end to
1298
+ assume beginning or end of
1299
+ arbitrary time range</p>
1300
+ </div>
1301
+
1302
+ </li>
1303
+
1304
+ </ul>
1305
+
1306
+
1307
+ <p class="tag_title">Returns:</p>
1308
+ <ul class="return">
1309
+
1310
+ <li>
1311
+
1312
+
1313
+ <span class='type'>(<tt>DateTime</tt>)</span>
1314
+
1315
+
1316
+
1317
+ &mdash;
1318
+ <div class='inline'><p>result</p>
1319
+ </div>
1320
+
1321
+ </li>
1322
+
1323
+ </ul>
1324
+ <p class="tag_title">Raises:</p>
1325
+ <ul class="raise">
1326
+
1327
+ <li>
1328
+
1329
+
1330
+ <span class='type'>(<tt>InvalidTimeExpression</tt>)</span>
1331
+
1332
+
1333
+
1334
+ </li>
1335
+
1336
+ </ul>
1337
+
1338
+ </div>
1339
+ </div>
1340
+
1341
+ <div class="method_details ">
1342
+ <h3 class="signature " id="chronify_qty-instance_method">
1343
+
1344
+ #<strong>chronify_qty</strong> &#x21d2; <tt>Integer</tt>
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+ </h3><div class="docstring">
1351
+ <div class="discussion">
1352
+ <p>Converts simple strings into seconds that can be
1353
+ added to a Time object</p>
1354
+
1355
+ <p>Input string can be HH:MM or XX[dhm]<a href="1d2h30m,%2045m,%201.5d,%201h20m,%20etc.">[XXhm][XXm]</a></p>
1356
+
1357
+
1358
+ </div>
1359
+ </div>
1360
+ <div class="tags">
1361
+
1362
+ <p class="tag_title">Returns:</p>
1363
+ <ul class="return">
1364
+
1365
+ <li>
1366
+
1367
+
1368
+ <span class='type'>(<tt>Integer</tt>)</span>
1369
+
1370
+
1371
+
1372
+ &mdash;
1373
+ <div class='inline'><p>seconds</p>
1374
+ </div>
1375
+
1376
+ </li>
1377
+
1378
+ </ul>
1379
+
1076
1380
  </div>
1077
1381
  </div>
1078
1382
 
@@ -1636,6 +1940,18 @@ may not render the same style.</p>
1636
1940
 
1637
1941
 
1638
1942
 
1943
+ </h3>
1944
+ </div>
1945
+
1946
+ <div class="method_details ">
1947
+ <h3 class="signature " id="pluralize-instance_method">
1948
+
1949
+ #<strong>pluralize</strong>(number) &#x21d2; <tt>Object</tt>
1950
+
1951
+
1952
+
1953
+
1954
+
1639
1955
  </h3>
1640
1956
  </div>
1641
1957
 
@@ -1692,6 +2008,18 @@ may not render the same style.</p>
1692
2008
 
1693
2009
 
1694
2010
 
2011
+ </h3>
2012
+ </div>
2013
+
2014
+ <div class="method_details ">
2015
+ <h3 class="signature " id="simple_wrap-instance_method">
2016
+
2017
+ #<strong>simple_wrap</strong>(width) &#x21d2; <tt>Object</tt>
2018
+
2019
+
2020
+
2021
+
2022
+
1695
2023
  </h3>
1696
2024
  </div>
1697
2025
 
@@ -2197,6 +2525,18 @@ between characters</p>
2197
2525
 
2198
2526
 
2199
2527
 
2528
+ </h3>
2529
+ </div>
2530
+
2531
+ <div class="method_details ">
2532
+ <h3 class="signature " id="wildcard_to_rx-instance_method">
2533
+
2534
+ #<strong>wildcard_to_rx</strong> &#x21d2; <tt>Object</tt>
2535
+
2536
+
2537
+
2538
+
2539
+
2200
2540
  </h3>
2201
2541
  </div>
2202
2542
 
@@ -2280,7 +2620,7 @@ between characters</p>
2280
2620
  </div>
2281
2621
 
2282
2622
  <div id="footer">
2283
- Generated on Sat Nov 27 10:06:03 2021 by
2623
+ Generated on Fri Dec 17 16:17:19 2021 by
2284
2624
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2285
2625
  0.9.26 (ruby-3.0.1).
2286
2626
  </div>
data/doc/Symbol.html CHANGED
@@ -240,7 +240,7 @@
240
240
  </div>
241
241
 
242
242
  <div id="footer">
243
- Generated on Sat Nov 27 10:06:03 2021 by
243
+ Generated on Fri Dec 17 16:17:19 2021 by
244
244
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
245
245
  0.9.26 (ruby-3.0.1).
246
246
  </div>
data/doc/Time.html CHANGED
@@ -127,6 +127,28 @@
127
127
  <li class="public ">
128
128
  <span class="summary_signature">
129
129
 
130
+ <a href="#humanize-instance_method" title="#humanize (instance method)">#<strong>humanize</strong>(seconds) &#x21d2; Object </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
130
152
  <a href="#relative_date-instance_method" title="#relative_date (instance method)">#<strong>relative_date</strong> &#x21d2; Object </a>
131
153
 
132
154
 
@@ -141,6 +163,28 @@
141
163
 
142
164
 
143
165
 
166
+ <span class="summary_desc"><div class='inline'></div></span>
167
+
168
+ </li>
169
+
170
+
171
+ <li class="public ">
172
+ <span class="summary_signature">
173
+
174
+ <a href="#time_ago-instance_method" title="#time_ago (instance method)">#<strong>time_ago</strong> &#x21d2; Object </a>
175
+
176
+
177
+
178
+ </span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
144
188
  <span class="summary_desc"><div class='inline'></div></span>
145
189
 
146
190
  </li>
@@ -156,7 +200,19 @@
156
200
 
157
201
 
158
202
  <div class="method_details first">
159
- <h3 class="signature first" id="relative_date-instance_method">
203
+ <h3 class="signature first" id="humanize-instance_method">
204
+
205
+ #<strong>humanize</strong>(seconds) &#x21d2; <tt>Object</tt>
206
+
207
+
208
+
209
+
210
+
211
+ </h3>
212
+ </div>
213
+
214
+ <div class="method_details ">
215
+ <h3 class="signature " id="relative_date-instance_method">
160
216
 
161
217
  #<strong>relative_date</strong> &#x21d2; <tt>Object</tt>
162
218
 
@@ -164,6 +220,18 @@
164
220
 
165
221
 
166
222
 
223
+ </h3>
224
+ </div>
225
+
226
+ <div class="method_details ">
227
+ <h3 class="signature " id="time_ago-instance_method">
228
+
229
+ #<strong>time_ago</strong> &#x21d2; <tt>Object</tt>
230
+
231
+
232
+
233
+
234
+
167
235
  </h3>
168
236
  </div>
169
237
 
@@ -172,7 +240,7 @@
172
240
  </div>
173
241
 
174
242
  <div id="footer">
175
- Generated on Sat Nov 27 10:06:03 2021 by
243
+ Generated on Fri Dec 17 16:17:18 2021 by
176
244
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
177
245
  0.9.26 (ruby-3.0.1).
178
246
  </div>