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.
- checksums.yaml +4 -4
- data/lib/rackr/action.rb +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc3b5a671b8b0eef9b86ca1819ecdd86a9a9ef9d9baa03c93f16e63b6a3bae20
|
4
|
+
data.tar.gz: 94be73bde785a3031cc3c76278e61f77c61637bdb0e279f659aa2a4e5707f44d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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.
|
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
|
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
|
118
|
+
summary: A complete, simple and easy web micro-framework.
|
119
119
|
test_files: []
|