rack-rscript 1.1.3 → 1.1.4
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rack-rscript.rb +26 -21
- metadata +45 -42
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cbd3eb663817e716b9659b6d9f363508eb0e4e4a348d1310d9fe9958eeb38bee
|
4
|
+
data.tar.gz: 886403ab31bc13ea31a522fb7aa4617b2e950f1c210f6298af70dbcc81fdbbf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dadc9a749503aa9c456aa00ef013004e3f8a941aee9d4e9e31bfa153df474817b1b503cd06f573671c8a689b7aa2487a0725ccdfaa36e0aab68ac25637df2939
|
7
|
+
data.tar.gz: 8ec1bf779f2f2367c6769f3bc1811f02a4f09f01061834bca853bbe9366e8a99499193a343f009526c4461e4cc17b28538f3fcf8b04789228bb8dde987625551
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rack-rscript.rb
CHANGED
@@ -223,29 +223,32 @@ class RackRscript
|
|
223
223
|
|
224
224
|
end
|
225
225
|
|
226
|
-
|
226
|
+
if @static.any? then
|
227
|
+
|
228
|
+
get /^(\/(?:#{@static.join('|')}).*)/ do |path|
|
227
229
|
|
228
|
-
|
229
|
-
|
230
|
+
puts 'path: ' + path.inspect if @debug
|
231
|
+
filepath = File.join(@app_root, @root, path )
|
230
232
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
233
|
+
if @log then
|
234
|
+
@log.info 'DandelionS1/default_routes: ' +
|
235
|
+
"root: %s path: %s" % [@root, path]
|
236
|
+
end
|
235
237
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
238
|
+
if path.length < 1 or path[-1] == '/' then
|
239
|
+
path += 'index.html'
|
240
|
+
File.read filepath
|
241
|
+
elsif File.directory? filepath then
|
242
|
+
Redirect.new (path + '/')
|
243
|
+
elsif File.exists? filepath then
|
242
244
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
245
|
+
content_type = @filetype[filepath[/\w+$/].to_sym]
|
246
|
+
[File.read(filepath), content_type || 'text/plain']
|
247
|
+
else
|
248
|
+
'oops, file ' + filepath + ' not found'
|
249
|
+
end
|
248
250
|
|
251
|
+
end
|
249
252
|
end
|
250
253
|
|
251
254
|
get /^\/$/ do
|
@@ -258,9 +261,11 @@ class RackRscript
|
|
258
261
|
|
259
262
|
def run_request(request)
|
260
263
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
+
#@log.debug 'inside run_request: ' + request.inspect if @log
|
265
|
+
#@log.debug 'inside run_request @env: ' + @env.inspect if @log
|
266
|
+
method_type = @env ? @env['REQUEST_METHOD'] : 'GET'
|
267
|
+
content, content_type, status_code = run_route(request, method_type)
|
268
|
+
#@log.debug 'inside run_request' if @log
|
264
269
|
if content.is_a? Redirect then
|
265
270
|
|
266
271
|
redirectx = content
|
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.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
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/KZ6owJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
|
27
|
+
c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAAml/WLcI8fT+QulD8hoZsWuewuLVwJiv7ghzLxAF
|
29
|
+
RlvLTBDSv2I9R78e8vqy6inLhvAzlkKr3jfJjjRXg7GHVQytWW6E4k2EtTaYMMkt
|
30
|
+
eyfNULcMR/gOjGYYzYNUuw0391bBKpvzyIvdQv0mrgoI99B5rX66s4jg0JBQbgXe
|
31
|
+
mhaLptf1n9HgPbbJjpmRHj6mhbY0mAdUV8VyBfcboOnpQWDVKrRLJPNUUmFD4d/B
|
32
|
+
/SQsoWX60/1wMIk0So3A71ebCrcVBou0Rl/QUOLP3tXqUY6LSjYT9gpOHVLCNuPL
|
33
|
+
QJP3XTf2DGVCTbQsnweemWbEI0LwlViBpZmvxDHmgjb+/pm/nsWnTdnAIoYyTxoc
|
34
|
+
5cO/O0IpbqcI7fY8cu2IktrIF2XwY1ZAewV6Yrxp36JYt131ajbs1/madpsZrFYa
|
35
|
+
lDqRilVLi+NZf/R9vR/vaL53GOmDC+VoywL5frfWXVSK1Zs1fF7RAMZDJeYF0A8W
|
36
|
+
arbgkVprfDCrZHsF1ZnCIvNO
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2019-02-16 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: rack
|
@@ -137,22 +141,22 @@ dependencies:
|
|
137
141
|
name: json
|
138
142
|
requirement: !ruby/object:Gem::Requirement
|
139
143
|
requirements:
|
140
|
-
- - "~>"
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '2.1'
|
143
144
|
- - ">="
|
144
145
|
- !ruby/object:Gem::Version
|
145
146
|
version: 2.1.0
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '2.1'
|
146
150
|
type: :runtime
|
147
151
|
prerelease: false
|
148
152
|
version_requirements: !ruby/object:Gem::Requirement
|
149
153
|
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '2.1'
|
153
154
|
- - ">="
|
154
155
|
- !ruby/object:Gem::Version
|
155
156
|
version: 2.1.0
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '2.1'
|
156
160
|
- !ruby/object:Gem::Dependency
|
157
161
|
name: rexslt
|
158
162
|
requirement: !ruby/object:Gem::Requirement
|
@@ -177,42 +181,42 @@ dependencies:
|
|
177
181
|
name: rsc
|
178
182
|
requirement: !ruby/object:Gem::Requirement
|
179
183
|
requirements:
|
180
|
-
- - "~>"
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: '0.4'
|
183
184
|
- - ">="
|
184
185
|
- !ruby/object:Gem::Version
|
185
186
|
version: 0.4.0
|
187
|
+
- - "~>"
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0.4'
|
186
190
|
type: :runtime
|
187
191
|
prerelease: false
|
188
192
|
version_requirements: !ruby/object:Gem::Requirement
|
189
193
|
requirements:
|
190
|
-
- - "~>"
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0.4'
|
193
194
|
- - ">="
|
194
195
|
- !ruby/object:Gem::Version
|
195
196
|
version: 0.4.0
|
197
|
+
- - "~>"
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0.4'
|
196
200
|
- !ruby/object:Gem::Dependency
|
197
201
|
name: polyrex-links
|
198
202
|
requirement: !ruby/object:Gem::Requirement
|
199
203
|
requirements:
|
200
|
-
- - "~>"
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version: '0.3'
|
203
204
|
- - ">="
|
204
205
|
- !ruby/object:Gem::Version
|
205
206
|
version: 0.3.0
|
207
|
+
- - "~>"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0.3'
|
206
210
|
type: :runtime
|
207
211
|
prerelease: false
|
208
212
|
version_requirements: !ruby/object:Gem::Requirement
|
209
213
|
requirements:
|
210
|
-
- - "~>"
|
211
|
-
- !ruby/object:Gem::Version
|
212
|
-
version: '0.3'
|
213
214
|
- - ">="
|
214
215
|
- !ruby/object:Gem::Version
|
215
216
|
version: 0.3.0
|
217
|
+
- - "~>"
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0.3'
|
216
220
|
description:
|
217
221
|
email: james@jamesrobertson.eu
|
218
222
|
executables: []
|
@@ -239,8 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
243
|
- !ruby/object:Gem::Version
|
240
244
|
version: '0'
|
241
245
|
requirements: []
|
242
|
-
|
243
|
-
rubygems_version: 2.6.13
|
246
|
+
rubygems_version: 3.0.1
|
244
247
|
signing_key:
|
245
248
|
specification_version: 4
|
246
249
|
summary: Rack-Rscript is a light-weight alternative to Sinatra-Rscript.
|
metadata.gz.sig
CHANGED
Binary file
|