Padrino 0.13.1 - Router and Reloader Updates, Ruby Compatibility, and Bug Fixes
Padrino 0.13.0 was shipped 3 months ago on October 2015 and laid important groundwork towards our eventual 1.0 release but also introduced some new issues. After a few months of effort, we are excited to announce the release of Padrino 0.13.1! This version is filled with routing and reloader optimizations, compatibility updates, and bug fixes. Full details for this release are below.
Router and Reloader Updates
The biggest improvement in this release is a significant reduction in the memory usage of Padrino apps by changing the configuration of the underlying mustermann router. Full list of improvements to router and reloader include:
- FIX #1975 Improve routing memory usage and performance (@namusyaka)
- FIX #1982 Support nested query for expanding path (@namusyaka)
- FIX #1978 Enable reloading of custom dependencies (@markglenfletcher)
Ruby Compatibility
Padrino 0.13.1 has been fixed to be fully compatible with Ruby 2.3 thanks to @tyabe:
Bug Fixes and Miscellaneous
There are also several bug fixes and other updates:
- FIX Remove use of ActiveSupport in tests (@ujifgc)
- FIX #1994 Missing new line in mocha generator (@peter50216)
- FIX #1995 Invalid german dates (@ujifgc)
- FIX #1998 Only output a warning message if the spec task is invoked (@postmodern)
- FIX #1882 test for selected values for select tag (@ujifgc)
- FIX rendering exception for custom mime types (@nesquena)
- FIX relax mail gem dependency (@ujifgc)
- FIX minor doc typos (@lokyoung, @markglenfletcher)
Contribute
Upgrading Padrino from 0.12.X to 0.13.0 Guide
This is the step-by-step guide for upgrading from Padrino 0.12.X to 0.13.0! This will review all the breaking changes and modifications made within the new release. Be sure to also check the 0.13.0 Release Blog Post for more information.
Deprecated Features Removed
Several deprecated methods were removed in this release including:
#link_to with :fragment
- Use
:fragment
for#url
instead:url(:controller, :action, :fragment => "foo")
- Use
Application#load_paths
,Padrino.set_load_paths
,Padrino.load_paths
- To set, use
$LOAD_PATH.concat(paths)
- To get, use
Padrino.prerequisites
instead - deprecated caching methods
- methods including
#get
,#set
,#flush
(see more here)
- To set, use
- deprecated form builder methods
- methods including
field_error
andnested_form?
(see more here")
- methods including
#fetch_template_file
,#cache_template_file!
,#resolved_layout
rendering methods- No replacement exists
String#undent
- No replacement exists
Helper Changes
There are a few helper changes to be aware of:
select_tag
used to be fairly ambiguous when specifying “selected” options. The ambiguity has been removed by always relying on the “value” where possible.- Switch your
:selected
options to indicate the value of the option wherever possible. (see more here)
- Switch your
New Routing System
Subtle differences likely exist between the old http_router and the new mustermann powered system. These differences include:
- Splat arguments in URL are now a string rather than an array
get :show, :map => "/show/*name"
used to returnparams[:name]
as an array. Now this is a string.