gloo 4.5.0 → 4.6.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/lib/VERSION +1 -1
- data/lib/VERSION_NOTES +8 -0
- data/lib/gloo/objs/web/json.rb +2 -5
- data/lib/gloo/objs/web_svr/page.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c998e950da4cdd0f74ce85512de237f9fd73bc9187fe55b49c6bb554e13bc1
|
4
|
+
data.tar.gz: 07e00df49aea7385673b27c5cb31cc6e5d4f926cebabe7f14d754a04e3eae949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0ed6794423d73bb4adaf913662cf28dd9095ea07b1885feb422384cd394acbafbd362da0b60d4384a04f44ca49b1a1c4a3a9d4f84f9caa8fb48b5bbf74e0380
|
7
|
+
data.tar.gz: 6cd54ec494fff41b92e9fb8788ae0e6c76b412ae2eba2a0ae8fe466ecfc45936743bf3d08d37e2a9cf02bf8d4905cc3ba8d60dd7d11d2fec7bbe8ac520c7861b
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.6.1
|
data/lib/VERSION_NOTES
CHANGED
data/lib/gloo/objs/web/json.rb
CHANGED
@@ -145,9 +145,6 @@ module Gloo
|
|
145
145
|
# Convert the object to JSON.
|
146
146
|
#
|
147
147
|
def self.convert_obj_to_json( obj )
|
148
|
-
|
149
|
-
# TODO: put container objects in an array
|
150
|
-
|
151
148
|
h = obj ? convert_obj_to_hash( obj ) : {}
|
152
149
|
json = JSON.parse( h.to_json )
|
153
150
|
json = JSON.pretty_generate( json )
|
@@ -162,10 +159,10 @@ module Gloo
|
|
162
159
|
|
163
160
|
if obj.child_count > 0
|
164
161
|
obj.children.each do |child|
|
165
|
-
h =
|
162
|
+
h[ child.name ] = convert_obj_to_hash( child )
|
166
163
|
end
|
167
164
|
else
|
168
|
-
|
165
|
+
return obj.value
|
169
166
|
end
|
170
167
|
|
171
168
|
return h
|
@@ -42,6 +42,7 @@ module Gloo
|
|
42
42
|
FILE_TYPE = 'file_type'.freeze
|
43
43
|
FILE_PATH = 'file_path'.freeze
|
44
44
|
FILE_NAME = 'file_name'.freeze
|
45
|
+
FILE_DATA = 'file_data'.freeze
|
45
46
|
DOWNLOAD_FILE = 'download_file'.freeze
|
46
47
|
|
47
48
|
#
|
@@ -506,6 +507,17 @@ module Gloo
|
|
506
507
|
return o&.value
|
507
508
|
end
|
508
509
|
|
510
|
+
#
|
511
|
+
# Get the File content
|
512
|
+
#
|
513
|
+
def file_data
|
514
|
+
o = find_child FILE_DATA
|
515
|
+
return nil unless o
|
516
|
+
|
517
|
+
o = Gloo::Objs::Alias.resolve_alias( @engine, o )
|
518
|
+
return o&.value
|
519
|
+
end
|
520
|
+
|
509
521
|
#
|
510
522
|
# Get the name of the file.
|
511
523
|
#
|
@@ -530,7 +542,12 @@ module Gloo
|
|
530
542
|
#
|
531
543
|
def render_file params
|
532
544
|
type = file_type
|
533
|
-
|
545
|
+
inline_content = file_data
|
546
|
+
if inline_content.nil?
|
547
|
+
data = File.binread( file_path )
|
548
|
+
else
|
549
|
+
data = inline_content
|
550
|
+
end
|
534
551
|
code = Gloo::WebSvr::ResponseCode::SUCCESS
|
535
552
|
fname = file_name
|
536
553
|
download = download_file
|
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.
|
4
|
+
version: 4.6.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: 2025-
|
11
|
+
date: 2025-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|