gloo 1.0.0 → 1.2.2

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/gloo.gemspec +7 -4
  6. data/lib/VERSION +1 -1
  7. data/lib/gloo/objs/data/mysql.rb +192 -0
  8. data/lib/gloo/objs/data/sqlite.rb +159 -0
  9. data/lib/gloo/verbs/help.rb +82 -0
  10. data/lib/gloo/verbs/version.rb +37 -0
  11. metadata +52 -82
  12. data/Gemfile.lock +0 -175
  13. data/lib/gloo/help/app/application.txt +0 -22
  14. data/lib/gloo/help/app/configuration.txt +0 -7
  15. data/lib/gloo/help/app/default_help.txt +0 -14
  16. data/lib/gloo/help/app/logging.txt +0 -16
  17. data/lib/gloo/help/core/color.txt +0 -31
  18. data/lib/gloo/help/core/error.txt +0 -33
  19. data/lib/gloo/help/core/events.txt +0 -21
  20. data/lib/gloo/help/core/gloo_system.txt +0 -57
  21. data/lib/gloo/help/core/here.txt +0 -30
  22. data/lib/gloo/help/core/it.txt +0 -23
  23. data/lib/gloo/help/core/ops.txt +0 -16
  24. data/lib/gloo/help/core/pathname.txt +0 -29
  25. data/lib/gloo/help/objs/basic/alias.txt +0 -36
  26. data/lib/gloo/help/objs/basic/boolean.txt +0 -28
  27. data/lib/gloo/help/objs/basic/container.txt +0 -33
  28. data/lib/gloo/help/objs/basic/decimal.txt +0 -28
  29. data/lib/gloo/help/objs/basic/integer.txt +0 -27
  30. data/lib/gloo/help/objs/basic/script.txt +0 -29
  31. data/lib/gloo/help/objs/basic/string.txt +0 -28
  32. data/lib/gloo/help/objs/basic/text.txt +0 -27
  33. data/lib/gloo/help/objs/basic/untyped.txt +0 -22
  34. data/lib/gloo/help/objs/cli/banner.txt +0 -49
  35. data/lib/gloo/help/objs/cli/bar.txt +0 -37
  36. data/lib/gloo/help/objs/cli/colorize.txt +0 -33
  37. data/lib/gloo/help/objs/cli/confirm.txt +0 -26
  38. data/lib/gloo/help/objs/cli/menu.txt +0 -44
  39. data/lib/gloo/help/objs/cli/menu_item.txt +0 -26
  40. data/lib/gloo/help/objs/cli/pastel.txt +0 -43
  41. data/lib/gloo/help/objs/cli/prompt.txt +0 -27
  42. data/lib/gloo/help/objs/cli/select.txt +0 -34
  43. data/lib/gloo/help/objs/ctrl/each.txt +0 -48
  44. data/lib/gloo/help/objs/ctrl/repeat.txt +0 -38
  45. data/lib/gloo/help/objs/data/markdown.txt +0 -25
  46. data/lib/gloo/help/objs/data/mysql.txt +0 -40
  47. data/lib/gloo/help/objs/data/query.txt +0 -37
  48. data/lib/gloo/help/objs/data/sqlite.txt +0 -26
  49. data/lib/gloo/help/objs/data/table.txt +0 -46
  50. data/lib/gloo/help/objs/dev/git_repo.txt +0 -36
  51. data/lib/gloo/help/objs/dev/stats.txt +0 -36
  52. data/lib/gloo/help/objs/dt/date.txt +0 -23
  53. data/lib/gloo/help/objs/dt/datetime.txt +0 -24
  54. data/lib/gloo/help/objs/dt/time.txt +0 -23
  55. data/lib/gloo/help/objs/ror/erb.txt +0 -37
  56. data/lib/gloo/help/objs/ror/eval.txt +0 -24
  57. data/lib/gloo/help/objs/snd/play.txt +0 -23
  58. data/lib/gloo/help/objs/snd/say.txt +0 -28
  59. data/lib/gloo/help/objs/system/file.txt +0 -48
  60. data/lib/gloo/help/objs/system/ssh_exec.txt +0 -30
  61. data/lib/gloo/help/objs/system/system.txt +0 -32
  62. data/lib/gloo/help/objs/web/http_get.txt +0 -35
  63. data/lib/gloo/help/objs/web/http_post.txt +0 -34
  64. data/lib/gloo/help/objs/web/json.txt +0 -34
  65. data/lib/gloo/help/objs/web/slack.txt +0 -33
  66. data/lib/gloo/help/objs/web/teams.txt +0 -30
  67. data/lib/gloo/help/objs/web/uri.txt +0 -38
  68. data/lib/gloo/help/verbs/alert.txt +0 -33
  69. data/lib/gloo/help/verbs/beep.txt +0 -25
  70. data/lib/gloo/help/verbs/cls.txt +0 -24
  71. data/lib/gloo/help/verbs/context.txt +0 -43
  72. data/lib/gloo/help/verbs/create.txt +0 -33
  73. data/lib/gloo/help/verbs/execute.txt +0 -27
  74. data/lib/gloo/help/verbs/help.txt +0 -34
  75. data/lib/gloo/help/verbs/if.txt +0 -37
  76. data/lib/gloo/help/verbs/list.txt +0 -34
  77. data/lib/gloo/help/verbs/load.txt +0 -38
  78. data/lib/gloo/help/verbs/move.txt +0 -42
  79. data/lib/gloo/help/verbs/put.txt +0 -38
  80. data/lib/gloo/help/verbs/quit.txt +0 -25
  81. data/lib/gloo/help/verbs/run.txt +0 -41
  82. data/lib/gloo/help/verbs/save.txt +0 -26
  83. data/lib/gloo/help/verbs/show.txt +0 -30
  84. data/lib/gloo/help/verbs/tell.txt +0 -34
  85. data/lib/gloo/help/verbs/unless.txt +0 -38
  86. data/lib/gloo/help/verbs/version.txt +0 -32
  87. data/lib/gloo/help/verbs/wait.txt +0 -29
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: 1.0.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-25 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,20 +70,20 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '1.0'
73
+ version: '1.1'
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.0.1
76
+ version: 1.2.2
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '1.0'
83
+ version: '1.1'
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: 1.0.1
86
+ version: 1.2.2
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: activesupport
89
89
  requirement: !ruby/object:Gem::Requirement
