chespirito 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -0
- data/chespirito.gemspec +1 -1
- data/lib/chespirito/request.rb +5 -3
- 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: c6e57f131192cd5e4fccd6513926bf22c6221c51eacff85682a5900da9146a02
|
4
|
+
data.tar.gz: e26e3605892b0c75f78d5857317dab7fa9843fc67eb1c6a0a323aa582bf320d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03aa51776141a12f14e923bd5fd774bfd311afaa15f76ba59efe210f69b6c55e0ccec8ce5378b2d9a64ebf95cce4e1af04bb54a6f8dd106b5ab380d99f65f56
|
7
|
+
data.tar.gz: ad890bef910d07425723aa21eb60468e55c9106304f5cbd7cc1ed710e608978feea72a0e119a94c201335231c56152482359286732b6d2a886b27e3a19ac69b2
|
data/Gemfile.lock
CHANGED
data/chespirito.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'chespirito'
|
5
|
-
spec.version = '0.0.
|
5
|
+
spec.version = '0.0.6'
|
6
6
|
spec.summary = 'Chespirito Ruby web framework'
|
7
7
|
spec.description = 'A dead simple, yet Rack-compatible, web framework written in Ruby'
|
8
8
|
spec.authors = ['Leandro Proença']
|
data/lib/chespirito/request.rb
CHANGED
@@ -21,7 +21,7 @@ module Chespirito
|
|
21
21
|
rack_request = Rack::Request.new(env)
|
22
22
|
|
23
23
|
body_params = rack_request.post? ? parse_body_params(rack_request.body.read,
|
24
|
-
rack_request
|
24
|
+
rack_request) : {}
|
25
25
|
|
26
26
|
params = rack_request.params.merge(body_params)
|
27
27
|
|
@@ -34,8 +34,10 @@ module Chespirito
|
|
34
34
|
)
|
35
35
|
end
|
36
36
|
|
37
|
-
def self.parse_body_params(body_data,
|
38
|
-
content_type =
|
37
|
+
def self.parse_body_params(body_data, rack_request)
|
38
|
+
content_type = rack_request.env['Content-Type'] ||
|
39
|
+
rack_request.env['content-type'] ||
|
40
|
+
rack_request.content_type
|
39
41
|
|
40
42
|
case content_type
|
41
43
|
in 'application/json'; JSON.parse(body_data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chespirito
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Proença
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
79
|
+
rubygems_version: 3.5.3
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: Chespirito Ruby web framework
|