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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56ff6cb0ae7c0fe3de38e1e76bd6003eb11d0455
4
- data.tar.gz: b2c795ba758dfcd5f9206e65d6baafc33ee4eedc
3
+ metadata.gz: 404abc3b20ea7c1083b6d6bcee08bede23080063
4
+ data.tar.gz: 7fdd0ae3f7d9b9bf7f274f7cf4f048d9171542d3
5
5
  SHA512:
6
- metadata.gz: 750db656ebbc3f12667decd66bbdeed4e1ac1c5b7c3a0e6ad98dead9e963e5a54396f98b9c200767c3e2e0e774bdeb9dd5b8a8fe5734deee6cf5d20a1a537a90
7
- data.tar.gz: 5002bd81d4ff647d98db7e8d5287a1902f0dc68a5b6656783f54e892ccc8960d808e9f667061761a59c85fbb60a161a8096e5012d5720727915400857896b744
6
+ metadata.gz: 1d405976c7ec6ba8c4f4f4cd2e70b4f64269e71a02f4b3074afe48a5c3ec9f00532023a3335d1a2c7c1a949bdacbf8c330cdb66086c13838cb2960e51a107d0b
7
+ data.tar.gz: a7bbdce241d51219b0060e0332094d5f111359504d9466e4b55736ef956f7f86a687db586b79b7b3146289e4fc4ce645839d204384fc5efb217a1683d37b8642
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.3.0
1
+ 5.3.1
@@ -21,6 +21,7 @@ module Rack::App::Constants
21
21
  end
22
22
 
23
23
  module ENV
24
+ PATH_INFO = (defined?(::Rack::PATH_INFO) ? ::Rack::PATH_INFO : "PATH_INFO".freeze)
24
25
  REQUEST_HANDLER = 'rack-app.handler'
25
26
  SERIALIZER = 'rack-app.serializer'
26
27
  PARSED_PARAMS = 'rack-app.parsed_params'
@@ -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
 
@@ -54,7 +54,7 @@ class Rack::App::Params
54
54
  end
55
55
 
56
56
  def request_path_parts
57
- @request_env[::Rack::PATH_INFO].split('/')
57
+ @request_env[::Rack::App::Constants::ENV::PATH_INFO].split('/')
58
58
  end
59
59
 
60
60
  def path_params_matcher
@@ -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
@@ -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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi