Sha256: d844455548c786af57c11eb46a1797c6e6eaa16fd09c8c655e41d5653da8b84f

Contents?: true

Size: 1.23 KB

Versions: 10

Compression:

Stored size: 1.23 KB

Contents

# -*- mode: ruby; coding: utf-8 -*-
#
# Copyright (C) 2011  Kouhei Sutou <kou@clear-code.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

require "drb/drb"

require "rabbit/middleware/controller"

environment = ENV["RACK_ENV"] || "development"
case environment
when "development"
  use Rack::ShowExceptions
end

use Rack::Runtime
use Rack::ContentLength

use Rack::Deflater
use Rack::ConditionalGet

use Rack::Lint
use Rack::Head

rabbit = DRbObject.new_with_uri(ENV["RABBIT_URI"])
application = Rabbit::Middleware::Controller.new do |controller|
  controller.rabbit = rabbit
end
run application

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rabbit-1.0.9 lib/rabbit/middleware/config.ru
rabbit-1.0.8 lib/rabbit/middleware/config.ru
rabbit-1.0.7 lib/rabbit/middleware/config.ru
rabbit-1.0.6 lib/rabbit/middleware/config.ru
rabbit-1.0.5 lib/rabbit/middleware/config.ru
rabbit-1.0.4 lib/rabbit/middleware/config.ru
rabbit-1.0.3 lib/rabbit/middleware/config.ru
rabbit-1.0.2 lib/rabbit/middleware/config.ru
rabbit-1.0.1 lib/rabbit/middleware/config.ru
rabbit-1.0.0 lib/rabbit/middleware/config.ru