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
  • about 8 years ago
  • January 30, 2016
License

MIT License

Links
Synced at

Thu, 02 May 2024 20:48:16 GMT

Languages