kemal-filters

Filters callback, similar to sinatra: http://www.sinatrarb.com/intro.html#Filters

Disclaimer:

This shard has been merged in kemal itself.

kemal-filters

Filters callback for Kemal, similar to sinatra: http://www.sinatrarb.com/intro.html#Filters

Installation

Add this to your application's shard.yml:

dependencies:
  kemal-filters:
    github: werner/kemal-filters

Usage

  require "kemal"
  require "kemal-filters"

  add_filters

  before "/home" do |env|
    env.redirect "/other"
  end

  get "/home" do
    "Hello World"
  end

  get "/other" do
    "Other Page"
  end

Contributing

  1. Fork it ( https://github.com/werner/kemal-filters/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • werner Werner - creator, maintainer
Repository

kemal-filters

Owner
Statistic
  • 9
  • 0
  • 0
  • 0
  • 1
  • over 8 years ago
  • January 30, 2016
License

MIT License

Links
Synced at

Sun, 17 Nov 2024 17:10:04 GMT

Languages