Sha256: f400942d84e75f93d4c2eede3a2b354a2e3fdd54795d99b841212ac3e8b48618

Contents?: true

Size: 487 Bytes

Versions: 54

Compression:

Stored size: 487 Bytes

Contents

class Rack::App::Middlewares::PathInfoCutter

  def initialize(app, cut_string_from_path)
    @cut_string_from_path = cut_string_from_path
    @app = app
  end

  def call(env)
    #env[::Rack::App::Constants::ENV::ORIGINAL_PATH_INFO]= env[::Rack::App::Constants::ENV::PATH_INFO]
    env[::Rack::App::Constants::ENV::PATH_INFO]= env[::Rack::App::Constants::ENV::PATH_INFO].dup
    env[::Rack::App::Constants::ENV::PATH_INFO].sub!(@cut_string_from_path, '')
    @app.call(env)
  end

end

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-11.0.1 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-11.0.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-10.0.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-9.0.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-8.1.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-8.0.1 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-8.0.0 lib/rack/app/middlewares/path_info_cutter.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.7.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.5 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.4 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.3 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.2 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.1 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.6.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.5.2 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.5.1 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.5.0 lib/rack/app/middlewares/path_info_cutter.rb
rack-app-7.4.0 lib/rack/app/middlewares/path_info_cutter.rb