-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
date: 2016-08-18 | ||
author: Matthias Günther | ||
email: matthias@wikimatze.de | ||
categories: ruby update | ||
tags: padrino, sinatra, ruby, release | ||
title: Padrino 0.13.3 - Generator changes, mailer rendering, proper URL escaping for link_to and form_tag helpers, new helper method, bug fixes | ||
--- | ||
|
||
Padrino 0.13.3 was shipped in August 2016. This version contains generator changes, mailer rendering, proper URL escaping for `link_to` and `form_tag` helpers, new helper method, bug fixes. | ||
|
||
|
||
## Generator changes | ||
|
||
No generator support for: | ||
|
||
- [riot](https://github.com/thumblemonks/riot "riot") (last change is from October 2013) | ||
- [steak](https://github.com/cavalle/steak "steak") (last change is from January 2012) | ||
- [rightjs](http://rightjs.org/ "rightjs") (last project update from March 2012) | ||
|
||
For more details see this [commit](https://github.com/padrino/padrino-framework/commit/cd1c1dc81894d96ed618c3af8adb623b04184ab6). | ||
|
||
|
||
## Mailer rendering | ||
|
||
Implemented new way to call render in mailers. It allows to omit mailer name or mailer name and message name. | ||
|
||
Example: | ||
|
||
```ruby | ||
mailer :sample do | ||
message :message2 | ||
render 'congrats' #=> renders from 'sample/congrats' | ||
end | ||
message :message1 | ||
render #=> renders from 'sample/message1' | ||
end | ||
end | ||
``` | ||
|
||
For more details check [#1907](https://github.com/padrino/padrino-framework/issues/1906) allow clipped render calls in mailer ([@ujifgc](https://github.com/ujifgc)). | ||
Thanks to [@jf](https://github.com/jf "@jf") for posting this idea. | ||
|
||
|
||
## `link_to` and `form_tag` URL escaping | ||
|
||
There has been an inconsistency between `image_tag` and `link_to`/`form_tag` in escaping URIs: | ||
|
||
|
||
```ruby | ||
puts(image_tag 'image name.jpeg') | ||
# => <img src="/images/image%20name.jpeg?1459513767" /> | ||
|
||
# previous behavior | ||
link_to 'image title', 'image name.jpeg') | ||
# => <a href="image name.jpeg">image title</a> | ||
|
||
# actual behavior | ||
link_to 'image title', 'image name.jpeg') | ||
# => <img src="/images/image%20name.jpeg?1459513767" /> | ||
``` | ||
|
||
For more details check [#2016](https://github.com/padrino/padrino-framework/issues/2016) escape urls in `link_to` and `form_tag` ([@ujifgc](https://github.com/ujifgc)). | ||
Thanks to [@jf](https://github.com/jf "@jf") for posting this idea. | ||
|
||
|
||
## New helper method `escape_link` | ||
|
||
Example: | ||
|
||
```ruby | ||
escape_link('http://example.com/spaced link') | ||
# => 'http://example.com/spaced%20link' | ||
|
||
escape_link('already%20partially escaped') | ||
# => 'already%20partially%20escaped' | ||
``` | ||
|
||
|
||
Details under [tag_helpers.rb](https://github.com/padrino/padrino-framework/blob/438afb9c381265c1b4e0eb338b940a513131ea0a/padrino-helpers/lib/padrino-helpers/tag_helpers.rb#L247) | ||
|
||
|
||
## Bug Fixes and Miscellaneous | ||
|
||
There are several bug fixes and other updates: | ||
|
||
- FIX [#1662](https://github.com/padrino/padrino-framework/issues/1662) make Reloader remove module constants (this occurred when source code is changed under a running padrino application) | ||
- FIX [#2036](https://github.com/padrino/padrino-framework/issues/2036) do not mutate route name String ([@ujifgc](https://github.com/ujifgc)) | ||
- FIX [#2024](https://github.com/padrino/padrino-framework/pull/2042) Do not override access control object when registered in multiple apps ([nx6](https://github.com/nxs6 "nxs6")) | ||
- FIX [#2045](https://github.com/padrino/padrino-framework/pull/2045) Prevent overwriting params by given query ([@namusyaka](https://github.com/namusyaka)) | ||
- NEW [#1872](https://github.com/padrino/padrino-framework/issues/1872) implement using partials without Sinatra, closes ([@ujifgc](https://github.com/ujifgc)) | ||
- FIX [#2052](https://github.com/padrino/padrino-framework/issues/2052) String#humanize compatibility with AS ~3.2 ([@ujifgc](https://github.com/ujifgc)) | ||
- NEW [#2050](https://github.com/padrino/padrino-framework/pull/2050) Update Moneta to 0.8.0 ([@basex](https://github.com/basex)) | ||
- NEW [#2056](https://github.com/padrino/padrino-framework/issues/2056) Allow Pry as Padrino console shell ([@ujifgc](https://github.com/ujifgc)) | ||
- NEW [github issue template](https://github.com/padrino/padrino-framework/commit/75c9afe55511de722463addc8260881ce8df345c) ([@ujifgc](https://github.com/ujifgc)) | ||
- FIX [#2066](https://github.com/padrino/padrino-framework/issues/2066) Fix reloader with native jruby classes ([@ujifgc](https://github.com/ujifgc)) | ||
|
||
|
||
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](http://twitter.com/padrinorb), join us on IRC at “#padrino” on freenode or [open an issue](https://github.com/padrino/padrino-framework/issues) on GitHub. |