rack-app 5.3.0 → 5.3.1
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 -0
- data/lib/rack/app/file_server.rb +3 -3
- data/lib/rack/app/middlewares/configuration/path_info_formatter.rb +2 -2
- data/lib/rack/app/params.rb +1 -1
- data/lib/rack/app/request_configurator.rb +2 -2
- 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: 404abc3b20ea7c1083b6d6bcee08bede23080063
|
4
|
+
data.tar.gz: 7fdd0ae3f7d9b9bf7f274f7cf4f048d9171542d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d405976c7ec6ba8c4f4f4cd2e70b4f64269e71a02f4b3074afe48a5c3ec9f00532023a3335d1a2c7c1a949bdacbf8c330cdb66086c13838cb2960e51a107d0b
|
7
|
+
data.tar.gz: a7bbdce241d51219b0060e0332094d5f111359504d9466e4b55736ef956f7f86a687db586b79b7b3146289e4fc4ce645839d204384fc5efb217a1683d37b8642
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.3.
|
1
|
+
5.3.1
|
data/lib/rack/app/constants.rb
CHANGED
data/lib/rack/app/file_server.rb
CHANGED
@@ -12,7 +12,7 @@ class Rack::App::FileServer
|
|
12
12
|
|
13
13
|
@relative_file_paths.each do |relative_file_path|
|
14
14
|
if path_info =~ /#{Regexp.escape(relative_file_path)}$/
|
15
|
-
env[::Rack::PATH_INFO]= relative_file_path
|
15
|
+
env[::Rack::App::Constants::ENV::PATH_INFO]= relative_file_path
|
16
16
|
break
|
17
17
|
end
|
18
18
|
end
|
@@ -24,14 +24,14 @@ class Rack::App::FileServer
|
|
24
24
|
file_server = self.new(File.dirname(file_path))
|
25
25
|
env = env.dup
|
26
26
|
env[::Rack::REQUEST_METHOD]= 'GET'
|
27
|
-
env[::Rack::PATH_INFO]= file_path
|
27
|
+
env[::Rack::App::Constants::ENV::PATH_INFO]= file_path
|
28
28
|
file_server.call(env)
|
29
29
|
end
|
30
30
|
|
31
31
|
protected
|
32
32
|
|
33
33
|
def clean_path_info(env)
|
34
|
-
path_info = ::Rack::Utils.unescape(env[::Rack::PATH_INFO])
|
34
|
+
path_info = ::Rack::Utils.unescape(env[::Rack::App::Constants::ENV::PATH_INFO])
|
35
35
|
::Rack::Utils.clean_path_info(path_info)
|
36
36
|
end
|
37
37
|
|
@@ -6,8 +6,8 @@ class Rack::App::Middlewares::Configuration::PathInfoFormatter
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def call(env)
|
9
|
-
env[::Rack::App::Constants::ENV::ORIGINAL_PATH_INFO]= env[::Rack::PATH_INFO].dup
|
10
|
-
env[::Rack::PATH_INFO].sub!(@cut_string_from_path, '')
|
9
|
+
env[::Rack::App::Constants::ENV::ORIGINAL_PATH_INFO]= env[::Rack::App::Constants::ENV::PATH_INFO].dup
|
10
|
+
env[::Rack::App::Constants::ENV::PATH_INFO].sub!(@cut_string_from_path, '')
|
11
11
|
@app.call(env)
|
12
12
|
end
|
13
13
|
|
data/lib/rack/app/params.rb
CHANGED
@@ -10,9 +10,9 @@ module Rack::App::RequestConfigurator
|
|
10
10
|
protected
|
11
11
|
|
12
12
|
def path_info(env)
|
13
|
-
path_info = env[::Rack::PATH_INFO]
|
13
|
+
path_info = env[::Rack::App::Constants::ENV::PATH_INFO]
|
14
14
|
env[::Rack::App::Constants::ENV::ORIGINAL_PATH_INFO]= path_info
|
15
|
-
env[::Rack::PATH_INFO]= Rack::App::Utils.normalize_path(path_info)
|
15
|
+
env[::Rack::App::Constants::ENV::PATH_INFO]= Rack::App::Utils.normalize_path(path_info)
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
data/lib/rack/app/router/base.rb
CHANGED
@@ -3,7 +3,7 @@ class Rack::App::Router::Base
|
|
3
3
|
def call(env)
|
4
4
|
|
5
5
|
request_method= env[Rack::REQUEST_METHOD]
|
6
|
-
path_info= env[Rack::PATH_INFO]
|
6
|
+
path_info= env[Rack::App::Constants::ENV::PATH_INFO]
|
7
7
|
|
8
8
|
context = fetch_context(request_method, path_info)
|
9
9
|
return unless context.is_a?(Hash) and not context[:app].nil?
|