Sha256: 8b7b38dc2a14d82a95ab570a76ded35bbac62503b740de3258ebd20615c02e0e

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

module Merb
  module Rack

    class DummyWare < ::Merb::Rack::Middleware

      def call(env)
        if env["PATH_INFO"] =~ /^\/dummy/
          [200, "", "This is a dummy content"]
        else
          @app.call(env)
        end
      end
    end
  end
end

use Merb::Rack::DummyWare

# use PathPrefix Middleware if :path_prefix is set in Merb::Config
if prefix = ::Merb::Config[:path_prefix]
  use ::Merb::Rack::PathPrefix, prefix
end

# comment this out if you are running merb behind a load balancer
# that serves static files
use ::Merb::Rack::Static, ::Merb.dir_for(:public)

# this is our main merb application
run ::Merb::Rack::Application.new

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
merb-core-1.1.0 spec/public/webrat/test_app/config/rack.rb
merb-core-1.1.0.rc1 spec/public/webrat/test_app/config/rack.rb
merb-core-1.1.0.pre spec/public/webrat/test_app/config/rack.rb