rackr 0.0.53 → 0.0.54

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rackr/action.rb +4 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 207a61eead2347b17a9f17c396934954640a8658ebede9625ad62e05e2db9465
4
- data.tar.gz: e8e7c162619f150483c1c1000f4cfff16a65cc68596871d9f034c9d6fcdf5e1a
3
+ metadata.gz: bc3b5a671b8b0eef9b86ca1819ecdd86a9a9ef9d9baa03c93f16e63b6a3bae20
4
+ data.tar.gz: 94be73bde785a3031cc3c76278e61f77c61637bdb0e279f659aa2a4e5707f44d
5
5
  SHA512:
6
- metadata.gz: 9b5c019b83ffd983b74a35b07588d190f64c1ac01e1c7efffd9cc5595d5901f653878c5ad3ba2496b4557841d12a0886cdab68d9eda262604290a73345474c00
7
- data.tar.gz: c3b6d38fa59027763530fe14f1e4630fe78de3aa568c7e998d93725e06bb3f30308be706fa26f5c30cf2fe5d32c568065f39617dd1db4d4a7222d9558a6068a6
6
+ metadata.gz: 2c51c2245fa6a6f3c7c488a8c10974b7ed6f742c9e32d31011926efa34630fe9647c6fa0ec6b823fc8e4d9f2086fd1c2fb2c3030e8bb668494e5bdf782b50c0b
7
+ data.tar.gz: cb61baccbcf55cd758b8f255b386c999b119d8d5df6683efc84de927aaab4139d9990644060099595f85012d420e9ff72c12e144f453cfc9d4e877e9a583327a
data/lib/rackr/action.rb CHANGED
@@ -103,12 +103,14 @@ class Rackr
103
103
  end
104
104
 
105
105
  def json(content = {}, status: 200, headers: {})
106
- [status, { 'content-type' => 'application/json' }.merge(headers), [Oj.dump(content, mode: :compat)]]
106
+ content = Oj.dump(content, mode: :compat) unless content.is_a?(String)
107
+ [status, { 'content-type' => 'application/json' }.merge(headers), [content]]
107
108
  end
108
109
 
109
110
  def json_response(content = {}, status: 200, headers: {})
111
+ content = Oj.dump(content, mode: :compat) unless content.is_a?(String)
110
112
  Rack::Response.new(
111
- Oj.dump(content, mode: :compat),
113
+ content,
112
114
  status,
113
115
  { 'content-type' => 'application/json' }.merge(headers)
114
116
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rackr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.53
4
+ version: 0.0.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique F. Teixeira
@@ -78,7 +78,7 @@ dependencies:
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '1.0'
81
- description: A complete http router solution that fit well with pure rack apps.
81
+ description: A complete, simple and easy web micro-framework.
82
82
  email: hriqueft@gmail.com
83
83
  executables: []
84
84
  extensions: []
@@ -115,5 +115,5 @@ requirements: []
115
115
  rubygems_version: 3.5.16
116
116
  signing_key:
117
117
  specification_version: 4
118
- summary: A complete http router solution that fit well with pure rack apps.
118
+ summary: A complete, simple and easy web micro-framework.
119
119
  test_files: []