gloo 4.7.0 → 5.0.1
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.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/gloo.gemspec +22 -11
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +11 -0
- data/lib/gloo/app/engine.rb +3 -2
- data/lib/gloo/app/running_app.rb +13 -0
- data/lib/gloo/core/dictionary.rb +13 -2
- data/lib/gloo/objs/ctrl/each.rb +2 -2
- data/lib/gloo/{ext → plugin}/base.rb +1 -1
- data/lib/gloo/{ext → plugin}/callback.rb +2 -3
- data/lib/gloo/{ext/manager.rb → plugin/ext_manager.rb} +2 -2
- data/lib/gloo/plugin/lib_manager.rb +97 -0
- data/lib/gloo/verbs/exists.rb +74 -0
- data/lib/gloo/verbs/help.rb +28 -0
- data/lib/gloo/verbs/load.rb +8 -2
- data/lib/gloo/verbs/redirect.rb +2 -1
- metadata +38 -164
- data/lib/gloo/objs/cli/colorize.rb +0 -73
- data/lib/gloo/objs/cli/confirm.rb +0 -96
- data/lib/gloo/objs/cli/menu.rb +0 -370
- data/lib/gloo/objs/cli/menu_item.rb +0 -95
- data/lib/gloo/objs/cli/prompt.rb +0 -110
- data/lib/gloo/objs/cli/select.rb +0 -127
- data/lib/gloo/objs/ctrl/each_repo.rb +0 -84
- data/lib/gloo/objs/data/markdown.rb +0 -133
- data/lib/gloo/objs/data/markdown_ext.rb +0 -260
- data/lib/gloo/objs/data/mysql.rb +0 -254
- data/lib/gloo/objs/data/query.rb +0 -269
- data/lib/gloo/objs/data/query_result.rb +0 -158
- data/lib/gloo/objs/data/sqlite.rb +0 -174
- data/lib/gloo/objs/data/table.rb +0 -267
- data/lib/gloo/objs/dev/git.rb +0 -140
- data/lib/gloo/objs/dev/stats.rb +0 -123
- data/lib/gloo/objs/system/ssh_exec.rb +0 -126
- data/lib/gloo/objs/web_svr/element.rb +0 -254
- data/lib/gloo/objs/web_svr/field.rb +0 -429
- data/lib/gloo/objs/web_svr/form.rb +0 -271
- data/lib/gloo/objs/web_svr/page.rb +0 -562
- data/lib/gloo/objs/web_svr/partial.rb +0 -210
- data/lib/gloo/objs/web_svr/svr.rb +0 -713
- data/lib/gloo/utils/stats.rb +0 -206
- data/lib/gloo/web_svr/asset.rb +0 -407
- data/lib/gloo/web_svr/asset_info.rb +0 -116
- data/lib/gloo/web_svr/config.rb +0 -56
- data/lib/gloo/web_svr/embedded_renderer.rb +0 -154
- data/lib/gloo/web_svr/handler.rb +0 -154
- data/lib/gloo/web_svr/request.rb +0 -143
- data/lib/gloo/web_svr/request_params.rb +0 -181
- data/lib/gloo/web_svr/response.rb +0 -177
- data/lib/gloo/web_svr/response_code.rb +0 -69
- data/lib/gloo/web_svr/routing/resource_router.rb +0 -47
- data/lib/gloo/web_svr/routing/router.rb +0 -232
- data/lib/gloo/web_svr/routing/show_routes.rb +0 -94
- data/lib/gloo/web_svr/server.rb +0 -105
- data/lib/gloo/web_svr/session.rb +0 -215
- data/lib/gloo/web_svr/table_renderer.rb +0 -151
- data/lib/gloo/web_svr/web_method.rb +0 -54
- /data/lib/gloo/objs/{security → str_utils}/cipher.rb +0 -0
- /data/lib/gloo/objs/{security → str_utils}/csrf_token.rb +0 -0
- /data/lib/gloo/objs/{security → str_utils}/password.rb +0 -0
- /data/lib/gloo/objs/{ror → system}/erb.rb +0 -0
- /data/lib/gloo/objs/{ror → system}/eval.rb +0 -0
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gloo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Crane
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -118,68 +118,6 @@ dependencies:
|
|
|
118
118
|
- - ">="
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: 0.10.2
|
|
121
|
-
- !ruby/object:Gem::Dependency
|
|
122
|
-
name: colorize
|
|
123
|
-
requirement: !ruby/object:Gem::Requirement
|
|
124
|
-
requirements:
|
|
125
|
-
- - "~>"
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: 1.1.0
|
|
128
|
-
- - ">="
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: 1.1.0
|
|
131
|
-
type: :runtime
|
|
132
|
-
prerelease: false
|
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - "~>"
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: 1.1.0
|
|
138
|
-
- - ">="
|
|
139
|
-
- !ruby/object:Gem::Version
|
|
140
|
-
version: 1.1.0
|
|
141
|
-
- !ruby/object:Gem::Dependency
|
|
142
|
-
name: inquirer
|
|
143
|
-
requirement: !ruby/object:Gem::Requirement
|
|
144
|
-
requirements:
|
|
145
|
-
- - ">="
|
|
146
|
-
- !ruby/object:Gem::Version
|
|
147
|
-
version: '0'
|
|
148
|
-
type: :runtime
|
|
149
|
-
prerelease: false
|
|
150
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
151
|
-
requirements:
|
|
152
|
-
- - ">="
|
|
153
|
-
- !ruby/object:Gem::Version
|
|
154
|
-
version: '0'
|
|
155
|
-
- !ruby/object:Gem::Dependency
|
|
156
|
-
name: reline
|
|
157
|
-
requirement: !ruby/object:Gem::Requirement
|
|
158
|
-
requirements:
|
|
159
|
-
- - ">="
|
|
160
|
-
- !ruby/object:Gem::Version
|
|
161
|
-
version: '0'
|
|
162
|
-
type: :runtime
|
|
163
|
-
prerelease: false
|
|
164
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
165
|
-
requirements:
|
|
166
|
-
- - ">="
|
|
167
|
-
- !ruby/object:Gem::Version
|
|
168
|
-
version: '0'
|
|
169
|
-
- !ruby/object:Gem::Dependency
|
|
170
|
-
name: terminal-table
|
|
171
|
-
requirement: !ruby/object:Gem::Requirement
|
|
172
|
-
requirements:
|
|
173
|
-
- - ">="
|
|
174
|
-
- !ruby/object:Gem::Version
|
|
175
|
-
version: '0'
|
|
176
|
-
type: :runtime
|
|
177
|
-
prerelease: false
|
|
178
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
179
|
-
requirements:
|
|
180
|
-
- - ">="
|
|
181
|
-
- !ruby/object:Gem::Version
|
|
182
|
-
version: '0'
|
|
183
121
|
- !ruby/object:Gem::Dependency
|
|
184
122
|
name: json
|
|
185
123
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -215,127 +153,101 @@ dependencies:
|
|
|
215
153
|
- !ruby/object:Gem::Version
|
|
216
154
|
version: '0'
|
|
217
155
|
- !ruby/object:Gem::Dependency
|
|
218
|
-
name:
|
|
156
|
+
name: bcrypt
|
|
219
157
|
requirement: !ruby/object:Gem::Requirement
|
|
220
158
|
requirements:
|
|
221
159
|
- - "~>"
|
|
222
160
|
- !ruby/object:Gem::Version
|
|
223
|
-
version:
|
|
224
|
-
- - ">="
|
|
225
|
-
- !ruby/object:Gem::Version
|
|
226
|
-
version: 6.1.0
|
|
161
|
+
version: 3.1.20
|
|
227
162
|
type: :runtime
|
|
228
163
|
prerelease: false
|
|
229
164
|
version_requirements: !ruby/object:Gem::Requirement
|
|
230
165
|
requirements:
|
|
231
166
|
- - "~>"
|
|
232
167
|
- !ruby/object:Gem::Version
|
|
233
|
-
version:
|
|
234
|
-
- - ">="
|
|
235
|
-
- !ruby/object:Gem::Version
|
|
236
|
-
version: 6.1.0
|
|
168
|
+
version: 3.1.20
|
|
237
169
|
- !ruby/object:Gem::Dependency
|
|
238
|
-
name:
|
|
170
|
+
name: os
|
|
239
171
|
requirement: !ruby/object:Gem::Requirement
|
|
240
172
|
requirements:
|
|
241
173
|
- - "~>"
|
|
242
174
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '
|
|
175
|
+
version: '1.1'
|
|
244
176
|
- - ">="
|
|
245
177
|
- !ruby/object:Gem::Version
|
|
246
|
-
version:
|
|
178
|
+
version: 1.1.4
|
|
247
179
|
type: :runtime
|
|
248
180
|
prerelease: false
|
|
249
181
|
version_requirements: !ruby/object:Gem::Requirement
|
|
250
182
|
requirements:
|
|
251
183
|
- - "~>"
|
|
252
184
|
- !ruby/object:Gem::Version
|
|
253
|
-
version: '
|
|
185
|
+
version: '1.1'
|
|
254
186
|
- - ">="
|
|
255
187
|
- !ruby/object:Gem::Version
|
|
256
|
-
version:
|
|
188
|
+
version: 1.1.4
|
|
257
189
|
- !ruby/object:Gem::Dependency
|
|
258
|
-
name:
|
|
190
|
+
name: colorize
|
|
259
191
|
requirement: !ruby/object:Gem::Requirement
|
|
260
192
|
requirements:
|
|
261
193
|
- - "~>"
|
|
262
194
|
- !ruby/object:Gem::Version
|
|
263
|
-
version:
|
|
195
|
+
version: 1.1.0
|
|
264
196
|
- - ">="
|
|
265
197
|
- !ruby/object:Gem::Version
|
|
266
|
-
version: 1.
|
|
198
|
+
version: 1.1.0
|
|
267
199
|
type: :runtime
|
|
268
200
|
prerelease: false
|
|
269
201
|
version_requirements: !ruby/object:Gem::Requirement
|
|
270
202
|
requirements:
|
|
271
203
|
- - "~>"
|
|
272
204
|
- !ruby/object:Gem::Version
|
|
273
|
-
version:
|
|
205
|
+
version: 1.1.0
|
|
274
206
|
- - ">="
|
|
275
207
|
- !ruby/object:Gem::Version
|
|
276
|
-
version: 1.
|
|
208
|
+
version: 1.1.0
|
|
277
209
|
- !ruby/object:Gem::Dependency
|
|
278
|
-
name:
|
|
210
|
+
name: inquirer
|
|
279
211
|
requirement: !ruby/object:Gem::Requirement
|
|
280
212
|
requirements:
|
|
281
|
-
- - "~>"
|
|
282
|
-
- !ruby/object:Gem::Version
|
|
283
|
-
version: '1.1'
|
|
284
213
|
- - ">="
|
|
285
214
|
- !ruby/object:Gem::Version
|
|
286
|
-
version:
|
|
215
|
+
version: '0'
|
|
287
216
|
type: :runtime
|
|
288
217
|
prerelease: false
|
|
289
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
290
219
|
requirements:
|
|
291
|
-
- - "~>"
|
|
292
|
-
- !ruby/object:Gem::Version
|
|
293
|
-
version: '1.1'
|
|
294
220
|
- - ">="
|
|
295
221
|
- !ruby/object:Gem::Version
|
|
296
|
-
version:
|
|
297
|
-
- !ruby/object:Gem::Dependency
|
|
298
|
-
name: thin
|
|
299
|
-
requirement: !ruby/object:Gem::Requirement
|
|
300
|
-
requirements:
|
|
301
|
-
- - "~>"
|
|
302
|
-
- !ruby/object:Gem::Version
|
|
303
|
-
version: 1.8.2
|
|
304
|
-
type: :runtime
|
|
305
|
-
prerelease: false
|
|
306
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
307
|
-
requirements:
|
|
308
|
-
- - "~>"
|
|
309
|
-
- !ruby/object:Gem::Version
|
|
310
|
-
version: 1.8.2
|
|
222
|
+
version: '0'
|
|
311
223
|
- !ruby/object:Gem::Dependency
|
|
312
|
-
name:
|
|
224
|
+
name: reline
|
|
313
225
|
requirement: !ruby/object:Gem::Requirement
|
|
314
226
|
requirements:
|
|
315
|
-
- - "
|
|
227
|
+
- - ">="
|
|
316
228
|
- !ruby/object:Gem::Version
|
|
317
|
-
version:
|
|
229
|
+
version: '0'
|
|
318
230
|
type: :runtime
|
|
319
231
|
prerelease: false
|
|
320
232
|
version_requirements: !ruby/object:Gem::Requirement
|
|
321
233
|
requirements:
|
|
322
|
-
- - "
|
|
234
|
+
- - ">="
|
|
323
235
|
- !ruby/object:Gem::Version
|
|
324
|
-
version:
|
|
236
|
+
version: '0'
|
|
325
237
|
- !ruby/object:Gem::Dependency
|
|
326
|
-
name:
|
|
238
|
+
name: terminal-table
|
|
327
239
|
requirement: !ruby/object:Gem::Requirement
|
|
328
240
|
requirements:
|
|
329
|
-
- - "
|
|
241
|
+
- - ">="
|
|
330
242
|
- !ruby/object:Gem::Version
|
|
331
|
-
version:
|
|
243
|
+
version: '0'
|
|
332
244
|
type: :runtime
|
|
333
245
|
prerelease: false
|
|
334
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
335
247
|
requirements:
|
|
336
|
-
- - "
|
|
248
|
+
- - ">="
|
|
337
249
|
- !ruby/object:Gem::Version
|
|
338
|
-
version:
|
|
250
|
+
version: '0'
|
|
339
251
|
description: A scripting languge to keep it all together.
|
|
340
252
|
email:
|
|
341
253
|
- eric.crane@mac.com
|
|
@@ -428,9 +340,6 @@ files:
|
|
|
428
340
|
- lib/gloo/expr/op_minus.rb
|
|
429
341
|
- lib/gloo/expr/op_mult.rb
|
|
430
342
|
- lib/gloo/expr/op_plus.rb
|
|
431
|
-
- lib/gloo/ext/base.rb
|
|
432
|
-
- lib/gloo/ext/callback.rb
|
|
433
|
-
- lib/gloo/ext/manager.rb
|
|
434
343
|
- lib/gloo/objs/basic/alias.rb
|
|
435
344
|
- lib/gloo/objs/basic/boolean.rb
|
|
436
345
|
- lib/gloo/objs/basic/container.rb
|
|
@@ -441,60 +350,40 @@ files:
|
|
|
441
350
|
- lib/gloo/objs/basic/string_generator.rb
|
|
442
351
|
- lib/gloo/objs/basic/text.rb
|
|
443
352
|
- lib/gloo/objs/basic/untyped.rb
|
|
444
|
-
- lib/gloo/objs/cli/colorize.rb
|
|
445
|
-
- lib/gloo/objs/cli/confirm.rb
|
|
446
|
-
- lib/gloo/objs/cli/menu.rb
|
|
447
|
-
- lib/gloo/objs/cli/menu_item.rb
|
|
448
|
-
- lib/gloo/objs/cli/prompt.rb
|
|
449
|
-
- lib/gloo/objs/cli/select.rb
|
|
450
353
|
- lib/gloo/objs/ctrl/each.rb
|
|
451
354
|
- lib/gloo/objs/ctrl/each_child.rb
|
|
452
355
|
- lib/gloo/objs/ctrl/each_file.rb
|
|
453
356
|
- lib/gloo/objs/ctrl/each_line.rb
|
|
454
|
-
- lib/gloo/objs/ctrl/each_repo.rb
|
|
455
357
|
- lib/gloo/objs/ctrl/each_word.rb
|
|
456
358
|
- lib/gloo/objs/ctrl/function.rb
|
|
457
359
|
- lib/gloo/objs/ctrl/repeat.rb
|
|
458
|
-
- lib/gloo/objs/data/markdown.rb
|
|
459
|
-
- lib/gloo/objs/data/markdown_ext.rb
|
|
460
|
-
- lib/gloo/objs/data/mysql.rb
|
|
461
|
-
- lib/gloo/objs/data/query.rb
|
|
462
|
-
- lib/gloo/objs/data/query_result.rb
|
|
463
|
-
- lib/gloo/objs/data/sqlite.rb
|
|
464
|
-
- lib/gloo/objs/data/table.rb
|
|
465
|
-
- lib/gloo/objs/dev/git.rb
|
|
466
|
-
- lib/gloo/objs/dev/stats.rb
|
|
467
360
|
- lib/gloo/objs/dt/date.rb
|
|
468
361
|
- lib/gloo/objs/dt/datetime.rb
|
|
469
362
|
- lib/gloo/objs/dt/dt_tools.rb
|
|
470
363
|
- lib/gloo/objs/dt/time.rb
|
|
471
|
-
- lib/gloo/objs/
|
|
472
|
-
- lib/gloo/objs/
|
|
473
|
-
- lib/gloo/objs/security/cipher.rb
|
|
474
|
-
- lib/gloo/objs/security/csrf_token.rb
|
|
475
|
-
- lib/gloo/objs/security/password.rb
|
|
364
|
+
- lib/gloo/objs/str_utils/cipher.rb
|
|
365
|
+
- lib/gloo/objs/str_utils/csrf_token.rb
|
|
476
366
|
- lib/gloo/objs/str_utils/outline.rb
|
|
367
|
+
- lib/gloo/objs/str_utils/password.rb
|
|
368
|
+
- lib/gloo/objs/system/erb.rb
|
|
369
|
+
- lib/gloo/objs/system/eval.rb
|
|
477
370
|
- lib/gloo/objs/system/file_handle.rb
|
|
478
|
-
- lib/gloo/objs/system/ssh_exec.rb
|
|
479
371
|
- lib/gloo/objs/system/system.rb
|
|
480
372
|
- lib/gloo/objs/web/http_get.rb
|
|
481
373
|
- lib/gloo/objs/web/http_post.rb
|
|
482
374
|
- lib/gloo/objs/web/json.rb
|
|
483
375
|
- lib/gloo/objs/web/uri.rb
|
|
484
|
-
- lib/gloo/objs/web_svr/element.rb
|
|
485
|
-
- lib/gloo/objs/web_svr/field.rb
|
|
486
|
-
- lib/gloo/objs/web_svr/form.rb
|
|
487
|
-
- lib/gloo/objs/web_svr/page.rb
|
|
488
|
-
- lib/gloo/objs/web_svr/partial.rb
|
|
489
|
-
- lib/gloo/objs/web_svr/svr.rb
|
|
490
376
|
- lib/gloo/persist/disc_mech.rb
|
|
491
377
|
- lib/gloo/persist/file_loader.rb
|
|
492
378
|
- lib/gloo/persist/file_saver.rb
|
|
493
379
|
- lib/gloo/persist/file_storage.rb
|
|
494
380
|
- lib/gloo/persist/line_splitter.rb
|
|
495
381
|
- lib/gloo/persist/persist_man.rb
|
|
382
|
+
- lib/gloo/plugin/base.rb
|
|
383
|
+
- lib/gloo/plugin/callback.rb
|
|
384
|
+
- lib/gloo/plugin/ext_manager.rb
|
|
385
|
+
- lib/gloo/plugin/lib_manager.rb
|
|
496
386
|
- lib/gloo/utils/format.rb
|
|
497
|
-
- lib/gloo/utils/stats.rb
|
|
498
387
|
- lib/gloo/utils/words.rb
|
|
499
388
|
- lib/gloo/verbs/break.rb
|
|
500
389
|
- lib/gloo/verbs/check.rb
|
|
@@ -502,6 +391,7 @@ files:
|
|
|
502
391
|
- lib/gloo/verbs/context.rb
|
|
503
392
|
- lib/gloo/verbs/create.rb
|
|
504
393
|
- lib/gloo/verbs/execute.rb
|
|
394
|
+
- lib/gloo/verbs/exists.rb
|
|
505
395
|
- lib/gloo/verbs/files.rb
|
|
506
396
|
- lib/gloo/verbs/help.rb
|
|
507
397
|
- lib/gloo/verbs/if.rb
|
|
@@ -522,22 +412,6 @@ files:
|
|
|
522
412
|
- lib/gloo/verbs/unload.rb
|
|
523
413
|
- lib/gloo/verbs/version.rb
|
|
524
414
|
- lib/gloo/verbs/wait.rb
|
|
525
|
-
- lib/gloo/web_svr/asset.rb
|
|
526
|
-
- lib/gloo/web_svr/asset_info.rb
|
|
527
|
-
- lib/gloo/web_svr/config.rb
|
|
528
|
-
- lib/gloo/web_svr/embedded_renderer.rb
|
|
529
|
-
- lib/gloo/web_svr/handler.rb
|
|
530
|
-
- lib/gloo/web_svr/request.rb
|
|
531
|
-
- lib/gloo/web_svr/request_params.rb
|
|
532
|
-
- lib/gloo/web_svr/response.rb
|
|
533
|
-
- lib/gloo/web_svr/response_code.rb
|
|
534
|
-
- lib/gloo/web_svr/routing/resource_router.rb
|
|
535
|
-
- lib/gloo/web_svr/routing/router.rb
|
|
536
|
-
- lib/gloo/web_svr/routing/show_routes.rb
|
|
537
|
-
- lib/gloo/web_svr/server.rb
|
|
538
|
-
- lib/gloo/web_svr/session.rb
|
|
539
|
-
- lib/gloo/web_svr/table_renderer.rb
|
|
540
|
-
- lib/gloo/web_svr/web_method.rb
|
|
541
415
|
- lib/run.rb
|
|
542
416
|
homepage: http://github.com/ecrane/gloo
|
|
543
417
|
licenses:
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
|
2
|
-
# Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved.
|
|
3
|
-
#
|
|
4
|
-
# Show colorized output.
|
|
5
|
-
#
|
|
6
|
-
require 'colorized_string'
|
|
7
|
-
|
|
8
|
-
module Gloo
|
|
9
|
-
module Objs
|
|
10
|
-
class Colorize < Gloo::Core::Obj
|
|
11
|
-
|
|
12
|
-
KEYWORD = 'colorize'.freeze
|
|
13
|
-
KEYWORD_SHORT = 'color'.freeze
|
|
14
|
-
|
|
15
|
-
#
|
|
16
|
-
# The name of the object type.
|
|
17
|
-
#
|
|
18
|
-
def self.typename
|
|
19
|
-
return KEYWORD
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
# The short name of the object type.
|
|
24
|
-
#
|
|
25
|
-
def self.short_typename
|
|
26
|
-
return KEYWORD_SHORT
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# ---------------------------------------------------------------------
|
|
30
|
-
# Children
|
|
31
|
-
# ---------------------------------------------------------------------
|
|
32
|
-
|
|
33
|
-
# Does this object have children to add when an object
|
|
34
|
-
# is created in interactive mode?
|
|
35
|
-
# This does not apply during obj load, etc.
|
|
36
|
-
def add_children_on_create?
|
|
37
|
-
return true
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Add children to this object.
|
|
41
|
-
# This is used by containers to add children needed
|
|
42
|
-
# for default configurations.
|
|
43
|
-
def add_default_children
|
|
44
|
-
fac = @engine.factory
|
|
45
|
-
fac.create_string 'white', '', self
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# ---------------------------------------------------------------------
|
|
49
|
-
# Messages
|
|
50
|
-
# ---------------------------------------------------------------------
|
|
51
|
-
|
|
52
|
-
#
|
|
53
|
-
# Get a list of message names that this object receives.
|
|
54
|
-
#
|
|
55
|
-
def self.messages
|
|
56
|
-
return super + [ 'run' ]
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
#
|
|
60
|
-
# Run the colorize command.
|
|
61
|
-
#
|
|
62
|
-
def msg_run
|
|
63
|
-
msg = ''
|
|
64
|
-
children.each do |o|
|
|
65
|
-
msg += ColorizedString[ o.value_display ].colorize( o.name.to_sym )
|
|
66
|
-
end
|
|
67
|
-
@engine.log.show msg
|
|
68
|
-
@engine.heap.it.set_to msg.to_s
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
|
2
|
-
# Copyright:: Copyright (c) 2019 Eric Crane. All rights reserved.
|
|
3
|
-
#
|
|
4
|
-
# Show a CLI confirmation prompt.
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
module Gloo
|
|
8
|
-
module Objs
|
|
9
|
-
class Confirm < Gloo::Core::Obj
|
|
10
|
-
|
|
11
|
-
KEYWORD = 'confirm'.freeze
|
|
12
|
-
KEYWORD_SHORT = 'confirm'.freeze
|
|
13
|
-
PROMPT = 'prompt'.freeze
|
|
14
|
-
DEFAULT_PROMPT = '> '.freeze
|
|
15
|
-
RESULT = 'result'.freeze
|
|
16
|
-
|
|
17
|
-
#
|
|
18
|
-
# The name of the object type.
|
|
19
|
-
#
|
|
20
|
-
def self.typename
|
|
21
|
-
return KEYWORD
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
# The short name of the object type.
|
|
26
|
-
#
|
|
27
|
-
def self.short_typename
|
|
28
|
-
return KEYWORD_SHORT
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
#
|
|
32
|
-
# Get the URI from the child object.
|
|
33
|
-
# Returns nil if there is none.
|
|
34
|
-
#
|
|
35
|
-
def prompt_value
|
|
36
|
-
o = find_child PROMPT
|
|
37
|
-
return nil unless o
|
|
38
|
-
|
|
39
|
-
return o.value
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
# Set the result of the system call.
|
|
44
|
-
#
|
|
45
|
-
def set_result( data )
|
|
46
|
-
r = find_child RESULT
|
|
47
|
-
return nil unless r
|
|
48
|
-
|
|
49
|
-
r.set_value data
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# ---------------------------------------------------------------------
|
|
53
|
-
# Children
|
|
54
|
-
# ---------------------------------------------------------------------
|
|
55
|
-
|
|
56
|
-
# Does this object have children to add when an object
|
|
57
|
-
# is created in interactive mode?
|
|
58
|
-
# This does not apply during obj load, etc.
|
|
59
|
-
def add_children_on_create?
|
|
60
|
-
return true
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
# Add children to this object.
|
|
64
|
-
# This is used by containers to add children needed
|
|
65
|
-
# for default configurations.
|
|
66
|
-
def add_default_children
|
|
67
|
-
fac = @engine.factory
|
|
68
|
-
fac.create_string PROMPT, DEFAULT_PROMPT, self
|
|
69
|
-
fac.create_bool RESULT, nil, self
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# ---------------------------------------------------------------------
|
|
73
|
-
# Messages
|
|
74
|
-
# ---------------------------------------------------------------------
|
|
75
|
-
|
|
76
|
-
#
|
|
77
|
-
# Get a list of message names that this object receives.
|
|
78
|
-
#
|
|
79
|
-
def self.messages
|
|
80
|
-
return super + [ 'run' ]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
#
|
|
84
|
-
# Run the confirmation command.
|
|
85
|
-
#
|
|
86
|
-
def msg_run
|
|
87
|
-
prompt = prompt_value
|
|
88
|
-
return unless prompt
|
|
89
|
-
|
|
90
|
-
result = @engine.platform.prompt.yes?( prompt )
|
|
91
|
-
set_result result
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|