mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
38778eddda
Adds an "provides"-option to a route definition, which can either be a string specifying a MIME type, a symbol that Rack can resolve to a MIME type, or an array of either.
157 lines
5.3 KiB
Text
157 lines
5.3 KiB
Text
= 0.9.0 (unreleased)
|
|
|
|
* New ":provides" route condition takes an array of mime types and
|
|
matches only when an Accept request header is present with a
|
|
corresponding type. [cypher]
|
|
|
|
* Work with and require Rack >= 0.9
|
|
|
|
* Regular expressions may now be used in route pattens; captures are
|
|
available at "params[:captures]".
|
|
|
|
* The request-level "body" method now takes a block; evaluation is
|
|
deferred until an attempt is made to read the body. The block must
|
|
return a String or Array.
|
|
|
|
* Better default "app_file", "root", "public", and "views" location
|
|
detection; changes to "root" and "app_file" automatically cascade to
|
|
other options that depend on them.
|
|
|
|
* New "route conditions" system for attaching rules for when a route
|
|
matches. The :agent and :host route options now use this system.
|
|
|
|
* New request-level "pass" method; immediately exits the current block
|
|
and passes control to the next matching route.
|
|
|
|
* Error mappings are now split into two distinct layers: exception
|
|
mappings and custom error pages. Exception mappings are registered
|
|
with "error(Exception)" and are run only when the app raises an
|
|
exception. Custom error pages are registered with "error(status_code)",
|
|
where "status_code" is an integer, and are run any time the response
|
|
has the status code specified. It's also possible to register an error
|
|
page for a range of status codes: "error(500..599)".
|
|
|
|
* Deprecated "set_option" and "set_options"; use "set" instead.
|
|
|
|
* Deprecated the "env" option ("options.env"); use "environment" instead.
|
|
|
|
* Deprecated the request level "stop" method; use "halt" instead.
|
|
|
|
* Deprecated the request level "entity_tag" method; use "etag" instead.
|
|
Both "entity_tag" and "etag" were previously supported.
|
|
|
|
* Deprecated the request level "headers" method (HTTP response headers);
|
|
use "response['Header-Name']" instead.
|
|
|
|
* Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
|
|
|
|
* Deprecated setting Sinatra.application = nil to reset an application.
|
|
This should no longer be necessary.
|
|
|
|
* Deprecated "Sinatra.default_options"; use
|
|
"Sinatra::Default.set(key, value)" instead.
|
|
|
|
* Deprecated the "ServerError" exception. All Exceptions are now
|
|
treated as internal server errors and result in a 500 response
|
|
status.
|
|
|
|
* Removed Event and EventContext classes. Applications are defined in a
|
|
subclass of Sinatra::Base; each request is processed within an
|
|
instance.
|
|
|
|
= 0.3.3 / 2009-01-06
|
|
|
|
* Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
|
|
|
|
* Log unhandled exception backtraces to rack.errors.
|
|
|
|
* Use RACK_ENV environment variable to establish Sinatra
|
|
environment when given. Thin sets this when started with
|
|
the -e argument.
|
|
|
|
* BUG: raising Sinatra::NotFound resulted in a 500 response
|
|
code instead of 404.
|
|
|
|
* BUG: use_in_file_templates! fails with CR/LF (#45)
|
|
|
|
* BUG: Sinatra detects the app file and root path when run under
|
|
thin/passenger.
|
|
|
|
= 0.3.2
|
|
|
|
* BUG: Static and send_file read entire file into String before
|
|
sending. Updated to stream with 8K chunks instead.
|
|
|
|
* Rake tasks and assets for building basic documentation website.
|
|
See http://sinatra.rubyforge.org
|
|
|
|
* Various minor doc fixes.
|
|
|
|
= 0.3.1
|
|
|
|
* Unbreak optional path parameters [jeremyevans]
|
|
|
|
= 0.3.0
|
|
|
|
* Add sinatra.gemspec w/ support for github gem builds. Forks can now
|
|
enable the build gem option in github to get free username-sinatra.gem
|
|
builds: gem install username-sinatra.gem --source=http://gems.github.com/
|
|
|
|
* Require rack-0.4 gem; removes frozen rack dir.
|
|
|
|
* Basic RSpec support; require 'sinatra/test/rspec' instead of
|
|
'sinatra/test/spec' to use. [avdi]
|
|
|
|
* before filters can modify request environment vars used for
|
|
routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
|
|
type functionality.
|
|
|
|
* In-file templates now uses @@ instead of ## as template separator.
|
|
|
|
* Top-level environment test predicates: development?, test?, production?
|
|
|
|
* Top-level "set", "enable", and "disable" methods for tweaking
|
|
app options. [rtomayko]
|
|
|
|
* Top-level "use" method for building Rack middleware pipelines
|
|
leading to app. See README for usage. [rtomayko]
|
|
|
|
* New "reload" option - set false to disable reloading in development.
|
|
|
|
* New "host" option - host/ip to bind to [cschneid]
|
|
|
|
* New "app_file" option - override the file to reload in development
|
|
mode [cschneid]
|
|
|
|
* Development error/not_found page cleanup [sr, adamwiggins]
|
|
|
|
* Remove a bunch of core extensions (String#to_param, String#from_param,
|
|
Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
|
|
|
|
* Various grammar and formatting fixes to README; additions on
|
|
community and contributing [cypher]
|
|
|
|
* Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
|
|
|
|
* Specs, documentation and fixes for splat'n routes [vic]
|
|
|
|
* Fix whitespace errors across all source files. [rtomayko]
|
|
|
|
* Fix streaming issues with Mongrel (body not closed). [bmizerany]
|
|
|
|
* Fix various issues with environment not being set properly (configure
|
|
blocks not running, error pages not registering, etc.) [cypher]
|
|
|
|
* Fix to allow locals to be passed to ERB templates [cschneid]
|
|
|
|
* Fix locking issues causing random errors during reload in development.
|
|
|
|
* Fix for escaped paths not resolving static files [Matthew Walker]
|
|
|
|
= 0.2.1
|
|
|
|
* File upload fix and minor tweaks.
|
|
|
|
= 0.2.0
|
|
|
|
* Initial gem release of 0.2 codebase.
|