rack-rscript 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7d34cb833bf0422cdcde6fbd6ca2af9f4c6dbb5588d83cb72a4ff53cb3ad938
4
- data.tar.gz: 4e20d1dd5709d4fbbf3bf05c6696947a0474b4c5047512cd41ca8a67181d66e4
3
+ metadata.gz: 35d6d0eead7c09e461f0a012e4bbde41a6d0caed9407cb5c3084f296cee53109
4
+ data.tar.gz: de258189650cfcce899fe6595a3a7d25a98a1ff8d39faf72cd7fc7c79219e143
5
5
  SHA512:
6
- metadata.gz: f1ac22e48c0333b4a1892dee3d7885e14bf7aa5f8b5f8816f31a3f94718ebcc9e92f0f9faaa089f6baa781a86cf34ebeebd967d54531e444d26dd45eec9a4bdb
7
- data.tar.gz: 3b0620c345d7933bfb9bd9b0bd5f2e176e63925a6e33c1146de5939aa99bee0859d3b5a6912100857378d74d20b78f9afb1f4b9e27b2cac1315a29b9df1c34d9
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
- #=begin
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
- #=end
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
- [Dir.glob(filepath + '/*.rsf').map{|x| x[/([^\/]+)\.rsf$/,1]}.to_json,\
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(@app_root, @root, path )
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
- File.read file
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.0
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-15 00:00:00.000000000 Z
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