Permalink
Newer
Older
100644 735 lines (518 sloc) 29.6 KB
@rkh
Mar 17, 2011
1
= 1.2.1 / 2011-03-17
@rkh
Mar 12, 2011
2
3
* Use a generated session secret when using `enable :sessions`. (Konstantin
4
Haase)
@rkh
Mar 12, 2011
5
@rkh
Mar 17, 2011
6
* Fixed a bug where the wrong content type was used if no content type was set
7
and a template engine was used with a different engine for the layout with
8
different default content types, say Less embedded in Slim. (Konstantin
9
Haase)
10
11
* README translations improved (Gabriel Andretta, burningTyger, Sylvain Desvé,
12
Gregor Schmidt)
@rkh
Mar 3, 2011
14
= 1.2.0 / 2011-03-03
@rkh
Nov 12, 2010
15
@rkh
Dec 14, 2010
16
* Added `slim` rendering method for rendering Slim templates. (Steve
17
Hodgkiss)
@rkh
Nov 12, 2010
18
19
* The `markaby` rendering method now allows passing a block, making inline
20
usage possible. Requires Tilt 1.2 or newer. (Konstantin Haase)
21
@rkh
Dec 25, 2010
22
* All render methods now take a `:layout_engine` option, allowing to use a
23
layout in a different template language. Even more useful than using this
24
directly (`erb :index, :layout_engine => :haml`) is setting this globally for
25
a template engine that otherwise does not support layouts, like Markdown or
26
Textile (`set :markdown, :layout_engine => :erb`). (Konstantin Haase)
27
28
* Before and after filters now support conditions, both with and without
29
patterns (`before '/api/*', :agent => /Songbird/`). (Konstantin Haase)
30
@rkh
Feb 19, 2011
31
* Added a `url` helper method which constructs absolute URLs. Copes with
32
reverse proxies and Rack handlers correctly. Aliased to `to`, so you can
33
write `redirect to('/foo')`. (Konstantin Haase)
34
35
* If running on 1.9, patterns for routes and filters now support named
36
captures: `get(%r{/hi/(?<name>[^/?#]+)}) { "Hi #{params['name']}" }`.
37
(Steve Price)
38
39
* All rendering methods now take a `:scope` option, which renders them in
40
another context. Note that helpers and instance variables will be
41
unavailable if you use this feature. (Paul Walker)
42
@rkh
Feb 19, 2011
43
* The behavior of `redirect` can now be configured with `absolute_redirects`
44
and `prefixed_redirects`. (Konstantin Haase)
45
@rkh
Dec 25, 2010
46
* `send_file` now allows overriding the Last-Modified header, which defaults
47
to the file's mtime, by passing a `:last_modified` option. (Konstantin Haase)
48
@rkh
Feb 19, 2011
49
* You can use your own template lookup method by defining `find_template`.
50
This allows, among other things, using more than one views folder.
51
(Konstantin Haase)
52
@rkh
Feb 19, 2011
53
* Largely improved documentation. (burningTyger, Vasily Polovnyov, Gabriel
54
Andretta, Konstantin Haase)
55
@rkh
Feb 19, 2011
56
* Improved error handling. (cactus, Konstantin Haase)
57
@rkh
Feb 19, 2011
58
* Skip missing template engines in tests correctly. (cactus)
59
60
* Sinatra now ships with a Gemfile for development dependencies, since it eases
61
supporting different platforms, like JRuby. (Konstantin Haase)
62
63
= 1.1.3 / 2011-02-20
@rkh
Feb 19, 2011
64
65
* Fixed issues with `user_agent` condition if the user agent header is missing.
66
(Konstantin Haase)
67
68
* Fix some routing tests that have been skipped by accident (Ross A. Baker)
69
70
* Fix rendering issues with Builder and Nokogiri (Konstantin Haase)
71
72
* Replace last_modified helper with better implementation. (cactus,
73
Konstantin Haase)
74
75
* Fix issue with charset not being set when using `provides` condition.
76
(Konstantin Haase)
77
78
* Fix issue with `render` not picking up all alternative file extensions for
79
a rendering engine - it was not possible to register ".html.erb" without
80
tricks. (Konstantin Haase)
81
@rkh
Dec 25, 2010
82
= 1.1.2 / 2010-10-25
83
84
Like 1.1.1, but with proper CHANGES file.
85
86
= 1.1.1 / 2010-10-25
@rkh
Dec 14, 2010
87
88
* README has been translated to Russian (Nickolay Schwarz, Vasily Polovnyov)
89
and Portuguese (Luciano Sousa).
@rkh
Nov 12, 2010
90
91
* Nested templates without a `:layout` option can now be used from the layout
92
template without causing an infinite loop. (Konstantin Haase)
93
@rkh
Dec 14, 2010
94
* Inline templates are now encoding aware and can therefore be used with
95
unicode characters on Ruby 1.9. Magic comments at the beginning of the file
96
will be honored. (Konstantin Haase)
97
98
* Default `app_file` is set correctly when running with bundler. Using
99
bundler caused Sinatra not to find the `app_file` and therefore not to find
100
the `views` folder on it's own. (Konstantin Haase)
101
102
* Better handling of Content-Type when using `send_file`: If file extension
103
is unknown, fall back to `application/octet-stream` and do not override
104
content type if it has already been set, except if `:type` is passed
105
explicitly (Konstantin Haase)
106
@rkh
Nov 12, 2010
107
* Path is no longer cached if changed between handlers that do pattern
@rkh
Dec 14, 2010
108
matching. This means you can change `request.path_info` in a pattern
109
matching before filter. (Konstantin Haase)
@rkh
Nov 12, 2010
110
111
* Headers set by cache_control now always set max_age as an Integer, making
112
sure it is compatible with RFC2616. (Konstantin Haase)
113
@rkh
Dec 25, 2010
114
* Further improved handling of string encodings on Ruby 1.9, templates now
115
honor default_encoding and URLs support unicode characters. (Konstantin
116
Haase)
117
@rkh
Oct 24, 2010
118
= 1.1.0 / 2010-10-24
@rkh
Sep 1, 2010
119
120
* Before and after filters now support pattern matching, including the
121
ability to use captures: "before('/user/:name') { |name| ... }". This
122
avoids manual path checking. No performance loss if patterns are avoided.
123
(Konstantin Haase)
@rkh
Sep 1, 2010
124
125
* It is now possible to render SCSS files with the `scss` method, which
126
behaves exactly like `sass` except for the different file extension and
127
assuming the SCSS syntax. (Pedro Menezes, Konstantin Haase)
@rkh
Sep 1, 2010
128
129
* Added `liquid`, `markdown`, `nokogiri`, `textile`, `rdoc`, `radius`,
130
`markaby`, and `coffee` rendering methods for rendering Liquid, Markdown,
131
Nokogiri, Textile, RDoc, Radius, Markaby and CoffeeScript templates.
132
(Konstantin Haase)
133
@rkh
Oct 19, 2010
134
* Now supports byte-range requests (the HTTP_RANGE header) for static files.
135
Multi-range requests are not supported, however. (Jens Alfke)
136
137
* You can now use #settings method from class and top level for convenience.
@rkh
Sep 1, 2010
138
(Konstantin Haase)
139
140
* Setting multiple values now no longer relies on #to_hash and therefore
141
accepts any Enumerable as parameter. (Simon Rozet)
@rkh
Sep 1, 2010
142
143
* Nested templates default the `layout` option to `false` rather than `true`.
144
This eases the use of partials. If you wanted to render one haml template
145
embedded in another, you had to call `haml :partial, {}, :layout => false`.
146
As you almost never want the partial to be wrapped in the standard layout
147
in this situation, you now only have to call `haml :partial`. Passing in
148
`layout` explicitly is still possible. (Konstantin Haase)
149
150
* If a the return value of one of the render functions is used as a response
151
body and the content type has not been set explicitly, Sinatra chooses a
152
content type corresponding to the rendering engine rather than just using
153
"text/html". (Konstantin Haase)
154
@rkh
Oct 24, 2010
155
* README is now available in Chinese (Wu Jiang), French (Mickael Riga),
156
German (Bernhard Essl, Konstantin Haase, burningTyger), Hungarian (Janos
157
Hardi) and Spanish (Gabriel Andretta). The extremely outdated Japanese
158
README has been updated (Kouhei Yanagita).
@rkh
Sep 1, 2010
159
160
* It is now possible to access Sinatra's template_cache from the outside.
161
(Nick Sutterer)
@rkh
Sep 1, 2010
162
163
* The `last_modified` method now also accepts DateTime instances and makes
164
sure the header will always be set to a string. (Konstantin Haase)
@rkh
Sep 1, 2010
165
166
* 599 now is a legal status code. (Steve Shreeve)
@rkh
Sep 1, 2010
167
168
* This release is compatible with Ruby 1.9.2. Sinatra was trying to read
169
non existent files Ruby added to the call stack. (Shota Fukumori,
170
Konstantin Haase)
@rkh
Sep 1, 2010
171
172
* Prevents a memory leak on 1.8.6 in production mode. Note, however, that
173
this is due to a bug in 1.8.6 and request will have the additional overhead
174
of parsing templates again on that version. It is recommended to use at
175
least Ruby 1.8.7. (Konstantin Haase)
176
177
* Compares last modified date correctly. `last_modified` was halting only
178
when the 'If-Modified-Since' header date was equal to the time specified.
179
Now, it halts when is equal or later than the time specified (Gabriel
180
Andretta).
181
182
* Sinatra is now usable in combination with Rails 3. When mounting a Sinatra
183
application under a subpath in Rails 3, the PATH_INFO is not prefixed with
184
a slash and no routes did match. (José Valim)
185
@rkh
Oct 24, 2010
186
* Better handling of encodings in 1.9, defaults params encoding to UTF-8.
@rkh
Sep 10, 2010
187
(Konstantin Haase)
188
189
* `show_exeptions` handling is now triggered after custom error handlers, if
190
it is set to `:after_handlers`, thus not disabling those handler in
191
development mode. (pangel, Konstantin Haase)
193
* Added ability to handle weighted HTTP_ACCEPT headers. (Davide D'Agostino)
194
195
* `send_file` now always respects the `:type` option if set. Previously it
196
was discarded if no matching mime type was found, which made it impossible
197
to directly pass a mime type. (Konstantin Haase)
198
199
* `redirect` always redirects to an absolute URI, even if a relative URI was
200
passed. Ensures compatibility with RFC 2616 section 14.30. (Jean-Philippe
201
Garcia Ballester, Anthony Williams)
202
203
* Broken examples for using Erubis, Haml and Test::Unit in README have been
204
fixed. (Nick Sutterer, Doug Ireton, Jason Stewart, Eric Marden)
205
@rkh
Sep 1, 2010
206
* Sinatra now handles SIGTERM correctly. (Patrick Collison)
207
208
* Fixes an issue with inline templates in modular applications that manually
209
call `run!`. (Konstantin Haase)
210
211
* Spaces after inline template names are now ignored (Konstantin Haase)
212
@rkh
Sep 1, 2010
213
* It's now possible to use Sinatra with different package management
214
systems defining a custom require. (Konstantin Haase)
215
216
* Lighthouse has been dropped in favor of GitHub issues.
217
218
* Tilt is now a dependency and therefore no longer ships bundled with
219
Sinatra. (Ryan Tomayko, Konstantin Haase)
220
221
* Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer supported.
222
(Konstantin Haase)
223
224
= 1.0 / 2010-03-23
226
* It's now possible to register blocks to run after each request using
227
after filters. After filters run at the end of each request, after
228
routes and error handlers. (Jimmy Schementi)
230
* Sinatra now uses Tilt <http://github.com/rtomayko/tilt> for rendering
231
templates. This adds support for template caching, consistent
232
template backtraces, and support for new template engines, like
233
mustache and liquid. (Ryan Tomayko)
234
235
* ERB, Erubis, and Haml templates are now compiled the first time
236
they're rendered instead of being string eval'd on each invocation.
237
Benchmarks show a 5x-10x improvement in render time. This also
238
reduces the number of objects created, decreasing pressure on Ruby's
239
GC. (Ryan Tomayko)
240
241
* New 'settings' method gives access to options in both class and request
242
scopes. This replaces the 'options' method. (Chris Wanstrath)
244
* New boolean 'reload_templates' setting controls whether template files
245
are reread from disk and recompiled on each request. Template read/compile
246
is cached by default in all environments except development. (Ryan Tomayko)
248
* New 'erubis' helper method for rendering ERB template with Erubis. The
249
erubis gem is required. (Dylan Egan)
250
251
* New 'cache_control' helper method provides a convenient way of
252
setting the Cache-Control response header. Takes a variable number
253
of boolean directives followed by a hash of value directives, like
254
this: cache_control :public, :must_revalidate, :max_age => 60
255
(Ryan Tomayko)
257
* New 'expires' helper method is like cache_control but takes an
258
integer number of seconds or Time object:
259
expires 300, :public, :must_revalidate
260
(Ryan Tomayko)
261
262
* New request.secure? method for checking for an SSL connection.
263
(Adam Wiggins)
265
* Sinatra apps can now be run with a `-o <addr>` argument to specify
266
the address to bind to. (Ryan Tomayko)
268
* Rack::Session::Cookie is now added to the middleware pipeline when
269
running in test environments if the :sessions option is set.
270
(Simon Rozet)
272
* Route handlers, before filters, templates, error mappings, and
273
middleware are now resolved dynamically up the inheritance hierarchy
274
when needed instead of duplicating the superclass's version when
275
a new Sinatra::Base subclass is created. This should fix a variety
276
of issues with extensions that need to add any of these things
277
to the base class. (Ryan Tomayko)
279
* Exception error handlers always override the raise_errors option now.
280
Previously, all exceptions would be raised outside of the application
281
when the raise_errors option was enabled, even if an error handler was
282
defined for that exception. The raise_errors option now controls
283
whether unhandled exceptions are raised (enabled) or if a generic 500
284
error is returned (disabled). (Ryan Tomayko)
285
286
* The X-Cascade response header is set to 'pass' when no matching route
287
is found or all routes pass. (Josh Peek)
289
* Filters do not run when serving static files anymore. (Ryan Tomayko)
290
291
* pass takes an optional block to be used as the route handler if no
292
subsequent route matches the request. (Blake Mizerany)
293
294
The following Sinatra features have been obsoleted (removed entirely) in
295
the 1.0 release:
296
297
* The `sinatra/test` library is obsolete. This includes the `Sinatra::Test`
298
module, the `Sinatra::TestHarness` class, and the `get_it`, `post_it`,
299
`put_it`, `delete_it`, and `head_it` helper methods. The
300
[`Rack::Test` library](http://gitrdoc.com/brynary/rack-test) should
301
be used instead.
302
303
* Test framework specific libraries (`sinatra/test/spec`,
304
`sinatra/test/bacon`,`sinatra/test/rspec`, etc.) are obsolete. See
305
http://www.sinatrarb.com/testing.html for instructions on setting up a
306
testing environment under each of these frameworks.
307
308
* `Sinatra::Default` is obsolete; use `Sinatra::Base` instead.
309
`Sinatra::Base` acts more like `Sinatra::Default` in development mode.
310
For example, static file serving and sexy development error pages are
311
enabled by default.
312
313
* Auto-requiring template libraries in the `erb`, `builder`, `haml`,
314
and `sass` methods is obsolete due to thread-safety issues. You must
315
require the template libraries explicitly in your app.
316
317
* The `:views_directory` option to rendering methods is obsolete; use
318
`:views` instead.
319
320
* The `:haml` and `:sass` options to rendering methods are obsolete.
321
Template engine options should be passed in the second Hash argument
322
instead.
323
324
* The `use_in_file_templates` method is obsolete. Use
325
`enable :inline_templates` or `set :inline_templates, 'path/to/file'`
326
327
* The 'media_type' helper method is obsolete. Use 'mime_type' instead.
328
329
* The 'mime' main and class method is obsolete. Use 'mime_type' instead.
330
331
* The request-level `send_data` method is no longer supported.
332
333
* The `Sinatra::Event` and `Sinatra::EventContext` classes are no longer
334
supported. This may effect extensions written for versions prior to 0.9.2.
335
See [Writing Sinatra Extensions](http://www.sinatrarb.com/extensions.html)
336
for the officially supported extensions API.
337
338
* The `set_option` and `set_options` methods are obsolete; use `set`
339
instead.
340
341
* The `:env` setting (`settings.env`) is obsolete; use `:environment`
342
instead.
343
344
* The request level `stop` method is obsolete; use `halt` instead.
345
346
* The request level `entity_tag` method is obsolete; use `etag`
347
instead.
348
349
* The request level `headers` method (HTTP response headers) is obsolete;
350
use `response['Header-Name']` instead.
351
352
* `Sinatra.application` is obsolete; use `Sinatra::Application` instead.
353
354
* Using `Sinatra.application = nil` to reset an application is obsolete.
355
This should no longer be necessary.
356
357
* Using `Sinatra.default_options` to set base configuration items is
358
obsolete; use `Sinatra::Base.set(key, value)` instead.
359
360
* The `Sinatra::ServerError` exception is obsolete. All exceptions raised
361
within a request are now treated as internal server errors and result in
362
a 500 response status.
363
364
* The `:methodoverride' option to enable/disable the POST _method hack is
365
obsolete; use `:method_override` instead.
366
367
= 0.9.2 / 2009-05-18
369
* This version is compatible with Rack 1.0. [Rein Henrichs]
370
371
* The development-mode unhandled exception / error page has been
372
greatly enhanced, functionally and aesthetically. The error
373
page is used when the :show_exceptions option is enabled and an
374
exception propagates outside of a route handler or before filter.
375
[Simon Rozet / Matte Noble / Ryan Tomayko]
376
377
* Backtraces that move through templates now include filenames and
378
line numbers where possible. [#51 / S. Brent Faulkner]
379
380
* All templates now have an app-level option for setting default
381
template options (:haml, :sass, :erb, :builder). The app-level
382
option value must be a Hash if set and is merged with the
383
template options specified to the render method (Base#haml,
384
Base#erb, Base#builder). [S. Brent Faulkner, Ryan Tomayko]
385
386
* The method signature for all template rendering methods has
387
been unified: "def engine(template, options={}, locals={})".
388
The options Hash now takes the generic :views, :layout, and
389
:locals options but also any template-specific options. The
390
generic options are removed before calling the template specific
391
render method. Locals may be specified using either the
392
:locals key in the options hash or a second Hash option to the
393
rendering method. [#191 / Ryan Tomayko]
394
395
* The receiver is now passed to "configure" blocks. This
396
allows for the following idiom in top-level apps:
397
configure { |app| set :foo, app.root + '/foo' }
398
[TJ Holowaychuck / Ryan Tomayko]
399
400
* The "sinatra/test" lib is deprecated and will be removed in
401
Sinatra 1.0. This includes the Sinatra::Test module and
402
Sinatra::TestHarness class in addition to all the framework
403
test helpers that were deprecated in 0.9.1. The Rack::Test
404
lib should be used instead: http://gitrdoc.com/brynary/rack-test
405
[#176 / Simon Rozet]
406
407
* Development mode source file reloading has been removed. The
408
"shotgun" (http://rtomayko.github.com/shotgun/) program can be
409
used to achieve the same basic functionality in most situations.
410
Passenger users should use the "tmp/always_restart.txt"
411
file (http://tinyurl.com/c67o4h). [#166 / Ryan Tomayko]
412
413
* Auto-requiring template libs in the erb, builder, haml, and
414
sass methods is deprecated due to thread-safety issues. You must
415
require the template libs explicitly in your app file. [Simon Rozet]
416
417
* A new Sinatra::Base#route_missing method was added. route_missing
418
is sent when no route matches the request or all route handlers
419
pass. The default implementation forwards the request to the
420
downstream app when running as middleware (i.e., "@app" is
421
non-nil), or raises a NotFound exception when no downstream app
422
is defined. Subclasses can override this method to perform custom
423
route miss logic. [Jon Crosby]
424
425
* A new Sinatra::Base#route_eval method was added. The method
426
yields to the block and throws :halt with the result. Subclasses
427
can override this method to tap into the route execution logic.
428
[TJ Holowaychuck]
429
430
* Fix the "-x" (enable request mutex / locking) command line
431
argument. Passing -x now properly sets the :lock option.
432
[S. Brent Faulkner, Ryan Tomayko]
433
434
* Fix writer ("foo=") and predicate ("foo?") methods in extension
435
modules not being added to the registering class.
436
[#172 / Pat Nakajima]
437
438
* Fix in-file templates when running alongside activesupport and
439
fatal errors when requiring activesupport before sinatra
440
[#178 / Brian Candler]
441
442
* Fix various issues running on Google AppEngine.
443
[Samuel Goebert, Simon Rozet]
444
445
* Fix in-file templates __END__ detection when __END__ exists with
446
other stuff on a line [Yoji Shidara]
448
= 0.9.1.1 / 2009-03-09
449
450
* Fix directory traversal vulnerability in default static files
451
route. See [#177] for more info.
452
453
= 0.9.1 / 2009-03-01
454
455
* Sinatra now runs under Ruby 1.9.1 [#61]
457
* Route patterns (splats, :named, or Regexp captures) are now
458
passed as arguments to the block. [#140]
460
* The "helpers" method now takes a variable number of modules
461
along with the normal block syntax. [#133]
463
* New request-level #forward method for middleware components: passes
464
the env to the downstream app and merges the response status, headers,
465
and body into the current context. [#126]
467
* Requests are now automatically forwarded to the downstream app when
468
running as middleware and no matching route is found or all routes
469
pass.
471
* New simple API for extensions/plugins to add DSL-level and
472
request-level methods. Use Sinatra.register(mixin) to extend
473
the DSL with all public methods defined in the mixin module;
474
use Sinatra.helpers(mixin) to make all public methods defined
475
in the mixin module available at the request level. [#138]
476
See http://www.sinatrarb.com/extensions.html for details.
477
478
* Named parameters in routes now capture the "." character. This makes
479
routes like "/:path/:filename" match against requests like
480
"/foo/bar.txt"; in this case, "params[:filename]" is "bar.txt".
481
Previously, the route would not match at all.
482
483
* Added request-level "redirect back" to redirect to the referring
484
URL.
485
486
* Added a new "clean_trace" option that causes backtraces dumped
487
to rack.errors and displayed on the development error page to
488
omit framework and core library backtrace lines. The option is
489
enabled by default. [#77]
491
* The ERB output buffer is now available to helpers via the @_out_buf
492
instance variable.
493
494
* It's now much easier to test sessions in unit tests by passing a
495
":session" option to any of the mock request methods. e.g.,
496
get '/', {}, :session => { 'foo' => 'bar' }
497
498
* The testing framework specific files ('sinatra/test/spec',
499
'sinatra/test/bacon', 'sinatra/test/rspec', etc.) have been deprecated.
500
See http://sinatrarb.com/testing.html for instructions on setting up
501
a testing environment with these frameworks.
502
503
* The request-level #send_data method from Sinatra 0.3.3 has been added
504
for compatibility but is deprecated.
506
* Fix :provides causing crash on any request when request has no
507
Accept header [#139]
508
509
* Fix that ERB templates were evaluated twice per "erb" call.
510
511
* Fix app-level middleware not being run when the Sinatra application is
512
run as middleware.
513
514
* Fixed some issues with running under Rack's CGI handler caused by
515
writing informational stuff to stdout.
516
517
* Fixed that reloading was sometimes enabled when starting from a
518
rackup file [#110]
519
520
* Fixed that "." in route patterns erroneously matched any character
521
instead of a literal ".". [#124]
522
523
= 0.9.0.4 / 2009-01-25
524
525
* Using halt with more than 1 args causes ArgumentError [#131]
526
* using halt in a before filter doesn't modify response [#127]
527
* Add deprecated Sinatra::EventContext to unbreak plugins [#130]
528
* Give access to GET/POST params in filters [#129]
529
* Preserve non-nested params in nested params hash [#117]
530
* Fix backtrace dump with Rack::Lint [#116]
531
532
= 0.9.0.3 / 2009-01-21
533
534
* Fall back on mongrel then webrick when thin not found. [#75]
535
* Use :environment instead of :env in test helpers to
536
fix deprecation warnings coming from framework.
537
* Make sinatra/test/rspec work again [#113]
538
* Fix app_file detection on windows [#118]
539
* Fix static files with Rack::Lint in pipeline [#121]
540
541
= 0.9.0.2 / 2009-01-18
542
543
* Halting a before block should stop processing of routes [#85]
544
* Fix redirect/halt in before filters [#85]
545
@rtomayko
Jan 18, 2009
546
= 0.9.0 / 2009-01-18
548
* Works with and requires Rack >= 0.9.1
549
550
* Multiple Sinatra applications can now co-exist peacefully within a
551
single process. The new "Sinatra::Base" class can be subclassed to
552
establish a blank-slate Rack application or middleware component.
553
Documentation on using these features is forth-coming; the following
554
provides the basic gist: http://gist.github.com/38605
555
556
* Parameters with subscripts are now parsed into a nested/recursive
557
Hash structure. e.g., "post[title]=Hello&post[body]=World" yields
558
params: {'post' => {'title' => 'Hello', 'body' => 'World'}}.
559
560
* Regular expressions may now be used in route pattens; captures are
561
available at "params[:captures]".
563
* New ":provides" route condition takes an array of mime types and
564
matches only when an Accept request header is present with a
565
corresponding type. [cypher]
566
567
* New request-level "pass" method; immediately exits the current block
568
and passes control to the next matching route.
569
570
* The request-level "body" method now takes a block; evaluation is
571
deferred until an attempt is made to read the body. The block must
572
return a String or Array.
573
574
* New "route conditions" system for attaching rules for when a route
575
matches. The :agent and :host route options now use this system.
576
577
* New "dump_errors" option controls whether the backtrace is dumped to
578
rack.errors when an exception is raised from a route. The option is
579
enabled by default for top-level apps.
580
581
* Better default "app_file", "root", "public", and "views" location
582
detection; changes to "root" and "app_file" automatically cascade to
583
other options that depend on them.
584
585
* Error mappings are now split into two distinct layers: exception
586
mappings and custom error pages. Exception mappings are registered
587
with "error(Exception)" and are run only when the app raises an
588
exception. Custom error pages are registered with "error(status_code)",
589
where "status_code" is an integer, and are run any time the response
590
has the status code specified. It's also possible to register an error
591
page for a range of status codes: "error(500..599)".
592
@rtomayko
Jan 18, 2009
593
* In-file templates are now automatically imported from the file that
594
requires 'sinatra'. The use_in_file_templates! method is still available
595
for loading templates from other files.
596
597
* Sinatra's testing support is no longer dependent on Test::Unit. Requiring
598
'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness
599
class, which can be used with any test framework. The 'sinatra/test/unit',
600
'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files
601
can be required to setup a framework-specific testing environment. See the
602
README for more information.
603
@dylanegan
Jan 9, 2009
604
* Added support for Bacon (test framework). The 'sinatra/test/bacon' file
605
can be required to setup Sinatra test helpers on Bacon::Context.
606
607
* Deprecated "set_option" and "set_options"; use "set" instead.
608
609
* Deprecated the "env" option ("options.env"); use "environment" instead.
610
611
* Deprecated the request level "stop" method; use "halt" instead.
612
613
* Deprecated the request level "entity_tag" method; use "etag" instead.
614
Both "entity_tag" and "etag" were previously supported.
615
616
* Deprecated the request level "headers" method (HTTP response headers);
617
use "response['Header-Name']" instead.
618
619
* Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
620
621
* Deprecated setting Sinatra.application = nil to reset an application.
622
This should no longer be necessary.
623
624
* Deprecated "Sinatra.default_options"; use
625
"Sinatra::Default.set(key, value)" instead.
626
627
* Deprecated the "ServerError" exception. All Exceptions are now
628
treated as internal server errors and result in a 500 response
629
status.
630
631
* Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it"
632
test helper methods. Use "get", "post", "put", "delete", and "head",
633
respectively, instead.
634
635
* Removed Event and EventContext classes. Applications are defined in a
636
subclass of Sinatra::Base; each request is processed within an
637
instance.
638
639
= 0.3.3 / 2009-01-06
640
641
* Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
642
643
* Log unhandled exception backtraces to rack.errors.
644
645
* Use RACK_ENV environment variable to establish Sinatra
646
environment when given. Thin sets this when started with
647
the -e argument.
648
649
* BUG: raising Sinatra::NotFound resulted in a 500 response
650
code instead of 404.
651
652
* BUG: use_in_file_templates! fails with CR/LF (#45)
653
654
* BUG: Sinatra detects the app file and root path when run under
655
thin/passenger.
656
657
= 0.3.2
658
659
* BUG: Static and send_file read entire file into String before
660
sending. Updated to stream with 8K chunks instead.
661
662
* Rake tasks and assets for building basic documentation website.
663
See http://sinatra.rubyforge.org
664
665
* Various minor doc fixes.
666
667
= 0.3.1
668
669
* Unbreak optional path parameters [jeremyevans]
670
671
= 0.3.0
672
673
* Add sinatra.gemspec w/ support for github gem builds. Forks can now
674
enable the build gem option in github to get free username-sinatra.gem
675
builds: gem install username-sinatra.gem --source=http://gems.github.com/
676
677
* Require rack-0.4 gem; removes frozen rack dir.
678
679
* Basic RSpec support; require 'sinatra/test/rspec' instead of
680
'sinatra/test/spec' to use. [avdi]
681
682
* before filters can modify request environment vars used for
683
routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
684
type functionality.
685
686
* In-file templates now uses @@ instead of ## as template separator.
687
688
* Top-level environment test predicates: development?, test?, production?
689
690
* Top-level "set", "enable", and "disable" methods for tweaking
691
app options. [rtomayko]
692
693
* Top-level "use" method for building Rack middleware pipelines
694
leading to app. See README for usage. [rtomayko]
695
696
* New "reload" option - set false to disable reloading in development.
697
698
* New "host" option - host/ip to bind to [cschneid]
699
700
* New "app_file" option - override the file to reload in development
701
mode [cschneid]
702
703
* Development error/not_found page cleanup [sr, adamwiggins]
704
705
* Remove a bunch of core extensions (String#to_param, String#from_param,
706
Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
707
708
* Various grammar and formatting fixes to README; additions on
709
community and contributing [cypher]
710
711
* Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
712
713
* Specs, documentation and fixes for splat'n routes [vic]
714
715
* Fix whitespace errors across all source files. [rtomayko]
716
717
* Fix streaming issues with Mongrel (body not closed). [bmizerany]
718
719
* Fix various issues with environment not being set properly (configure
720
blocks not running, error pages not registering, etc.) [cypher]
721
722
* Fix to allow locals to be passed to ERB templates [cschneid]
723
724
* Fix locking issues causing random errors during reload in development.
725
726
* Fix for escaped paths not resolving static files [Matthew Walker]
727
728
= 0.2.1
729
730
* File upload fix and minor tweaks.
731
732
= 0.2.0
733
734
* Initial gem release of 0.2 codebase.