gloo 6.7.1 → 6.7.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.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +4 -0
- data/lib/gloo/app/engine.rb +1 -1
- data/lib/gloo/core/dictionary.rb +30 -21
- data/lib/gloo/plugin/callback.rb +2 -2
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dfd9613e0faf6957907641ff2f7a8eee6e70d8d99478c43a910e65259537eb30
|
|
4
|
+
data.tar.gz: 4b5a3f2f27da015cdaa4899feed21bdedce47c9f3988e346ec4ed7dad06aa666
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6010976ec3a99afee69a02c076d1da1ae44b41f0869f908e7239019bf06c948e3e67fe45221a2a0225ca00bad1f6278a6e02a38ba221e40e545cd88c54ce8aa
|
|
7
|
+
data.tar.gz: ce1ff1aeff6849d3f7f3b89bfc783a4cb140d82b9f7f0f3e6c5792ba84b19b66b33c3bdb464f5bccca56add517f0ac10102fbf65e6389ef91cc9041f80aa04d7
|
data/lib/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.7.
|
|
1
|
+
6.7.2
|
data/lib/VERSION_NOTES
CHANGED
data/lib/gloo/app/engine.rb
CHANGED
data/lib/gloo/core/dictionary.rb
CHANGED
|
@@ -27,10 +27,14 @@ module Gloo
|
|
|
27
27
|
#
|
|
28
28
|
# Get the singleton Dictionary and Initialize
|
|
29
29
|
# if this is the first time.
|
|
30
|
+
# The engine is optional -- verbs/objects self-register at class
|
|
31
|
+
# load time, before any engine (and its log) exists. When an
|
|
32
|
+
# engine is given, it's used to report a duplicate-registration
|
|
33
|
+
# error; without one, duplicates are just silently skipped.
|
|
30
34
|
#
|
|
31
|
-
def self.get
|
|
35
|
+
def self.get( engine=nil )
|
|
32
36
|
o = Gloo::Core::Dictionary.instance
|
|
33
|
-
o.init if o.verbs.count == 0
|
|
37
|
+
o.init( engine ) if o.verbs.count == 0
|
|
34
38
|
return o
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -51,9 +55,9 @@ module Gloo
|
|
|
51
55
|
#
|
|
52
56
|
# Initialize verbs and objects in the dictionary.
|
|
53
57
|
#
|
|
54
|
-
def init
|
|
55
|
-
init_verbs
|
|
56
|
-
init_objs
|
|
58
|
+
def init( engine=nil )
|
|
59
|
+
init_verbs( engine )
|
|
60
|
+
init_objs( engine )
|
|
57
61
|
end
|
|
58
62
|
|
|
59
63
|
#
|
|
@@ -145,15 +149,15 @@ module Gloo
|
|
|
145
149
|
#
|
|
146
150
|
# Register a verb after start up.
|
|
147
151
|
#
|
|
148
|
-
def register_verb_post_start( verb_class )
|
|
149
|
-
add_verb verb_class
|
|
152
|
+
def register_verb_post_start( verb_class, engine=nil )
|
|
153
|
+
add_verb verb_class, engine
|
|
150
154
|
end
|
|
151
155
|
|
|
152
156
|
#
|
|
153
157
|
# Register an object type after start up.
|
|
154
158
|
#
|
|
155
|
-
def register_obj_post_start( obj_class )
|
|
156
|
-
add_object obj_class
|
|
159
|
+
def register_obj_post_start( obj_class, engine=nil )
|
|
160
|
+
add_object obj_class, engine
|
|
157
161
|
end
|
|
158
162
|
|
|
159
163
|
#
|
|
@@ -200,28 +204,32 @@ module Gloo
|
|
|
200
204
|
#
|
|
201
205
|
# Init the list of objects.
|
|
202
206
|
#
|
|
203
|
-
def init_objs
|
|
207
|
+
def init_objs( engine=nil )
|
|
204
208
|
@obj_references.each do |o|
|
|
205
|
-
add_object o
|
|
209
|
+
add_object o, engine
|
|
206
210
|
end
|
|
207
211
|
end
|
|
208
212
|
|
|
209
213
|
#
|
|
210
214
|
# Init the list of verbs.
|
|
211
215
|
#
|
|
212
|
-
def init_verbs
|
|
216
|
+
def init_verbs( engine=nil )
|
|
213
217
|
@verb_references.each do |v|
|
|
214
|
-
add_verb v
|
|
218
|
+
add_verb v, engine
|
|
215
219
|
end
|
|
216
220
|
end
|
|
217
221
|
|
|
218
|
-
#
|
|
219
|
-
# Add an object to the dictionary
|
|
220
|
-
#
|
|
221
|
-
|
|
222
|
+
#
|
|
223
|
+
# Add an object to the dictionary.
|
|
224
|
+
# The engine is optional and is only used to report a
|
|
225
|
+
# duplicate-registration error -- when it's not given (e.g.
|
|
226
|
+
# self-registration at class load time), duplicates are just
|
|
227
|
+
# silently skipped.
|
|
228
|
+
#
|
|
229
|
+
def add_object( obj, engine=nil )
|
|
222
230
|
# Make sure it hasn't already been registered
|
|
223
231
|
if ( @objs.key?(obj.typename) || @objs.key?(obj.short_typename) )
|
|
224
|
-
|
|
232
|
+
engine&.err "duplicate object type '#{obj.typename}' or '#{obj.short_typename}'"
|
|
225
233
|
return
|
|
226
234
|
end
|
|
227
235
|
|
|
@@ -232,12 +240,13 @@ module Gloo
|
|
|
232
240
|
end
|
|
233
241
|
|
|
234
242
|
#
|
|
235
|
-
# Add a verb to the dictionary
|
|
243
|
+
# Add a verb to the dictionary.
|
|
244
|
+
# The engine is optional -- see add_object.
|
|
236
245
|
#
|
|
237
|
-
def add_verb( verb )
|
|
246
|
+
def add_verb( verb, engine=nil )
|
|
238
247
|
# Make sure it hasn't already been registered
|
|
239
248
|
if ( verb?( verb.keyword ) || verb?( verb.keyword_shortcut ) )
|
|
240
|
-
|
|
249
|
+
engine&.err "duplicate verb keyword '#{verb.keyword}' or '#{verb.keyword_shortcut}'"
|
|
241
250
|
return
|
|
242
251
|
end
|
|
243
252
|
|
data/lib/gloo/plugin/callback.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Gloo
|
|
|
17
17
|
#
|
|
18
18
|
def register_verb( verb_class )
|
|
19
19
|
@engine.log.debug "Registering verb: #{verb_class} from callback helper"
|
|
20
|
-
@engine.dictionary.register_verb_post_start( verb_class )
|
|
20
|
+
@engine.dictionary.register_verb_post_start( verb_class, @engine )
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
#
|
|
@@ -25,7 +25,7 @@ module Gloo
|
|
|
25
25
|
#
|
|
26
26
|
def register_obj( object_class )
|
|
27
27
|
@engine.log.debug "Registering object: #{object_class} from callback helper"
|
|
28
|
-
@engine.dictionary.register_obj_post_start( object_class )
|
|
28
|
+
@engine.dictionary.register_obj_post_start( object_class, @engine )
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
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: 6.7.
|
|
4
|
+
version: 6.7.2
|
|
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
|
|
@@ -508,7 +507,6 @@ licenses:
|
|
|
508
507
|
- MIT
|
|
509
508
|
metadata:
|
|
510
509
|
documentation_uri: https://github.com/ecrane/gloo
|
|
511
|
-
post_install_message:
|
|
512
510
|
rdoc_options: []
|
|
513
511
|
require_paths:
|
|
514
512
|
- lib
|
|
@@ -523,8 +521,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
523
521
|
- !ruby/object:Gem::Version
|
|
524
522
|
version: '0'
|
|
525
523
|
requirements: []
|
|
526
|
-
rubygems_version:
|
|
527
|
-
signing_key:
|
|
524
|
+
rubygems_version: 4.0.17
|
|
528
525
|
specification_version: 4
|
|
529
526
|
summary: Gloo scripting language. A scripting language built on ruby.
|
|
530
527
|
test_files: []
|