Skip to content

iguchi1124/rack-env_ribbon

Repository files navigation

Rack::EnvRibbon

Build Status

Add env ribbon on your rack application views.

Installation

$ gem install rack-env_ribbon

Rack application

Add use Rack::EnvRibbon on your config.ru file.

require 'rack/env_ribbon'

app # => your rack application object

use Rack::EnvRibbon
run app

Sinatra

Add use Rack::EnvRibbon in the same way as rack application

require 'sinatra'

require 'rack/env_ribbon'

use Rack::EnvRibbon

get '/' do
  <<~HTML
    <!doctype html>
    <html lang="ja">
    <head>
      <meta charset="utf-8">
      <title>sinatra app</title>
    </head>
    <body>
      <p>app body</p>
    </body>
    </html>
  HTML
end

Rails

Add this line to your application's Gemfile

gem 'rack-env_ribbon'

And then execute

$ bundle

License

The gem is available as open source under the terms of the MIT License.