Padrino

Padrino 0.14.0 - cascading option for Rack applications, no ruby default encodings, erubi support, bug fixes

Enable cascading with Rack application

In prior versions of Padrino, the core router would cascade from one application to the next on a 404 response even when the application explicitly specified cascade: false. With this release, this has been corrected and Padrino will not cascade even if the specified Rack application returns 404.

Padrino.mount('RackApp', cascade: false).to('/api') # this will not be cascaded even if returning 404.
Padrino.mount('PadrinoApp::App', app_file: Padrino.root('app/app.rb')).to('/')

Stop managing Ruby default encodings

Default Encoding.default_internal is now nil (Ruby default) instead of UTF-8 (Padrino < 0.14 default)

Erubi support

Padrino has now Erubi support. Erubi is a ERB template engine for Ruby. The most significant changes are:

  • Handles postfix conditionals when using escaping (e.g. <%= foo if bar %>)
  • Supports frozenstringliteral: true in templates via :freeze option
  • Automatically freezes strings for template text when ruby optimizes it (on ruby 2.1+)
  • Has 6x faster escaping on ruby 2.3+ by using cgi/escape
  • Has 86% smaller memory footprint

More details can be found under erubi.

All the credit for the implementation goes to @adam12 - thank you so much for your hard work.

Bug Fixes and Miscellaneous Things

There are several bug fixes and other updates:

  • Removal of requiring activesupport - see details
  • Removal of lib from $LOAD_PATH - see details
  • FIX #2105 run bundle with --binstubs on -b switch (@adam12)
  • FIX #2097 use exe folder for application executables (@adam12)
  • FIX #2109 change the format of session_id for Padrino Admin AccessControl (thanks @fnordfish for reporting this problem)
  • FIX #2111 disallow conflicting project names (thanks @leemour for reporting this problem)
  • FIX #2113 properly override default values in route definitions if parameter is present (@fidalgo)
  • FIX #2116 fix plugin list padrino g plugin -l (@fnordfish)
  • FIX #2119 add rake gem tasks to gem project Rakefile (@grasp)
  • FIX #2125 do not load in cycle files excluded from reloading (thanks @fnordfish for reporting this problem)
  • FIX handle nil database passwords for create_db and drop_db (@phallstrom)
  • FIX lock rake < 11.0 to avoid last_comment error (@namusyaka)

Contribute

Please report any issues you encounter with this release! We are working very actively on Padrino and want to make the framework as stable and reliable as possible. That concludes the changelog for this release. As always if you want to keep up with Padrino updates, be sure to follow us on twitter: @padrinorb, join us on IRC at “#padrino” on freenode, open an issue, or discuss on gitter.


comments powered by Disqus