We are happy to announce that Sinatra 1.1 has just been released! This
release introduces a small number of new features and fixes for all
known bugs that came up since the 1.0. This release is expected to run
1.0 apps without changes and to work seamlessly with the latest releases
of Ruby, Rails and Rack.
To upgrade your version via rubygems, simply run:
gem install sinatra
Thanks to everyone who has contributed to Sinatra directly:
Markus P., Chris Schneider, Gabriel Andretta, S. Brent Faulkner,
Nicolas Sanguinetti, Adam W., Nickolas Means, Doug Ireton, Damian
Janowski, TJ Holowaychuk, Matte Noble, Wu Jiang, Rein H., Dylan
Egan, burningTygerrans, Ben B., Bob A., Brandon D., David
Balatero, Davide D’Agostino, Harry Vangberg, Jon Crosby, Karel Minarik,
Kouhei Y., Krekoten’ Marjan, Pat N., Sylvain Desvé, kematzy,
raggi, Jeremy E., John B., kektre, Joshua Peek, José Valim,
Julio C., [email protected], Homer S., mig, pangel, Lee J.,
Erik Kastner, Mathew C., Matias Käkelä, Eric Marden, Michael
Jones, Michel, Nick S., Doug Richardson, Dopin, yaanno, Patrick
Collison, Pedro Menezes, Peter Suschlik, Devlin D., Danny Tatom,
Chris W., Sam R., Samuel Goebert, Scott Wisely, Caio
Chassot, Steve Shreeve, scottj97, Bernhard Essl, Tim Carey-Smith, Tom
Hartwell, Trevor Dawe, Victor Hugo Borja, Widi Harsojo, Wlodek Bzyl,
Aupajo, Yoji Shidara, [email protected], Anthony Williams, Andrey
Savchenko, Andreas Haller, cylence, Ian D., Igal K., JP
Hastings-Spital, Jack Danger Canty, Jason S., Jean-Philippe Garcia
Ballester, Jens A., Jimmy S.
Or to the website:
Markus P., Konstantin Haase, Karel Minarik, nesquena, Dylan Egan,
Scott Wisely, zapnap, Victor Igumnov, Alexander Kahn, micah rich,
Andreas Schacke, Chris Schneider, Dan C., Guido De Rosa, Jon Maddox,
Kevin F., Michael Koukoullis, Mike Breen, Nat Welch, Nate, Neal
Lindsay, Nicolas Sanguinetti, Ramanan Sivaranjan, Tanner B., Wlodek
Bzyl, ai, hallison, nakajima, shtirlic, tanner, will bailey, Chris M.,
klondike, Mike Stenhouse, lenary, madx, Alex Reisner, Nicholas J
Humfrey, waferbaby, Prabhakar C., Q R, Andy Herbert, Robert Crim,
Brian Deterling, Sausheong Chang, Ben Schwarz, Anton Mironov, Stuart
Henry, norr, Tim Carey-Smith, Tomás Pollak, Vesa Vänskä, Angel N.
Sciortino, Wagner Andrade, pcorliss, Andrew N., bcarlso, beenimble,
blair christensen, blindgaenger, bmizerany, brdavs, Daniel Hofstetter,
Dan Ryan, Emanuele Vicentini, Eric Kidd, Etienne Vallette d’Osia, Evan,
Geoffrey Grosenbach, Graham Ashton, dbr, Hans Oksendahl, Jarin U.,
Jason S., Jesse Cooke, foca, Damian J., gabrielf, Corey
Donohoe, winton
Or to the book:
Chris Schneider, Markus P., Karel Minarik, Attila Csiszár,
Christopher S., Scott Wisely, Zachary S., Nicolas Sanguinetti,
Max Aller, Louis Nyffenegger, gruner, ichverstehe, bryanwoods, Syd, jdp,
syd, Deepak Kumar, Hunter Gillane, John C., Jordan E., Kumar
Gaurav, Neal Lindsay, Robert Peterson, Rohit Arondekar, Ryan T.,
burningTyger, karmi, lucasjosh, root, Andy Atkinson
And thanks of course to everyone who has reported bugs, suggested
features, wrote extensions or simply uses Sinatra.
It would not have been possible without you!
Everything that happened since 1.0, from the CHANGES:
-
Before and after filters now support pattern matching, including the
ability to use captures: “before(’/user/:name’) { |name| … }”. This
avoids manual path checking. No performance loss if patterns are
avoided. (Konstantin Haase) -
It is now possible to render SCSS files with the
scss
method, which
behaves exactly likesass
except for the different file extension and
assuming the SCSS syntax. (Pedro Menezes, Konstantin Haase) -
Added
liquid
,markdown
,nokogiri
,textile
,rdoc
,radius
,
markaby
, andcoffee
rendering methods for rendering Liquid,
Markdown, Nokogiri, Textile, RDoc, Radius, Markaby and CoffeeScript
templates. (Konstantin Haase) -
Now supports byte-range requests (the HTTP_RANGE header) for static
files. Multi-range requests are not supported, however. (Jens A.) -
You can now use #settings method from class and top level for
convenience. (Konstantin Haase) -
Setting multiple values now no longer relies on #to_hash and therefore
accepts any Enumerable as parameter. (Simon R.) -
Nested templates default the
layout
option tofalse
rather than
true
. This eases the use of partials. If you wanted to render one haml
template embedded in another, you had to callhaml :partial, {}, :layout => false
. As you almost never want the partial to be wrapped in
the standard layout in this situation, you now only have to callhaml :partial
. Passing inlayout
explicitly is still possible. (Konstantin
Haase) -
If a the return value of one of the render functions is used as a
response body and the content type has not been set explicitly, Sinatra
chooses a content type corresponding to the rendering engine rather than
just using “text/html”. (Konstantin Haase) -
README is now available in Chinese (Wu Jiang), French (Mickael Riga),
German (Bernhard Essl, Konstantin Haase, burningTyger), Hungarian (Janos
Hardi) and Spanish (Gabriel Andretta). The extremely outdated Japanese
README has been updated (Kouhei Y.). -
It is now possible to access Sinatra’s template_cache from the
outside. (Nick S.) -
The
last_modified
method now also accepts DateTime instances and
makes sure the header will always be set to a string. (Konstantin Haase) -
599 now is a legal status code. (Steve Shreeve)
-
This release is compatible with Ruby 1.9.2. Sinatra was trying to read
non existent files Ruby added to the call stack. (Shota F.,
Konstantin Haase) -
Prevents a memory leak on 1.8.6 in production mode. Note, however,
that this is due to a bug in 1.8.6 and request will have the additional
overhead of parsing templates again on that version. It is recommended
to use at least Ruby 1.8.7. (Konstantin Haase) -
Compares last modified date correctly.
last_modified
was halting
only when the ‘If-Modified-Since’ header date was equal to the time
specified. Now, it halts when is equal or later than the time specified
(Gabriel Andretta). -
Sinatra is now usable in combination with Rails 3. When mounting a
Sinatra application under a subpath in Rails 3, the PATH_INFO is not
prefixed with a slash and no routes did match. (José Valim) -
Better handling of encodings in 1.9, defaults params encoding to
UTF-8. (Konstantin Haase) -
show_exeptions
handling is now triggered after custom error
handlers, if it is set to:after_handlers
, thus not disabling those
handler in development mode. (pangel, Konstantin Haase) -
Added ability to handle weighted HTTP_ACCEPT headers. (Davide
D’Agostino) -
send_file
now always respects the:type
option if set. Previously
it was discarded if no matching mime type was found, which made it
impossible to directly pass a mime type. (Konstantin Haase) -
redirect
always redirects to an absolute URI, even if a relative URI
was passed. Ensures compatibility with RFC 2616 section 14.30.
(Jean-Philippe Garcia Ballester, Anthony Williams) -
Broken examples for using Erubis, Haml and Test::Unit in README have
been fixed. (Nick S., Doug Ireton, Jason S., Eric Marden) -
Sinatra now handles SIGTERM correctly. (Patrick Collison)
-
Fixes an issue with inline templates in modular applications that
manually callrun!
. (Konstantin Haase) -
Spaces after inline template names are now ignored (Konstantin Haase)
-
It’s now possible to use Sinatra with different package management
systems defining a custom require. (Konstantin Haase) -
Lighthouse has been dropped in favor of GitHub issues.
-
Tilt is now a dependency and therefore no longer ships bundled with
Sinatra. (Ryan T., Konstantin Haase) -
Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer
supported. (Konstantin Haase)
Enjoy!
The Sinatra Team
Blake Mizerany
Ryan T.
Simon R.
Konstantin Haase