gloo 6.0 → 6.1.0
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/CLAUDE.md +9 -3
- data/README.md +38 -7
- data/docs/application.md +164 -0
- data/docs/getting_started.md +112 -0
- data/docs/iterators.md +294 -0
- data/docs/language_objects.md +190 -0
- data/docs/language_scripting.md +62 -0
- data/docs/language_syntax.md +307 -0
- data/docs/objects.md +77 -0
- data/docs/operators.md +62 -0
- data/docs/plugins.md +54 -0
- data/docs/verbs.md +64 -0
- data/gloo.gemspec +5 -3
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +14 -0
- data/lib/gloo/app/platform.rb +29 -2
- data/lib/gloo/app/settings.rb +1 -1
- data/lib/gloo/core/gloo_system.rb +52 -1
- data/lib/gloo/docs/doc_data.rb +160 -0
- data/lib/gloo/docs/help_shell.rb +285 -0
- data/lib/gloo/docs/markdown_renderer.rb +39 -0
- data/lib/gloo/objs/basic/alias.rb +53 -0
- data/lib/gloo/objs/basic/boolean.rb +30 -0
- data/lib/gloo/objs/basic/container.rb +38 -0
- data/lib/gloo/objs/basic/decimal.rb +30 -0
- data/lib/gloo/objs/basic/integer.rb +58 -0
- data/lib/gloo/objs/basic/script.rb +31 -0
- data/lib/gloo/objs/basic/string.rb +51 -4
- data/lib/gloo/objs/basic/string_msgs.rb +20 -0
- data/lib/gloo/objs/basic/text.rb +51 -4
- data/lib/gloo/objs/basic/untyped.rb +21 -0
- data/lib/gloo/objs/ctrl/each.rb +63 -1
- data/lib/gloo/objs/ctrl/function.rb +69 -0
- data/lib/gloo/objs/ctrl/repeat.rb +41 -0
- data/lib/gloo/objs/dt/date.rb +43 -0
- data/lib/gloo/objs/dt/datetime.rb +50 -0
- data/lib/gloo/objs/dt/time.rb +43 -0
- data/lib/gloo/objs/str_utils/cipher.rb +59 -0
- data/lib/gloo/objs/str_utils/outline.rb +65 -1
- data/lib/gloo/objs/str_utils/password.rb +56 -0
- data/lib/gloo/objs/system/erb.rb +39 -0
- data/lib/gloo/objs/system/file_handle.rb +56 -0
- data/lib/gloo/objs/system/system.rb +29 -0
- data/lib/gloo/objs/web/http_get.rb +35 -0
- data/lib/gloo/objs/web/http_post.rb +33 -0
- data/lib/gloo/objs/web/json.rb +40 -0
- data/lib/gloo/objs/web/uri.rb +40 -0
- data/lib/gloo/shell/command_node.rb +39 -0
- data/lib/gloo/shell/context.rb +93 -0
- data/lib/gloo/shell/runner.rb +315 -0
- data/lib/gloo/verbs/break.rb +32 -0
- data/lib/gloo/verbs/check.rb +49 -0
- data/lib/gloo/verbs/cls.rb +18 -0
- data/lib/gloo/verbs/context.rb +47 -0
- data/lib/gloo/verbs/create.rb +42 -0
- data/lib/gloo/verbs/eval.rb +27 -0
- data/lib/gloo/verbs/execute.rb +27 -0
- data/lib/gloo/verbs/exists.rb +54 -2
- data/lib/gloo/verbs/files.rb +22 -0
- data/lib/gloo/verbs/help.rb +43 -178
- data/lib/gloo/verbs/if.rb +52 -0
- data/lib/gloo/verbs/invoke.rb +62 -0
- data/lib/gloo/verbs/list.rb +32 -0
- data/lib/gloo/verbs/load.rb +55 -2
- data/lib/gloo/verbs/log.rb +44 -0
- data/lib/gloo/verbs/move.rb +36 -1
- data/lib/gloo/verbs/put.rb +35 -0
- data/lib/gloo/verbs/quit.rb +19 -0
- data/lib/gloo/verbs/redirect.rb +52 -2
- data/lib/gloo/verbs/reload.rb +27 -0
- data/lib/gloo/verbs/run.rb +39 -0
- data/lib/gloo/verbs/save.rb +26 -0
- data/lib/gloo/verbs/show.rb +54 -0
- data/lib/gloo/verbs/tell.rb +32 -0
- data/lib/gloo/verbs/throw.rb +29 -0
- data/lib/gloo/verbs/unless.rb +50 -0
- data/lib/gloo/verbs/unload.rb +23 -0
- data/lib/gloo/verbs/version.rb +37 -3
- data/lib/gloo/verbs/wait.rb +26 -0
- metadata +28 -20
data/lib/gloo/verbs/redirect.rb
CHANGED
|
@@ -122,16 +122,66 @@ module Gloo
|
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
-
#
|
|
125
|
+
#
|
|
126
126
|
# Redirect to another script.
|
|
127
127
|
# This stops execution of the current script.
|
|
128
|
-
#
|
|
128
|
+
#
|
|
129
129
|
def redirect_to_script
|
|
130
130
|
@engine.exec_env.running_script.break_out
|
|
131
131
|
|
|
132
132
|
Gloo::Exec::Dispatch.message( @engine, RUN_MESSAGE, @target_obj )
|
|
133
133
|
end
|
|
134
134
|
|
|
135
|
+
# ---------------------------------------------------------------------
|
|
136
|
+
# Verb Documentation
|
|
137
|
+
# ---------------------------------------------------------------------
|
|
138
|
+
|
|
139
|
+
#
|
|
140
|
+
# Get the verb's documentation data.
|
|
141
|
+
#
|
|
142
|
+
def self.doc_data
|
|
143
|
+
{
|
|
144
|
+
:name => KEYWORD,
|
|
145
|
+
:shortcut => KEYWORD_SHORT,
|
|
146
|
+
:description => 'Redirect from the current script (or page). ' \
|
|
147
|
+
'There are 3 ways to use this verb: redirect in a script; ' \
|
|
148
|
+
'redirect from one page to another, where the parameter is ' \
|
|
149
|
+
'a path to a page; or redirect (hard) to an external web ' \
|
|
150
|
+
'site, where the parameter is the URL.',
|
|
151
|
+
:syntax => [
|
|
152
|
+
'redirect {path.to.object}',
|
|
153
|
+
'redirect https://example.com/ (hard)'
|
|
154
|
+
],
|
|
155
|
+
:parameters => [
|
|
156
|
+
'{path.to.object} — Reference to the script to run, or ' \
|
|
157
|
+
'reference to the page to redirect to. In the case of a ' \
|
|
158
|
+
'redirect (hard) this is the target website we will redirect to.'
|
|
159
|
+
],
|
|
160
|
+
:result => 'No more commands are executed in the currently ' \
|
|
161
|
+
'running script. Execution transfers to the target script. ' \
|
|
162
|
+
'If the target is a page, the current page is replaced with ' \
|
|
163
|
+
'the target page.',
|
|
164
|
+
:errors => [
|
|
165
|
+
"#{MISSING_EXPR_ERR} — Redirect requires the target page or script to redirect to.",
|
|
166
|
+
"#{BAD_TARGET_ERR} — The target object does not exist or cannot receive the redirect.",
|
|
167
|
+
"#{APP_NOT_RUNING_ERR} — Page cannot redirect because the application is not running."
|
|
168
|
+
],
|
|
169
|
+
:examples => <<~EXAMPLES.strip
|
|
170
|
+
# Redirect to a different script:
|
|
171
|
+
redirect [can] :
|
|
172
|
+
x [bool] : false
|
|
173
|
+
first_time [script] : show 'It is true (first time)'
|
|
174
|
+
second_time [script] : show 'It is true (second time)'
|
|
175
|
+
on_load [script] :
|
|
176
|
+
if ^.x then go ^.first_time
|
|
177
|
+
show 'skipping first time'
|
|
178
|
+
put true into ^.x
|
|
179
|
+
if ^.x then go ^.second_time
|
|
180
|
+
show 'skipping second time'
|
|
181
|
+
EXAMPLES
|
|
182
|
+
}
|
|
183
|
+
end
|
|
184
|
+
|
|
135
185
|
end
|
|
136
186
|
end
|
|
137
187
|
end
|
data/lib/gloo/verbs/reload.rb
CHANGED
|
@@ -40,6 +40,33 @@ module Gloo
|
|
|
40
40
|
|
|
41
41
|
private
|
|
42
42
|
|
|
43
|
+
# ---------------------------------------------------------------------
|
|
44
|
+
# Verb Documentation
|
|
45
|
+
# ---------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
#
|
|
48
|
+
# Get the verb's documentation data.
|
|
49
|
+
#
|
|
50
|
+
def self.doc_data
|
|
51
|
+
{
|
|
52
|
+
:name => KEYWORD,
|
|
53
|
+
:shortcut => KEYWORD_SHORT,
|
|
54
|
+
:description => 'Re-load to original state. This will ' \
|
|
55
|
+
'essentially re-run gloo with the parameters given during ' \
|
|
56
|
+
'start-up. Use the files command to see the list of files ' \
|
|
57
|
+
'that will be re-loaded. Any changes made externally in the ' \
|
|
58
|
+
'stored files will take effect.',
|
|
59
|
+
:syntax => [ 'reload' ],
|
|
60
|
+
:result => 'Each open file will be first unloaded and then ' \
|
|
61
|
+
'loaded again. Note that re-load does not trigger the ' \
|
|
62
|
+
'on_load script to run. There is an on_reload message sent ' \
|
|
63
|
+
'to all open files.',
|
|
64
|
+
:examples => <<~EXAMPLES.strip
|
|
65
|
+
> reload
|
|
66
|
+
EXAMPLES
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
43
70
|
end
|
|
44
71
|
end
|
|
45
72
|
end
|
data/lib/gloo/verbs/run.rb
CHANGED
|
@@ -70,6 +70,45 @@ module Gloo
|
|
|
70
70
|
@engine.parser.run expr.evaluate
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
# ---------------------------------------------------------------------
|
|
74
|
+
# Verb Documentation
|
|
75
|
+
# ---------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
#
|
|
78
|
+
# Get the verb's documentation data.
|
|
79
|
+
#
|
|
80
|
+
def self.doc_data
|
|
81
|
+
{
|
|
82
|
+
:name => KEYWORD,
|
|
83
|
+
:shortcut => KEYWORD_SHORT,
|
|
84
|
+
:description => 'Run a script or other object. This is the ' \
|
|
85
|
+
'same as sending a run message to the object.',
|
|
86
|
+
:syntax => [
|
|
87
|
+
'run {path.to.object}',
|
|
88
|
+
'run ~> {expression}'
|
|
89
|
+
],
|
|
90
|
+
:parameters => [
|
|
91
|
+
'{path.to.object} — Reference to the object which will be ' \
|
|
92
|
+
'run. The object must be a runnable object such as a script.',
|
|
93
|
+
'{expression} — Evaluate the expression and run it.'
|
|
94
|
+
],
|
|
95
|
+
:result => 'The result depends on the object that is run.',
|
|
96
|
+
:errors => [
|
|
97
|
+
"#{MISSING_EXPR_ERR} — No expression is provided as parameter to the verb."
|
|
98
|
+
],
|
|
99
|
+
:examples => <<~EXAMPLES.strip
|
|
100
|
+
> run my.script
|
|
101
|
+
|
|
102
|
+
> create s as script : "show 3 + 4"
|
|
103
|
+
> run s
|
|
104
|
+
|
|
105
|
+
# Run a script in an evaluated expression:
|
|
106
|
+
> create s as string : "show 3 + 4"
|
|
107
|
+
> run ~> s
|
|
108
|
+
EXAMPLES
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
73
112
|
end
|
|
74
113
|
end
|
|
75
114
|
end
|
data/lib/gloo/verbs/save.rb
CHANGED
|
@@ -34,6 +34,32 @@ module Gloo
|
|
|
34
34
|
return KEYWORD_SHORT
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# ---------------------------------------------------------------------
|
|
38
|
+
# Verb Documentation
|
|
39
|
+
# ---------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
# Get the verb's documentation data.
|
|
43
|
+
#
|
|
44
|
+
def self.doc_data
|
|
45
|
+
{
|
|
46
|
+
:name => KEYWORD,
|
|
47
|
+
:shortcut => KEYWORD_SHORT,
|
|
48
|
+
:description => 'Save a previously loaded object to a .gloo ' \
|
|
49
|
+
'file. The path will be for the root level object that was ' \
|
|
50
|
+
'loaded earlier.',
|
|
51
|
+
:syntax => [ 'save {path.to.object}' ],
|
|
52
|
+
:parameters => [
|
|
53
|
+
'{path.to.object} — Name of the object file that is to be saved.'
|
|
54
|
+
],
|
|
55
|
+
:result => 'The file is updated with the latest object state.',
|
|
56
|
+
:notes => 'The save verb is not currently fully functional.',
|
|
57
|
+
:examples => <<~EXAMPLES.strip
|
|
58
|
+
> save my_obj
|
|
59
|
+
EXAMPLES
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
37
63
|
end
|
|
38
64
|
end
|
|
39
65
|
end
|
data/lib/gloo/verbs/show.rb
CHANGED
|
@@ -58,6 +58,60 @@ module Gloo
|
|
|
58
58
|
return str
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
# ---------------------------------------------------------------------
|
|
62
|
+
# Verb Documentation
|
|
63
|
+
# ---------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
#
|
|
66
|
+
# Get the verb's documentation data.
|
|
67
|
+
#
|
|
68
|
+
def self.doc_data
|
|
69
|
+
{
|
|
70
|
+
:name => KEYWORD,
|
|
71
|
+
:shortcut => KEYWORD_SHORT,
|
|
72
|
+
:description => "Show an object's value, a literal or the " \
|
|
73
|
+
'result of an evaluation.',
|
|
74
|
+
:syntax => [
|
|
75
|
+
'show {target}',
|
|
76
|
+
'show {target} ({color})'
|
|
77
|
+
],
|
|
78
|
+
:parameters => [
|
|
79
|
+
'{target} — The object that we want to see. The target ' \
|
|
80
|
+
'might be the path to an object, a literal or an ' \
|
|
81
|
+
'expression to be evaluated before being shown.',
|
|
82
|
+
'{color} — Optional color for the text.'
|
|
83
|
+
],
|
|
84
|
+
:result => "The object's value is shown, or the literal, or " \
|
|
85
|
+
'the result of the evaluated expression is shown. It will ' \
|
|
86
|
+
"contain the object's value.",
|
|
87
|
+
:examples => <<~EXAMPLES.strip,
|
|
88
|
+
> show "me"
|
|
89
|
+
> show "hello " "world"
|
|
90
|
+
> show 132 * 23
|
|
91
|
+
|
|
92
|
+
> create x : "boo"
|
|
93
|
+
> show x
|
|
94
|
+
EXAMPLES
|
|
95
|
+
:notes => <<~NOTES.strip
|
|
96
|
+
Example with Color:
|
|
97
|
+
|
|
98
|
+
#
|
|
99
|
+
# Show multiple messages in color
|
|
100
|
+
#
|
|
101
|
+
|
|
102
|
+
colors [can] :
|
|
103
|
+
var [string] : red
|
|
104
|
+
on_load [script] :
|
|
105
|
+
show "red" (colors.var)
|
|
106
|
+
show "blue" (blue)
|
|
107
|
+
show "green" (green)
|
|
108
|
+
show "white" (white)
|
|
109
|
+
show "black" (black)
|
|
110
|
+
show "yellow" (yellow)
|
|
111
|
+
NOTES
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
|
|
61
115
|
end
|
|
62
116
|
end
|
|
63
117
|
end
|
data/lib/gloo/verbs/tell.rb
CHANGED
|
@@ -50,6 +50,38 @@ module Gloo
|
|
|
50
50
|
|
|
51
51
|
private
|
|
52
52
|
|
|
53
|
+
# ---------------------------------------------------------------------
|
|
54
|
+
# Verb Documentation
|
|
55
|
+
# ---------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
#
|
|
58
|
+
# Get the verb's documentation data.
|
|
59
|
+
#
|
|
60
|
+
def self.doc_data
|
|
61
|
+
{
|
|
62
|
+
:name => KEYWORD,
|
|
63
|
+
:shortcut => KEYWORD_SHORT,
|
|
64
|
+
:description => 'Send a message to an object. Ask the object ' \
|
|
65
|
+
'to perform an action.',
|
|
66
|
+
:syntax => [ 'tell {path.to.object} to {message}' ],
|
|
67
|
+
:parameters => [
|
|
68
|
+
'{path.to.object} — The object that we want to send a message to.',
|
|
69
|
+
'{message} — The message to send.'
|
|
70
|
+
],
|
|
71
|
+
:result => 'The result depends on the message that is sent.',
|
|
72
|
+
:errors => [
|
|
73
|
+
"#{UNKNOWN_MSG_ERR} — No message was specified, or the `to` keyword is missing.",
|
|
74
|
+
'Object was not found — The target of the message was not found.'
|
|
75
|
+
],
|
|
76
|
+
:examples => <<~EXAMPLES.strip
|
|
77
|
+
> tell an.obj to unload
|
|
78
|
+
> tell the.script to run
|
|
79
|
+
> tell my.str to up
|
|
80
|
+
> tell the.container to count
|
|
81
|
+
EXAMPLES
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
53
85
|
end
|
|
54
86
|
end
|
|
55
87
|
end
|
data/lib/gloo/verbs/throw.rb
CHANGED
|
@@ -50,6 +50,35 @@ module Gloo
|
|
|
50
50
|
return expr.evaluate
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
# ---------------------------------------------------------------------
|
|
54
|
+
# Verb Documentation
|
|
55
|
+
# ---------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
#
|
|
58
|
+
# Get the verb's documentation data.
|
|
59
|
+
#
|
|
60
|
+
def self.doc_data
|
|
61
|
+
{
|
|
62
|
+
:name => KEYWORD,
|
|
63
|
+
:shortcut => KEYWORD_SHORT,
|
|
64
|
+
:description => 'Deliberately raise a Ruby exception, to ' \
|
|
65
|
+
'exercise the on_exception handling pipeline (e.g. for ' \
|
|
66
|
+
'testing). Execution continues normally after the throw — ' \
|
|
67
|
+
'it is not a fatal halt.',
|
|
68
|
+
:syntax => [ 'throw {optional message}' ],
|
|
69
|
+
:parameters => [
|
|
70
|
+
"{message} — Optional. An expression evaluated and used as the thrown message. If not provided, a default message (\"#{DEFAULT_MSG}\") is used."
|
|
71
|
+
],
|
|
72
|
+
:result => "Fires the app's on_exception handler, if one is " \
|
|
73
|
+
'defined, with exception_data.message set to the thrown ' \
|
|
74
|
+
'message. Does not fire on_error.',
|
|
75
|
+
:examples => <<~EXAMPLES.strip
|
|
76
|
+
> throw
|
|
77
|
+
> throw "custom message"
|
|
78
|
+
EXAMPLES
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
53
82
|
end
|
|
54
83
|
end
|
|
55
84
|
end
|
data/lib/gloo/verbs/unless.rb
CHANGED
|
@@ -101,6 +101,56 @@ module Gloo
|
|
|
101
101
|
|
|
102
102
|
i.run
|
|
103
103
|
end
|
|
104
|
+
|
|
105
|
+
# ---------------------------------------------------------------------
|
|
106
|
+
# Verb Documentation
|
|
107
|
+
# ---------------------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
#
|
|
110
|
+
# Get the verb's documentation data.
|
|
111
|
+
#
|
|
112
|
+
def self.doc_data
|
|
113
|
+
{
|
|
114
|
+
:name => KEYWORD,
|
|
115
|
+
:shortcut => KEYWORD_SHORT,
|
|
116
|
+
:description => "Unless an expression is true, do something. " \
|
|
117
|
+
"This is the opposite of the if verb.",
|
|
118
|
+
:syntax => [
|
|
119
|
+
'unless {true} do {command}',
|
|
120
|
+
'unless {true} do {command} else {else command}'
|
|
121
|
+
],
|
|
122
|
+
:parameters => [
|
|
123
|
+
'{true} — Does the expression evaluate to true?',
|
|
124
|
+
'{command} — Execute command if the expression is false.',
|
|
125
|
+
'{else command} — The else command is optional. Execute else command if the expression is true.'
|
|
126
|
+
],
|
|
127
|
+
:result => 'Unchanged if the expression is true. If not true, ' \
|
|
128
|
+
'then the result will be based on the command specified ' \
|
|
129
|
+
'after the do keyword.',
|
|
130
|
+
:errors => [
|
|
131
|
+
"#{MISSING_EXPR_ERR} — No expression is provided as parameter to the verb.",
|
|
132
|
+
'Other errors depend on the command that is run.'
|
|
133
|
+
],
|
|
134
|
+
:examples => <<~EXAMPLES.strip
|
|
135
|
+
#
|
|
136
|
+
# Unless statement example
|
|
137
|
+
#
|
|
138
|
+
|
|
139
|
+
unless [container] :
|
|
140
|
+
|
|
141
|
+
x [bool] : true
|
|
142
|
+
false_msg [string] : It is NOT true!
|
|
143
|
+
|
|
144
|
+
on_load [script] :
|
|
145
|
+
unless unless.x do show "first time: " + unless.false_msg
|
|
146
|
+
unless ^.x do show 'F' else show 'T'
|
|
147
|
+
|
|
148
|
+
put false into unless.x
|
|
149
|
+
unless unless.x do show "second time: " + unless.false_msg
|
|
150
|
+
unless ^.x do show 'F' else show 'T'
|
|
151
|
+
EXAMPLES
|
|
152
|
+
}
|
|
153
|
+
end
|
|
104
154
|
end
|
|
105
155
|
end
|
|
106
156
|
end
|
data/lib/gloo/verbs/unload.rb
CHANGED
|
@@ -41,6 +41,29 @@ module Gloo
|
|
|
41
41
|
|
|
42
42
|
private
|
|
43
43
|
|
|
44
|
+
# ---------------------------------------------------------------------
|
|
45
|
+
# Verb Documentation
|
|
46
|
+
# ---------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
#
|
|
49
|
+
# Get the verb's documentation data.
|
|
50
|
+
#
|
|
51
|
+
def self.doc_data
|
|
52
|
+
{
|
|
53
|
+
:name => KEYWORD,
|
|
54
|
+
:shortcut => KEYWORD_SHORT,
|
|
55
|
+
:description => 'Un-load all open files. Use the files ' \
|
|
56
|
+
'command to see the list of files that will be un-loaded. ' \
|
|
57
|
+
'The heap will be empty after this is run, so be sure to ' \
|
|
58
|
+
'save state prior to executing.',
|
|
59
|
+
:syntax => [ 'unload' ],
|
|
60
|
+
:result => 'All objects will be unloaded from the heap.',
|
|
61
|
+
:examples => <<~EXAMPLES.strip
|
|
62
|
+
> unload
|
|
63
|
+
EXAMPLES
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
44
67
|
end
|
|
45
68
|
end
|
|
46
69
|
end
|
data/lib/gloo/verbs/version.rb
CHANGED
|
@@ -58,11 +58,11 @@ module Gloo
|
|
|
58
58
|
@engine.platform.show notes
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
#
|
|
61
|
+
#
|
|
62
62
|
# Is the request to show version notes?
|
|
63
|
-
#
|
|
63
|
+
#
|
|
64
64
|
def vers_notes?
|
|
65
|
-
if ( @tokens.token_count > 1 ) && (
|
|
65
|
+
if ( @tokens.token_count > 1 ) && (
|
|
66
66
|
( @tokens.last == NOTES ) || ( @tokens.last == NOTES_SHORT ) )
|
|
67
67
|
return true
|
|
68
68
|
end
|
|
@@ -70,6 +70,40 @@ module Gloo
|
|
|
70
70
|
return false
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
# ---------------------------------------------------------------------
|
|
74
|
+
# Verb Documentation
|
|
75
|
+
# ---------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
#
|
|
78
|
+
# Get the verb's documentation data.
|
|
79
|
+
#
|
|
80
|
+
def self.doc_data
|
|
81
|
+
{
|
|
82
|
+
:name => KEYWORD,
|
|
83
|
+
:shortcut => KEYWORD_SHORT,
|
|
84
|
+
:description => 'Show the application version information. ' \
|
|
85
|
+
'This is the same as showing the version by running gloo ' \
|
|
86
|
+
'with the --version command line parameter.',
|
|
87
|
+
:syntax => [
|
|
88
|
+
'version',
|
|
89
|
+
'version notes'
|
|
90
|
+
],
|
|
91
|
+
:parameters => [
|
|
92
|
+
'notes ({n}) — Optional. Show the version notes (release notes) instead of just the version number.'
|
|
93
|
+
],
|
|
94
|
+
:examples => <<~EXAMPLES.strip
|
|
95
|
+
> version
|
|
96
|
+
> v
|
|
97
|
+
This is the same as running this from the command line:
|
|
98
|
+
|
|
99
|
+
> gloo --version
|
|
100
|
+
|
|
101
|
+
> version notes
|
|
102
|
+
> v n
|
|
103
|
+
EXAMPLES
|
|
104
|
+
}
|
|
105
|
+
end
|
|
106
|
+
|
|
73
107
|
end
|
|
74
108
|
end
|
|
75
109
|
end
|
data/lib/gloo/verbs/wait.rb
CHANGED
|
@@ -37,6 +37,32 @@ module Gloo
|
|
|
37
37
|
return KEYWORD_SHORT
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# ---------------------------------------------------------------------
|
|
41
|
+
# Verb Documentation
|
|
42
|
+
# ---------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
#
|
|
45
|
+
# Get the verb's documentation data.
|
|
46
|
+
#
|
|
47
|
+
def self.doc_data
|
|
48
|
+
{
|
|
49
|
+
:name => KEYWORD,
|
|
50
|
+
:shortcut => KEYWORD_SHORT,
|
|
51
|
+
:description => 'Wait for the given number of seconds.',
|
|
52
|
+
:syntax => [ 'wait {seconds}' ],
|
|
53
|
+
:parameters => [
|
|
54
|
+
'{seconds} — The number of seconds to wait. Optional. If no value is given, we will wait for 1 second.'
|
|
55
|
+
],
|
|
56
|
+
:examples => <<~EXAMPLES.strip
|
|
57
|
+
> wait
|
|
58
|
+
> wait 3
|
|
59
|
+
|
|
60
|
+
> create x as int : 10
|
|
61
|
+
> wait x
|
|
62
|
+
EXAMPLES
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
40
66
|
end
|
|
41
67
|
end
|
|
42
68
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gloo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Crane
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -68,36 +67,30 @@ dependencies:
|
|
|
68
67
|
name: concurrent-ruby
|
|
69
68
|
requirement: !ruby/object:Gem::Requirement
|
|
70
69
|
requirements:
|
|
71
|
-
- -
|
|
70
|
+
- - "~>"
|
|
72
71
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: 1.3.
|
|
72
|
+
version: 1.3.7
|
|
74
73
|
type: :development
|
|
75
74
|
prerelease: false
|
|
76
75
|
version_requirements: !ruby/object:Gem::Requirement
|
|
77
76
|
requirements:
|
|
78
|
-
- -
|
|
77
|
+
- - "~>"
|
|
79
78
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 1.3.
|
|
79
|
+
version: 1.3.7
|
|
81
80
|
- !ruby/object:Gem::Dependency
|
|
82
81
|
name: activesupport
|
|
83
82
|
requirement: !ruby/object:Gem::Requirement
|
|
84
83
|
requirements:
|
|
85
84
|
- - "~>"
|
|
86
85
|
- !ruby/object:Gem::Version
|
|
87
|
-
version:
|
|
88
|
-
- - ">="
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: 6.1.5
|
|
86
|
+
version: 7.2.3.1
|
|
91
87
|
type: :runtime
|
|
92
88
|
prerelease: false
|
|
93
89
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
90
|
requirements:
|
|
95
91
|
- - "~>"
|
|
96
92
|
- !ruby/object:Gem::Version
|
|
97
|
-
version:
|
|
98
|
-
- - ">="
|
|
99
|
-
- !ruby/object:Gem::Version
|
|
100
|
-
version: 6.1.5
|
|
93
|
+
version: 7.2.3.1
|
|
101
94
|
- !ruby/object:Gem::Dependency
|
|
102
95
|
name: chronic
|
|
103
96
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -272,6 +265,16 @@ files:
|
|
|
272
265
|
- bin/console
|
|
273
266
|
- bin/run
|
|
274
267
|
- bin/setup
|
|
268
|
+
- docs/application.md
|
|
269
|
+
- docs/getting_started.md
|
|
270
|
+
- docs/iterators.md
|
|
271
|
+
- docs/language_objects.md
|
|
272
|
+
- docs/language_scripting.md
|
|
273
|
+
- docs/language_syntax.md
|
|
274
|
+
- docs/objects.md
|
|
275
|
+
- docs/operators.md
|
|
276
|
+
- docs/plugins.md
|
|
277
|
+
- docs/verbs.md
|
|
275
278
|
- exe/gloo
|
|
276
279
|
- exe/o
|
|
277
280
|
- gloo.gemspec
|
|
@@ -320,6 +323,9 @@ files:
|
|
|
320
323
|
- lib/gloo/core/pn.rb
|
|
321
324
|
- lib/gloo/core/tokens.rb
|
|
322
325
|
- lib/gloo/core/verb.rb
|
|
326
|
+
- lib/gloo/docs/doc_data.rb
|
|
327
|
+
- lib/gloo/docs/help_shell.rb
|
|
328
|
+
- lib/gloo/docs/markdown_renderer.rb
|
|
323
329
|
- lib/gloo/exec/action.rb
|
|
324
330
|
- lib/gloo/exec/dispatch.rb
|
|
325
331
|
- lib/gloo/exec/exec_env.rb
|
|
@@ -385,6 +391,9 @@ files:
|
|
|
385
391
|
- lib/gloo/plugin/callback.rb
|
|
386
392
|
- lib/gloo/plugin/ext_manager.rb
|
|
387
393
|
- lib/gloo/plugin/lib_manager.rb
|
|
394
|
+
- lib/gloo/shell/command_node.rb
|
|
395
|
+
- lib/gloo/shell/context.rb
|
|
396
|
+
- lib/gloo/shell/runner.rb
|
|
388
397
|
- lib/gloo/verbs/break.rb
|
|
389
398
|
- lib/gloo/verbs/check.rb
|
|
390
399
|
- lib/gloo/verbs/cls.rb
|
|
@@ -454,11 +463,11 @@ files:
|
|
|
454
463
|
- test.gloo/verbs/run.test.gloo
|
|
455
464
|
- test.gloo/verbs/tell.test.gloo
|
|
456
465
|
- test.gloo/verbs/unless.test.gloo
|
|
457
|
-
homepage:
|
|
466
|
+
homepage: https://github.com/ecrane/gloo
|
|
458
467
|
licenses:
|
|
459
468
|
- MIT
|
|
460
|
-
metadata:
|
|
461
|
-
|
|
469
|
+
metadata:
|
|
470
|
+
documentation_uri: https://github.com/ecrane/gloo
|
|
462
471
|
rdoc_options: []
|
|
463
472
|
require_paths:
|
|
464
473
|
- lib
|
|
@@ -473,8 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
473
482
|
- !ruby/object:Gem::Version
|
|
474
483
|
version: '0'
|
|
475
484
|
requirements: []
|
|
476
|
-
rubygems_version:
|
|
477
|
-
signing_key:
|
|
485
|
+
rubygems_version: 4.0.17
|
|
478
486
|
specification_version: 4
|
|
479
487
|
summary: Gloo scripting language. A scripting language built on ruby.
|
|
480
488
|
test_files: []
|