Sha256: 2cc5d9851c7fe8f9060032273b55977c0cd1863291a56032b2489a520db5caaa
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
= New Plugins * A websocket plugin has been added, for websocket support using faye-websocket. Here's an example of a simple echo service using websockets: plugin :websocket route do |r| r.get "echo" do r.websocket do |ws| # Routing block taken for a websocket request to /echo # ws is a Faye::WebSocket instance, so you can use the # Faye::WebSocket API ws.on(:message) do |event| ws.send(event.data) end end # View rendered if a regular GET request to /echo view "echo" end end * A status_handler plugin has been added, which allows Roda to specially handle arbitrary status codes. Usage is similar to the not_found plugin (which now uses status_handler internally): plugin :status_handler status_handler 403 do "You are forbidden from seeing that!" end status_handler 404 do "Where did it go?" end = Other New Features * The assets plugin now supports a :gzip option, which will save gzipped versions when compiling assets. When serving compiled assets, if the request accepts gzip encoding, it will serve the gzipped version. This also plays nicely with nginx's gzip_static support. * The assets plugin now supports Google Closure Compiler, Uglifier, and MinJS for minifying javascript. You can now specify which css and js compressors to use via the :css_compressor and :js_compressor options. = Backwards Compatibility * Roda.plugin now always returns nil. Previously the return value could be non-nil if the plugin used a configure method.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roda-2.4.0 | doc/release_notes/2.4.0.txt |