Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 471 lines (332 sloc) 18.82 kb
f75bee5 Ryan Tomayko Cleanup and refactoring after inheritance changes
rtomayko authored
1 = 1.0 / unreleased
2
e14c700 Ryan Tomayko Update CHANGES with new features and obsoletions
rtomayko authored
3 * It's now possible to register blocks to run after each request using
4 after filters. After filters run at the end of each request, after
5 routes and error handlers.
6
e3a9f9e Ryan Tomayko update CHANGES file with recent changes
rtomayko authored
7 * Sinatra now uses Tilt <http://github.com/rtomayko/tilt> for rendering
8 templates. This adds support for template caching, consistent
9 template backtraces, and support for new template engines, like
e14c700 Ryan Tomayko Update CHANGES with new features and obsoletions
rtomayko authored
10 mustache and liquid.
11
f889c75 Ryan Tomayko reload_templates setting; on by default in :development [#321]
rtomayko authored
12 * New boolean 'reload_templates' setting controls whether template files
13 are reread from disk and recompiled on each request. Template read/compile
14 is cached by default in all environments except development.
15
e14c700 Ryan Tomayko Update CHANGES with new features and obsoletions
rtomayko authored
16 * New 'settings' method gives access to options in both class and request
17 scopes. This replaces the 'options' method.
18 * New 'erubis' helper method for rendering Erubis templates.
e3a9f9e Ryan Tomayko update CHANGES file with recent changes
rtomayko authored
19
20 * New 'cache_control' helper method provides a convenient way of
21 setting the Cache-Control response header. Takes a variable number
22 of boolean directives followed by a hash of value directives, like
23 this:
24 cache_control :public, :must_revalidate, :max_age => 60
25
ce3a8a8 Ryan Tomayko rearrange a couple of bullets in CHANGES for easier reading
rtomayko authored
26 * New 'expires' helper method is like cache_control but takes an
27 integer number of seconds or Time object:
28 expires 300, :public, :must_revalidate
29
e14c700 Ryan Tomayko Update CHANGES with new features and obsoletions
rtomayko authored
30 * Sinatra apps can now be run with a `-h <addr>` argument to specify
31 the address to bind to.
32
e3a9f9e Ryan Tomayko update CHANGES file with recent changes
rtomayko authored
33 * Rack::Session::Cookie is now added to the middleware pipeline when
34 running in test environments if the :sessions option is set.
35
f75bee5 Ryan Tomayko Cleanup and refactoring after inheritance changes
rtomayko authored
36 * Route handlers, before filters, templates, error mappings, and
37 middleware are now resolved dynamically up the inheritance hierarchy
38 when needed instead of duplicating the superclass's version when
39 a new Sinatra::Base subclass is created. This should fix a variety
40 of issues with extensions that need to add any of these things
41 to the base class.
42
e14c700 Ryan Tomayko Update CHANGES with new features and obsoletions
rtomayko authored
43 The following Sinatra features have been obsoleted in the 1.0 release:
44
45 * The `sinatra/test` library is obsolete. This includes the
46 `Sinatra::Test` module, the `Sinatra::TestHarness` class,
47 and the `get_it`, `post_it`, `put_it`, `delete_it`, and `head_it`
48 helper methods. The
49 [`Rack::Test` library](http://gitrdoc.com/brynary/rack-test) should
50 be used instead.
51
52 * Test framework specific libraries (`sinatra/test/spec`,
53 `sinatra/test/bacon`,`sinatra/test/rspec`, etc.) are obsolete.
54 See http://www.sinatrarb.com/testing.html for instructions on
55 setting up a testing environment under each of these frameworks.
56
57 * Auto-requiring template libraries in the `erb`, `builder`, `haml`,
58 and `sass` methods is obsolete due to thread-safety issues. You must
59 require the template libraries explicitly in your app.
60
61 * The `:views_directory` option to rendering methods is obsolete; use
62 `:views` instead.
63
64 * The `:haml` and `:sass` options to rendering methods are obsolete.
65 Template engine options should be passed in the second Hash argument
66 instead.
67
68 * The 'media_type' helper method is obsolete. Use 'mime_type' instead.
69
70 * The request-level `send_data` method is no longer supported.
71
72 * The `Sinatra::Event` and `Sinatra::EventContext` classes are no longer
73 supported. This may effect extensions written for versions prior to 0.9.2.
74 See [Writing Sinatra Extensions](http://www.sinatrarb.com/extensions.html)
75 for the officially supported extensions API.
76
77 * The `set_option` and `set_options` methods are obsolete; use `set`
78 instead.
79
80 * The `:env` setting (`settings.env`) is obsolete; use `:environment`
81 instead.
82
83 * The request level `stop` method is obsolete; use `halt` instead.
84
85 * The request level `entity_tag` method is obsolete; use `etag`
86 instead.
87
88 * The request level `headers` method (HTTP response headers) is obsolete;
89 use `response['Header-Name']` instead.
90
91 * `Sinatra.application` is obsolete; use `Sinatra::Application` instead.
92
93 * Using `Sinatra.application = nil` to reset an application is obsolete.
94 This should no longer be necessary.
95
96 * Using `Sinatra.default_options` to set base configuration items is
97 obsolete; use `Sinatra::Base.set(key, value)` instead.
98
99 * The `Sinatra::ServerError` exception is obsolete. All exceptions raised
100 within a request are now treated as internal server errors and result in
101 a 500 response status.
102
3d2988c Ryan Tomayko Forgot to add release date for 0.9.2 in CHANGES
rtomayko authored
103 = 0.9.2 / 2009-05-18
13fc79d Ryan Tomayko Remove support for source file reloading [#166]
rtomayko authored
104
5d6ac2a Ryan Tomayko update CHANGES for 0.9.2 (perhaps 1.0) release
rtomayko authored
105 * This version is compatible with Rack 1.0. [Rein Henrichs]
106
107 * The development-mode unhandled exception / error page has been
108 greatly enhanced, functionally and aesthetically. The error
109 page is used when the :show_exceptions option is enabled and an
110 exception propagates outside of a route handler or before filter.
111 [Simon Rozet / Matte Noble / Ryan Tomayko]
112
113 * Backtraces that move through templates now include filenames and
114 line numbers where possible. [#51 / S. Brent Faulkner]
115
116 * All templates now have an app-level option for setting default
117 template options (:haml, :sass, :erb, :builder). The app-level
118 option value must be a Hash if set and is merged with the
119 template options specified to the render method (Base#haml,
120 Base#erb, Base#builder). [S. Brent Faulkner, Ryan Tomayko]
121
122 * The method signature for all template rendering methods has
123 been unified: "def engine(template, options={}, locals={})".
124 The options Hash now takes the generic :views, :layout, and
125 :locals options but also any template-specific options. The
126 generic options are removed before calling the template specific
127 render method. Locals may be specified using either the
128 :locals key in the options hash or a second Hash option to the
129 rendering method. [#191 / Ryan Tomayko]
130
131 * The receiver is now passed to "configure" blocks. This
132 allows for the following idiom in top-level apps:
133 configure { |app| set :foo, app.root + '/foo' }
134 [TJ Holowaychuck / Ryan Tomayko]
135
136 * The "sinatra/test" lib is deprecated and will be removed in
137 Sinatra 1.0. This includes the Sinatra::Test module and
138 Sinatra::TestHarness class in addition to all the framework
139 test helpers that were deprecated in 0.9.1. The Rack::Test
140 lib should be used instead: http://gitrdoc.com/brynary/rack-test
141 [#176 / Simon Rozet]
142
13fc79d Ryan Tomayko Remove support for source file reloading [#166]
rtomayko authored
143 * Development mode source file reloading has been removed. The
144 "shotgun" (http://rtomayko.github.com/shotgun/) program can be
145 used to achieve the same basic functionality in most situations.
146 Passenger users should use the "tmp/always_restart.txt"
5d6ac2a Ryan Tomayko update CHANGES for 0.9.2 (perhaps 1.0) release
rtomayko authored
147 file (http://tinyurl.com/c67o4h). [#166 / Ryan Tomayko]
148
b48ed22 Ryan Tomayko Add note about auto-require deprecation to CHANGES
rtomayko authored
149 * Auto-requiring template libs in the erb, builder, haml, and
150 sass methods is deprecated due to thread-safety issues. You must
151 require the template libs explicitly in your app file. [Simon Rozet]
152
5d6ac2a Ryan Tomayko update CHANGES for 0.9.2 (perhaps 1.0) release
rtomayko authored
153 * A new Sinatra::Base#route_missing method was added. route_missing
154 is sent when no route matches the request or all route handlers
155 pass. The default implementation forwards the request to the
156 downstream app when running as middleware (i.e., "@app" is
157 non-nil), or raises a NotFound exception when no downstream app
158 is defined. Subclasses can override this method to perform custom
159 route miss logic. [Jon Crosby]
160
161 * A new Sinatra::Base#route_eval method was added. The method
162 yields to the block and throws :halt with the result. Subclasses
163 can override this method to tap into the route execution logic.
164 [TJ Holowaychuck]
165
166 * Fix the "-x" (enable request mutex / locking) command line
167 argument. Passing -x now properly sets the :lock option.
168 [S. Brent Faulkner, Ryan Tomayko]
169
170 * Fix writer ("foo=") and predicate ("foo?") methods in extension
171 modules not being added to the registering class.
172 [#172 / Pat Nakajima]
173
174 * Fix in-file templates when running alongside activesupport and
175 fatal errors when requiring activesupport before sinatra
176 [#178 / Brian Candler]
177
178 * Fix various issues running on Google AppEngine.
179 [Samuel Goebert, Simon Rozet]
180
181 * Fix in-file templates __END__ detection when __END__ exists with
182 other stuff on a line [Yoji Shidara]
13fc79d Ryan Tomayko Remove support for source file reloading [#166]
rtomayko authored
183
0f02baf Ryan Tomayko 0.9.1.1 security release
rtomayko authored
184 = 0.9.1.1 / 2009-03-09
185
186 * Fix directory traversal vulnerability in default static files
187 route. See [#177] for more info.
188
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
189 = 0.9.1 / 2009-03-01
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
190
191 * Sinatra now runs under Ruby 1.9.1 [#61]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
192
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
193 * Route patterns (splats, :named, or Regexp captures) are now
194 passed as arguments to the block. [#140]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
195
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
196 * The "helpers" method now takes a variable number of modules
197 along with the normal block syntax. [#133]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
198
cf32f2e Ryan Tomayko Middleware enhancements: automatic and explicit forward to downstream [#...
rtomayko authored
199 * New request-level #forward method for middleware components: passes
200 the env to the downstream app and merges the response status, headers,
0e1fd22 Ryan Tomayko Misc additions to the CHANGES file
rtomayko authored
201 and body into the current context. [#126]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
202
cf32f2e Ryan Tomayko Middleware enhancements: automatic and explicit forward to downstream [#...
rtomayko authored
203 * Requests are now automatically forwarded to the downstream app when
204 running as middleware and no matching route is found or all routes
205 pass.
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
206
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
207 * New simple API for extensions/plugins to add DSL-level and
208 request-level methods. Use Sinatra.register(mixin) to extend
209 the DSL with all public methods defined in the mixin module;
210 use Sinatra.helpers(mixin) to make all public methods defined
211 in the mixin module available at the request level. [#138]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
212 See http://www.sinatrarb.com/extensions.html for details.
213
214 * Named parameters in routes now capture the "." character. This makes
215 routes like "/:path/:filename" match against requests like
216 "/foo/bar.txt"; in this case, "params[:filename]" is "bar.txt".
217 Previously, the route would not match at all.
218
219 * Added request-level "redirect back" to redirect to the referring
220 URL.
221
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
222 * Added a new "clean_trace" option that causes backtraces dumped
223 to rack.errors and displayed on the development error page to
224 omit framework and core library backtrace lines. The option is
225 enabled by default. [#77]
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
226
090c4d7 Ryan Tomayko Fix weirdness with partials in ERB [#158]
rtomayko authored
227 * The ERB output buffer is now available to helpers via the @_out_buf
228 instance variable.
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
229
230 * It's now much easier to test sessions in unit tests by passing a
231 ":session" option to any of the mock request methods. e.g.,
232 get '/', {}, :session => { 'foo' => 'bar' }
233
2f377e2 Ryan Tomayko Trim down Testing section in the README; link to doc site instead
rtomayko authored
234 * The testing framework specific files ('sinatra/test/spec',
235 'sinatra/test/bacon', 'sinatra/test/rspec', etc.) have been deprecated.
236 See http://sinatrarb.com/testing.html for instructions on setting up
237 a testing environment with these frameworks.
238
a9e9f00 Ryan Tomayko Add send_data back in but deprecate [#143]
rtomayko authored
239 * The request-level #send_data method from Sinatra 0.3.3 has been added
240 for compatibility but is deprecated.
41c8aeb Ryan Tomayko Bring CHANGES file up to date with last week of stuff
rtomayko authored
241
987d622 Ryan Tomayko Bump version to 0.9.1 and update CHANGES file
rtomayko authored
242 * Fix :provides causing crash on any request when request has no
243 Accept header [#139]
244
245 * Fix that ERB templates were evaluated twice per "erb" call.
246
247 * Fix app-level middleware not being run when the Sinatra application is
248 run as middleware.
249
250 * Fixed some issues with running under Rack's CGI handler caused by
251 writing informational stuff to stdout.
252
0e1fd22 Ryan Tomayko Misc additions to the CHANGES file
rtomayko authored
253 * Fixed that reloading was sometimes enabled when starting from a
254 rackup file [#110]
255
256 * Fixed that "." in route patterns erroneously matched any character
257 instead of a literal ".". [#124]
258
f99015d Ryan Tomayko Bring in CHANGES additions from 0.9.0.x branch
rtomayko authored
259 = 0.9.0.4 / 2009-01-25
260
261 * Using halt with more than 1 args causes ArgumentError [#131]
262 * using halt in a before filter doesn't modify response [#127]
263 * Add deprecated Sinatra::EventContext to unbreak plugins [#130]
264 * Give access to GET/POST params in filters [#129]
265 * Preserve non-nested params in nested params hash [#117]
266 * Fix backtrace dump with Rack::Lint [#116]
267
268 = 0.9.0.3 / 2009-01-21
269
270 * Fall back on mongrel then webrick when thin not found. [#75]
271 * Use :environment instead of :env in test helpers to
272 fix deprecation warnings coming from framework.
273 * Make sinatra/test/rspec work again [#113]
274 * Fix app_file detection on windows [#118]
275 * Fix static files with Rack::Lint in pipeline [#121]
276
277 = 0.9.0.2 / 2009-01-18
278
279 * Halting a before block should stop processing of routes [#85]
280 * Fix redirect/halt in before filters [#85]
281
968194d Ryan Tomayko 0.9.0 release
rtomayko authored
282 = 0.9.0 / 2009-01-18
ccb653f Ryan Tomayko Update CHANGES file with hoboken notes
rtomayko authored
283
17cb177 Markus Prinz README and CHANGES tweaks for 0.9.0 release (#63)
cypher authored
284 * Works with and requires Rack >= 0.9.1
285
286 * Multiple Sinatra applications can now co-exist peacefully within a
287 single process. The new "Sinatra::Base" class can be subclassed to
288 establish a blank-slate Rack application or middleware component.
289 Documentation on using these features is forth-coming; the following
290 provides the basic gist: http://gist.github.com/38605
291
1fa9807 Nicolás Sanguinetti Nested params (e.g., "post[title]=Hello") [#70]
foca authored
292 * Parameters with subscripts are now parsed into a nested/recursive
293 Hash structure. e.g., "post[title]=Hello&post[body]=World" yields
294 params: {'post' => {'title' => 'Hello', 'body' => 'World'}}.
295
17cb177 Markus Prinz README and CHANGES tweaks for 0.9.0 release (#63)
cypher authored
296 * Regular expressions may now be used in route pattens; captures are
297 available at "params[:captures]".
b5faa57 Ryan Tomayko Dump backtrace to rack.errors on unhandled exception
rtomayko authored
298
38778ed Markus Prinz Add filtering support for Accept HTTP header.
cypher authored
299 * New ":provides" route condition takes an array of mime types and
300 matches only when an Accept request header is present with a
301 corresponding type. [cypher]
302
17cb177 Markus Prinz README and CHANGES tweaks for 0.9.0 release (#63)
cypher authored
303 * New request-level "pass" method; immediately exits the current block
304 and passes control to the next matching route.
ccb653f Ryan Tomayko Update CHANGES file with hoboken notes
rtomayko authored
305
306 * The request-level "body" method now takes a block; evaluation is
307 deferred until an attempt is made to read the body. The block must
308 return a String or Array.
309
310 * New "route conditions" system for attaching rules for when a route
311 matches. The :agent and :host route options now use this system.
312
17cb177 Markus Prinz README and CHANGES tweaks for 0.9.0 release (#63)
cypher authored
313 * New "dump_errors" option controls whether the backtrace is dumped to
314 rack.errors when an exception is raised from a route. The option is
315 enabled by default for top-level apps.
316
317 * Better default "app_file", "root", "public", and "views" location
318 detection; changes to "root" and "app_file" automatically cascade to
319 other options that depend on them.
ccb653f Ryan Tomayko Update CHANGES file with hoboken notes
rtomayko authored
320
321 * Error mappings are now split into two distinct layers: exception
322 mappings and custom error pages. Exception mappings are registered
323 with "error(Exception)" and are run only when the app raises an
324 exception. Custom error pages are registered with "error(status_code)",
325 where "status_code" is an integer, and are run any time the response
326 has the status code specified. It's also possible to register an error
327 page for a range of status codes: "error(500..599)".
328
968194d Ryan Tomayko 0.9.0 release
rtomayko authored
329 * In-file templates are now automatically imported from the file that
330 requires 'sinatra'. The use_in_file_templates! method is still available
331 for loading templates from other files.
332
c2849ff Ryan Tomayko Note sinatra/test modifications in CHANGES file
rtomayko authored
333 * Sinatra's testing support is no longer dependent on Test::Unit. Requiring
334 'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness
335 class, which can be used with any test framework. The 'sinatra/test/unit',
336 'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files
337 can be required to setup a framework-specific testing environment. See the
338 README for more information.
339
1fb5b99 Dylan Egan Bacon support
dylanegan authored
340 * Added support for Bacon (test framework). The 'sinatra/test/bacon' file
341 can be required to setup Sinatra test helpers on Bacon::Context.
342
ccb653f Ryan Tomayko Update CHANGES file with hoboken notes
rtomayko authored
343 * Deprecated "set_option" and "set_options"; use "set" instead.
344
345 * Deprecated the "env" option ("options.env"); use "environment" instead.
346
347 * Deprecated the request level "stop" method; use "halt" instead.
348
349 * Deprecated the request level "entity_tag" method; use "etag" instead.
350 Both "entity_tag" and "etag" were previously supported.
351
352 * Deprecated the request level "headers" method (HTTP response headers);
353 use "response['Header-Name']" instead.
354
355 * Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
356
357 * Deprecated setting Sinatra.application = nil to reset an application.
358 This should no longer be necessary.
359
360 * Deprecated "Sinatra.default_options"; use
361 "Sinatra::Default.set(key, value)" instead.
362
363 * Deprecated the "ServerError" exception. All Exceptions are now
364 treated as internal server errors and result in a 500 response
365 status.
366
91922b7 Ryan Tomayko Deprecate get_it, post_it, etc. test helpers with warnings
rtomayko authored
367 * Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it"
368 test helper methods. Use "get", "post", "put", "delete", and "head",
369 respectively, instead.
370
ccb653f Ryan Tomayko Update CHANGES file with hoboken notes
rtomayko authored
371 * Removed Event and EventContext classes. Applications are defined in a
372 subclass of Sinatra::Base; each request is processed within an
373 instance.
374
375 = 0.3.3 / 2009-01-06
376
377 * Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
378
379 * Log unhandled exception backtraces to rack.errors.
380
381 * Use RACK_ENV environment variable to establish Sinatra
382 environment when given. Thin sets this when started with
383 the -e argument.
384
385 * BUG: raising Sinatra::NotFound resulted in a 500 response
386 code instead of 404.
387
388 * BUG: use_in_file_templates! fails with CR/LF (#45)
389
390 * BUG: Sinatra detects the app file and root path when run under
391 thin/passenger.
392
393 = 0.3.2
394
395 * BUG: Static and send_file read entire file into String before
396 sending. Updated to stream with 8K chunks instead.
397
398 * Rake tasks and assets for building basic documentation website.
399 See http://sinatra.rubyforge.org
400
401 * Various minor doc fixes.
402
403 = 0.3.1
404
405 * Unbreak optional path parameters [jeremyevans]
406
407 = 0.3.0
408
409 * Add sinatra.gemspec w/ support for github gem builds. Forks can now
410 enable the build gem option in github to get free username-sinatra.gem
411 builds: gem install username-sinatra.gem --source=http://gems.github.com/
412
413 * Require rack-0.4 gem; removes frozen rack dir.
414
415 * Basic RSpec support; require 'sinatra/test/rspec' instead of
416 'sinatra/test/spec' to use. [avdi]
417
418 * before filters can modify request environment vars used for
419 routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
420 type functionality.
421
422 * In-file templates now uses @@ instead of ## as template separator.
423
424 * Top-level environment test predicates: development?, test?, production?
425
426 * Top-level "set", "enable", and "disable" methods for tweaking
427 app options. [rtomayko]
428
429 * Top-level "use" method for building Rack middleware pipelines
430 leading to app. See README for usage. [rtomayko]
431
432 * New "reload" option - set false to disable reloading in development.
433
434 * New "host" option - host/ip to bind to [cschneid]
435
436 * New "app_file" option - override the file to reload in development
437 mode [cschneid]
438
439 * Development error/not_found page cleanup [sr, adamwiggins]
440
441 * Remove a bunch of core extensions (String#to_param, String#from_param,
442 Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
443
444 * Various grammar and formatting fixes to README; additions on
445 community and contributing [cypher]
446
447 * Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
448
449 * Specs, documentation and fixes for splat'n routes [vic]
450
451 * Fix whitespace errors across all source files. [rtomayko]
452
453 * Fix streaming issues with Mongrel (body not closed). [bmizerany]
454
455 * Fix various issues with environment not being set properly (configure
456 blocks not running, error pages not registering, etc.) [cypher]
457
458 * Fix to allow locals to be passed to ERB templates [cschneid]
459
460 * Fix locking issues causing random errors during reload in development.
461
462 * Fix for escaped paths not resolving static files [Matthew Walker]
463
464 = 0.2.1
465
466 * File upload fix and minor tweaks.
467
468 = 0.2.0
469
470 * Initial gem release of 0.2 codebase.
Something went wrong with that request. Please try again.