[ANN] Sinatra 0.9.2 released

6 views
Skip to first unread message

Ryan Tomayko

unread,
May 18, 2009, 9:00:49 AM5/18/09
to sina...@googlegroups.com
Sinatra 0.9.2 has been released with a few months worth of minor
features and bug fixes, including support for running under Rack 1.0.
This release is backward compatible with all prior 0.9.x and 0.3.x
versions.

gem install sinatra

From the CHANGES file:

* This version is compatible with Rack 1.0. [Rein Henrichs]

* The development-mode unhandled exception / error page has been
greatly enhanced, functionally and aesthetically. The error page is
used when the :show_exceptions option is enabled and an exception
propagates outside of a route handler or before filter. [Simon Rozet
/ Matte Noble / Ryan Tomayko]

* Backtraces that move through templates now include filenames and
line numbers where possible. [#51 / S. Brent Faulkner]

* All templates now have an app-level option for setting default
template options (:haml, :sass, :erb, :builder). The app-level option
value must be a Hash if set and is merged with the template options
specified to the render method (Base#haml, Base#erb, Base#builder).
[S. Brent Faulkner, Ryan Tomayko]

* The method signature for all template rendering methods has been
unified: "def engine(template, options={}, locals={})". The options
Hash now takes the generic :views, :layout, and :locals options but
also any template-specific options. The generic options are removed
before calling the template specific render method. Locals may be
specified using either the :locals key in the options hash or a second
Hash option to the rendering method. [#191 / Ryan Tomayko]

* The receiver is now passed to "configure" blocks. This allows for
the following idiom in top-level apps: configure { |app| set :foo,
app.root + '/foo' } [TJ Holowaychuck / Ryan Tomayko]

* The "sinatra/test" lib is deprecated and will be removed in Sinatra
1.0. This includes the Sinatra::Test module and Sinatra::TestHarness
class in addition to all the framework test helpers that were
deprecated in 0.9.1. The Rack::Test lib should be used instead:
http://gitrdoc.com/brynary/rack-test [#176 / Simon Rozet]

* Development mode source file reloading has been removed. The
"shotgun" (http://rtomayko.github.com/shotgun/) program can be used to
achieve the same basic functionality in most situations. Passenger
users should use the "tmp/always_restart.txt" file
(http://tinyurl.com/c67o4h). [#166 / Ryan Tomayko]

* Auto-requiring template libs in the erb, builder, haml, and sass
methods is deprecated due to thread-safety issues. You must require
the template libs explicitly in your app file. [Simon Rozet]

* A new Sinatra::Base#route_missing method was added. route_missing
is sent when no route matches the request or all route handlers pass.
The default implementation forwards the request to the downstream app
when running as middleware (i.e., "@app" is non-nil), or raises a
NotFound exception when no downstream app is defined. Subclasses can
override this method to perform custom route miss logic. [Jon Crosby]

* A new Sinatra::Base#route_eval method was added. The method yields
to the block and throws :halt with the result. Subclasses can override
this method to tap into the route execution logic. [TJ Holowaychuck]

* Fix the "-x" (enable request mutex / locking) command line
argument. Passing -x now properly sets the :lock option. [S. Brent
Faulkner, Ryan Tomayko]

* Fix writer ("foo=") and predicate ("foo?") methods in extension
modules not being added to the registering class. [#172 / Pat
Nakajima]

* Fix in-file templates when running alongside activesupport and
fatal errors when requiring activesupport before sinatra [#178 / Brian
Candler]

* Fix various issues running on Google AppEngine. [Samuel Goebert,
Simon Rozet]

* Fix in-file templates __END__ detection when __END__ exists with
other stuff on a line [Yoji Shidara]

There were 62 tickets addressed in this released:

https://sinatra.lighthouseapp.com/projects/9779-sinatra/tickets/bins/18218

Full commit history:

http://github.com/sinatra/sinatra/commits/0.9.2

Thanks to the following people for contributing code and/or doc
patches to this release: Ryan Tomayko (32), Simon Rozet (19), S. Brent
Faulkner (4), TJ Holowaychuk (3), Rein Henrichs (3), Matte Noble (3),
Blake Mizerany (3), Markus Prinz (2), Bob Aman (2), kematzy (1), Yoji
Shidara (1), Tim Carey-Smith (1), Samuel Goebert (1), Pat Nakajima
(1), Mathew Cucuzella (1), Jon Crosby (1).

Reply all
Reply to author
Forward
0 new messages