All Versions
34
Latest Version
Avg Release Cycle
125 days
Latest Release
2133 days ago
Changelog History
Page 3
Changelog History
Page 3
-
v0.13 Changes
- โ Added
content_type
condition, corresponding to theContent-Type
request header. - ๐ Reverted rogue commit containing experimental debugging logging that I didn't plan to merge. Fixes issue #12.
- โ Added
-
v0.12 Changes
- Halt can now take an optional response body (typically a string).
- Controller now returns a valid rack array, rather than a Scorched::Response.
-
v0.11.1 Changes
- ๐ Fixed an issue where subsequent nested render calls would render the default layout, which they shouldn't (issue #9).
- โฌ๏ธ Bumped Tilt dependancy to v1.4 and removed work-around for Tilt encoding issue.
-
v0.11 Changes
- Route wildcards '' and '' (and their named equivalents) now match zero or more characters, instead of one or more. This means `/
will now match both
/and
/about` for example. - Conditions can now be inverted by appending an exclamation mark to the condition, e.g.
method!: 'GET'
matches all HTTP methods, excluding GET. - While not strictly Scorched related, one planned feature for Scorched was to implement a simple form population mechanism. This has instead been implemented as a stand-alone project, Formless, which can be used with any framework or application, including Scorched.
- Route wildcards '' and '' (and their named equivalents) now match zero or more characters, instead of one or more. This means `/
-
v0.10 Changes
- ๐จ Route matching internals have been refactored.
- Match information is now stored in the
Match
struct for better formalisation. matches
method no longer has a short-circuit option, and now returns all mappings that match the URL, regardless of whether their conditions passed. It also now caches the set of matches which are returned on subsequent calls.- The first failed condition (if any) is stored in the
Match
struct as:failed_condition
. This allows one to change the response in an after block depending on what condition failed. For example, proper status codes can be set depending on the failed condition. - Response status defaults to 403 if one or more mappings are matched, but their conditions do not pass. The existing behaviour was to always return 404.
- Match information is now stored in the
- โ Added
:proc
condition which takes one or more Proc objects, allowing custom conditions to be added on-the-fly. - โ Added
:matched
condition. When a controller delegates the request to a mapping, it's considered to be matched. - Added
:failed_condition
condition. If one or more mappings are matched, but they're conditions do not pass, the first failed condition of the first matched mapping is considered thefailed_condition
for the request. - โ Added
:config
condition which takes a hash, each element of which must match the value of the corresponding config option. - ๐ Renamed
:methods
condition to:method
for consistency sake. - โ Added default error message for all empty responses with a HTTP status code between 400 and 599, inclusive.
- ๐
Scorched::Collection
now merges parent values onto the beginning of self, rather than the end. - To compensate for the previous change, an
append_parent
accessor added toScorched::Collection
to allow after filters to run in the correct order, executing inner filters before outer filters. - Added
:show_http_error_pages
config option. If true, it shows the Scorched HTTP error pages. Defaults to false. - Filters have been added to set the appropriate HTTP status code for certain failed conditions, such as returning
405 Method Not Allowed
when for example, a POST is made to a URL that only accepts GET requests.
- ๐จ Route matching internals have been refactored.
-
v0.9 Changes
- ๐จ Refactored
render
method:- All Scorched options are now keyword arguments, including
:locals
which was added as a proper render option. - Scorched options are no longer passed through to Tilt.
:tilt
option added to allow options to be passed directly to Tilt, such as:engine
- Unrecognised options are still passed through to Tilt for convenience.
- All Scorched options are now keyword arguments, including
- โ Added template caching using Tilt::Cache.
- Added
:cache_templates
config option. Defaults to true except for development.
- Added
- ๐จ Refactored
-
v0.8 Changes
- ๐ Changed
controller
method signature to accept an optional URL pattern as the first argument. - Implemented a pass mechanism to short-circuit out of the current match and invoke the next match.
- โ Added
:auto_pass
configuration option. When true, if none of the controller's mapping match the request, the controller willpass
back to the outer controller without running any filters. - ๐ง Sub-controllers generated with the
controller
helper are automatically configured with:auto_pass
set totrue
. This makes inline sub-controllers even more useful for grouping routes.
- ๐ Changed
-
v0.7 Changes
- ๐ฒ Logging preparations made. Now just have to decide on a logging strategy, such as what to log, how verbose the messages should be, etc.
- 0๏ธโฃ Environment-specific defaults added. The environment variable
RACK_ENV
s used to determine the current environment.- Non-Development
config[:static_dir] = false
* Developmentconfig[:show_exceptions] = true
*config[:logger] = Logger.new(STDOUT)
* Add developer-friendly 404 error page. This is implemented as an after filter, and won't have any effect if the response body is set.
- Non-Development
absolute
method now returns forward slash if script name is empty.
-
v0.6 Changes
view_config
options hash renamed torender_defaults`ch better reflects its function.
-
v0.5.2 Changes
- Minor modification to routing to make it behave as documented regarding matching a forward slash directly after or at the end of the matched path.
- 0๏ธโฃ Response content-type now defaults to "text/html;charset=utf-8", rather than empty.