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