rack-app 5.3.1 → 5.3.2
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 +4 -1
- data/lib/rack/app/file_server.rb +1 -1
- data/lib/rack/app/router/base.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75d771d3e7874808cfdaeeea7d4f2a4b173f75cd
|
4
|
+
data.tar.gz: 42d209dfc6c8fafdf6b69e68fdaf3e736e2e18f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4bb51aa0b67b4322136672085a058004f8ac9a2c36ba2bfb332996ada02de5c5ea62b36b61f2434bc8f6a60708e9efeb79aaba46567de83fcc37f44ab136e77
|
7
|
+
data.tar.gz: 39e5569083207ebf6007ac940b0ba13093b4be4573f70366130b2522390b336e607e3ea53d8bc325f37713f913c5db6fc09b82e7e8db176542a46f84f55851a5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.3.
|
1
|
+
5.3.2
|
data/lib/rack/app/constants.rb
CHANGED
@@ -21,7 +21,10 @@ module Rack::App::Constants
|
|
21
21
|
end
|
22
22
|
|
23
23
|
module ENV
|
24
|
-
PATH_INFO =
|
24
|
+
PATH_INFO = (defined?(::Rack::PATH_INFO) ? ::Rack::PATH_INFO : "PATH_INFO".freeze)
|
25
|
+
REQUEST_METHOD = (defined?(::Rack::REQUEST_METHOD) ? ::Rack::REQUEST_METHOD : "REQUEST_METHOD".freeze)
|
26
|
+
REQUEST_PATH = (defined?(::Rack::REQUEST_PATH) ? ::Rack::REQUEST_PATH : "REQUEST_PATH".freeze)
|
27
|
+
|
25
28
|
REQUEST_HANDLER = 'rack-app.handler'
|
26
29
|
SERIALIZER = 'rack-app.serializer'
|
27
30
|
PARSED_PARAMS = 'rack-app.parsed_params'
|
data/lib/rack/app/file_server.rb
CHANGED
@@ -23,7 +23,7 @@ class Rack::App::FileServer
|
|
23
23
|
def self.serve_file(env, file_path)
|
24
24
|
file_server = self.new(File.dirname(file_path))
|
25
25
|
env = env.dup
|
26
|
-
env[::Rack::REQUEST_METHOD]= 'GET'
|
26
|
+
env[::Rack::App::Constants::ENV::REQUEST_METHOD]= 'GET'
|
27
27
|
env[::Rack::App::Constants::ENV::PATH_INFO]= file_path
|
28
28
|
file_server.call(env)
|
29
29
|
end
|
data/lib/rack/app/router/base.rb
CHANGED
@@ -2,7 +2,7 @@ class Rack::App::Router::Base
|
|
2
2
|
|
3
3
|
def call(env)
|
4
4
|
|
5
|
-
request_method= env[Rack::REQUEST_METHOD]
|
5
|
+
request_method= env[::Rack::App::Constants::ENV::REQUEST_METHOD]
|
6
6
|
path_info= env[Rack::App::Constants::ENV::PATH_INFO]
|
7
7
|
|
8
8
|
context = fetch_context(request_method, path_info)
|