Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

rack middleware for exposing Heroku environment variables

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 CHANGELOG.md
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 rack-heroku_env.gemspec
README.md

rack-heroku_env

Build Status

A gem that provides exposing Heroku environment variables as HTTP response headers as rack middleware.

Screenshot

Rack::HerokuEnv exposes any HTTP_X_HEROKU* as X-Heroku-*.

For example:

  • HTTP_X_HEROKU_DYNOS_IN_USE as X-Heroku-Dynos-In-Use
  • HTTP_X_HEROKU_QUEUE_DEPTH as X-Heroku-Queue-Depth
  • HTTP_X_HEROKU_QUEUE_WAIT_TIME as X-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 rspec spec/rack-heroku_env_spec.rb
Something went wrong with that request. Please try again.