rack-rscript 1.3.0 → 1.3.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
- checksums.yaml.gz.sig +0 -0
- data/lib/rack-rscript.rb +8 -18
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d6d0eead7c09e461f0a012e4bbde41a6d0caed9407cb5c3084f296cee53109
|
4
|
+
data.tar.gz: de258189650cfcce899fe6595a3a7d25a98a1ff8d39faf72cd7fc7c79219e143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852ddfd534c199308c7973544a918d6cecbbfaeac935739b952e57551765f8f739fac509991b603f9151f9d5df27e59a62dccf93afd7b92cc872399d14e52c24
|
7
|
+
data.tar.gz: 9f1d6a104adbfa437ffe5aff658e9c16cff42fd9f499e3d036fa3cb75de5ed69d2393b428a80dc55e2432c4599e6901df95384dbafe487dab9be7b1d9c1ac6cf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rack-rscript.rb
CHANGED
@@ -43,14 +43,15 @@ class RackRscript
|
|
43
43
|
pxlinks: nil, debug: false, root: '', static: {})
|
44
44
|
|
45
45
|
@log, @debug, @static = log, debug, static
|
46
|
-
|
47
|
-
puts '@app_root: ' + @app_root.inspect if @debug
|
46
|
+
|
48
47
|
puts 'root: ' + root.inspect if @debug
|
48
|
+
puts 'pkg_Src: ' + pkg_src.inspect if @debug
|
49
49
|
|
50
50
|
@params = {}
|
51
51
|
|
52
52
|
@templates = {}
|
53
53
|
|
54
|
+
@log.debug 'pkg_src: ' + pkg_src.inspect if @log
|
54
55
|
@rscript = RScriptRW.new log: log, pkg_src: pkg_src, cache: cache, debug: true
|
55
56
|
@render = NThrut.new(self)
|
56
57
|
|
@@ -89,7 +90,7 @@ class RackRscript
|
|
89
90
|
|
90
91
|
@root, @static = root, static
|
91
92
|
@initialized = {}
|
92
|
-
|
93
|
+
|
93
94
|
end
|
94
95
|
|
95
96
|
def call(env, testmode: false)
|
@@ -191,7 +192,6 @@ class RackRscript
|
|
191
192
|
@initialized[url] = true
|
192
193
|
end
|
193
194
|
|
194
|
-
|
195
195
|
r = eval result
|
196
196
|
|
197
197
|
return r
|
@@ -298,7 +298,7 @@ class RackRscript
|
|
298
298
|
FileX.exists? @url_base
|
299
299
|
filepath = @url_base
|
300
300
|
|
301
|
-
[
|
301
|
+
[DirX.glob(filepath + '/*.rsf').map{|x| x[/([^\/]+)\.rsf$/,1]}.to_json,\
|
302
302
|
'application/json']
|
303
303
|
|
304
304
|
end
|
@@ -313,7 +313,7 @@ class RackRscript
|
|
313
313
|
|
314
314
|
path = raw_path
|
315
315
|
puts 'path: ' + path.inspect if @debug
|
316
|
-
filepath = File.join(@
|
316
|
+
filepath = File.join(@root, path )
|
317
317
|
|
318
318
|
else
|
319
319
|
|
@@ -343,30 +343,20 @@ class RackRscript
|
|
343
343
|
end
|
344
344
|
|
345
345
|
end
|
346
|
+
|
346
347
|
end
|
347
348
|
|
348
349
|
get /^\/$/ do
|
349
350
|
|
350
351
|
if @root.length > 0 then
|
351
352
|
file = File.join(@root, 'index.html')
|
352
|
-
|
353
|
+
FileX.read file
|
353
354
|
else
|
354
355
|
Time.now.inspect
|
355
356
|
end
|
356
357
|
|
357
358
|
end
|
358
359
|
|
359
|
-
# file exists?
|
360
|
-
a = Dir.glob( File.join(@root.to_s, '*')).select do |x|
|
361
|
-
File::ftype(x) == 'directory'
|
362
|
-
end
|
363
|
-
|
364
|
-
get /^\/#{a.join('|')}/ do
|
365
|
-
|
366
|
-
'found' + a.inspect
|
367
|
-
|
368
|
-
end
|
369
|
-
|
370
360
|
end
|
371
361
|
|
372
362
|
def run_request(request)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-rscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
uQ8ts8x2DfuJYY/PmLbqwXkzMzb1EgnUBWZ3mZCdlL0UBst5ypPAFTn1b2qRUC92
|
36
36
|
UtKkOrrEmCXrBnFtpv6a1ULk
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-01-
|
38
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rack
|
metadata.gz.sig
CHANGED
Binary file
|