@@ -224,6 +224,46 @@ dependencies:
224
224
  - - ">="
225
225
  - !ruby/object:Gem::Version
226
226
  version: 6.1.0
227
+ - !ruby/object:Gem::Dependency
228
+ name: mysql2
229
+ requirement: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - "~>"
232
+ - !ruby/object:Gem::Version
233
+ version: '0.5'
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: 0.5.3
237
+ type: :runtime
238
+ prerelease: false
239
+ version_requirements: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '0.5'
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: 0.5.3
247
+ - !ruby/object:Gem::Dependency
248
+ name: sqlite3
249
+ requirement: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - "~>"
252
+ - !ruby/object:Gem::Version
253
+ version: '1.4'
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: 1.4.2
257
+ type: :runtime
258
+ prerelease: false
259
+ version_requirements: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - "~>"
262
+ - !ruby/object:Gem::Version
263
+ version: '1.4'
264
+ - - ">="
265
+ - !ruby/object:Gem::Version
266
+ version: 1.4.2
227
267
  description: A scripting languge to keep it all together.
228
268
  email:
229
269
  - eric.crane@mac.com
@@ -236,10 +276,11 @@ files:
236
276
  - ".DS_Store"
237
277
  - ".gitignore"
238
278
  - ".rubocop.yml"
279
+ - ".ruby-gemset"
280
+ - ".ruby-version"
239
281
  - ".travis.yml"
240
282
  - CODE_OF_CONDUCT.md
241
283
  - Gemfile
242
- - Gemfile.lock
243
284
  - LICENSE.txt
244
285
  - README.md
245
286
  - Rakefile
@@ -254,81 +295,6 @@ files:
254
295
  - lib/gloo/app/info.rb
255
296
  - lib/gloo/app/log.rb
256
297
  - lib/gloo/app/platform.rb
