diode 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/diode/response.rb +6 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afa0bf0af528f72eb3920cc13af9ee2b5942423eb32475b0d3d406500221d1ce
4
- data.tar.gz: a908dd25d30fb283c14890cd6a0bcee4ccbb1cbc01bccce1f9e93ca18a611543
3
+ metadata.gz: 323c1d5146b6e56105dd9bf4586ef95d8b6a6b41263ef6c7c18e5d8da537b60f
4
+ data.tar.gz: 72f818e9086fa61a118432127bf5966139f004c424f95b1fffa3cf73dde37337
5
5
  SHA512:
6
- metadata.gz: 6060689ab753f9f3ea5303a03790b78158e665ea237c1215756dbaeb75ceebe534c2c0b96ce97d960e6e12f7147ab5b7798a770d73bc486d53a3c2d1a56a3bfd
7
- data.tar.gz: dedaeb80985c8f514a88ce63b786f616d3102e0a5e001b3529a9777d879f7fccde2bd22c3b6bbd7973a30df30343076dada798ea5c6c6a0dac6fd1f66eab2c10
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={})
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.1
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-29 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