diode 1.2 → 1.2.2

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: a78f492d045a8ed2000597384b5bb4ccd16028be81a2e058f18d06be800e2255
4
- data.tar.gz: 4e8d5ba6375511e05888424c042001622a00ccf9fe2fd268a48fc24ec2edbe56
3
+ metadata.gz: 323c1d5146b6e56105dd9bf4586ef95d8b6a6b41263ef6c7c18e5d8da537b60f
4
+ data.tar.gz: 72f818e9086fa61a118432127bf5966139f004c424f95b1fffa3cf73dde37337
5
5
  SHA512:
6
- metadata.gz: 9d1b3c20467382e7e3dfbdc7727f0ac7ca351d89cf023777d1cb5af3681dc1570f84230360e910ef36215e2ec7ff24171482eaa7fbdc87f7f4ddc4f4210efd31
7
- data.tar.gz: 75b9a046bd2dbe1270e32435376d4a591ac7e3a586785bf773a85ac2175836a5f6728bba623ad8e8df13e9798a5e25c0d77fc0592a603b743d2cc6d145f75da8
6
+ metadata.gz: a267eaf498f643f2082bd32acdfe84628de258804e9965b34a4ee42634f4d9cc74dbe6686e09a21d6c2ab04ce154f1167c73086e053d474470e60eba8b212816
7
+ data.tar.gz: a287277870c88a0aeb27e76508a51b5470355e9ac22f7821ed85e5102b269a3306631d0e876943c4dfbc824226aafdf09d722da59fa014cd71c0b5c8a5995e98
@@ -29,6 +29,12 @@ class Response
29
29
  new(code, body, h)
30
30
  end
31
31
 
32
+ def self.xml(code, body="", headers={})
33
+ resp = Response.new(code, body, headers)
34
+ resp.headers["Content-Type"] = "application/xml"
35
+ return resp
36
+ end
37
+
32
38
  attr_accessor(:code, :body, :headers)
33
39
 
34
40
  def initialize(code, body="", headers={})
data/lib/diode/static.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'pathname'
2
2
 
3
+ module Diode
4
+
3
5
  class Static
4
6
 
5
7
  def initialize(docRoot=".")
@@ -58,3 +60,4 @@ class Static
58
60
  end
59
61
 
60
62
  end
63
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diode
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kjell Koda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-23 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json