257
- - lib/gloo/help/app/application.txt
258
- - lib/gloo/help/app/configuration.txt
259
- - lib/gloo/help/app/default_help.txt
260
- - lib/gloo/help/app/logging.txt
261
- - lib/gloo/help/core/color.txt
262
- - lib/gloo/help/core/error.txt
263
- - lib/gloo/help/core/events.txt
264
- - lib/gloo/help/core/gloo_system.txt
265
- - lib/gloo/help/core/here.txt
266
- - lib/gloo/help/core/it.txt
267
- - lib/gloo/help/core/ops.txt
268
- - lib/gloo/help/core/pathname.txt
269
- - lib/gloo/help/objs/basic/alias.txt
270
- - lib/gloo/help/objs/basic/boolean.txt
271
- - lib/gloo/help/objs/basic/container.txt
272
- - lib/gloo/help/objs/basic/decimal.txt
273
- - lib/gloo/help/objs/basic/integer.txt
274
- - lib/gloo/help/objs/basic/script.txt
275
- - lib/gloo/help/objs/basic/string.txt
276
- - lib/gloo/help/objs/basic/text.txt
277
- - lib/gloo/help/objs/basic/untyped.txt
278
- - lib/gloo/help/objs/cli/banner.txt
279
- - lib/gloo/help/objs/cli/bar.txt
280
- - lib/gloo/help/objs/cli/colorize.txt
281
- - lib/gloo/help/objs/cli/confirm.txt
282
- - lib/gloo/help/objs/cli/menu.txt
283
- - lib/gloo/help/objs/cli/menu_item.txt
284
- - lib/gloo/help/objs/cli/pastel.txt
285
- - lib/gloo/help/objs/cli/prompt.txt
286
- - lib/gloo/help/objs/cli/select.txt
287
- - lib/gloo/help/objs/ctrl/each.txt
288
- - lib/gloo/help/objs/ctrl/repeat.txt
289
- - lib/gloo/help/objs/data/markdown.txt
290
- - lib/gloo/help/objs/data/mysql.txt
291
- - lib/gloo/help/objs/data/query.txt
292
- - lib/gloo/help/objs/data/sqlite.txt
293
- - lib/gloo/help/objs/data/table.txt
294
- - lib/gloo/help/objs/dev/git_repo.txt
295
- - lib/gloo/help/objs/dev/stats.txt
296
- - lib/gloo/help/objs/dt/date.txt
297
- - lib/gloo/help/objs/dt/datetime.txt
298
- - lib/gloo/help/objs/dt/time.txt
299
- - lib/gloo/help/objs/ror/erb.txt
300
- - lib/gloo/help/objs/ror/eval.txt
301
- - lib/gloo/help/objs/snd/play.txt
302
- - lib/gloo/help/objs/snd/say.txt
303
- - lib/gloo/help/objs/system/file.txt
304
- - lib/gloo/help/objs/system/ssh_exec.txt
305
- - lib/gloo/help/objs/system/system.txt
306
- - lib/gloo/help/objs/web/http_get.txt
307
- - lib/gloo/help/objs/web/http_post.txt
308
- - lib/gloo/help/objs/web/json.txt
309
- - lib/gloo/help/objs/web/slack.txt
310
- - lib/gloo/help/objs/web/teams.txt
311
- - lib/gloo/help/objs/web/uri.txt
312
- - lib/gloo/help/verbs/alert.txt
313
- - lib/gloo/help/verbs/beep.txt
314
- - lib/gloo/help/verbs/cls.txt
315
- - lib/gloo/help/verbs/context.txt
316
- - lib/gloo/help/verbs/create.txt
317
- - lib/gloo/help/verbs/execute.txt
318
- - lib/gloo/help/verbs/help.txt
319
- - lib/gloo/help/verbs/if.txt
320
- - lib/gloo/help/verbs/list.txt
321
- - lib/gloo/help/verbs/load.txt
322
- - lib/gloo/help/verbs/move.txt
323
- - lib/gloo/help/verbs/put.txt
324
- - lib/gloo/help/verbs/quit.txt
325
- - lib/gloo/help/verbs/run.txt
326
- - lib/gloo/help/verbs/save.txt
327
- - lib/gloo/help/verbs/show.txt
328
- - lib/gloo/help/verbs/tell.txt
329
- - lib/gloo/help/verbs/unless.txt
330
- - lib/gloo/help/verbs/version.txt
331
- - lib/gloo/help/verbs/wait.txt
332
298
  - lib/gloo/objs/cli/banner.rb
333
299
  - lib/gloo/objs/cli/bar.rb
334
300
  - lib/gloo/objs/cli/colorize.rb
@@ -338,6 +304,8 @@ files:
338
304
  - lib/gloo/objs/cli/pastel.rb
339
305
  - lib/gloo/objs/cli/prompt.rb
