All Versions
34
Latest Version
Avg Release Cycle
125 days
Latest Release
1960 days ago

Changelog History
Page 2

  • v0.23 Changes

    • Now using scorched-accept for accept header parsing and logic, which fixes issues with the :media_type condition.
    • ๐Ÿ‘ป Exceptions caught by Scorched are now assigned to env['rack.exception'].
    • Implemented respond_to_missing? on Scorched::Controller.
  • v0.22 Changes

    • The redirect method now passes the given URL through absolute.
    • The error page filter now always runs at the end-point controller so :show_http_error_pages behaves as expected when overriden in sub-controllers.
  • v0.21 Changes

    • Named captures have changed again. The values are now passed as arguments to route proc's in favor of using the new captures convenience method for accessing named arguments as a hash.
    • The :redirect option for :strip_trailing_slashes no longer cause a redirection loop when the request path is set to two or more forward slashes, e.g. '//'
    • 0๏ธโƒฃ Changed default value of render_defaults[:tilt] to {default_encoding: 'UTF-8'}. This defaults Tilt to using UTF-8 for loading template files, which is desirable 99% of the time.
    • The action method has been split out into two new methods, process and dispatch. This provides the oppurtunity to override the dispatch logic where more control is needed over how mapping targets are invoked.
    • :failed_condition condition now takes into account whether any mapping has actually handled the request. This allows for example, the correct status to be set when a mapping has been matched, but has passed the request.
  • v0.20 Changes

    • After filters are now still processed when a request is halted. This restores the original behaviour prior to version 0.8. This fixes an issue where halting the request after setting flash session data would cause the request to bomb-out.
    • ๐Ÿ‘ฎ As an extension of the change above, filters can now be marked as forced using the new force option, which if true, means the filter will run even if the request is halted within another filter (including within another forced filter). This ensures a particular filter is run for every request. This required changing the public interface for the filter method. The sugar methods before, after, and error have remained backwards compatible.
    • Named captures are now passed to route proc's as a single hash argument. The previous behaviour was an oversight.
    • Halting within an error filter is now swallowed if the error filter is invoked by an error raised in a before or after filter.
    • The controller helper can now be used to map predefined controllers simply by omitting the block, which is now optional. This a more convenient means of mapping controllers as compared to the more barebones map method.
    • ๐ŸŒฒ log method now returns the log object. Method arguments are also now optional, meaning you can use the more natural logger interface if you prefer, e.g. log.info "hello".
  • v0.19 Changes

    • The behaviour of wildcards * and ** (and their named equivalents) have been reverted to their original behaviour of matching one or more characters, instead of zero or more. This means /* will no longer match /. Adding a question mark directly after a wildcard will have that wildcard match zero or more character, instead of one or more. So the pattern /*? will match both / and /about.
  • v0.18 Changes

    • Redirects now use a 303 or 302 HTTP status code by default, depending on HTTP version (similar logic to Sinatra). Trailing slash redirects (triggered by :strip_trailing_slash) still uses a 307 status.
  • v0.17 Changes

    • Fixes an issue introduced in v0.16 where joining SCRIPT_NAME and PATH_INFO would sometimes produce a path with two forward slashes, and a related issue where PATH_INFO would sometimes be missing a leading forward slash when it should have had one.
    • ๐Ÿš€ Mappings are now sorted by the best matching media type in addition to the existing logic that included definition order and priority. This required that mappings be sorted at request-time rather than at the time they're mapped. Note, because of limitations of rack-accept, this doesn't completely respect the HTTP spec when it comes to prioritising which media type to serve for a given request. Full support for the HTTP spec is intended for a future release.
    • ๐Ÿ‘ File path references to views are now joined to the view directory using #expand_path. This allows views to be specified with an absolute path (effectively ignoring the view directory), and better support for relative paths.
  • v0.16 Changes

    • A copy of the Rack env hash is now handed off to sub-controllers and other Rack-callable objects, with PATH_INFO and SCRIPT_NAME now set to appropriate values, bring Scorched inline with the Rack specification. This differs from the original behaviour which was to just forward on the original env hash unmodified.
    • URL helper method absolute and url now use the new env property scorched.root_path as their base path, rather than SCRIPT_NAME.
    • Helpers for HTTP methods link and unlink have been added.
  • v0.15 Changes

    • Route DSL methods (route, get, post, ...) now accept an array of patterns as the pattern argument. Each pattern is defined as a separate mapping, sharing the same target proc. This provides a cleaner and more efficient solution to simply wrapping a route definition within a loop.
    • ๐Ÿ‘ป URI unescaping has been implemented for Scorched::Request#unmatched_path. This modification directly affects route matching. Previously, routes were matched against the escaped path, e.g. /this%20has%20spaces. Routes are now matched against the unescaped form /this has spaces. The only exception is the escaped forward-slash %2F and percent sign %25 which remain unaltered for the fact their unescaped form as special meaning which you wouldn't be able to disambiguate. It's however safe to unescape the path a second time to resolve these characters.
  • v0.14 Changes

    • If a matched mapping passes the request and there are no other matching mappings, a 404 status is now set by default, rather than a 200 status.
    • ๐Ÿ“‡ Renamed matched condition to handled to be less ambiguous.