rack-heroku_env
A gem that provides exposing Heroku environment variables as HTTP response headers as rack middleware.
Rack::HerokuEnv
exposes any HTTP_X_HEROKU*
as X-Heroku-*
.
For example:
-
HTTP_X_HEROKU_DYNOS_IN_USE
asX-Heroku-Dynos-In-Use
-
HTTP_X_HEROKU_QUEUE_DEPTH
asX-Heroku-Queue-Depth
-
HTTP_X_HEROKU_QUEUE_WAIT_TIME
asX-Heroku-Queue-Wait-Time
Usage
Rails 3
# Gemfile
gem 'rack-heroku_env', :require => 'rack/heroku_env'
# config/application.rb
config.middleware.use Rack::HerokuEnv
Sinatra
require 'rack/heroku_env'
use Rack::HerokuEnv
Installation
$ gem install rack-heroku_env
Testing
$ gem install bundler
$ bundle install
$ bundle exec rake