340
306
  - lib/gloo/objs/cli/select.rb
307
+ - lib/gloo/objs/data/mysql.rb
308
+ - lib/gloo/objs/data/sqlite.rb
341
309
  - lib/gloo/objs/dev/git.rb
342
310
  - lib/gloo/objs/dev/stats.rb
343
311
  - lib/gloo/objs/snd/play.rb
@@ -348,6 +316,8 @@ files:
348
316
  - lib/gloo/verbs/alert.rb
349
317
  - lib/gloo/verbs/beep.rb
350
318
  - lib/gloo/verbs/cls.rb
319
+ - lib/gloo/verbs/help.rb
320
+ - lib/gloo/verbs/version.rb
351
321
  - lib/run.rb
352
322
  homepage: http://github.com/ecrane/gloo
353
323
  licenses:
data/Gemfile.lock DELETED
@@ -1,175 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- gloo (0.8.0)
5
- activesupport (~> 6.1, >= 6.1.5)
6
- chronic (~> 0.10, >= 0.10.2)
7
- colorize (~> 0.8, >= 0.8.1)
8
- gloo-lang (~> 1.0, >= 1.0.1)
9
- json (~> 2.1, >= 2.1.0)
10
- net-ssh (~> 6.1, >= 6.1.0)
11
- openssl (~> 2.1, >= 2.1.0)
12
- tty (~> 0.10, >= 0.10.0)
13
-
14
- GEM
15
- remote: https://rubygems.org/
16
- specs:
17
- activesupport (6.1.5)
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 1.6, < 2)
20
- minitest (>= 5.1)
21
- tzinfo (~> 2.0)
22
- zeitwerk (~> 2.3)
23
- ast (2.4.2)
24
- chronic (0.10.2)
25
- colorize (0.8.1)
26
- concurrent-ruby (1.1.10)
27
- diff-lcs (1.5.0)
28
- equatable (0.7.0)
29
- gloo-lang (1.0.1)
30
- activesupport (~> 6.1, >= 6.1.4.6)
31
- chronic (~> 0.10, >= 0.10.2)
32
- json (~> 2.1, >= 2.1.0)
33
- net-ssh (~> 6.1, >= 6.1.0)
34
- openssl (~> 2.1, >= 2.1.0)
35
- tty-platform (~> 0.3, >= 0.3.0)
36
- i18n (1.10.0)
37
- concurrent-ruby (~> 1.0)
38
- ipaddr (1.2.4)
39
- json (2.6.1)
40
- kramdown (1.16.2)
41
- minitest (5.15.0)
42
- necromancer (0.5.1)
43
- net-ssh (6.1.0)
44
- openssl (2.2.1)
45
- ipaddr
46
- parallel (1.22.0)
47
- parser (3.1.1.0)
48
- ast (~> 2.4.1)
49
- pastel (0.7.4)
50
- equatable (~> 0.6)
51
- tty-color (~> 0.5)
52
- rainbow (3.1.1)
53
- rake (13.0.6)
54
- regexp_parser (2.2.1)
55
- rexml (3.2.5)
56
- rouge (3.28.0)
57
- rubocop (1.26.1)
58
- parallel (~> 1.10)
59
- parser (>= 3.1.0.0)
60
- rainbow (>= 2.2.2, < 4.0)
61
- regexp_parser (>= 1.8, < 3.0)
62
- rexml
63
- rubocop-ast (>= 1.16.0, < 2.0)
64
- ruby-progressbar (~> 1.7)
65
- unicode-display_width (>= 1.4.0, < 3.0)
66
- rubocop-ast (1.16.0)
67
- parser (>= 3.1.1.0)
68
- ruby-progressbar (1.11.0)
69
- strings (0.1.8)
70
- strings-ansi (~> 0.1)
71
- unicode-display_width (~> 1.5)
72
- unicode_utils (~> 1.4)
73
- strings-ansi (0.2.0)
74
- thor (0.20.3)
75
- tty (0.10.0)
76
- bundler (~> 1.16, < 2.0)
77
- equatable (~> 0.5)
78
- pastel (~> 0.7.2)
79
- thor (~> 0.20.0)
80
- tty-box (~> 0.4.1)
81
- tty-color (~> 0.5)
82
- tty-command (~> 0.9.0)
83
- tty-config (~> 0.3.2)
84
- tty-cursor (~> 0.7)
85
- tty-editor (~> 0.5)
86
- tty-file (~> 0.8.0)
87
- tty-font (~> 0.4.0)
88
- tty-logger (~> 0.2.0)
89
- tty-markdown (~> 0.6.0)
90
- tty-pager (~> 0.12)
91
- tty-pie (~> 0.3.0)
92
- tty-platform (~> 0.2)
93
- tty-progressbar (~> 0.17)
94
- tty-prompt (~> 0.19)
95
- tty-screen (~> 0.7)
96
- tty-spinner (~> 0.9)
97
- tty-table (~> 0.11.0)
98
- tty-tree (~> 0.3)
99
- tty-which (~> 0.4)
100
- tty-box (0.4.1)
101
- pastel (~> 0.7.2)
102
- strings (~> 0.1.6)
103
- tty-cursor (~> 0.7)
104
- tty-color (0.6.0)
105
- tty-command (0.9.0)
106
- pastel (~> 0.7.0)
107
- tty-config (0.3.2)
108
- tty-cursor (0.7.1)
109
- tty-editor (0.5.1)
110
- tty-prompt (~> 0.19)
111
- tty-which (~> 0.4)
112
- tty-file (0.8.0)
113
- diff-lcs (~> 1.3)
114
- pastel (~> 0.7.2)
115
- tty-prompt (~> 0.18)
116
- tty-font (0.4.0)
117
- tty-logger (0.2.0)
118
- pastel (~> 0.7.0)
119
- tty-markdown (0.6.0)
120
- kramdown (~> 1.16.2)
121
- pastel (~> 0.7.2)
122
- rouge (~> 3.3)
123
- strings (~> 0.1.4)
124
- tty-color (~> 0.4)
125
- tty-screen (~> 0.6)
126
- tty-pager (0.13.0)
127
- strings (~> 0.1.8)
128
- tty-screen (~> 0.8)
129
- tty-pie (0.3.0)
130
- pastel (~> 0.7.3)
131
- tty-cursor (~> 0.7)
132
- tty-platform (0.3.0)
133
- tty-progressbar (0.18.2)
134
- strings-ansi (~> 0.2)
135
- tty-cursor (~> 0.7)
136
- tty-screen (~> 0.8)
137
- unicode-display_width (>= 1.6, < 3.0)
138
- tty-prompt (0.21.0)
139
- necromancer (~> 0.5.0)
140
- pastel (~> 0.7.0)
141
- tty-reader (~> 0.7.0)
142
- tty-reader (0.7.0)
143
- tty-cursor (~> 0.7)
144
- tty-screen (~> 0.7)
145
- wisper (~> 2.0.0)
146
- tty-screen (0.8.1)
147
- tty-spinner (0.9.3)
148
- tty-cursor (~> 0.7)
149
- tty-table (0.11.0)
150
- equatable (~> 0.6)
151
- necromancer (~> 0.5)
152
- pastel (~> 0.7.2)
153
- strings (~> 0.1.5)
154
- tty-screen (~> 0.7)
155
- tty-tree (0.4.0)
156
- tty-which (0.5.0)
157
- tzinfo (2.0.4)
158
- concurrent-ruby (~> 1.0)
159
- unicode-display_width (1.8.0)
160
- unicode_utils (1.4.0)
161
- wisper (2.0.1)
162
- zeitwerk (2.5.4)
163
-
164
- PLATFORMS
165
- ruby
166
-
167
- DEPENDENCIES
168
- bundler (~> 1.17.3)
169
- gloo!
170
- minitest (~> 5.1, >= 5.14.2)
171
- rake (~> 13.0, >= 13.0.1)
172
- rubocop
173
-
174
- BUNDLED WITH
175
- 1.17.3
@@ -1,22 +0,0 @@
1
- GLOO APPLICATION
2
-
3
- DESCRIPTION
4
- Gloo scripting language. A scripting language built on ruby.
5
- More information coming soon.
6
-
7
- SYNOPSIS
8
- gloo [global option] [file]
9
-
10
- GLOBAL OPTIONS
11
- --cli - Run in CLI mode
12
- - If no options are specified, this is the default.
13
- --version - Show application version
14
- --help - Show this help page
15
-
16
- FILE
17
- TODO: document running a gloo script
18
- how to reference files by relative path in gloo folder
19
- and also by absolute path
20
-
21
- SEE ALSO
22
- application, configuration
@@ -1,7 +0,0 @@
1
- CONFIGURATION
2
-
3
- DESCRIPTION
4
- TODO: document the application configuration and settings
5
-
6
- SEE ALSO
7
- application, help
@@ -1,14 +0,0 @@
1
- GLOO HELP
2
-
3
- TODO: write this article
4
-
5
- LISTS
6
- Show options for object and verb lists
7
-
8
- DETAIL
9
- How to get help detail for verbs and objects
10
- How to see a help pages
11
- How to see a list of help pages (topics)
12
-
13
- SEE ALSO
14
- application, configuration
@@ -1,16 +0,0 @@
1
- GLOO APPLICATION LOGGING
2
-
3
- DESCRIPTION
4
- Gloo writes to the gloo.log as well as to the console.
5
- Debug messages are written to the log only, but other messages
6
- are also written to the console unless the application is
7
- running in quiet mode.
8
-
9
- CONFIGURATION
10
- The application logs folder is in the gloo folder.
11
- When gloo is run, the gloo.log file will be written to.
12
-
13
- TAIL
14
- Example tail command to watch the gloo log:
15
-
16
- tail -f ~/gloo/logs/gloo.log
@@ -1,31 +0,0 @@
1
- COLOR
2
-
3
- DESCRIPTION
4
- The following colors can be used by the show verb to display
5
- colored text:
6
-
7
- red
8
- blue
9
- green
10
- white
11
- black
12
- yellow
13
-
14
- The color names are considered as virtual objects but may
15
- also be referenced in variables. See the example below.
16
-
17
- EXAMPLE
18
- Here are some examples of expression usage:
19
-
20
- #
21
- # Show multiple messages in color
22
- #
23
- colors [can] :
24
- var [string] : red
25
- on_load [script] :
26
- show "red" (colors.var)
27
- show "blue" (blue)
28
- show "green" (green)
29
-
30
- SEE ALSO
31
- show
@@ -1,33 +0,0 @@
1
- ERROR
2
-
3
- DESCRIPTION
4
- Gloo has a special 'error' variable that's not part of the normal
5
- object heap. The error will be empty most of the time, but
6
- if a command results in an error, this variable will hold the
7
- error message until the next command is executed. The error
8
- is a string and can be accessed by simply referring to the
9
- path-name 'error'.
10
-
11
- EXAMPLE
12
- To see the last error:
13
-
14
- > show error
15
-
16
- To run a command that generates an error:
17
-
18
- > put 3 into
19
- 'put' must include 'into' target
20
-
21
- Then, showing the error
22
-
23
- > show error
24
- 'put' must include 'into' target
25
-
26
- But, as mentioned, the next command will clear out the last error.
27
- If you need to keep track of the result of a command, you should
28
- put the error into another object.
29
-
30
- > create err as string
31
- > put 3 into
32
- > put error into err
33
-
@@ -1,21 +0,0 @@
1
- EVENTS
2
-
3
- DESCRIPTION
4
- Scripts can be written to be triggered by events. The current list is as
5
- follows, but it is expected that the list of events will grow.
6
-
7
- on_load - run when a script loads
8
- on_unload - run when an object receives an unload message
9
-
10
- TODO: add event types.
11
-
12
- EXAMPLE
13
- Show a message when a file is loaded:
14
-
15
- start [container] :
16
- on_load [script] : show "Welcome back!" (white)
17
-
18
- Show a message when a file unloaded:
19
-
20
- done [container] :
21
- on_unload [script] : show "See ya soon!" (white)
@@ -1,57 +0,0 @@
1
- GLOO SYSTEM OBJECTS
2
-
3
- DESCRIPTION
4
- The gloo system objects are virtual objects. That is that they
5
- can be accessed like other objects. But the values are set by
6
- the system. The values cannot be updated. The other difference
7
- is that the virtual objects do not show up in the object heap.
8
-
9
- ACCESS
10
- The gloo objects can be accessed through the 'gloo' root level
11
- virtual object designation. There is also a shortcut for the virtual
12
- object path: '$'. For example, to see the current user:
13
-
14
- > show gloo.user
15
-
16
- Or:
17
-
18
- > show $.user
19
-
20
- Some objects include an '_' to separate words. As an alternative,
21
- a '.' can be used instead. The following commands are treated as
22
- identical:
23
-
24
- > show gloo.working_dir
25
- > show gloo.working.dir
26
- > show $.working_dir
27
- > show $.working.dir
28
-
29
- OBJECTS
30
-
31
- IDENTITY
32
- gloo.hostname # Get the system hostname.
33
- gloo.user # Get the logged in User.
34
-
35
- SPECIAL CHARS
36
- gloo.line # A carriage return (line feed) character.
37
-
38
- FILE SYSTEM
39
- gloo.user_home # Get the user's home directory.
40
- gloo.working_dir # Get the working directory.
41
- gloo.gloo_home # Get the gloo home directory
42
- gloo.gloo_config # Get the gloo configuration directory
43
- gloo.gloo_projects # Get the gloo projects directory
44
- gloo.gloo_log # Get the gloo logging directory
45
-
46
- SCREEN
47
- gloo.screen_lines # Get the number of lines on screen.
48
- gloo.screen_cols # Get the number of columns on screen.
49
-
50
- PLATFORM
51
- gloo.platform_cpu # Get the platform CPU
52
- gloo.platform_os # Get the platform Operating System
53
- gloo.platform_version # Get the platform version
54
- gloo.platform_windows? # Is the platform Windows?
55
- gloo.platform_unix? # Is the platform Unix?
56
- gloo.platform_linux? # Is the platform Linux?
57
- gloo.platform_mac? # Is the platform Mac?
@@ -1,30 +0,0 @@
1
- HERE
2
-
3
- DESCRIPTION
4
- Gloo scripts can use relative referencing to access objects
5
- without specifying the full path. This relative referencing is
6
- referred to with the 'here' operator: ^
7
-
8
- EXAMPLE
9
- In the following script, the here reference is used several times:
10
-
11
- #
12
- # Use here reference.
13
- #
14
- here [can] :
15
- s [str] : local string
16
- on_load [script] : show ^.s
17
- a [can] :
18
- s [str] : A string
19
- b [can] :
20
- s [str] : B string
21
- on_load [script] :
22
- show ^.s
23
- show ^^.s
24
-
25
- A single use of '^' means: refer to an object at the same level
26
- as the running script. It tells the interpreter to 'look here'
27
- for the object.
28
-
29
- Use of two ^^ here references means to go up a level, and
30
- so forth.
@@ -1,23 +0,0 @@
1
- IT
2
-
3
- DESCRIPTION
4
- 'It' is a special virtual object. 'It' contains the value of
5
- the last expression or command run. Not all commands result in
6
- a change to the value of it.
7
-
8
- EXAMPLE
9
- Get the value of an expression and store it somewhere for later use:
10
-
11
- #
12
- # Example of usage of 'it'.
13
- #
14
- it_example [can] :
15
- result [int] :
16
- on_load [script] :
17
- show 3 + 4
18
- put it into ^.result
19
- show ^.result
20
-
21
- Running this script will show 7 twice. The first time will be the
22
- result of the addition. The second time will be showing the
23
- result object.
@@ -1,16 +0,0 @@
1
- OPERATORS
2
-
3
- DESCRIPTION
4
- These are the gloo operators:
5
-
6
- + addition
7
- - subtraction
8
- * multiplication
9
- / division
10
-
11
- EXAMPLE
12
- Here are some examples of expression usage:
13
-
14
- > show 2 + 5
15
- > put 12 / 3 into x
16
- > show 23 * 3 - 6
@@ -1,29 +0,0 @@
1
- PATHNAME
2
-
3
- DESCRIPTION
4
- All gloo object data and scripts are stored in a heap of objects or
5
- just "the heap". The heap is hierarchical, with some objects having
6
- children objects. To reference an object, we use a "pathname". The
7
- pathname starts with the root level object then has a period, ".",
8
- then the child object name, and so forth. "a.b.c" refers to the "c"
9
- object in the "b" container, which is in the "a" container.
10
-
11
- ROOT
12
- The word "root" is not needed when referring to objects. In some
13
- special cases, "root" can be used to point to the first level of
14
- the object heap. One such use would be with the "context" verb.
15
-
16
- EXAMPLE
17
- Here is an example of objects and a pathname reference to an
18
- object within the hierarchy:
19
-
20
- #
21
- # Hierarchical containers.
22
- #
23
- a [can] :
24
- b [can] :
25
- c [string] : Hello World
26
- on_load [script] : show a.b.c
27
-
28
- SEE ALSO
29
- context