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
anddrop_db
(@phallstrom) - FIX lock
rake < 11.0
to avoidlast_comment
error (@namusyaka)
Contribute
Padrino 0.13.3.2 - small fixes, documentation cleanup, enable sqlite's file to deep tree of subdirectories, caching the content_type mime type
Padrino 0.13.3.2 was shipped in September 2016. This version contains small fixes, documentation cleanup, enable sqlite's file to deep tree of subdirectories, as well as fixing an issue with not caching the content_type mime type.
Be able to create sqlite's file to deep tree of subdirectories.
@karakava was so nice to make the following possible when working with SQLite:
ActiveRecord::Base.configuration[:development] = {
:adapter => 'sqlite3',
:database => Padrino.root('db', 'development/1/sample.db')
}
Bug Fixes and Miscellaneous Things
There are several bug fixes and other updates:
- FIX fix padrinorb.com links in several rdocs (@karakava)
- FIX #2075 cache actual content_type mime type (@ujifgc) - thanks davinciRor for reporing this issue
- FIX #2076 retire webrat and nokogiri from helper tests and using now oga (@ujifgc)
- FIX #2081 remove -i option from pg_dump command (@dfens)
- FIX #2083 remove -i option from pg_dump command (@dfens)
- FIX a typo in admin generation command when no valid render engine is being used