gloo 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gloo.gemspec +1 -0
- data/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +7 -0
- data/lib/gloo/app/platform.rb +7 -1
- data/lib/gloo/convert/falseclass_to_integer.rb +20 -0
- data/lib/gloo/convert/nilclass_to_date.rb +21 -0
- data/lib/gloo/convert/nilclass_to_datetime.rb +21 -0
- data/lib/gloo/convert/nilclass_to_integer.rb +21 -0
- data/lib/gloo/convert/nilclass_to_string.rb +21 -0
- data/lib/gloo/convert/nilclass_to_time.rb +21 -0
- data/lib/gloo/convert/trueclass_to_integer.rb +20 -0
- data/lib/gloo/core/error.rb +7 -0
- data/lib/gloo/core/it.rb +7 -0
- data/lib/gloo/core/obj.rb +7 -0
- data/lib/gloo/core/parser.rb +6 -3
- data/lib/gloo/objs/basic/integer.rb +1 -0
- data/lib/gloo/objs/{basic → ctrl}/function.rb +12 -0
- data/lib/gloo/objs/data/markdown.rb +60 -2
- data/lib/gloo/objs/web_svr/page.rb +8 -4
- data/lib/gloo/verbs/invoke.rb +80 -0
- data/lib/gloo/web_svr/asset.rb +24 -24
- metadata +26 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f90941d4a489efde1a15b50d55c85af80e1ac02e012102644a21613ce23e90
|
4
|
+
data.tar.gz: 3216f0732a0e59b258453ce5d929f751477a264586e73f668ced1332cb601d61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b68948e64413281d9a1f51542888b6818adf28adfb0a625e0c8415c596600207365d761a6c5ebe36c5cebbeb6ab7ee6a6244dc1e8f215b58f5b7000909032d18
|
7
|
+
data.tar.gz: 9cef0e42026158497bf424828e691958a196ff7a6cd65771dff504a59c2a205691b997485e7cd1b50e8882d349076b0d8f8b8564f794d953021cf2e4a2310667
|
data/gloo.gemspec
CHANGED
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.0
|
data/lib/VERSION_NOTES
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
3.3.0 - 2024.08.16
|
2
|
+
- Adds nil converters to string and integer.
|
3
|
+
- Adds render to markdown object to convert to html
|
4
|
+
- Adds invoke verb to call a function from a script
|
5
|
+
- Web updates: singular name conventions
|
6
|
+
|
7
|
+
|
1
8
|
3.2.0 - 2024.07.07
|
2
9
|
- Update with more web server functionality, http methods, resource routing
|
3
10
|
- Expands query with additional html table support
|
data/lib/gloo/app/platform.rb
CHANGED
@@ -35,7 +35,13 @@ module Gloo
|
|
35
35
|
#
|
36
36
|
def show( msg, md=false, page=false )
|
37
37
|
if md
|
38
|
-
|
38
|
+
# 2024.08.16 - TTY::Markdown.parse msg was not working.
|
39
|
+
# Tried with redcarpet and it was not working either.
|
40
|
+
# So just leaving it for now. Not sure I even really need it.
|
41
|
+
# TODO: Revisit and clean up.
|
42
|
+
|
43
|
+
# msg = TTY::Markdown.parse msg
|
44
|
+
# msg = Gloo::Objs::Markdown.md_2_manpage( msg )
|
39
45
|
end
|
40
46
|
|
41
47
|
if page
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: FALSE to Integer.
|
5
|
+
#
|
6
|
+
|
7
|
+
module Gloo
|
8
|
+
module Convert
|
9
|
+
class FalseClassToInteger
|
10
|
+
|
11
|
+
#
|
12
|
+
# Convert the given FALSE value to an integer.
|
13
|
+
#
|
14
|
+
def convert( value )
|
15
|
+
return 0
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: Nil to Date.
|
5
|
+
#
|
6
|
+
require 'chronic'
|
7
|
+
|
8
|
+
module Gloo
|
9
|
+
module Convert
|
10
|
+
class NilClassToDate
|
11
|
+
|
12
|
+
#
|
13
|
+
# Convert a nil to a date.
|
14
|
+
#
|
15
|
+
def convert( value )
|
16
|
+
return Chronic.parse( '' )
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: Nil to DateTime.
|
5
|
+
#
|
6
|
+
require 'chronic'
|
7
|
+
|
8
|
+
module Gloo
|
9
|
+
module Convert
|
10
|
+
class NilClassToDateTime
|
11
|
+
|
12
|
+
#
|
13
|
+
# Convert a nil to a date.
|
14
|
+
#
|
15
|
+
def convert( value )
|
16
|
+
return Chronic.parse( '' )
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: Nil to Integer.
|
5
|
+
#
|
6
|
+
require 'chronic'
|
7
|
+
|
8
|
+
module Gloo
|
9
|
+
module Convert
|
10
|
+
class NilClassToInteger
|
11
|
+
|
12
|
+
#
|
13
|
+
# Convert a nil to a string.
|
14
|
+
#
|
15
|
+
def convert( value )
|
16
|
+
return 0
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: Nil to String.
|
5
|
+
#
|
6
|
+
require 'chronic'
|
7
|
+
|
8
|
+
module Gloo
|
9
|
+
module Convert
|
10
|
+
class NilClassToString
|
11
|
+
|
12
|
+
#
|
13
|
+
# Convert a nil to a string.
|
14
|
+
#
|
15
|
+
def convert( value )
|
16
|
+
return ''
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: Nil to Time.
|
5
|
+
#
|
6
|
+
require 'chronic'
|
7
|
+
|
8
|
+
module Gloo
|
9
|
+
module Convert
|
10
|
+
class NilClassToTime
|
11
|
+
|
12
|
+
#
|
13
|
+
# Convert a nil to a date.
|
14
|
+
#
|
15
|
+
def convert( value )
|
16
|
+
return Chronic.parse( '' )
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Conversion tool: TRUE to Integer.
|
5
|
+
#
|
6
|
+
|
7
|
+
module Gloo
|
8
|
+
module Convert
|
9
|
+
class TrueClassToInteger
|
10
|
+
|
11
|
+
#
|
12
|
+
# Convert the given TRUE value to an integer.
|
13
|
+
#
|
14
|
+
def convert( value )
|
15
|
+
return 1
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/gloo/core/error.rb
CHANGED
data/lib/gloo/core/it.rb
CHANGED
data/lib/gloo/core/obj.rb
CHANGED
@@ -144,6 +144,13 @@ module Gloo
|
|
144
144
|
return self.type_display == Gloo::Objs::Alias.typename
|
145
145
|
end
|
146
146
|
|
147
|
+
#
|
148
|
+
# Is this a function object?
|
149
|
+
#
|
150
|
+
def is_function?
|
151
|
+
return self.type_display == Gloo::Objs::Function.typename
|
152
|
+
end
|
153
|
+
|
147
154
|
|
148
155
|
# ---------------------------------------------------------------------
|
149
156
|
# Children
|
data/lib/gloo/core/parser.rb
CHANGED
@@ -20,8 +20,11 @@ module Gloo
|
|
20
20
|
#
|
21
21
|
# Parse a command from the immediate execution context.
|
22
22
|
#
|
23
|
-
def parse_immediate(
|
24
|
-
|
23
|
+
def parse_immediate( full_cmd )
|
24
|
+
# Break the full command into verb and params
|
25
|
+
cmd, params = split_params full_cmd
|
26
|
+
|
27
|
+
# Params are the parenthetical part of the command at the end
|
25
28
|
params = Gloo::Core::Tokens.new( params ) if params
|
26
29
|
tokens = Gloo::Core::Tokens.new( cmd )
|
27
30
|
dic = Gloo::Core::Dictionary.instance
|
@@ -42,7 +45,7 @@ module Gloo
|
|
42
45
|
if i && cmd.strip.end_with?( ')' )
|
43
46
|
pstr = cmd[ i + 1..-1 ]
|
44
47
|
params = pstr.strip[ 0..-2 ] if pstr
|
45
|
-
cmd = cmd[ 0, i
|
48
|
+
cmd = cmd[ 0, i].strip
|
46
49
|
end
|
47
50
|
return cmd, params
|
48
51
|
end
|
@@ -14,6 +14,7 @@ module Gloo
|
|
14
14
|
|
15
15
|
# Events
|
16
16
|
ON_INVOKE = 'on_invoke'.freeze
|
17
|
+
AFTER_INVOKE = 'after_invoke'.freeze
|
17
18
|
|
18
19
|
# Parameters to the function invocation.
|
19
20
|
PARAMS = 'params'.freeze
|
@@ -132,6 +133,16 @@ module Gloo
|
|
132
133
|
Gloo::Exec::Dispatch.message( @engine, 'run', o )
|
133
134
|
end
|
134
135
|
|
136
|
+
#
|
137
|
+
# Run the after invoke script if there is one.
|
138
|
+
#
|
139
|
+
def run_after_invoke
|
140
|
+
o = find_child AFTER_INVOKE
|
141
|
+
return unless o
|
142
|
+
|
143
|
+
Gloo::Exec::Dispatch.message( @engine, 'run', o )
|
144
|
+
end
|
145
|
+
|
135
146
|
|
136
147
|
# ---------------------------------------------------------------------
|
137
148
|
# Messages
|
@@ -147,6 +158,7 @@ module Gloo
|
|
147
158
|
run_on_invoke
|
148
159
|
return_value = result
|
149
160
|
@engine.heap.it.set_to return_value
|
161
|
+
run_after_invoke
|
150
162
|
|
151
163
|
return return_value
|
152
164
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# Markdown data.
|
5
5
|
#
|
6
|
+
require 'redcarpet'
|
6
7
|
|
7
8
|
module Gloo
|
8
9
|
module Objs
|
@@ -55,7 +56,7 @@ module Gloo
|
|
55
56
|
# Get a list of message names that this object receives.
|
56
57
|
#
|
57
58
|
def self.messages
|
58
|
-
return super + %w[show page]
|
59
|
+
return super + %w[show page render]
|
59
60
|
end
|
60
61
|
|
61
62
|
#
|
@@ -71,9 +72,66 @@ module Gloo
|
|
71
72
|
def msg_page
|
72
73
|
return unless self.value
|
73
74
|
|
74
|
-
@engine.platform.show(
|
75
|
+
@engine.platform.show( self.value, true, true )
|
75
76
|
end
|
76
77
|
|
78
|
+
#
|
79
|
+
# Render the markdown as HTML.
|
80
|
+
# Needs an optional parameter of where to put the rendered html.
|
81
|
+
# The html will be in 'it' as well.
|
82
|
+
#
|
83
|
+
def msg_render
|
84
|
+
html = Gloo::Objs::Markdown.md_2_html( value )
|
85
|
+
|
86
|
+
# Put the HTML in the optional parameter if one is given.
|
87
|
+
if @params&.token_count&.positive?
|
88
|
+
pn = Gloo::Core::Pn.new( @engine, @params.first )
|
89
|
+
o = pn.resolve
|
90
|
+
o.set_value html
|
91
|
+
end
|
92
|
+
|
93
|
+
# Put the HTML in it, in any case.
|
94
|
+
@engine.heap.it.set_to html
|
95
|
+
end
|
96
|
+
|
97
|
+
# ---------------------------------------------------------------------
|
98
|
+
# Static Helpers
|
99
|
+
# ---------------------------------------------------------------------
|
100
|
+
|
101
|
+
#
|
102
|
+
# Convert markdown to HTML using the
|
103
|
+
# Redcarpet markdown processor.
|
104
|
+
#
|
105
|
+
def self.md_2_html( md )
|
106
|
+
markdown = Redcarpet::Markdown.new(
|
107
|
+
Redcarpet::Render::HTML,
|
108
|
+
autolink: true,
|
109
|
+
fenced_code_blocks: true,
|
110
|
+
tables: true,
|
111
|
+
strikethrough: true )
|
112
|
+
|
113
|
+
return markdown.render( md )
|
114
|
+
end
|
115
|
+
|
116
|
+
#
|
117
|
+
# Does not work.
|
118
|
+
# See note in the platform.rb file.
|
119
|
+
#
|
120
|
+
# #
|
121
|
+
# # Convert markdown to manpage using the
|
122
|
+
# # Redcarpet markdown processor.
|
123
|
+
# #
|
124
|
+
# def self.md_2_manpage( md )
|
125
|
+
# markdown = Redcarpet::Markdown.new(
|
126
|
+
# Redcarpet::Render::ManPage,
|
127
|
+
# autolink: true,
|
128
|
+
# fenced_code_blocks: true,
|
129
|
+
# tables: true,
|
130
|
+
# strikethrough: true )
|
131
|
+
|
132
|
+
# return markdown.render( md )
|
133
|
+
# end
|
134
|
+
|
77
135
|
end
|
78
136
|
end
|
79
137
|
end
|
@@ -196,6 +196,8 @@ module Gloo
|
|
196
196
|
o = find_child ON_RENDER
|
197
197
|
return unless o
|
198
198
|
|
199
|
+
@engine.log.debug "running on_render for page"
|
200
|
+
|
199
201
|
Gloo::Exec::Dispatch.message( @engine, 'run', o )
|
200
202
|
end
|
201
203
|
|
@@ -206,6 +208,8 @@ module Gloo
|
|
206
208
|
o = find_child ON_RENDERED
|
207
209
|
return unless o
|
208
210
|
|
211
|
+
@engine.log.debug "running on_rendered for page"
|
212
|
+
|
209
213
|
Gloo::Exec::Dispatch.message( @engine, 'run', o )
|
210
214
|
end
|
211
215
|
|
@@ -321,12 +325,12 @@ module Gloo
|
|
321
325
|
@request = request
|
322
326
|
set_id if @request
|
323
327
|
|
324
|
-
# Set Params before running on render
|
325
|
-
params = params_hash
|
326
|
-
|
327
328
|
run_on_render
|
328
329
|
return nil if redirect_set?
|
329
330
|
|
331
|
+
# Set Params before running on render
|
332
|
+
params = params_hash
|
333
|
+
|
330
334
|
if is_html?
|
331
335
|
contents = render_html params
|
332
336
|
elsif is_json?
|
@@ -337,7 +341,7 @@ module Gloo
|
|
337
341
|
@engine.log.error "Unknown content type: #{content_type}"
|
338
342
|
return nil
|
339
343
|
end
|
340
|
-
|
344
|
+
|
341
345
|
run_on_rendered
|
342
346
|
@request = nil
|
343
347
|
return nil if redirect_set?
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2024 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# Invoke a function from a script.
|
5
|
+
#
|
6
|
+
|
7
|
+
module Gloo
|
8
|
+
module Verbs
|
9
|
+
class Invoke < Gloo::Core::Verb
|
10
|
+
|
11
|
+
KEYWORD = 'invoke'.freeze
|
12
|
+
KEYWORD_SHORT = '~>'.freeze
|
13
|
+
|
14
|
+
#
|
15
|
+
# Run the verb.
|
16
|
+
#
|
17
|
+
def run
|
18
|
+
if @tokens.token_count > 1
|
19
|
+
ob = @tokens.first
|
20
|
+
|
21
|
+
# Get the function object
|
22
|
+
pn = Gloo::Core::Pn.new( @engine, @tokens.second )
|
23
|
+
func = pn.resolve
|
24
|
+
|
25
|
+
# Is the object a function?
|
26
|
+
if func&.is_function?
|
27
|
+
params = get_params_arr
|
28
|
+
|
29
|
+
@engine.log.debug "invoking function: #{func.pn}"
|
30
|
+
result = func.invoke( params )
|
31
|
+
@engine.log.debug "function returned: #{result}"
|
32
|
+
@engine.heap.it.set_to result
|
33
|
+
return result
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Get the Verb's keyword.
|
40
|
+
#
|
41
|
+
def self.keyword
|
42
|
+
return KEYWORD
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Get the Verb's keyword shortcut.
|
47
|
+
#
|
48
|
+
def self.keyword_shortcut
|
49
|
+
return KEYWORD_SHORT
|
50
|
+
end
|
51
|
+
|
52
|
+
# ---------------------------------------------------------------------
|
53
|
+
# Private functions
|
54
|
+
# ---------------------------------------------------------------------
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
#
|
59
|
+
# Get params array.
|
60
|
+
#
|
61
|
+
def get_params_arr
|
62
|
+
@engine.log.debug "token params: #{@tokens.params}"
|
63
|
+
params = @tokens.params[1..-1]
|
64
|
+
|
65
|
+
@engine.log.info "params: #{params}"
|
66
|
+
evaluated_params = []
|
67
|
+
|
68
|
+
params.each do |p|
|
69
|
+
expr = Gloo::Expr::Expression.new( @engine, [ p ] )
|
70
|
+
evaluated_params << expr.evaluate
|
71
|
+
end
|
72
|
+
|
73
|
+
@engine.log.debug "evaluated_params: #{evaluated_params}"
|
74
|
+
|
75
|
+
return evaluated_params
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/gloo/web_svr/asset.rb
CHANGED
@@ -8,9 +8,9 @@ module Gloo
|
|
8
8
|
module WebSvr
|
9
9
|
class Asset
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
ASSET_FOLDER = 'asset'.freeze
|
12
|
+
IMAGE_FOLDER = 'image'.freeze
|
13
|
+
STYLESHEET_FOLDER = 'stylesheet'.freeze
|
14
14
|
JAVASCRIPT_FOLDER = 'javascript'.freeze
|
15
15
|
|
16
16
|
CSS_TYPE = 'text/css'.freeze
|
@@ -42,29 +42,29 @@ module Gloo
|
|
42
42
|
#
|
43
43
|
# Get the asset folder in the project.
|
44
44
|
#
|
45
|
-
def
|
46
|
-
return File.join( @engine.settings.project_path,
|
45
|
+
def asset_folder
|
46
|
+
return File.join( @engine.settings.project_path, ASSET_FOLDER )
|
47
47
|
end
|
48
48
|
|
49
49
|
#
|
50
50
|
# Get the images folder in the project.
|
51
51
|
#
|
52
|
-
def
|
53
|
-
return File.join(
|
52
|
+
def image_folder
|
53
|
+
return File.join( asset_folder, IMAGE_FOLDER )
|
54
54
|
end
|
55
55
|
|
56
56
|
#
|
57
57
|
# Get the stylesheets folder in the project.
|
58
58
|
#
|
59
|
-
def
|
60
|
-
return File.join(
|
59
|
+
def stylesheet_folder
|
60
|
+
return File.join( asset_folder, STYLESHEET_FOLDER )
|
61
61
|
end
|
62
62
|
|
63
63
|
#
|
64
64
|
# Get the stylesheets folder in the project.
|
65
65
|
#
|
66
66
|
def javascript_folder
|
67
|
-
return File.join(
|
67
|
+
return File.join( asset_folder, JAVASCRIPT_FOLDER )
|
68
68
|
end
|
69
69
|
|
70
70
|
#
|
@@ -77,7 +77,7 @@ module Gloo
|
|
77
77
|
return pn if File.exist? pn
|
78
78
|
|
79
79
|
# Look in the web server's asset folder.
|
80
|
-
pn = File.join(
|
80
|
+
pn = File.join( asset_folder, pn )
|
81
81
|
|
82
82
|
return pn
|
83
83
|
end
|
@@ -125,7 +125,7 @@ module Gloo
|
|
125
125
|
# Add all asssets to the web server pages (routes).
|
126
126
|
#
|
127
127
|
def add_asset_routes
|
128
|
-
return unless File.exist?
|
128
|
+
return unless File.exist? asset_folder
|
129
129
|
|
130
130
|
@log.debug 'Adding asset routes to web server…'
|
131
131
|
@factory = @engine.factory
|
@@ -142,14 +142,14 @@ module Gloo
|
|
142
142
|
def add_containers
|
143
143
|
pages = @web_svr_obj.pages_container
|
144
144
|
|
145
|
-
@assets = pages.find_child(
|
146
|
-
@factory.create_can(
|
145
|
+
@assets = pages.find_child( ASSET_FOLDER ) ||
|
146
|
+
@factory.create_can( ASSET_FOLDER, pages )
|
147
147
|
|
148
|
-
@images = @assets.find_child(
|
149
|
-
@factory.create_can(
|
148
|
+
@images = @assets.find_child( IMAGE_FOLDER ) ||
|
149
|
+
@factory.create_can( IMAGE_FOLDER, @assets )
|
150
150
|
|
151
|
-
@stylesheets = @assets.find_child(
|
152
|
-
@factory.create_can(
|
151
|
+
@stylesheets = @assets.find_child( STYLESHEET_FOLDER ) ||
|
152
|
+
@factory.create_can( STYLESHEET_FOLDER, @assets )
|
153
153
|
|
154
154
|
@javascript = @assets.find_child( JAVASCRIPT_FOLDER ) ||
|
155
155
|
@factory.create_can( JAVASCRIPT_FOLDER, @assets )
|
@@ -161,12 +161,12 @@ module Gloo
|
|
161
161
|
def add_images
|
162
162
|
@log.debug 'Adding image asset routes to web server…'
|
163
163
|
|
164
|
-
return unless File.exist?
|
164
|
+
return unless File.exist? image_folder
|
165
165
|
|
166
166
|
# for each file in the images folder
|
167
167
|
# create a file object and add it to the images container
|
168
|
-
Dir.each_child(
|
169
|
-
pn = File.join(
|
168
|
+
Dir.each_child( image_folder ) do |name|
|
169
|
+
pn = File.join( IMAGE_FOLDER, name )
|
170
170
|
add_file_obj( @images, name, pn )
|
171
171
|
end
|
172
172
|
end
|
@@ -177,12 +177,12 @@ module Gloo
|
|
177
177
|
def add_stylesheets
|
178
178
|
@log.debug 'Adding stylesheet asset routes to web server…'
|
179
179
|
|
180
|
-
return unless File.exist?
|
180
|
+
return unless File.exist? stylesheet_folder
|
181
181
|
|
182
182
|
# for each file in the stylesheets folder
|
183
183
|
# create a file object and add it to the stylesheets container
|
184
|
-
Dir.each_child(
|
185
|
-
pn = File.join(
|
184
|
+
Dir.each_child( stylesheet_folder ) do |name|
|
185
|
+
pn = File.join( STYLESHEET_FOLDER, name )
|
186
186
|
add_file_obj( @stylesheets, name, pn )
|
187
187
|
end
|
188
188
|
end
|
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: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Crane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -292,6 +292,20 @@ dependencies:
|
|
292
292
|
- - "~>"
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: 1.8.2
|
295
|
+
- !ruby/object:Gem::Dependency
|
296
|
+
name: redcarpet
|
297
|
+
requirement: !ruby/object:Gem::Requirement
|
298
|
+
requirements:
|
299
|
+
- - "~>"
|
300
|
+
- !ruby/object:Gem::Version
|
301
|
+
version: 3.6.0
|
302
|
+
type: :runtime
|
303
|
+
prerelease: false
|
304
|
+
version_requirements: !ruby/object:Gem::Requirement
|
305
|
+
requirements:
|
306
|
+
- - "~>"
|
307
|
+
- !ruby/object:Gem::Version
|
308
|
+
version: 3.6.0
|
295
309
|
description: A scripting languge to keep it all together.
|
296
310
|
email:
|
297
311
|
- eric.crane@mac.com
|
@@ -332,11 +346,18 @@ files:
|
|
332
346
|
- lib/gloo/app/running_app.rb
|
333
347
|
- lib/gloo/app/settings.rb
|
334
348
|
- lib/gloo/convert/converter.rb
|
349
|
+
- lib/gloo/convert/falseclass_to_integer.rb
|
350
|
+
- lib/gloo/convert/nilclass_to_date.rb
|
351
|
+
- lib/gloo/convert/nilclass_to_datetime.rb
|
352
|
+
- lib/gloo/convert/nilclass_to_integer.rb
|
353
|
+
- lib/gloo/convert/nilclass_to_string.rb
|
354
|
+
- lib/gloo/convert/nilclass_to_time.rb
|
335
355
|
- lib/gloo/convert/string_to_date.rb
|
336
356
|
- lib/gloo/convert/string_to_datetime.rb
|
337
357
|
- lib/gloo/convert/string_to_decimal.rb
|
338
358
|
- lib/gloo/convert/string_to_integer.rb
|
339
359
|
- lib/gloo/convert/string_to_time.rb
|
360
|
+
- lib/gloo/convert/trueclass_to_integer.rb
|
340
361
|
- lib/gloo/core/baseo.rb
|
341
362
|
- lib/gloo/core/dictionary.rb
|
342
363
|
- lib/gloo/core/error.rb
|
@@ -373,7 +394,6 @@ files:
|
|
373
394
|
- lib/gloo/objs/basic/boolean.rb
|
374
395
|
- lib/gloo/objs/basic/container.rb
|
375
396
|
- lib/gloo/objs/basic/decimal.rb
|
376
|
-
- lib/gloo/objs/basic/function.rb
|
377
397
|
- lib/gloo/objs/basic/integer.rb
|
378
398
|
- lib/gloo/objs/basic/script.rb
|
379
399
|
- lib/gloo/objs/basic/string.rb
|
@@ -389,6 +409,7 @@ files:
|
|
389
409
|
- lib/gloo/objs/cli/prompt.rb
|
390
410
|
- lib/gloo/objs/cli/select.rb
|
391
411
|
- lib/gloo/objs/ctrl/each.rb
|
412
|
+
- lib/gloo/objs/ctrl/function.rb
|
392
413
|
- lib/gloo/objs/ctrl/repeat.rb
|
393
414
|
- lib/gloo/objs/data/markdown.rb
|
394
415
|
- lib/gloo/objs/data/mysql.rb
|
@@ -439,6 +460,7 @@ files:
|
|
439
460
|
- lib/gloo/verbs/files.rb
|
440
461
|
- lib/gloo/verbs/help.rb
|
441
462
|
- lib/gloo/verbs/if.rb
|
463
|
+
- lib/gloo/verbs/invoke.rb
|
442
464
|
- lib/gloo/verbs/list.rb
|
443
465
|
- lib/gloo/verbs/load.rb
|
444
466
|
- lib/gloo/verbs/log.rb
|
@@ -488,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
488
510
|
- !ruby/object:Gem::Version
|
489
511
|
version: '0'
|
490
512
|
requirements: []
|
491
|
-
rubygems_version: 3.
|
513
|
+
rubygems_version: 3.2.22
|
492
514
|
signing_key:
|
493
515
|
specification_version: 4
|
494
516
|
summary: Gloo scripting language. A scripting language built on ruby.
|