rack-app 9.0.0 → 11.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/app/constants.rb +1 -1
- data/lib/rack/app/instance_methods/http_status.rb +2 -3
- data/lib/rack/app/middlewares/configuration.rb +1 -1
- data/lib/rack/app/request.rb +16 -0
- data/lib/rack/app.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34010813828ea95f84bf7fb0958b0d2e8912e246891e8bbf46e7af1bea541f84
|
4
|
+
data.tar.gz: '0356991e9ef33ff15deb572465913d9dde5bf89a877e7895be02e00f0b28d90a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 134584de369514bf63204d4700e0f0a79a316fa2b446cc29c3f6ed81484dbdda4babb9d7fd9da53e2d40bede390673ed77319e466c7ba8e67a64beb436117a6e
|
7
|
+
data.tar.gz: 59ed4ddd0c05094f5b608bdb6f237b9d0a80c194b13b4405d9e9482ed75f2f323f9b249564c8556cb31287b0afcb14ea95cab6e93a8b43ad8ed76c7890f6733a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
11.0.0
|
data/lib/rack/app/constants.rb
CHANGED
@@ -45,7 +45,7 @@ module Rack::App::Constants
|
|
45
45
|
SERIALIZER = 'rack-app.serializer'.freeze
|
46
46
|
CONTENT_TYPE = 'CONTENT_TYPE'.freeze
|
47
47
|
|
48
|
-
PARAMS_GETTER = 'rack-app.params.getter'
|
48
|
+
PARAMS_GETTER = 'rack-app.params.getter'.freeze
|
49
49
|
PARAMS = 'rack-app.params.object'.freeze
|
50
50
|
|
51
51
|
MERGED_PARAMS = 'rack-app.params.merged'.freeze
|
@@ -1,10 +1,9 @@
|
|
1
1
|
module Rack::App::InstanceMethods::HTTPStatus
|
2
2
|
|
3
|
-
def http_status!(code,
|
3
|
+
def http_status!(code, body=nil)
|
4
4
|
raise unless code.is_a?(Integer)
|
5
5
|
response.status = code
|
6
|
-
|
7
|
-
finish!
|
6
|
+
respond_with(body || Rack::App::Constants::HTTP_STATUS_CODES[code] || raise)
|
8
7
|
end
|
9
8
|
|
10
9
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "rack/request"
|
2
|
+
class Rack::App::Request < ::Rack::Request
|
3
|
+
|
4
|
+
def params
|
5
|
+
@env[::Rack::App::Constants::ENV::PARAMS].to_hash
|
6
|
+
end
|
7
|
+
|
8
|
+
def path_segments_params
|
9
|
+
@env[::Rack::App::Constants::ENV::PARAMS].path_segments_params
|
10
|
+
end
|
11
|
+
|
12
|
+
def query_string_params
|
13
|
+
@env[::Rack::App::Constants::ENV::PARAMS].query_string_params
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/lib/rack/app.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 11.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- lib/rack/app/payload/parser.rb
|
156
156
|
- lib/rack/app/payload/parser/builder.rb
|
157
157
|
- lib/rack/app/payload/parser/builder/formats.rb
|
158
|
+
- lib/rack/app/request.rb
|
158
159
|
- lib/rack/app/request_configurator.rb
|
159
160
|
- lib/rack/app/request_stream.rb
|
160
161
|
- lib/rack/app/router.rb
|