rack-rscript 1.4.0 → 1.4.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: 9179db367dd0bf801e2734f5a3bd9ca3000105a7ee5b1340462fc61f8bda56f6
4
- data.tar.gz: e5a0cb3510707ca6090521f9114f9875fa5657e144d6822b14a1ead00156f66a
3
+ metadata.gz: be378f63ca9f58403060beb22da0eda891f9f1f3d4472340a4062c4ea5a97cf0
4
+ data.tar.gz: 9f9fa92fd555a7c3e0ef87106d1e2daf174476ed5e46556cba62df9811d967d4
5
5
  SHA512:
6
- metadata.gz: 5150189b578838c95947a8dd5f2d7934f97524a805330d0c5ba1fdd2ae6f49a59da2dc653022a8c339b8393edeb9cd7a8b3446342a8f1429e484a6ecbdf350ea
7
- data.tar.gz: c4faabb77d7806075a732ceba3d8a7d7aa0984fd4a05fbc68beaaabd0440d6a08f341ce9ca62425a714663ee4f7869716ee0a8f7d67c0da2f05a381030ef134b
6
+ metadata.gz: 9fc83c3c44f23cbcedf53d0d71092105b8fbb4e90f4f9149c84ad0208fa11b3bb96f1ee5d7ebabc0cd60fa3bfa290d746bee90d195eec559a70002629ed48ea8
7
+ data.tar.gz: 8c850d980a395a8084f5febbf43374702cb6e42330c16a0d0061b3b8111ead777e9b167e41d100ef9b3e659953909b166e007cad7445ca5727d43a90000692c2
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rack-rscript.rb CHANGED
@@ -28,6 +28,9 @@ end
28
28
  class RackRscriptError < Exception
29
29
  end
30
30
 
31
+
32
+
33
+
31
34
  class RackRscript
32
35
  include AppRoutes
33
36
  include RXFReadWriteModule
@@ -416,6 +419,17 @@ class RackRscript
416
419
  proc ||= passthru_proc
417
420
  content, content_type = proc.call(content, content_type)
418
421
 
422
+ if content_type.is_a? Integer then
423
+
424
+ status_code = content_type.to_s
425
+ httpcodefile = File.join(@root, status_code + '.html')
426
+ if FileX.exists? httpcodefile then
427
+ content = FileX.read(httpcodefile)
428
+ else
429
+ content_type = 'text/plain'
430
+ end
431
+ end
432
+
419
433
  [status_code, {"Content-Type" => content_type}, [content]]
420
434
  end
421
435
 
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.4.0
4
+ version: 1.4.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-02-23 00:00:00.000000000 Z
38
+ date: 2022-05-02 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rack
@@ -183,20 +183,20 @@ dependencies:
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '0.4'
186
+ version: '0.5'
187
187
  - - ">="
188
188
  - !ruby/object:Gem::Version
189
- version: 0.4.5
189
+ version: 0.5.0
190
190
  type: :runtime
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - "~>"
195
195
  - !ruby/object:Gem::Version
196
- version: '0.4'
196
+ version: '0.5'
197
197
  - - ">="
198
198
  - !ruby/object:Gem::Version
199
- version: 0.4.5
199
+ version: 0.5.0
200
200
  - !ruby/object:Gem::Dependency
201
201
  name: polyrex-links
202
202
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file