All Versions
61
Latest Version
Avg Release Cycle
143 days
Latest Release
850 days ago

Changelog History
Page 4

  • v1.3.1 Changes

    October 05, 2011
    • Support adding more than one callback to the stream object. (Konstantin Haase)

    • Fix for infinite loop when streaming on 1.9.2 with Thin from a modular application (Konstantin Haase)

  • v1.3.0 Changes

    September 30, 2011
    • Added stream helper method for easily creating streaming APIs, Server Sent Events or even WebSockets. See README for more on that topic. (Konstantin Haase)

    • If a HTTP 1.1 client is redirected from a different verb than GET, use 303 instead of 302 by default. You may still pass 302 explicitly. Fixes AJAX redirects in Internet Explorer 9 (to be fair, everyone else is doing it wrong and IE is behaving correct). (Konstantin Haase)

    • Added support for HTTP PATCH requests. (Konstantin Haase)

    • Use rack-protection to defend against common opportunistic attacks. (Josh Lane, Jacob Burkhart, Konstantin Haase)

    • Support for Creole templates, Creole is a standardized wiki markup, supported by many wiki implementations. (Konstanin Haase)

    • The erubis method has been deprecated. If Erubis is available, Sinatra will automatically use it for rendering ERB templates. require 'erb' explicitly to prevent that behavior. (Magnus Holm, Ryan Tomayko, Konstantin Haase)

    • Patterns now match against the escaped URLs rather than the unescaped version. This makes Sinatra confirm with RFC 2396 section 2.2 and RFC 2616 section 3.2.3 (escaped reserved characters should not be treated like the unescaped version), meaning that "/:name" will also match /foo%2Fbar, but not /foo/bar. To avoid incompatibility, pattern matching has been adjusted. Moreover, since we do no longer need to keep an unescaped version of path_info around, we handle all changes to env['PATH_INFO'] correctly. (Konstantin Haase)

    • settings.app_file now defaults to the file subclassing Sinatra::Base in modular applications. (Konstantin Haase)

    • Set up Rack::Logger or Rack::NullLogger depending on whether logging was enabled or not. Also, expose that logger with the logger helper method. (Konstantin Haase)

    • The sessions setting may be an options hash now. (Konstantin Haase)

    • Important: Ruby 1.8.6 support has been dropped. This version also depends on at least Rack 1.3.0. This means that it is incompatible with Rails prior to 3.1.0. Please use 1.2.x if you require an earlier version of Ruby or Rack, which we will continue to supply with bug fixes. (Konstantin Haase)

    • Renamed :public to :public_folder to avoid overriding Ruby's built-in public method/keyword. set(:public, ...) is still possible but shows a warning. (Konstantin Haase)

    • It is now possible to use a different target class for the top level DSL (aka classic style) than Sinatra::Application by setting Delegator.target. This was mainly introduced to ease testing. (Konstantin Haase)

    • Error handlers defined for an error class will now also handle subclasses of that class, unless more specific error handlers exist. (Konstantin Haase)

    • Error handling respects Exception#code, again. (Konstantin Haase)

    • Changing a setting will merge hashes: set(:x, :a => 1); set(:x :b => 2) will result in {:a => 1, :b => 2}. Use set(:x, {:a => 1}, true) to avoid this behavior. (Konstantin Haase)

    • Added request.accept? and request.preferred_type to ease dealing with Accept headers. (Konstantin Haase)

    • Added :static_cache_control setting to automatically set cache control headers to static files. (Kenichi Nakamura)

    • Added informal?, success?, redirect?, client_error?, server_error? and not_found? helper methods to ease dealing with status codes. (Konstantin Haase)

    • Uses SecureRandom to generate default session secret. (Konstantin Haase)

    • The attachment helper will set Content-Type (if it hasn't been set yet) depending on the supplied file name. (Vasiliy Ermolovich)

    • Conditional requests on etag helper now work properly for unsafe HTTP methods. (Matthew Schinckel, Konstantin Haase)

    • The last_modified helper does not stop execution and change the status code if the status code is something different than 200. (Konstantin Haase)

    • Added support for If-Unmodified-Since header. (Konstantin Haase)

    • Sinatra::Base.run! now prints to stderr rather than stdout. (Andrew Armenia)

    • Sinatra::Base.run! takes a block allowing access to the Rack handler. (David Waite)

    • Automatic app_file detection now works in directories containing brackets (Konstantin Haase)

    • Exception objects are now passed to error handlers. (Konstantin Haase)

    • Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori Ishikawa, Konstantin Haase)

    • Also specify charset in Content-Type header for JSON. (Konstantin Haase)

    • Rack handler names will not be converted to lower case internally, this allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2. Example: ruby app.rb -s Mongrel2 (Konstantin Haase)

    • Ignore to_ary on response bodies. Fixes compatibility to Rails 3.1. (Konstantin Haase)

    • Middleware setup is now distributed across multiple methods, allowing Sinatra extensions to easily hook into the setup process. (Konstantin Haase)

    • Internal refactoring and minor performance improvements. (Konstantin Haase)

    • Move Sinatra::VERSION to separate file, so it can be checked without loading Sinatra. (Konstantin Haase)

    • Command line options now complain if value passed to -p is not a valid integer. (Konstantin Haase)

    • Fix handling of broken query params when displaying exceptions. (Luke Jahnke)

  • v1.2.9 Changes

    March 15, 2013

    ๐Ÿš€ IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.

    • Display EOL warning when loading Sinatra. (Konstantin Haase)

    • Improve documentation. (Anurag Priyam, Konstantin Haase)

    • Do not modify the load path. (Konstantin Haase)

    • Display deprecation warning if RUBY_IGNORE_CALLERS is used. (Konstantin Haase)

    • Add backports library so we can still run on Ruby 1.8.6. (Konstantin Haase)

  • v1.2.8 Changes

    December 30, 2011

    Backported from 1.3.2:

    • ๐Ÿ›  Fix bug where rendering a second template in the same request after the first one raised an exception skipped the default layout (Nathan Baum)
  • v1.2.7 Changes

    September 30, 2011

    Custom changes:

    • Fix Ruby 1.8.6 issue with Accept header parsing. (Konstantin Haase)

    Backported from 1.3.0:

    • Ignore to_ary on response bodies. Fixes compatibility to Rails 3.1. (Konstantin Haase)

    • Sinatra.run! now prints to stderr rather than stdout. (Andrew Armenia)

    • Automatic app_file detection now works in directories containing brackets (Konstantin Haase)

    • Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori Ishikawa, Konstantin Haase)

    • Also specify charset in Content-Type header for JSON. (Konstantin Haase)

    • Rack handler names will not be converted to lower case internally, this allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2. Example: ruby app.rb -s Mongrel2 (Konstantin Haase)

    • Fix uninitialized instance variable warning. (David Kellum)

    • Command line options now complain if value passed to -p is not a valid integer. (Konstantin Haase)

    • Fix handling of broken query params when displaying exceptions. (Luke Jahnke)

  • v1.2.6 Changes

    May 01, 2011
    • Fix broken delegation, backport delegation tests from Sinatra 1.3. (Konstantin Haase)
  • v1.2.5 Changes

    April 30, 2011
    • Restore compatibility with Ruby 1.8.6. (Konstantin Haase)
  • v1.2.4 Changes

    April 30, 2011
    • Sinatra::Application (classic style) does not use a session secret in development mode, so sessions are not invalidated after every request when using Shotgun. (Konstantin Haase)

    • The request object was shared between multiple Sinatra instances in the same middleware chain. This caused issues if any non-sinatra routing happened in-between two of those instances, or running a request twice against an application (described in the README). The caching was reverted. See GH#239 and GH#256 for more infos. (Konstantin Haase)

    • Fixes issues where the top level DSL was interfering with method_missing proxies. This issue surfaced when Rails 3 was used with older Sass versions and Sinatra >= 1.2.0. (Konstantin Haase)

    • Sinatra::Delegator.delegate is now able to delegate any method names, even those containing special characters. This allows better integration into other programming languages on Rubinius (probably on the JVM, too), like Fancy. (Konstantin Haase)

    • Remove HEAD request logic and let Rack::Head handle it instead. (Paolo "Nusco" Perrotta)

  • v1.2.3 Changes

    April 13, 2011
    • This release is compatible with Tilt 1.3, it will still work with Tilt 1.2.2, however, if you want to use a newer Tilt version, you have to upgrade to at least this version of Sinatra. (Konstantin Haase)

    • Helpers dealing with time, like expires, handle objects that pretend to be numbers, like ActiveSupport::Duration, better. (Konstantin Haase)

  • v1.2.2 Changes

    April 08, 2011
    • The :provides => :js condition now matches both application/javascript and text/javascript. The :provides => :xml condition now matches both application/xml and text/xml. The Content-Type header is set accordingly. If the client accepts both, the application/* version is preferred, since the text/* versions are deprecated. (Konstantin Haase)

    • The provides condition now handles wildcards in Accept headers correctly. Thus :provides => :html matches text/html, text/* and */*. (Konstantin Haase)

    • When parsing Accept headers, Content-Type preferences are honored according to RFC 2616 section 14.1. (Konstantin Haase)

    • URIs passed to the url helper or redirect may now use any schema to be identified as absolute URIs, not only http or https. (Konstantin Haase)

    • Handles Content-Type strings that already contain parameters correctly in content_type (example: content_type "text/plain; charset=utf-16"). (Konstantin Haase)

    • If a route with an empty pattern is defined (get("") { ... }) requests with an empty path info match this route instead of "/". (Konstantin Haase)

    • In development environment, when running under a nested path, the image URIs on the error pages are set properly. (Konstantin Haase)