Skip to content

HTTPS clone URL

Subversion checkout URL

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