- Notifications
You must be signed in to change notification settings - Fork1
adam12/rack-unpoly
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Add this line to your application's Gemfile:
gem"rack-unpoly"
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-unpoly
Use the officialUnpoly gem from Makandra.
require"sinatra/base"require"sinatra/unpoly"classApp <Sinatra::BaseregisterSinatra::Unpolyget"/"doifup?"Unpoly request!"else"Not Unpoly :("endendend
Use theroda-unpoly gem.
require"rack"require"rack/unpoly/middleware"useRack::Unpoly::Middlewareapp=->(env){ifenv["rack.unpoly"].up?[200,{},["Unpoly request!"]]else[200,{},["Not Unpoly :("]]end}runapp
I've chosen not to bundle those assets with the gem as they might be updated morefrequently then this library. Most Ruby web libraries outside of Rails are asset-agnostic(for the most part), so it's easier if you bring in your assets as you see fit for yourspecific needs.
Bug reports and pull requests are welcome on GitHub athttps://github.com/adam12/rack-unpoly.
I love pull requests! If you fork this project and modify it, please ping me to seeif your changes can be incorporated back into this project.
That said, if your feature idea is nontrivial, you should probably open an issue todiscuss itbefore attempting a pull request.
The gem is available as open source under the terms of theMIT License.