sinatra-rack-3-commonlit 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md ADDED
@@ -0,0 +1,1742 @@
1
+ ## Unreleased
2
+
3
+ * _Your new feature here._
4
+
5
+ ## 3.1.0 / 2023-08-07
6
+
7
+ * New: Add sass support via sass-embedded [#1911] by なつき
8
+
9
+ * New: Add start and stop callbacks [#1913] by Jevin Sew
10
+
11
+ * New: Warn on dropping sessions [#1900] by Jonathan del Strother
12
+
13
+ * New: Make Puma the default server [#1924] by Patrik Ragnarsson
14
+
15
+ * Fix: Remove use of Tilt::Cache [#1922] by Jeremy Evans (allows use of Tilt 2.2.0 without deprecation warning)
16
+
17
+ * Fix: rack-protection: specify rack version requirement [#1932] by Patrik Ragnarsson
18
+
19
+ [#1911]: https://github.com/sinatra/sinatra/pull/1911
20
+ [#1913]: https://github.com/sinatra/sinatra/pull/1913
21
+ [#1900]: https://github.com/sinatra/sinatra/pull/1900
22
+ [#1924]: https://github.com/sinatra/sinatra/pull/1924
23
+ [#1922]: https://github.com/sinatra/sinatra/pull/1922
24
+ [#1932]: https://github.com/sinatra/sinatra/pull/1932
25
+
26
+ ## 3.0.6 / 2023-04-11
27
+
28
+ * Fix: Add support to keep open streaming connections with Puma [#1858](https://github.com/sinatra/sinatra/pull/1858) by Jordan Owens
29
+
30
+ * Fix: Avoid crash in `uri` helper on Integer input [#1890](https://github.com/sinatra/sinatra/pull/1890) by Patrik Ragnarsson
31
+
32
+ * Fix: Rescue `RuntimeError` when trying to use `SecureRandom` [#1888](https://github.com/sinatra/sinatra/pull/1888) by Stefan Sundin
33
+
34
+ ## 3.0.5 / 2022-12-16
35
+
36
+ * Fix: Add Zeitwerk compatibility. [#1831](https://github.com/sinatra/sinatra/pull/1831) by Dawid Janczak
37
+
38
+ * Fix: Allow CALLERS_TO_IGNORE to be overridden
39
+
40
+ ## 3.0.4 / 2022-11-25
41
+
42
+ * Fix: Escape filename in the Content-Disposition header. [#1841](https://github.com/sinatra/sinatra/pull/1841) by Kunpei Sakai
43
+
44
+ ## 3.0.3 / 2022-11-11
45
+
46
+ * Fix: fixed ReDoS for Rack::Protection::IPSpoofing. [#1823](https://github.com/sinatra/sinatra/pull/1823) by @ooooooo-q
47
+
48
+ ## 3.0.2 / 2022-10-01
49
+
50
+ * New: Add Haml 6 support. [#1820](https://github.com/sinatra/sinatra/pull/1820) by Jordan Owens
51
+
52
+ ## 3.0.1 / 2022-09-26
53
+
54
+ * Fix: Revert removal of rack-protection.rb. [#1814](https://github.com/sinatra/sinatra/pull/1814) by Olle Jonsson
55
+
56
+ * Fix: Revert change to server start and stop messaging by using Kernel#warn. Renamed internal warn method warn_for_deprecation. [#1818](https://github.com/sinatra/sinatra/pull/1818) by Jordan Owens
57
+
58
+ ## 3.0.0 / 2022-09-26
59
+
60
+ * New: Add Falcon support. [#1794](https://github.com/sinatra/sinatra/pull/1794) by Samuel Williams and @horaciob
61
+
62
+ * New: Add AES GCM encryption support for session cookies. [#1324] (https://github.com/sinatra/sinatra/pull/1324) by Michael Coyne
63
+
64
+ * Deprecated: Sinatra Reloader will be removed in the next major release.
65
+
66
+ * Fix: Internal Sinatra errors now extend `Sinatra::Error`. This fixes [#1204](https://github.com/sinatra/sinatra/issues/1204) and [#1518](https://github.com/sinatra/sinatra/issues/1518). [bda8c29d](https://github.com/sinatra/sinatra/commit/bda8c29d70619d53f5b1c181140638d340695514) by Jordan Owens
67
+
68
+ * Fix: Preserve query param value if named route param nil. [#1676](https://github.com/sinatra/sinatra/pull/1676) by Jordan Owens
69
+
70
+ * Require Ruby 2.6 as minimum Ruby version. [#1699](https://github.com/sinatra/sinatra/pull/1699) by Eloy Pérez
71
+
72
+ * Breaking change: Remove support for the Stylus template engine. [#1697](https://github.com/sinatra/sinatra/pull/1697) by Eloy Pérez
73
+
74
+ * Breaking change: Remove support for the erubis template engine. [#1761](https://github.com/sinatra/sinatra/pull/1761) by Eloy Pérez
75
+
76
+ * Breaking change: Remove support for the textile template engine. [#1766](https://github.com/sinatra/sinatra/pull/1766) by Eloy Pérez
77
+
78
+ * Breaking change: Remove support for SASS as a template engine. [#1768](https://github.com/sinatra/sinatra/pull/1768) by Eloy Pérez
79
+
80
+ * Breaking change: Remove support for Wlang as a template engine. [#1780](https://github.com/sinatra/sinatra/pull/1780) by Eloy Pérez
81
+
82
+ * Breaking change: Remove support for CoffeeScript as a template engine. [#1790](https://github.com/sinatra/sinatra/pull/1790) by Eloy Pérez
83
+
84
+ * Breaking change: Remove support for Mediawiki as a template engine. [#1791](https://github.com/sinatra/sinatra/pull/1791) by Eloy Pérez
85
+
86
+ * Breaking change: Remove support for Creole as a template engine. [#1792](https://github.com/sinatra/sinatra/pull/1792) by Eloy Pérez
87
+
88
+ * Breaking change: Remove support for Radius as a template engine. [#1793](https://github.com/sinatra/sinatra/pull/1793) by Eloy Pérez
89
+
90
+ * Breaking change: Remove support for the defunct Less templating library. See [#1716](https://github.com/sinatra/sinatra/issues/1716), [#1715](https://github.com/sinatra/sinatra/issues/1715) for more discussion and background. [d1af2f1e](https://github.com/sinatra/sinatra/commit/d1af2f1e6c8710419dfe3102a660f7a32f0e67e3) by Olle Jonsson
91
+
92
+ * Breaking change: Remove Reel integration. [54597502](https://github.com/sinatra/sinatra/commit/545975025927a27a1daca790598620038979f1c5) by Olle Jonsson
93
+
94
+ * CI: Start testing on Ruby 3.1. [60e221940](https://github.com/sinatra/sinatra/commit/60e2219407e6ae067bf3e53eb060ee4860c60c8d) and [b0fa4bef](https://github.com/sinatra/sinatra/commit/b0fa4beffaa3b10bf02947d0a35e137403296c6b) by Johannes Würbach
95
+
96
+ * Use `Kernel#caller_locations`. [#1491](https://github.com/sinatra/sinatra/pull/1491) by Julik Tarkhanov
97
+
98
+ * Docs: Japanese documentation: Add notes about the `default_content_type` setting. [#1650](https://github.com/sinatra/sinatra/pull/1650) by Akifumi Tominaga
99
+
100
+ * Docs: Polish documentation: Add section about Multithreaded modes and Routes. [#1708](https://github.com/sinatra/sinatra/pull/1708) by Patrick Gramatowski
101
+
102
+ * Docs: Japanese documentation: Make Session section reflect changes done to README.md. [#1731](https://github.com/sinatra/sinatra/pull/1731) by @shu-i-chi
103
+
104
+ ## 2.2.3 / 2022-11-25
105
+
106
+ * Fix: Escape filename in the Content-Disposition header. [#1841](https://github.com/sinatra/sinatra/pull/1841) by Kunpei Sakai
107
+
108
+ * Fix: fixed ReDoS for Rack::Protection::IPSpoofing. [#1823](https://github.com/sinatra/sinatra/pull/1823) by @ooooooo-q
109
+
110
+ ## 2.2.2 / 2022-07-23
111
+
112
+ * Update mustermann dependency to version 2.
113
+
114
+ ## 2.2.1 / 2022-07-15
115
+
116
+ * Fix JRuby regression by using ruby2_keywords for delegation. #1750 by Patrik Ragnarsson
117
+
118
+ * Add JRuby to CI. #1755 by Karol Bucek
119
+
120
+ ## 2.2.0 / 2022-02-15
121
+
122
+ * Breaking change: Add `#select`, `#reject` and `#compact` methods to `Sinatra::IndifferentHash`. If hash keys need to be converted to symbols, call `#to_h` to get a `Hash` instance first. [#1711](https://github.com/sinatra/sinatra/pull/1711) by Olivier Bellone
123
+
124
+ * Handle EOFError raised by Rack and return Bad Request 400 status. [#1743](https://github.com/sinatra/sinatra/pull/1743) by tamazon
125
+
126
+ * Minor refactors in `base.rb`. [#1640](https://github.com/sinatra/sinatra/pull/1640) by ceclinux
127
+
128
+ * Add escaping to the static 404 page. [#1645](https://github.com/sinatra/sinatra/pull/1645) by Chris Gavin
129
+
130
+ * Remove `detect_rack_handler` method. [#1652](https://github.com/sinatra/sinatra/pull/1652) by ceclinux
131
+
132
+ * Respect content type set in superclass before filter. Fixes [#1647](https://github.com/sinatra/sinatra/issues/1647) [#1649](https://github.com/sinatra/sinatra/pull/1649) by Jordan Owens
133
+
134
+ * *Revert "Use prepend instead of include for helpers.* [#1662](https://github.com/sinatra/sinatra/pull/1662) by namusyaka
135
+
136
+ * Fix usage of inherited `Sinatra::Base` classes keyword arguments. Fixes [#1669](https://github.com/sinatra/sinatra/issues/1669) [#1670](https://github.com/sinatra/sinatra/pull/1670) by Cadu Ribeiro
137
+
138
+ * Reduce RDoc generation time by not including every README. Fixes [#1578](https://github.com/sinatra/sinatra/issues/1578) [#1671](https://github.com/sinatra/sinatra/pull/1671) by Eloy Pérez
139
+
140
+ * Add support for per form csrf tokens. Fixes [#1616](https://github.com/sinatra/sinatra/issues/1616) [#1653](https://github.com/sinatra/sinatra/pull/1653) by Jordan Owens
141
+
142
+ * Update MAINTENANCE.md with the `stable` branch status. [#1681](https://github.com/sinatra/sinatra/pull/1681) by Fredrik Rubensson
143
+
144
+ * Validate expanded path matches `public_dir` when serving static files. [#1683](https://github.com/sinatra/sinatra/pull/1683) by cji-stripe
145
+
146
+ * Fix Delegator to pass keyword arguments for Ruby 3.0. [#1684](https://github.com/sinatra/sinatra/pull/1684) by andrewtblake
147
+
148
+ * Fix use with keyword arguments for Ruby 3.0. [#1701](https://github.com/sinatra/sinatra/pull/1701) by Robin Wallin
149
+
150
+ * Fix memory leaks for proc template. Fixes [#1704](https://github.com/sinatra/sinatra/issues/1714) [#1719](https://github.com/sinatra/sinatra/pull/1719) by Slevin
151
+
152
+ * Remove unnecessary `test_files` from the gemspec. [#1712](https://github.com/sinatra/sinatra/pull/1712) by Masataka Pocke Kuwabara
153
+
154
+ * Docs: Spanish documentation: Update README.es.md with removal of Thin. [#1630](https://github.com/sinatra/sinatra/pull/1630) by Espartaco Palma
155
+
156
+ * Docs: German documentation: Fixed typos in German README.md. [#1648](https://github.com/sinatra/sinatra/pull/1648) by Juri
157
+
158
+ * Docs: Japanese documentation: Update README.ja.md with removal of Thin. [#1629](https://github.com/sinatra/sinatra/pull/1629) by Ryuichi KAWAMATA
159
+
160
+ * Docs: English documentation: Various minor fixes to README.md. [#1663](https://github.com/sinatra/sinatra/pull/1663) by Yanis Zafirópulos
161
+
162
+ * Docs: English documentation: Document when `dump_errors` is enabled. Fixes [#1664](https://github.com/sinatra/sinatra/issues/1664) [#1665](https://github.com/sinatra/sinatra/pull/1665) by Patrik Ragnarsson
163
+
164
+ * Docs: Brazilian Portuguese documentation: Update README.pt-br.md with translation fixes. [#1668](https://github.com/sinatra/sinatra/pull/1668) by Vitor Oliveira
165
+
166
+ ### CI
167
+
168
+ * Use latest JRuby 9.2.16.0 on CI. [#1682](https://github.com/sinatra/sinatra/pull/1682) by Olle Jonsson
169
+
170
+ * Switch CI from travis to GitHub Actions. [#1691](https://github.com/sinatra/sinatra/pull/1691) by namusyaka
171
+
172
+ * Skip the Slack action if `secrets.SLACK_WEBHOOK` is not set. [#1705](https://github.com/sinatra/sinatra/pull/1705) by Robin Wallin
173
+
174
+ * Small CI improvements. [#1703](https://github.com/sinatra/sinatra/pull/1703) by Robin Wallin
175
+
176
+ * Drop auto-generated boilerplate comments from CI configuration file. [#1728](https://github.com/sinatra/sinatra/pull/1728) by Olle Jonsson
177
+
178
+ ### sinatra-contrib
179
+
180
+ * Do not raise when key is an enumerable. [#1619](https://github.com/sinatra/sinatra/pull/1619) by Ulysse Buonomo
181
+
182
+ ### Rack protection
183
+
184
+ * Fix broken `origin_whitelist` option. Fixes [#1641](https://github.com/sinatra/sinatra/issues/1641) [#1642](https://github.com/sinatra/sinatra/pull/1642) by Takeshi YASHIRO
185
+
186
+ ## 2.1.0 / 2020-09-05
187
+
188
+ * Fix additional Ruby 2.7 keyword warnings [#1586](https://github.com/sinatra/sinatra/pull/1586) by Stefan Sundin
189
+
190
+ * Drop Ruby 2.2 support [#1455](https://github.com/sinatra/sinatra/pull/1455) by Eloy Pérez
191
+
192
+ * Add Rack::Protection::ReferrerPolicy [#1291](https://github.com/sinatra/sinatra/pull/1291) by Stefan Sundin
193
+
194
+ * Add `default_content_type` setting. Fixes [#1238](https://github.com/sinatra/sinatra/pull/1238) [#1239](https://github.com/sinatra/sinatra/pull/1239) by Mike Pastore
195
+
196
+ * Allow `set :<engine>` in sinatra-namespace [#1255](https://github.com/sinatra/sinatra/pull/1255) by Christian Höppner
197
+
198
+ * Use prepend instead of include for helpers. Fixes [#1213](https://github.com/sinatra/sinatra/pull/1213) [#1214](https://github.com/sinatra/sinatra/pull/1214) by Mike Pastore
199
+
200
+ * Fix issue with passed routes and provides Fixes [#1095](https://github.com/sinatra/sinatra/pull/1095) [#1606](https://github.com/sinatra/sinatra/pull/1606) by Mike Pastore, Jordan Owens
201
+
202
+ * Add QuietLogger that excludes pathes from Rack::CommonLogger [1250](https://github.com/sinatra/sinatra/pull/1250) by Christoph Wagner
203
+
204
+ * Sinatra::Contrib dependency updates. Fixes [#1207](https://github.com/sinatra/sinatra/pull/1207) [#1411](https://github.com/sinatra/sinatra/pull/1411) by Mike Pastore
205
+
206
+ * Allow CSP to fallback to default-src. Fixes [#1484](https://github.com/sinatra/sinatra/pull/1484) [#1490](https://github.com/sinatra/sinatra/pull/1490) by Jordan Owens
207
+
208
+ * Replace `origin_whitelist` with `permitted_origins`. Closes [#1620](https://github.com/sinatra/sinatra/issues/1620) [#1625](https://github.com/sinatra/sinatra/pull/1625) by rhymes
209
+
210
+ * Use Rainbows instead of thin for async/stream features. Closes [#1624](https://github.com/sinatra/sinatra/issues/1624) [#1627](https://github.com/sinatra/sinatra/pull/1627) by Ryuichi KAWAMATA
211
+
212
+ * Enable EscapedParams if passed via settings. Closes [#1615](https://github.com/sinatra/sinatra/issues/1615) [#1632](https://github.com/sinatra/sinatra/issues/1632) by Anders Bälter
213
+
214
+ * Support for parameters in mime types. Fixes [#1141](https://github.com/sinatra/sinatra/issues/1141) by John Hope
215
+
216
+ * Handle null byte when serving static files [#1574](https://github.com/sinatra/sinatra/issues/1574) by Kush Fanikiso
217
+
218
+ * Improve development support and documentation and source code by Olle Jonsson, Pierre-Adrien Buisson, Shota Iguchi
219
+
220
+ ## 2.0.8.1 / 2020-01-02
221
+
222
+ * Allow multiple hashes to be passed in `merge` and `merge!` for `Sinatra::IndifferentHash` [#1572](https://github.com/sinatra/sinatra/pull/1572) by Shota Iguchi
223
+
224
+ ## 2.0.8 / 2020-01-01
225
+
226
+ * Lookup Tilt class for template engine without loading files [#1558](https://github.com/sinatra/sinatra/pull/1558). Fixes [#1172](https://github.com/sinatra/sinatra/issues/1172) by Jordan Owens
227
+
228
+ * Add request info in NotFound exception [#1566](https://github.com/sinatra/sinatra/pull/1566) by Stefan Sundin
229
+
230
+ * Add `.yaml` support in `Sinatra::Contrib::ConfigFile` [#1564](https://github.com/sinatra/sinatra/issues/1564). Fixes [#1563](https://github.com/sinatra/sinatra/issues/1563) by Emerson Manabu Araki
231
+
232
+ * Remove only routing parameters from @params hash [#1569](https://github.com/sinatra/sinatra/pull/1569). Fixes [#1567](https://github.com/sinatra/sinatra/issues/1567) by Jordan Owens, Horacio
233
+
234
+ * Support `capture` and `content_for` with Hamlit [#1580](https://github.com/sinatra/sinatra/pull/1580) by Takashi Kokubun
235
+
236
+ * Eliminate warnings of keyword parameter for Ruby 2.7.0 [#1581](https://github.com/sinatra/sinatra/pull/1581) by Osamtimizer
237
+
238
+ ## 2.0.7 / 2019-08-22
239
+
240
+ * Fix a regression [#1560](https://github.com/sinatra/sinatra/pull/1560) by Kunpei Sakai
241
+
242
+ ## 2.0.6 / 2019-08-21
243
+
244
+ * Fix an issue setting environment from command line option [#1547](https://github.com/sinatra/sinatra/pull/1547), [#1554](https://github.com/sinatra/sinatra/pull/1554) by Jordan Owens, Kunpei Sakai
245
+
246
+ * Support pandoc as a new markdown renderer [#1533](https://github.com/sinatra/sinatra/pull/1533) by Vasiliy
247
+
248
+ * Remove outdated code for tilt 1.x [#1532](https://github.com/sinatra/sinatra/pull/1532) by Vasiliy
249
+
250
+ * Remove an extra logic for `force_encoding` [#1527](https://github.com/sinatra/sinatra/pull/1527) by Jordan Owens
251
+
252
+ * Avoid multiple errors even if `params` contains special values [#1526](https://github.com/sinatra/sinatra/pull/1527) by Kunpei Sakai
253
+
254
+ * Support `bundler/inline` with `require 'sinatra'` integration [#1520](https://github.com/sinatra/sinatra/pull/1520) by Kunpei Sakai
255
+
256
+ * Avoid `TypeError` when params contain a key without a value on Ruby < 2.4 [#1516](https://github.com/sinatra/sinatra/pull/1516) by Samuel Giddins
257
+
258
+ * Improve development support and documentation and source code by Olle Jonsson, Basavanagowda Kanur, Yuki MINAMIYA
259
+
260
+ ## 2.0.5 / 2018-12-22
261
+
262
+ * Avoid FrozenError when params contains frozen value [#1506](https://github.com/sinatra/sinatra/pull/1506) by Kunpei Sakai
263
+
264
+ * Add support for Erubi [#1494](https://github.com/sinatra/sinatra/pull/1494) by @tkmru
265
+
266
+ * `IndifferentHash` monkeypatch warning improvements [#1477](https://github.com/sinatra/sinatra/pull/1477) by Mike Pastore
267
+
268
+ * Improve development support and documentation and source code by Anusree Prakash, Jordan Owens, @ceclinux and @krororo.
269
+
270
+ ### sinatra-contrib
271
+
272
+ * Add `flush` option to `content_for` [#1225](https://github.com/sinatra/sinatra/pull/1225) by Shota Iguchi
273
+
274
+ * Drop activesupport dependency from sinatra-contrib [#1448](https://github.com/sinatra/sinatra/pull/1448)
275
+
276
+ * Update `yield_content` to append default to ERB template buffer [#1500](https://github.com/sinatra/sinatra/pull/1500) by Jordan Owens
277
+
278
+ ### rack-protection
279
+
280
+ * Don't track the Accept-Language header by default [#1504](https://github.com/sinatra/sinatra/pull/1504) by Artem Chistyakov
281
+
282
+ ## 2.0.4 / 2018-09-15
283
+
284
+ * Don't blow up when passing frozen string to `send_file` disposition [#1137](https://github.com/sinatra/sinatra/pull/1137) by Andrew Selder
285
+
286
+ * Fix ubygems LoadError [#1436](https://github.com/sinatra/sinatra/pull/1436) by Pavel Rosický
287
+
288
+ * Unescape regex captures [#1446](https://github.com/sinatra/sinatra/pull/1446) by Jordan Owens
289
+
290
+ * Slight performance improvements for IndifferentHash [#1427](https://github.com/sinatra/sinatra/pull/1427) by Mike Pastore
291
+
292
+ * Improve development support and documentation and source code by Will Yang, Jake Craige, Grey Baker and Guilherme Goettems Schneider
293
+
294
+ ## 2.0.3 / 2018-06-09
295
+
296
+ * Fix the backports gem regression [#1442](https://github.com/sinatra/sinatra/issues/1442) by Marc-André Lafortune
297
+
298
+ ## 2.0.2 / 2018-06-05
299
+
300
+ * Escape invalid query parameters [#1432](https://github.com/sinatra/sinatra/issues/1432) by Kunpei Sakai
301
+ * The patch fixes [CVE-2018-11627](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-11627).
302
+
303
+ * Fix undefined method error for `Sinatra::RequiredParams` with hash key [#1431](https://github.com/sinatra/sinatra/issues/1431) by Arpit Chauhan
304
+
305
+ * Add xml content-types to valid html_types for Rack::Protection [#1413](https://github.com/sinatra/sinatra/issues/1413) by Reenan Arbitrario
306
+
307
+ * Encode route parameters using :default_encoding setting [#1412](https://github.com/sinatra/sinatra/issues/1412) by Brian m. Carlson
308
+
309
+ * Fix unpredictable behaviour from Sinatra::ConfigFile [#1244](https://github.com/sinatra/sinatra/issues/1244) by John Hope
310
+
311
+ * Add Sinatra::IndifferentHash#slice [#1405](https://github.com/sinatra/sinatra/issues/1405) by Shota Iguchi
312
+
313
+ * Remove status code 205 from drop body response [#1398](https://github.com/sinatra/sinatra/issues/1398) by Shota Iguchi
314
+
315
+ * Ignore empty captures from params [#1390](https://github.com/sinatra/sinatra/issues/1390) by Shota Iguchi
316
+
317
+ * Improve development support and documentation and source code by Zp Yuan, Andreas Finger, Olle Jonsson, Shota Iguchi, Nikita Bulai and Joshua O'Brien
318
+
319
+ ## 2.0.1 / 2018-02-17
320
+
321
+ * Repair nested namespaces, by avoiding prefix duplication [#1322](https://github.com/sinatra/sinatra/issues/1322). Fixes [#1310](https://github.com/sinatra/sinatra/issues/1310) by Kunpei Sakai
322
+
323
+ * Add pattern matches to values for Mustermann::Concat [#1333](https://github.com/sinatra/sinatra/issues/1333). Fixes [#1332](https://github.com/sinatra/sinatra/issues/1332) by Dawa Ometto
324
+
325
+ * Ship the VERSION file with the gem, to allow local unpacking [#1338](https://github.com/sinatra/sinatra/issues/1338) by Olle Jonsson
326
+
327
+ * Fix issue with custom error handler on bad request [#1351](https://github.com/sinatra/sinatra/issues/1351). Fixes [#1350](https://github.com/sinatra/sinatra/issues/1350) by Jordan Owens
328
+
329
+ * Override Rack::ShowExceptions#pretty to set custom template [#1377](https://github.com/sinatra/sinatra/issues/1377). Fixes [#1376](https://github.com/sinatra/sinatra/issues/1376) by Jordan Owens
330
+
331
+ * Enhanced path validation in Windows [#1379](https://github.com/sinatra/sinatra/issues/1379) by Orange Tsai from DEVCORE
332
+ * The patch fixes [CVE-2018-7212](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7212)
333
+
334
+ * Improve development support and documentation by Faheel Ahmad, Shota Iguchi, Olle Jonsson, Manabu Niseki, John Hope, Horacio, Ice-Storm, GraniteRock, Raman Skaskevich, Carlos Azuaje, 284km, Dan Rice and Zachary Scott
335
+
336
+ ## 2.0.0 / 2017-04-10
337
+
338
+ * Use Mustermann for patterns [#1086](https://github.com/sinatra/sinatra/issues/1086) by Konstantin Haase
339
+
340
+ * Server now provides `-q` flag for quiet mode, which disables start/stop messages [#1153](https://github.com/sinatra/sinatra/issues/1153) by Vasiliy.
341
+
342
+ * Session middleware can now be specified with `:session_store` setting [#1161](https://github.com/sinatra/sinatra/issues/1161) by Jordan Owens.
343
+
344
+ * `APP_ENV` is now preferred and recommended over `RACK_ENV` for setting environment [#984](https://github.com/sinatra/sinatra/issues/984) by Damien Mathieu.
345
+
346
+ * Add Reel support [#793](https://github.com/sinatra/sinatra/issues/793) by Patricio Mac Adden.
347
+
348
+ * Make route params available during error handling [#895](https://github.com/sinatra/sinatra/issues/895) by Jeremy Evans.
349
+
350
+ * Unify `not_found` and `error` 404 behavior [#896](https://github.com/sinatra/sinatra/issues/896) by Jeremy Evans.
351
+
352
+ * Enable Ruby 2.3 `frozen_string_literal` feature [#1076](https://github.com/sinatra/sinatra/issues/1076) by Vladimir Kochnev.
353
+
354
+ * Add Sinatra::ShowExceptions::TEMPLATE and patched Rack::ShowExceptions to prefer Sinatra template by Zachary Scott.
355
+
356
+ * Sinatra::Runner is used internally for integration tests [#840](https://github.com/sinatra/sinatra/issues/840) by Nick Sutterer.
357
+
358
+ * Fix case-sensitivity issue in `uri` method [#889](https://github.com/sinatra/sinatra/issues/889) by rennex.
359
+
360
+ * Use `Rack::Utils.status_code` to allow `status` helper to use symbol as well as numeric codes [#968](https://github.com/sinatra/sinatra/issues/968) by Tobias H. Michaelsen.
361
+
362
+ * Improved error handling for invalid params through Rack [#1070](https://github.com/sinatra/sinatra/issues/1070) by Jordan Owens.
363
+
364
+ * Ensure template is cached only once [#1021](https://github.com/sinatra/sinatra/issues/1021) by Patrik Rak.
365
+
366
+ * Rack middleware is initialized at server runtime rather than after receiving first request [#1205](https://github.com/sinatra/sinatra/issues/1205) by Itamar Turner-Trauring.
367
+
368
+ * Improve Session Secret documentation to encourage better security practices [#1218](https://github.com/sinatra/sinatra/issues/1218) by Glenn Rempe
369
+
370
+ * Exposed global and per-route options for Mustermann route parsing [#1233](https://github.com/sinatra/sinatra/issues/1233) by Mike Pastore
371
+
372
+ * Use same `session_secret` for classic and modular apps in development [#1245](https://github.com/sinatra/sinatra/issues/1245) by Marcus Stollsteimer
373
+
374
+ * Make authenticity token length a fixed value of 32 [#1181](https://github.com/sinatra/sinatra/issues/1181) by Jordan Owens
375
+
376
+ * Modernize Rack::Protection::ContentSecurityPolicy with CSP Level 2 and 3 Directives [#1202](https://github.com/sinatra/sinatra/issues/1202) by Glenn Rempe
377
+
378
+ * Adds preload option to Rack:Protection:StrictTransport [#1209](https://github.com/sinatra/sinatra/issues/1209) by Ed Robinson
379
+
380
+ * Improve BadRequest logic. Raise and handle exceptions if status is 400 [#1212](https://github.com/sinatra/sinatra/issues/1212) by Mike Pastore
381
+
382
+ * Make Rack::Test a development dependency [#1232](https://github.com/sinatra/sinatra/issues/1232) by Mike Pastore
383
+
384
+ * Capture exception messages of raised NotFound and BadRequest [#1210](https://github.com/sinatra/sinatra/issues/1210) by Mike Pastore
385
+
386
+ * Add explicit set method to contrib/cookies to override cookie settings [#1240](https://github.com/sinatra/sinatra/issues/1240) by Andrew Allen
387
+
388
+ * Avoid executing filters even if prefix matches with other namespace [#1253](https://github.com/sinatra/sinatra/issues/1253) by namusyaka
389
+
390
+ * Make `#has_key?` also indifferent in access, can accept String or Symbol [#1262](https://github.com/sinatra/sinatra/issues/1262) by Stephen Paul Weber
391
+
392
+ * Add `allow_if` option to bypass json csrf protection [#1265](https://github.com/sinatra/sinatra/issues/1265) by Jordan Owens
393
+
394
+ * rack-protection: Bundle StrictTransport, CookieTossing, and CSP [#1267](https://github.com/sinatra/sinatra/issues/1267) by Mike Pastore
395
+
396
+ * Add `:strict_paths` option for managing trailing slashes [#1273](https://github.com/sinatra/sinatra/issues/1273) by namusyaka
397
+
398
+ * Add full IndifferentHash implementation to params [#1279](https://github.com/sinatra/sinatra/issues/1279) by Mike Pastore
399
+
400
+ ## 1.4.8 / 2017-01-30
401
+
402
+ * Fix the deprecation warning from Ruby about Fixnum. [#1235](https://github.com/sinatra/sinatra/issues/1235) by Akira Matsuda
403
+
404
+ ## 1.4.7 / 2016-01-24
405
+
406
+ * Add Ashley Williams, Trevor Bramble, and Kashyap Kondamudi to team Sinatra.
407
+
408
+ * Correctly handle encoded colons in routes. (Jeremy Evans)
409
+
410
+ * Rename CHANGES to CHANGELOG.md and update Rakefile. [#1043](https://github.com/sinatra/sinatra/issues/1043) (Eliza Sorensen)
411
+
412
+ * Improve documentation. [#941](https://github.com/sinatra/sinatra/issues/941), [#1069](https://github.com/sinatra/sinatra/issues/1069), [#1075](https://github.com/sinatra/sinatra/issues/1075), [#1025](https://github.com/sinatra/sinatra/issues/1025), [#1052](https://github.com/sinatra/sinatra/issues/1052) (Many great folks)
413
+
414
+ * Introduce `Sinatra::Ext` to workaround Rack 1.6 bug to fix Ruby 1.8.7
415
+ support. [#1080](https://github.com/sinatra/sinatra/issues/1080) (Zachary Scott)
416
+
417
+ * Add CONTRIBUTING guide. [#987](https://github.com/sinatra/sinatra/issues/987) (Katrina Owen)
418
+
419
+
420
+ ## 1.4.6 / 2015-03-23
421
+
422
+ * Improve tests and documentation. (Darío Hereñú, Seiichi Yonezawa, kyoendo,
423
+ John Voloski, Ferenc-, Renaud Martinet, Christian Haase, marocchino,
424
+ huoxito, Damir Svrtan, Amaury Medeiros, Jeremy Evans, Kashyap, shenqihui,
425
+ Ausmarton Fernandes, kami, Vipul A M, Lei Wu, 7stud, Taylor Shuler,
426
+ namusyaka, burningTyger, Cornelius Bock, detomastah, hakeda, John Hope,
427
+ Ruben Gonzalez, Andrey Deryabin, attilaolah, Anton Davydov, Nikita Penzin,
428
+ Dyego Costa)
429
+
430
+ * Remove duplicate require of sinatra/base. (Alexey Muranov)
431
+
432
+ * Escape HTML in 404 error page. (Andy Brody)
433
+
434
+ * Refactor to method call in `Stream#close` and `#callback`. (Damir Svrtan)
435
+
436
+ * Depend on latest version of Slim. (Damir Svrtan)
437
+
438
+ * Fix compatibility with Tilt version 2. (Yegor Timoschenko)
439
+
440
+ * Fix compatibility issue with Rack `pretty` method from ShowExceptions.
441
+ (Kashyap)
442
+
443
+ * Show date in local time in exception messages. (tayler1)
444
+
445
+ * Fix logo on error pages when using Ruby 1.8. (Jeremy Evans)
446
+
447
+ * Upgrade test suite to Minitest version 5 and fix Ruby 2.2 compatibility.
448
+ (Vipul A M)
449
+
450
+ ## 1.4.5 / 2014-04-08
451
+
452
+ * Improve tests and documentation. (Seiichi Yonezawa, Mike Gehard, Andrew
453
+ Deitrick, Matthew Nicholas Bradley, GoGo tanaka, Carlos Lazo, Shim Tw,
454
+ kyoendo, Roman Kuznietsov, Stanislav Chistenko, Ryunosuke SATO, Ben Lewis,
455
+ wuleicanada, Patricio Mac Adden, Thais Camilo)
456
+
457
+ * Fix Ruby warnings. (Vipul A M, Piotr Szotkowski)
458
+
459
+ * Fix template cache memory leak. (Scott Holden)
460
+
461
+ * Work around UTF-8 bug in JRuby. (namusyaka)
462
+
463
+ * Don't set charset for JSON mime-type (Sebastian Borrazas)
464
+
465
+ * Fix bug in request.accept? that might trigger a NoMethodError. (sbonami)
466
+
467
+ ## 1.4.4 / 2013-10-21
468
+
469
+ * Allow setting layout to false specifically for a single rendering engine.
470
+ (Matt Wildig)
471
+
472
+ * Allow using wildcard in argument passed to `request.accept?`. (wilkie)
473
+
474
+ * Treat missing Accept header like wild card. (Patricio Mac Adden)
475
+
476
+ * Improve tests and documentation. (Darío Javier Cravero, Armen P., michelc,
477
+ Patricio Mac Adden, Matt Wildig, Vipul A M, utenmiki, George Timoschenko,
478
+ Diogo Scudelletti)
479
+
480
+ * Fix Ruby warnings. (Vipul A M, Patricio Mac Adden)
481
+
482
+ * Improve self-hosted server started by `run!` method or in classic mode.
483
+ (Tobias Bühlmann)
484
+
485
+ * Reduce objects allocated per request. (Vipul A M)
486
+
487
+ * Drop unused, undocumented options hash from Sinatra.new. (George Timoschenko)
488
+
489
+ * Keep Content-Length header when response is a `Rack::File` or when streaming.
490
+ (Patricio Mac Adden, George Timoschenko)
491
+
492
+ * Use reel if it's the only server available besides webrick. (Tobias Bühlmann)
493
+
494
+ * Add `disable :traps` so setting up signal traps for self hosted server can be
495
+ skipped. (George Timoschenko)
496
+
497
+ * The `status` option passed to `send_file` may now be a string. (George
498
+ Timoschenko)
499
+
500
+ * Reduce file size of dev mode images for 404 and 500 pages. (Francis Go)
501
+
502
+ ## 1.4.3 / 2013-06-07
503
+
504
+ * Running a Sinatra file directly or via `run!` it will now ignore an
505
+ empty $PORT env variable. (noxqsgit)
506
+
507
+ * Improve documentation. (burningTyger, Patricio Mac Adden,
508
+ Konstantin Haase, Diogo Scudelletti, Dominic Imhof)
509
+
510
+ * Expose matched pattern as env["sinatra.route"]. (Aman Gupta)
511
+
512
+ * Fix warning on Ruby 2.0. (Craig Little)
513
+
514
+ * Improve running subset of tests in isolation. (Viliam Pucik)
515
+
516
+ * Reorder private/public methods. (Patricio Mac Adden)
517
+
518
+ * Loosen version dependency for rack, so it runs with Rails 3.2.
519
+ (Konstantin Haase)
520
+
521
+ * Request#accept? now returns true instead of a truthy value. (Alan Harris)
522
+
523
+ ## 1.4.2 / 2013-03-21
524
+
525
+ * Fix parsing error for case where both the pattern and the captured part
526
+ contain a dot. (Florian Hanke, Konstantin Haase)
527
+
528
+ * Missing Accept header is treated like */*. (Greg Denton)
529
+
530
+ * Improve documentation. (Patricio Mac Adden, Joe Bottigliero)
531
+
532
+ ## 1.4.1 / 2013-03-15
533
+
534
+ * Make delegated methods available in config.ru (Konstantin Haase)
535
+
536
+ ## 1.4.0 / 2013-03-15
537
+
538
+ * Add support for LINK and UNLINK requests. (Konstantin Haase)
539
+
540
+ * Add support for Yajl templates. (Jamie Hodge)
541
+
542
+ * Add support for Rabl templates. (Jesse Cooke)
543
+
544
+ * Add support for Wlang templates. (Bernard Lambeau)
545
+
546
+ * Add support for Stylus templates. (Juan David Pastas, Konstantin Haase)
547
+
548
+ * You can now pass a block to ERb, Haml, Slim, Liquid and Wlang templates,
549
+ which will be used when calling `yield` in the template. (Alexey Muranov)
550
+
551
+ * When running in classic mode, no longer include Sinatra::Delegator in Object,
552
+ instead extend the main object only. (Konstantin Haase)
553
+
554
+ * Improved route parsing: "/:name.?:format?" with "/foo.png" now matches to
555
+ {name: "foo", format: "png"} instead of {name: "foo.png"}. (Florian Hanke)
556
+
557
+ * Add :status option support to send_file. (Konstantin Haase)
558
+
559
+ * The `provides` condition now respects an earlier set content type.
560
+ (Konstantin Haase)
561
+
562
+ * Exception#code is only used when :use_code is enabled. Moreover, it will
563
+ be ignored if the value is not between 400 and 599. You should use
564
+ Exception#http_status instead. (Konstantin Haase)
565
+
566
+ * Status, headers and body will be set correctly in an after filter when using
567
+ halt in a before filter or route. (Konstantin Haase)
568
+
569
+ * Sinatra::Base.new now returns a Sinatra::Wrapper instance, exposing
570
+ `#settings` and `#helpers`, yet going through the middleware stack on
571
+ `#call`. It also implements a nice `#inspect`, so it plays nice with
572
+ Rails' `rake routes`. (Konstantin Haase)
573
+
574
+ * In addition to WebRick, Thin and Mongrel, Sinatra will now automatically pick
575
+ up Puma, Trinidad, ControlTower or Net::HTTP::Server when installed. The
576
+ logic for picking the server has been improved and now depends on the Ruby
577
+ implementation used. (Mark Rada, Konstantin Haase, Patricio Mac Adden)
578
+
579
+ * "Sinatra doesn't know this ditty" pages now show the app class when running
580
+ a modular application. This helps detecting where the response came from when
581
+ combining multiple modular apps. (Konstantin Haase)
582
+
583
+ * When port is not set explicitly, use $PORT env variable if set and only
584
+ default to 4567 if not. Plays nice with foreman. (Konstantin Haase)
585
+
586
+ * Allow setting layout on a per engine basis. (Zachary Scott, Konstantin Haase)
587
+
588
+ * You can now use `register` directly in a classic app. (Konstantin Haase)
589
+
590
+ * `redirect` now accepts URI or Addressable::URI instances. (Nicolas
591
+ Sanguinetti)
592
+
593
+ * Have Content-Disposition header also include file name for `inline`, not
594
+ just for `attachment`. (Konstantin Haase)
595
+
596
+ * Better compatibility to Rack 1.5. (James Tucker, Konstantin Haase)
597
+
598
+ * Make route parsing regex more robust. (Zoltan Dezso, Konstantin Haase)
599
+
600
+ * Improve Accept header parsing, expose parameters. (Pieter van de Bruggen,
601
+ Konstantin Haase)
602
+
603
+ * Add `layout_options` render option. Allows you, amongst other things, to
604
+ render a layout from a different folder. (Konstantin Haase)
605
+
606
+ * Explicitly setting `layout` to `nil` is treated like setting it to `false`.
607
+ (richo)
608
+
609
+ * Properly escape attributes in Content-Type header. (Pieter van de Bruggen)
610
+
611
+ * Default to only serving localhost in development mode. (Postmodern)
612
+
613
+ * Setting status code to 404 in error handler no longer triggers not_found
614
+ handler. (Konstantin Haase)
615
+
616
+ * The `protection` option now takes a `session` key for force
617
+ disabling/enabling session based protections. (Konstantin Haase)
618
+
619
+ * Add `x_cascade` option to disable `X-Cascade` header on missing route.
620
+ (Konstantin Haase)
621
+
622
+ * Improve documentation. (Kashyap, Stanislav Chistenko, Zachary Scott,
623
+ Anthony Accomazzo, Peter Suschlik, Rachel Mehl, ymmtmsys, Anurag Priyam,
624
+ burningTyger, Tony Miller, akicho8, Vasily Polovnyov, Markus Prinz,
625
+ Alexey Muranov, Erik Johnson, Vipul A M, Konstantin Haase)
626
+
627
+ * Convert documentation to Markdown. (Kashyap, Robin Dupret, burningTyger,
628
+ Vasily Polovnyov, Iain Barnett, Giuseppe Capizzi, Neil West)
629
+
630
+ * Don't set not_found content type to HTML in development mode with custom
631
+ not_found handler. (Konstantin Haase)
632
+
633
+ * Fix mixed indentation for private methods. (Robin Dupret)
634
+
635
+ * Recalculate Content-Length even if hard coded if body is reset. Relevant
636
+ mostly for error handlers. (Nathan Esquenazi, Konstantin Haase)
637
+
638
+ * Plus sign is once again kept as such when used for URL matches. (Konstantin
639
+ Haase)
640
+
641
+ * Take views option into account for template caching. (Konstantin Haase)
642
+
643
+ * Consistent use of `headers` instead of `header` internally. (Patricio Mac Adden)
644
+
645
+ * Fix compatibility to RDoc 4. (Bohuslav Kabrda)
646
+
647
+ * Make chat example work with latest jQuery. (loveky, Tony Miller)
648
+
649
+ * Make tests run without warnings. (Patricio Mac Adden)
650
+
651
+ * Make sure value returned by `mime_type` is a String or nil, even when a
652
+ different object is passed in, like an AcceptEntry. (Konstantin Haase)
653
+
654
+ * Exceptions in `after` filter are now handled like any other exception.
655
+ (Nathan Esquenazi)
656
+
657
+ ## 1.3.6 (backport release) / 2013-03-15
658
+
659
+ Backported from 1.4.0:
660
+
661
+ * Take views option into account for template caching. (Konstantin Haase)
662
+
663
+ * Improve documentation (Konstantin Haase)
664
+
665
+ * No longer override `define_singleton_method`. (Konstantin Haase)
666
+
667
+ ## 1.3.5 / 2013-02-25
668
+
669
+ * Fix for RubyGems 2.0 (Uchio KONDO)
670
+
671
+ * Improve documentation (Konstantin Haase)
672
+
673
+ * No longer override `define_singleton_method`. (Konstantin Haase)
674
+
675
+ ## 1.3.4 / 2013-01-26
676
+
677
+ * Improve documentation. (Kashyap, Stanislav Chistenko, Konstantin Haase,
678
+ ymmtmsys, Anurag Priyam)
679
+
680
+ * Adjustments to template system to work with Tilt edge. (Konstantin Haase)
681
+
682
+ * Fix streaming with latest Rack release. (Konstantin Haase)
683
+
684
+ * Fix default content type for Sinatra::Response with latest Rack release.
685
+ (Konstantin Haase)
686
+
687
+ * Fix regression where + was no longer treated like space. (Ross Boucher)
688
+
689
+ * Status, headers and body will be set correctly in an after filter when using
690
+ halt in a before filter or route. (Konstantin Haase)
691
+
692
+ ## 1.3.3 / 2012-08-19
693
+
694
+ * Improved documentation. (burningTyger, Konstantin Haase, Gabriel Andretta,
695
+ Anurag Priyam, michelc)
696
+
697
+ * No longer modify the load path. (Konstantin Haase)
698
+
699
+ * When keeping a stream open, set up callback/errback correctly to deal with
700
+ clients closing the connection. (Konstantin Haase)
701
+
702
+ * Fix bug where having a query param and a URL param by the same name would
703
+ concatenate the two values. (Konstantin Haase)
704
+
705
+ * Prevent duplicated log output when application is already wrapped in a
706
+ `Rack::CommonLogger`. (Konstantin Haase)
707
+
708
+ * Fix issue where `Rack::Link` and Rails were preventing indefinite streaming.
709
+ (Konstantin Haase)
710
+
711
+ * No longer cause warnings when running Ruby with `-w`. (Konstantin Haase)
712
+
713
+ * HEAD requests on static files no longer report a Content-Length of 0, but
714
+ instead the proper length. (Konstantin Haase)
715
+
716
+ * When protecting against CSRF attacks, drop the session instead of refusing
717
+ the request. (Konstantin Haase)
718
+
719
+ ## 1.3.2 / 2011-12-30
720
+
721
+ * Don't automatically add `Rack::CommonLogger` if `Rack::Server` is adding it,
722
+ too. (Konstantin Haase)
723
+
724
+ * Setting `logging` to `nil` will avoid setting up `Rack::NullLogger`.
725
+ (Konstantin Haase)
726
+
727
+ * Route specific params are now available in the block passed to #stream.
728
+ (Konstantin Haase)
729
+
730
+ * Fix bug where rendering a second template in the same request, after the
731
+ first one raised an exception, skipped the default layout. (Nathan Baum)
732
+
733
+ * Fix bug where parameter escaping got enabled when disabling a different
734
+ protection. (Konstantin Haase)
735
+
736
+ * Fix regression: Filters without a pattern may now again manipulate the params
737
+ hash. (Konstantin Haase)
738
+
739
+ * Added examples directory. (Konstantin Haase)
740
+
741
+ * Improved documentation. (Gabriel Andretta, Markus Prinz, Erick Zetta, Just
742
+ Lest, Adam Vaughan, Aleksander Dąbrowski)
743
+
744
+ * Improved MagLev support. (Tim Felgentreff)
745
+
746
+ ## 1.3.1 / 2011-10-05
747
+
748
+ * Support adding more than one callback to the stream object. (Konstantin
749
+ Haase)
750
+
751
+ * Fix for infinite loop when streaming on 1.9.2 with Thin from a modular
752
+ application (Konstantin Haase)
753
+
754
+ ## 1.3.0 / 2011-09-30
755
+
756
+ * Added `stream` helper method for easily creating streaming APIs, Server
757
+ Sent Events or even WebSockets. See README for more on that topic.
758
+ (Konstantin Haase)
759
+
760
+ * If a HTTP 1.1 client is redirected from a different verb than GET, use 303
761
+ instead of 302 by default. You may still pass 302 explicitly. Fixes AJAX
762
+ redirects in Internet Explorer 9 (to be fair, everyone else is doing it
763
+ wrong and IE is behaving correct). (Konstantin Haase)
764
+
765
+ * Added support for HTTP PATCH requests. (Konstantin Haase)
766
+
767
+ * Use rack-protection to defend against common opportunistic attacks.
768
+ (Josh Lane, Jacob Burkhart, Konstantin Haase)
769
+
770
+ * Support for Creole templates, Creole is a standardized wiki markup,
771
+ supported by many wiki implementations. (Konstanin Haase)
772
+
773
+ * The `erubis` method has been deprecated. If Erubis is available, Sinatra
774
+ will automatically use it for rendering ERB templates. `require 'erb'`
775
+ explicitly to prevent that behavior. (Magnus Holm, Ryan Tomayko, Konstantin
776
+ Haase)
777
+
778
+ * Patterns now match against the escaped URLs rather than the unescaped
779
+ version. This makes Sinatra confirm with RFC 2396 section 2.2 and RFC 2616
780
+ section 3.2.3 (escaped reserved characters should not be treated like the
781
+ unescaped version), meaning that "/:name" will also match `/foo%2Fbar`, but
782
+ not `/foo/bar`. To avoid incompatibility, pattern matching has been
783
+ adjusted. Moreover, since we do no longer need to keep an unescaped version
784
+ of path_info around, we handle all changes to `env['PATH_INFO']` correctly.
785
+ (Konstantin Haase)
786
+
787
+ * `settings.app_file` now defaults to the file subclassing `Sinatra::Base` in
788
+ modular applications. (Konstantin Haase)
789
+
790
+ * Set up `Rack::Logger` or `Rack::NullLogger` depending on whether logging
791
+ was enabled or not. Also, expose that logger with the `logger` helper
792
+ method. (Konstantin Haase)
793
+
794
+ * The sessions setting may be an options hash now. (Konstantin Haase)
795
+
796
+ * Important: Ruby 1.8.6 support has been dropped. This version also depends
797
+ on at least Rack 1.3.0. This means that it is incompatible with Rails prior
798
+ to 3.1.0. Please use 1.2.x if you require an earlier version of Ruby or
799
+ Rack, which we will continue to supply with bug fixes. (Konstantin Haase)
800
+
801
+ * Renamed `:public` to `:public_folder` to avoid overriding Ruby's built-in
802
+ `public` method/keyword. `set(:public, ...)` is still possible but shows a
803
+ warning. (Konstantin Haase)
804
+
805
+ * It is now possible to use a different target class for the top level DSL
806
+ (aka classic style) than `Sinatra::Application` by setting
807
+ `Delegator.target`. This was mainly introduced to ease testing. (Konstantin
808
+ Haase)
809
+
810
+ * Error handlers defined for an error class will now also handle subclasses
811
+ of that class, unless more specific error handlers exist. (Konstantin
812
+ Haase)
813
+
814
+ * Error handling respects Exception#code, again. (Konstantin Haase)
815
+
816
+ * Changing a setting will merge hashes: `set(:x, :a => 1); set(:x :b => 2)`
817
+ will result in `{:a => 1, :b => 2}`. Use `set(:x, {:a => 1}, true)` to
818
+ avoid this behavior. (Konstantin Haase)
819
+
820
+ * Added `request.accept?` and `request.preferred_type` to ease dealing with
821
+ `Accept` headers. (Konstantin Haase)
822
+
823
+ * Added `:static_cache_control` setting to automatically set cache control
824
+ headers to static files. (Kenichi Nakamura)
825
+
826
+ * Added `informal?`, `success?`, `redirect?`, `client_error?`,
827
+ `server_error?` and `not_found?` helper methods to ease dealing with status
828
+ codes. (Konstantin Haase)
829
+
830
+ * Uses SecureRandom to generate default session secret. (Konstantin Haase)
831
+
832
+ * The `attachment` helper will set Content-Type (if it hasn't been set yet)
833
+ depending on the supplied file name. (Vasiliy Ermolovich)
834
+
835
+ * Conditional requests on `etag` helper now work properly for unsafe HTTP
836
+ methods. (Matthew Schinckel, Konstantin Haase)
837
+
838
+ * The `last_modified` helper does not stop execution and change the status code
839
+ if the status code is something different than 200. (Konstantin Haase)
840
+
841
+ * Added support for If-Unmodified-Since header. (Konstantin Haase)
842
+
843
+ * `Sinatra::Base.run!` now prints to stderr rather than stdout. (Andrew
844
+ Armenia)
845
+
846
+ * `Sinatra::Base.run!` takes a block allowing access to the Rack handler.
847
+ (David Waite)
848
+
849
+ * Automatic `app_file` detection now works in directories containing brackets
850
+ (Konstantin Haase)
851
+
852
+ * Exception objects are now passed to error handlers. (Konstantin Haase)
853
+
854
+ * Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori
855
+ Ishikawa, Konstantin Haase)
856
+
857
+ * Also specify charset in Content-Type header for JSON. (Konstantin Haase)
858
+
859
+ * Rack handler names will not be converted to lower case internally, this
860
+ allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2.
861
+ Example: `ruby app.rb -s Mongrel2` (Konstantin Haase)
862
+
863
+ * Ignore `to_ary` on response bodies. Fixes compatibility to Rails 3.1.
864
+ (Konstantin Haase)
865
+
866
+ * Middleware setup is now distributed across multiple methods, allowing
867
+ Sinatra extensions to easily hook into the setup process. (Konstantin
868
+ Haase)
869
+
870
+ * Internal refactoring and minor performance improvements. (Konstantin Haase)
871
+
872
+ * Move Sinatra::VERSION to separate file, so it can be checked without
873
+ loading Sinatra. (Konstantin Haase)
874
+
875
+ * Command line options now complain if value passed to `-p` is not a valid
876
+ integer. (Konstantin Haase)
877
+
878
+ * Fix handling of broken query params when displaying exceptions. (Luke
879
+ Jahnke)
880
+
881
+ ## 1.2.9 (backports release) / 2013-03-15
882
+
883
+ IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
884
+
885
+ * Display EOL warning when loading Sinatra. (Konstantin Haase)
886
+
887
+ * Improve documentation. (Anurag Priyam, Konstantin Haase)
888
+
889
+ * Do not modify the load path. (Konstantin Haase)
890
+
891
+ * Display deprecation warning if RUBY_IGNORE_CALLERS is used. (Konstantin Haase)
892
+
893
+ * Add backports library so we can still run on Ruby 1.8.6. (Konstantin Haase)
894
+
895
+ ## 1.2.8 (backports release) / 2011-12-30
896
+
897
+ Backported from 1.3.2:
898
+
899
+ * Fix bug where rendering a second template in the same request after the
900
+ first one raised an exception skipped the default layout (Nathan Baum)
901
+
902
+ ## 1.2.7 (backports release) / 2011-09-30
903
+
904
+ Custom changes:
905
+
906
+ * Fix Ruby 1.8.6 issue with Accept header parsing. (Konstantin Haase)
907
+
908
+ Backported from 1.3.0:
909
+
910
+ * Ignore `to_ary` on response bodies. Fixes compatibility to Rails 3.1.
911
+ (Konstantin Haase)
912
+
913
+ * `Sinatra.run!` now prints to stderr rather than stdout. (Andrew Armenia)
914
+
915
+ * Automatic `app_file` detection now works in directories containing brackets
916
+ (Konstantin Haase)
917
+
918
+ * Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori
919
+ Ishikawa, Konstantin Haase)
920
+
921
+ * Also specify charset in Content-Type header for JSON. (Konstantin Haase)
922
+
923
+ * Rack handler names will not be converted to lower case internally, this
924
+ allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2.
925
+ Example: `ruby app.rb -s Mongrel2` (Konstantin Haase)
926
+
927
+ * Fix uninitialized instance variable warning. (David Kellum)
928
+
929
+ * Command line options now complain if value passed to `-p` is not a valid
930
+ integer. (Konstantin Haase)
931
+
932
+ * Fix handling of broken query params when displaying exceptions. (Luke
933
+ Jahnke)
934
+
935
+ ## 1.2.6 / 2011-05-01
936
+
937
+ * Fix broken delegation, backport delegation tests from Sinatra 1.3.
938
+ (Konstantin Haase)
939
+
940
+ ## 1.2.5 / 2011-04-30
941
+
942
+ * Restore compatibility with Ruby 1.8.6. (Konstantin Haase)
943
+
944
+ ## 1.2.4 / 2011-04-30
945
+
946
+ * Sinatra::Application (classic style) does not use a session secret in
947
+ development mode, so sessions are not invalidated after every request when
948
+ using Shotgun. (Konstantin Haase)
949
+
950
+ * The request object was shared between multiple Sinatra instances in the
951
+ same middleware chain. This caused issues if any non-sinatra routing
952
+ happened in-between two of those instances, or running a request twice
953
+ against an application (described in the README). The caching was reverted.
954
+ See GH[#239](https://github.com/sinatra/sinatra/issues/239) and GH[#256](https://github.com/sinatra/sinatra/issues/256) for more infos. (Konstantin Haase)
955
+
956
+ * Fixes issues where the top level DSL was interfering with method_missing
957
+ proxies. This issue surfaced when Rails 3 was used with older Sass versions
958
+ and Sinatra >= 1.2.0. (Konstantin Haase)
959
+
960
+ * Sinatra::Delegator.delegate is now able to delegate any method names, even
961
+ those containing special characters. This allows better integration into
962
+ other programming languages on Rubinius (probably on the JVM, too), like
963
+ Fancy. (Konstantin Haase)
964
+
965
+ * Remove HEAD request logic and let Rack::Head handle it instead. (Paolo
966
+ "Nusco" Perrotta)
967
+
968
+ ## 1.2.3 / 2011-04-13
969
+
970
+ * This release is compatible with Tilt 1.3, it will still work with Tilt 1.2.2,
971
+ however, if you want to use a newer Tilt version, you have to upgrade to at
972
+ least this version of Sinatra. (Konstantin Haase)
973
+
974
+ * Helpers dealing with time, like `expires`, handle objects that pretend to be
975
+ numbers, like `ActiveSupport::Duration`, better. (Konstantin Haase)
976
+
977
+ ## 1.2.2 / 2011-04-08
978
+
979
+ * The `:provides => :js` condition now matches both `application/javascript`
980
+ and `text/javascript`. The `:provides => :xml` condition now matches both
981
+ `application/xml` and `text/xml`. The `Content-Type` header is set
982
+ accordingly. If the client accepts both, the `application/*` version is
983
+ preferred, since the `text/*` versions are deprecated. (Konstantin Haase)
984
+
985
+ * The `provides` condition now handles wildcards in `Accept` headers correctly.
986
+ Thus `:provides => :html` matches `text/html`, `text/*` and `*/*`.
987
+ (Konstantin Haase)
988
+
989
+ * When parsing `Accept` headers, `Content-Type` preferences are honored
990
+ according to RFC 2616 section 14.1. (Konstantin Haase)
991
+
992
+ * URIs passed to the `url` helper or `redirect` may now use any schema to be
993
+ identified as absolute URIs, not only `http` or `https`. (Konstantin Haase)
994
+
995
+ * Handles `Content-Type` strings that already contain parameters correctly in
996
+ `content_type` (example: `content_type "text/plain; charset=utf-16"`).
997
+ (Konstantin Haase)
998
+
999
+ * If a route with an empty pattern is defined (`get("") { ... }`) requests with
1000
+ an empty path info match this route instead of "/". (Konstantin Haase)
1001
+
1002
+ * In development environment, when running under a nested path, the image URIs
1003
+ on the error pages are set properly. (Konstantin Haase)
1004
+
1005
+ ## 1.2.1 / 2011-03-17
1006
+
1007
+ * Use a generated session secret when using `enable :sessions`. (Konstantin
1008
+ Haase)
1009
+
1010
+ * Fixed a bug where the wrong content type was used if no content type was set
1011
+ and a template engine was used with a different engine for the layout with
1012
+ different default content types, say Less embedded in Slim. (Konstantin
1013
+ Haase)
1014
+
1015
+ * README translations improved (Gabriel Andretta, burningTyger, Sylvain Desvé,
1016
+ Gregor Schmidt)
1017
+
1018
+ ## 1.2.0 / 2011-03-03
1019
+
1020
+ * Added `slim` rendering method for rendering Slim templates. (Steve
1021
+ Hodgkiss)
1022
+
1023
+ * The `markaby` rendering method now allows passing a block, making inline
1024
+ usage possible. Requires Tilt 1.2 or newer. (Konstantin Haase)
1025
+
1026
+ * All render methods now take a `:layout_engine` option, allowing to use a
1027
+ layout in a different template language. Even more useful than using this
1028
+ directly (`erb :index, :layout_engine => :haml`) is setting this globally for
1029
+ a template engine that otherwise does not support layouts, like Markdown or
1030
+ Textile (`set :markdown, :layout_engine => :erb`). (Konstantin Haase)
1031
+
1032
+ * Before and after filters now support conditions, both with and without
1033
+ patterns (`before '/api/*', :agent => /Songbird/`). (Konstantin Haase)
1034
+
1035
+ * Added a `url` helper method which constructs absolute URLs. Copes with
1036
+ reverse proxies and Rack handlers correctly. Aliased to `to`, so you can
1037
+ write `redirect to('/foo')`. (Konstantin Haase)
1038
+
1039
+ * If running on 1.9, patterns for routes and filters now support named
1040
+ captures: `get(%r{/hi/(?<name>[^/?#]+)}) { "Hi #{params['name']}" }`.
1041
+ (Steve Price)
1042
+
1043
+ * All rendering methods now take a `:scope` option, which renders them in
1044
+ another context. Note that helpers and instance variables will be
1045
+ unavailable if you use this feature. (Paul Walker)
1046
+
1047
+ * The behavior of `redirect` can now be configured with `absolute_redirects`
1048
+ and `prefixed_redirects`. (Konstantin Haase)
1049
+
1050
+ * `send_file` now allows overriding the Last-Modified header, which defaults
1051
+ to the file's mtime, by passing a `:last_modified` option. (Konstantin Haase)
1052
+
1053
+ * You can use your own template lookup method by defining `find_template`.
1054
+ This allows, among other things, using more than one views folder.
1055
+ (Konstantin Haase)
1056
+
1057
+ * Largely improved documentation. (burningTyger, Vasily Polovnyov, Gabriel
1058
+ Andretta, Konstantin Haase)
1059
+
1060
+ * Improved error handling. (cactus, Konstantin Haase)
1061
+
1062
+ * Skip missing template engines in tests correctly. (cactus)
1063
+
1064
+ * Sinatra now ships with a Gemfile for development dependencies, since it eases
1065
+ supporting different platforms, like JRuby. (Konstantin Haase)
1066
+
1067
+ ## 1.1.4 (backports release) / 2011-04-13
1068
+
1069
+ * Compatible with Tilt 1.3. (Konstantin Haase)
1070
+
1071
+ ## 1.1.3 / 2011-02-20
1072
+
1073
+ * Fixed issues with `user_agent` condition if the user agent header is missing.
1074
+ (Konstantin Haase)
1075
+
1076
+ * Fix some routing tests that have been skipped by accident (Ross A. Baker)
1077
+
1078
+ * Fix rendering issues with Builder and Nokogiri (Konstantin Haase)
1079
+
1080
+ * Replace last_modified helper with better implementation. (cactus,
1081
+ Konstantin Haase)
1082
+
1083
+ * Fix issue with charset not being set when using `provides` condition.
1084
+ (Konstantin Haase)
1085
+
1086
+ * Fix issue with `render` not picking up all alternative file extensions for
1087
+ a rendering engine - it was not possible to register ".html.erb" without
1088
+ tricks. (Konstantin Haase)
1089
+
1090
+ ## 1.1.2 / 2010-10-25
1091
+
1092
+ Like 1.1.1, but with proper CHANGES file.
1093
+
1094
+ ## 1.1.1 / 2010-10-25
1095
+
1096
+ * README has been translated to Russian (Nickolay Schwarz, Vasily Polovnyov)
1097
+ and Portuguese (Luciano Sousa).
1098
+
1099
+ * Nested templates without a `:layout` option can now be used from the layout
1100
+ template without causing an infinite loop. (Konstantin Haase)
1101
+
1102
+ * Inline templates are now encoding aware and can therefore be used with
1103
+ unicode characters on Ruby 1.9. Magic comments at the beginning of the file
1104
+ will be honored. (Konstantin Haase)
1105
+
1106
+ * Default `app_file` is set correctly when running with bundler. Using
1107
+ bundler caused Sinatra not to find the `app_file` and therefore not to find
1108
+ the `views` folder on it's own. (Konstantin Haase)
1109
+
1110
+ * Better handling of Content-Type when using `send_file`: If file extension
1111
+ is unknown, fall back to `application/octet-stream` and do not override
1112
+ content type if it has already been set, except if `:type` is passed
1113
+ explicitly (Konstantin Haase)
1114
+
1115
+ * Path is no longer cached if changed between handlers that do pattern
1116
+ matching. This means you can change `request.path_info` in a pattern
1117
+ matching before filter. (Konstantin Haase)
1118
+
1119
+ * Headers set by cache_control now always set max_age as an Integer, making
1120
+ sure it is compatible with RFC2616. (Konstantin Haase)
1121
+
1122
+ * Further improved handling of string encodings on Ruby 1.9, templates now
1123
+ honor default_encoding and URLs support unicode characters. (Konstantin
1124
+ Haase)
1125
+
1126
+ ## 1.1.0 / 2010-10-24
1127
+
1128
+ * Before and after filters now support pattern matching, including the
1129
+ ability to use captures: "before('/user/:name') { |name| ... }". This
1130
+ avoids manual path checking. No performance loss if patterns are avoided.
1131
+ (Konstantin Haase)
1132
+
1133
+ * It is now possible to render SCSS files with the `scss` method, which
1134
+ behaves exactly like `sass` except for the different file extension and
1135
+ assuming the SCSS syntax. (Pedro Menezes, Konstantin Haase)
1136
+
1137
+ * Added `liquid`, `markdown`, `nokogiri`, `textile`, `rdoc`, `radius`,
1138
+ `markaby`, and `coffee` rendering methods for rendering Liquid, Markdown,
1139
+ Nokogiri, Textile, RDoc, Radius, Markaby and CoffeeScript templates.
1140
+ (Konstantin Haase)
1141
+
1142
+ * Now supports byte-range requests (the HTTP_RANGE header) for static files.
1143
+ Multi-range requests are not supported, however. (Jens Alfke)
1144
+
1145
+ * You can now use #settings method from class and top level for convenience.
1146
+ (Konstantin Haase)
1147
+
1148
+ * Setting multiple values now no longer relies on #to_hash and therefore
1149
+ accepts any Enumerable as parameter. (Simon Rozet)
1150
+
1151
+ * Nested templates default the `layout` option to `false` rather than `true`.
1152
+ This eases the use of partials. If you wanted to render one haml template
1153
+ embedded in another, you had to call `haml :partial, {}, :layout => false`.
1154
+ As you almost never want the partial to be wrapped in the standard layout
1155
+ in this situation, you now only have to call `haml :partial`. Passing in
1156
+ `layout` explicitly is still possible. (Konstantin Haase)
1157
+
1158
+ * If a the return value of one of the render functions is used as a response
1159
+ body and the content type has not been set explicitly, Sinatra chooses a
1160
+ content type corresponding to the rendering engine rather than just using
1161
+ "text/html". (Konstantin Haase)
1162
+
1163
+ * README is now available in Chinese (Wu Jiang), French (Mickael Riga),
1164
+ German (Bernhard Essl, Konstantin Haase, burningTyger), Hungarian (Janos
1165
+ Hardi) and Spanish (Gabriel Andretta). The extremely outdated Japanese
1166
+ README has been updated (Kouhei Yanagita).
1167
+
1168
+ * It is now possible to access Sinatra's template_cache from the outside.
1169
+ (Nick Sutterer)
1170
+
1171
+ * The `last_modified` method now also accepts DateTime instances and makes
1172
+ sure the header will always be set to a string. (Konstantin Haase)
1173
+
1174
+ * 599 now is a legal status code. (Steve Shreeve)
1175
+
1176
+ * This release is compatible with Ruby 1.9.2. Sinatra was trying to read
1177
+ non existent files Ruby added to the call stack. (Shota Fukumori,
1178
+ Konstantin Haase)
1179
+
1180
+ * Prevents a memory leak on 1.8.6 in production mode. Note, however, that
1181
+ this is due to a bug in 1.8.6 and request will have the additional overhead
1182
+ of parsing templates again on that version. It is recommended to use at
1183
+ least Ruby 1.8.7. (Konstantin Haase)
1184
+
1185
+ * Compares last modified date correctly. `last_modified` was halting only
1186
+ when the 'If-Modified-Since' header date was equal to the time specified.
1187
+ Now, it halts when is equal or later than the time specified (Gabriel
1188
+ Andretta).
1189
+
1190
+ * Sinatra is now usable in combination with Rails 3. When mounting a Sinatra
1191
+ application under a subpath in Rails 3, the PATH_INFO is not prefixed with
1192
+ a slash and no routes did match. (José Valim)
1193
+
1194
+ * Better handling of encodings in 1.9, defaults params encoding to UTF-8.
1195
+ (Konstantin Haase)
1196
+
1197
+ * `show_exceptions` handling is now triggered after custom error handlers, if
1198
+ it is set to `:after_handlers`, thus not disabling those handler in
1199
+ development mode. (pangel, Konstantin Haase)
1200
+
1201
+ * Added ability to handle weighted HTTP_ACCEPT headers. (Davide D'Agostino)
1202
+
1203
+ * `send_file` now always respects the `:type` option if set. Previously it
1204
+ was discarded if no matching mime type was found, which made it impossible
1205
+ to directly pass a mime type. (Konstantin Haase)
1206
+
1207
+ * `redirect` always redirects to an absolute URI, even if a relative URI was
1208
+ passed. Ensures compatibility with RFC 2616 section 14.30. (Jean-Philippe
1209
+ Garcia Ballester, Anthony Williams)
1210
+
1211
+ * Broken examples for using Erubis, Haml and Test::Unit in README have been
1212
+ fixed. (Nick Sutterer, Doug Ireton, Jason Stewart, Eric Marden)
1213
+
1214
+ * Sinatra now handles SIGTERM correctly. (Patrick Collison)
1215
+
1216
+ * Fixes an issue with inline templates in modular applications that manually
1217
+ call `run!`. (Konstantin Haase)
1218
+
1219
+ * Spaces after inline template names are now ignored (Konstantin Haase)
1220
+
1221
+ * It's now possible to use Sinatra with different package management
1222
+ systems defining a custom require. (Konstantin Haase)
1223
+
1224
+ * Lighthouse has been dropped in favor of GitHub issues.
1225
+
1226
+ * Tilt is now a dependency and therefore no longer ships bundled with
1227
+ Sinatra. (Ryan Tomayko, Konstantin Haase)
1228
+
1229
+ * Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer supported.
1230
+ (Konstantin Haase)
1231
+
1232
+ ## 1.0 / 2010-03-23
1233
+
1234
+ * It's now possible to register blocks to run after each request using
1235
+ after filters. After filters run at the end of each request, after
1236
+ routes and error handlers. (Jimmy Schementi)
1237
+
1238
+ * Sinatra now uses Tilt <http://github.com/rtomayko/tilt> for rendering
1239
+ templates. This adds support for template caching, consistent
1240
+ template backtraces, and support for new template engines, like
1241
+ mustache and liquid. (Ryan Tomayko)
1242
+
1243
+ * ERB, Erubis, and Haml templates are now compiled the first time
1244
+ they're rendered instead of being string eval'd on each invocation.
1245
+ Benchmarks show a 5x-10x improvement in render time. This also
1246
+ reduces the number of objects created, decreasing pressure on Ruby's
1247
+ GC. (Ryan Tomayko)
1248
+
1249
+ * New 'settings' method gives access to options in both class and request
1250
+ scopes. This replaces the 'options' method. (Chris Wanstrath)
1251
+
1252
+ * New boolean 'reload_templates' setting controls whether template files
1253
+ are reread from disk and recompiled on each request. Template read/compile
1254
+ is cached by default in all environments except development. (Ryan Tomayko)
1255
+
1256
+ * New 'erubis' helper method for rendering ERB template with Erubis. The
1257
+ erubis gem is required. (Dylan Egan)
1258
+
1259
+ * New 'cache_control' helper method provides a convenient way of
1260
+ setting the Cache-Control response header. Takes a variable number
1261
+ of boolean directives followed by a hash of value directives, like
1262
+ this: cache_control :public, :must_revalidate, :max_age => 60
1263
+ (Ryan Tomayko)
1264
+
1265
+ * New 'expires' helper method is like cache_control but takes an
1266
+ integer number of seconds or Time object:
1267
+ expires 300, :public, :must_revalidate
1268
+ (Ryan Tomayko)
1269
+
1270
+ * New request.secure? method for checking for an SSL connection.
1271
+ (Adam Wiggins)
1272
+
1273
+ * Sinatra apps can now be run with a `-o <addr>` argument to specify
1274
+ the address to bind to. (Ryan Tomayko)
1275
+
1276
+ * Rack::Session::Cookie is now added to the middleware pipeline when
1277
+ running in test environments if the :sessions option is set.
1278
+ (Simon Rozet)
1279
+
1280
+ * Route handlers, before filters, templates, error mappings, and
1281
+ middleware are now resolved dynamically up the inheritance hierarchy
1282
+ when needed instead of duplicating the superclass's version when
1283
+ a new Sinatra::Base subclass is created. This should fix a variety
1284
+ of issues with extensions that need to add any of these things
1285
+ to the base class. (Ryan Tomayko)
1286
+
1287
+ * Exception error handlers always override the raise_errors option now.
1288
+ Previously, all exceptions would be raised outside of the application
1289
+ when the raise_errors option was enabled, even if an error handler was
1290
+ defined for that exception. The raise_errors option now controls
1291
+ whether unhandled exceptions are raised (enabled) or if a generic 500
1292
+ error is returned (disabled). (Ryan Tomayko)
1293
+
1294
+ * The X-Cascade response header is set to 'pass' when no matching route
1295
+ is found or all routes pass. (Josh Peek)
1296
+
1297
+ * Filters do not run when serving static files anymore. (Ryan Tomayko)
1298
+
1299
+ * pass takes an optional block to be used as the route handler if no
1300
+ subsequent route matches the request. (Blake Mizerany)
1301
+
1302
+ The following Sinatra features have been obsoleted (removed entirely) in
1303
+ the 1.0 release:
1304
+
1305
+ * The `sinatra/test` library is obsolete. This includes the `Sinatra::Test`
1306
+ module, the `Sinatra::TestHarness` class, and the `get_it`, `post_it`,
1307
+ `put_it`, `delete_it`, and `head_it` helper methods. The
1308
+ [`Rack::Test` library](http://gitrdoc.com/brynary/rack-test) should
1309
+ be used instead.
1310
+
1311
+ * Test framework specific libraries (`sinatra/test/spec`,
1312
+ `sinatra/test/bacon`,`sinatra/test/rspec`, etc.) are obsolete. See
1313
+ http://www.sinatrarb.com/testing.html for instructions on setting up a
1314
+ testing environment under each of these frameworks.
1315
+
1316
+ * `Sinatra::Default` is obsolete; use `Sinatra::Base` instead.
1317
+ `Sinatra::Base` acts more like `Sinatra::Default` in development mode.
1318
+ For example, static file serving and sexy development error pages are
1319
+ enabled by default.
1320
+
1321
+ * Auto-requiring template libraries in the `erb`, `builder`, `haml`,
1322
+ and `sass` methods is obsolete due to thread-safety issues. You must
1323
+ require the template libraries explicitly in your app.
1324
+
1325
+ * The `:views_directory` option to rendering methods is obsolete; use
1326
+ `:views` instead.
1327
+
1328
+ * The `:haml` and `:sass` options to rendering methods are obsolete.
1329
+ Template engine options should be passed in the second Hash argument
1330
+ instead.
1331
+
1332
+ * The `use_in_file_templates` method is obsolete. Use
1333
+ `enable :inline_templates` or `set :inline_templates, 'path/to/file'`
1334
+
1335
+ * The 'media_type' helper method is obsolete. Use 'mime_type' instead.
1336
+
1337
+ * The 'mime' main and class method is obsolete. Use 'mime_type' instead.
1338
+
1339
+ * The request-level `send_data` method is no longer supported.
1340
+
1341
+ * The `Sinatra::Event` and `Sinatra::EventContext` classes are no longer
1342
+ supported. This may effect extensions written for versions prior to 0.9.2.
1343
+ See [Writing Sinatra Extensions](http://www.sinatrarb.com/extensions.html)
1344
+ for the officially supported extensions API.
1345
+
1346
+ * The `set_option` and `set_options` methods are obsolete; use `set`
1347
+ instead.
1348
+
1349
+ * The `:env` setting (`settings.env`) is obsolete; use `:environment`
1350
+ instead.
1351
+
1352
+ * The request level `stop` method is obsolete; use `halt` instead.
1353
+
1354
+ * The request level `entity_tag` method is obsolete; use `etag`
1355
+ instead.
1356
+
1357
+ * The request level `headers` method (HTTP response headers) is obsolete;
1358
+ use `response['Header-Name']` instead.
1359
+
1360
+ * `Sinatra.application` is obsolete; use `Sinatra::Application` instead.
1361
+
1362
+ * Using `Sinatra.application = nil` to reset an application is obsolete.
1363
+ This should no longer be necessary.
1364
+
1365
+ * Using `Sinatra.default_options` to set base configuration items is
1366
+ obsolete; use `Sinatra::Base.set(key, value)` instead.
1367
+
1368
+ * The `Sinatra::ServerError` exception is obsolete. All exceptions raised
1369
+ within a request are now treated as internal server errors and result in
1370
+ a 500 response status.
1371
+
1372
+ * The `:methodoverride' option to enable/disable the POST _method hack is
1373
+ obsolete; use `:method_override` instead.
1374
+
1375
+ ## 0.9.2 / 2009-05-18
1376
+
1377
+ * This version is compatible with Rack 1.0. [Rein Henrichs]
1378
+
1379
+ * The development-mode unhandled exception / error page has been
1380
+ greatly enhanced, functionally and aesthetically. The error
1381
+ page is used when the :show_exceptions option is enabled and an
1382
+ exception propagates outside of a route handler or before filter.
1383
+ [Simon Rozet / Matte Noble / Ryan Tomayko]
1384
+
1385
+ * Backtraces that move through templates now include filenames and
1386
+ line numbers where possible. [#51 / S. Brent Faulkner]
1387
+
1388
+ * All templates now have an app-level option for setting default
1389
+ template options (:haml, :sass, :erb, :builder). The app-level
1390
+ option value must be a Hash if set and is merged with the
1391
+ template options specified to the render method (Base#haml,
1392
+ Base#erb, Base#builder). [S. Brent Faulkner, Ryan Tomayko]
1393
+
1394
+ * The method signature for all template rendering methods has
1395
+ been unified: "def engine(template, options={}, locals={})".
1396
+ The options Hash now takes the generic :views, :layout, and
1397
+ :locals options but also any template-specific options. The
1398
+ generic options are removed before calling the template specific
1399
+ render method. Locals may be specified using either the
1400
+ :locals key in the options hash or a second Hash option to the
1401
+ rendering method. [#191 / Ryan Tomayko]
1402
+
1403
+ * The receiver is now passed to "configure" blocks. This
1404
+ allows for the following idiom in top-level apps:
1405
+ configure { |app| set :foo, app.root + '/foo' }
1406
+ [TJ Holowaychuck / Ryan Tomayko]
1407
+
1408
+ * The "sinatra/test" lib is deprecated and will be removed in
1409
+ Sinatra 1.0. This includes the Sinatra::Test module and
1410
+ Sinatra::TestHarness class in addition to all the framework
1411
+ test helpers that were deprecated in 0.9.1. The Rack::Test
1412
+ lib should be used instead: http://gitrdoc.com/brynary/rack-test
1413
+ [#176 / Simon Rozet]
1414
+
1415
+ * Development mode source file reloading has been removed. The
1416
+ "shotgun" (http://rtomayko.github.com/shotgun/) program can be
1417
+ used to achieve the same basic functionality in most situations.
1418
+ Passenger users should use the "tmp/always_restart.txt"
1419
+ file (http://tinyurl.com/c67o4h). [#166 / Ryan Tomayko]
1420
+
1421
+ * Auto-requiring template libs in the erb, builder, haml, and
1422
+ sass methods is deprecated due to thread-safety issues. You must
1423
+ require the template libs explicitly in your app file. [Simon Rozet]
1424
+
1425
+ * A new Sinatra::Base#route_missing method was added. route_missing
1426
+ is sent when no route matches the request or all route handlers
1427
+ pass. The default implementation forwards the request to the
1428
+ downstream app when running as middleware (i.e., "@app" is
1429
+ non-nil), or raises a NotFound exception when no downstream app
1430
+ is defined. Subclasses can override this method to perform custom
1431
+ route miss logic. [Jon Crosby]
1432
+
1433
+ * A new Sinatra::Base#route_eval method was added. The method
1434
+ yields to the block and throws :halt with the result. Subclasses
1435
+ can override this method to tap into the route execution logic.
1436
+ [TJ Holowaychuck]
1437
+
1438
+ * Fix the "-x" (enable request mutex / locking) command line
1439
+ argument. Passing -x now properly sets the :lock option.
1440
+ [S. Brent Faulkner, Ryan Tomayko]
1441
+
1442
+ * Fix writer ("foo=") and predicate ("foo?") methods in extension
1443
+ modules not being added to the registering class.
1444
+ [#172 / Pat Nakajima]
1445
+
1446
+ * Fix in-file templates when running alongside activesupport and
1447
+ fatal errors when requiring activesupport before sinatra
1448
+ [#178 / Brian Candler]
1449
+
1450
+ * Fix various issues running on Google AppEngine.
1451
+ [Samuel Goebert, Simon Rozet]
1452
+
1453
+ * Fix in-file templates __END__ detection when __END__ exists with
1454
+ other stuff on a line [Yoji Shidara]
1455
+
1456
+ ## 0.9.1.1 / 2009-03-09
1457
+
1458
+ * Fix directory traversal vulnerability in default static files
1459
+ route. See [#177] for more info.
1460
+
1461
+ ## 0.9.1 / 2009-03-01
1462
+
1463
+ * Sinatra now runs under Ruby 1.9.1 [#61]
1464
+
1465
+ * Route patterns (splats, :named, or Regexp captures) are now
1466
+ passed as arguments to the block. [#140]
1467
+
1468
+ * The "helpers" method now takes a variable number of modules
1469
+ along with the normal block syntax. [#133]
1470
+
1471
+ * New request-level #forward method for middleware components: passes
1472
+ the env to the downstream app and merges the response status, headers,
1473
+ and body into the current context. [#126]
1474
+
1475
+ * Requests are now automatically forwarded to the downstream app when
1476
+ running as middleware and no matching route is found or all routes
1477
+ pass.
1478
+
1479
+ * New simple API for extensions/plugins to add DSL-level and
1480
+ request-level methods. Use Sinatra.register(mixin) to extend
1481
+ the DSL with all public methods defined in the mixin module;
1482
+ use Sinatra.helpers(mixin) to make all public methods defined
1483
+ in the mixin module available at the request level. [#138]
1484
+ See http://www.sinatrarb.com/extensions.html for details.
1485
+
1486
+ * Named parameters in routes now capture the "." character. This makes
1487
+ routes like "/:path/:filename" match against requests like
1488
+ "/foo/bar.txt"; in this case, "params[:filename]" is "bar.txt".
1489
+ Previously, the route would not match at all.
1490
+
1491
+ * Added request-level "redirect back" to redirect to the referring
1492
+ URL.
1493
+
1494
+ * Added a new "clean_trace" option that causes backtraces dumped
1495
+ to rack.errors and displayed on the development error page to
1496
+ omit framework and core library backtrace lines. The option is
1497
+ enabled by default. [#77]
1498
+
1499
+ * The ERB output buffer is now available to helpers via the @_out_buf
1500
+ instance variable.
1501
+
1502
+ * It's now much easier to test sessions in unit tests by passing a
1503
+ ":session" option to any of the mock request methods. e.g.,
1504
+ get '/', {}, :session => { 'foo' => 'bar' }
1505
+
1506
+ * The testing framework specific files ('sinatra/test/spec',
1507
+ 'sinatra/test/bacon', 'sinatra/test/rspec', etc.) have been deprecated.
1508
+ See http://sinatrarb.com/testing.html for instructions on setting up
1509
+ a testing environment with these frameworks.
1510
+
1511
+ * The request-level #send_data method from Sinatra 0.3.3 has been added
1512
+ for compatibility but is deprecated.
1513
+
1514
+ * Fix :provides causing crash on any request when request has no
1515
+ Accept header [#139]
1516
+
1517
+ * Fix that ERB templates were evaluated twice per "erb" call.
1518
+
1519
+ * Fix app-level middleware not being run when the Sinatra application is
1520
+ run as middleware.
1521
+
1522
+ * Fixed some issues with running under Rack's CGI handler caused by
1523
+ writing informational stuff to stdout.
1524
+
1525
+ * Fixed that reloading was sometimes enabled when starting from a
1526
+ rackup file [#110]
1527
+
1528
+ * Fixed that "." in route patterns erroneously matched any character
1529
+ instead of a literal ".". [#124]
1530
+
1531
+ ## 0.9.0.4 / 2009-01-25
1532
+
1533
+ * Using halt with more than 1 args causes ArgumentError [#131]
1534
+ * using halt in a before filter doesn't modify response [#127]
1535
+ * Add deprecated Sinatra::EventContext to unbreak plugins [#130]
1536
+ * Give access to GET/POST params in filters [#129]
1537
+ * Preserve non-nested params in nested params hash [#117]
1538
+ * Fix backtrace dump with Rack::Lint [#116]
1539
+
1540
+ ## 0.9.0.3 / 2009-01-21
1541
+
1542
+ * Fall back on mongrel then webrick when thin not found. [#75]
1543
+ * Use :environment instead of :env in test helpers to
1544
+ fix deprecation warnings coming from framework.
1545
+ * Make sinatra/test/rspec work again [#113]
1546
+ * Fix app_file detection on windows [#118]
1547
+ * Fix static files with Rack::Lint in pipeline [#121]
1548
+
1549
+ ## 0.9.0.2 / 2009-01-18
1550
+
1551
+ * Halting a before block should stop processing of routes [#85]
1552
+ * Fix redirect/halt in before filters [#85]
1553
+
1554
+ ## 0.9.0 / 2009-01-18
1555
+
1556
+ * Works with and requires Rack >= 0.9.1
1557
+
1558
+ * Multiple Sinatra applications can now co-exist peacefully within a
1559
+ single process. The new "Sinatra::Base" class can be subclassed to
1560
+ establish a blank-slate Rack application or middleware component.
1561
+ Documentation on using these features is forth-coming; the following
1562
+ provides the basic gist: http://gist.github.com/38605
1563
+
1564
+ * Parameters with subscripts are now parsed into a nested/recursive
1565
+ Hash structure. e.g., "post[title]=Hello&post[body]=World" yields
1566
+ params: {'post' => {'title' => 'Hello', 'body' => 'World'}}.
1567
+
1568
+ * Regular expressions may now be used in route pattens; captures are
1569
+ available at "params[:captures]".
1570
+
1571
+ * New ":provides" route condition takes an array of mime types and
1572
+ matches only when an Accept request header is present with a
1573
+ corresponding type. [cypher]
1574
+
1575
+ * New request-level "pass" method; immediately exits the current block
1576
+ and passes control to the next matching route.
1577
+
1578
+ * The request-level "body" method now takes a block; evaluation is
1579
+ deferred until an attempt is made to read the body. The block must
1580
+ return a String or Array.
1581
+
1582
+ * New "route conditions" system for attaching rules for when a route
1583
+ matches. The :agent and :host route options now use this system.
1584
+
1585
+ * New "dump_errors" option controls whether the backtrace is dumped to
1586
+ rack.errors when an exception is raised from a route. The option is
1587
+ enabled by default for top-level apps.
1588
+
1589
+ * Better default "app_file", "root", "public", and "views" location
1590
+ detection; changes to "root" and "app_file" automatically cascade to
1591
+ other options that depend on them.
1592
+
1593
+ * Error mappings are now split into two distinct layers: exception
1594
+ mappings and custom error pages. Exception mappings are registered
1595
+ with "error(Exception)" and are run only when the app raises an
1596
+ exception. Custom error pages are registered with "error(status_code)",
1597
+ where "status_code" is an integer, and are run any time the response
1598
+ has the status code specified. It's also possible to register an error
1599
+ page for a range of status codes: "error(500..599)".
1600
+
1601
+ * In-file templates are now automatically imported from the file that
1602
+ requires 'sinatra'. The use_in_file_templates! method is still available
1603
+ for loading templates from other files.
1604
+
1605
+ * Sinatra's testing support is no longer dependent on Test::Unit. Requiring
1606
+ 'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness
1607
+ class, which can be used with any test framework. The 'sinatra/test/unit',
1608
+ 'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files
1609
+ can be required to setup a framework-specific testing environment. See the
1610
+ README for more information.
1611
+
1612
+ * Added support for Bacon (test framework). The 'sinatra/test/bacon' file
1613
+ can be required to setup Sinatra test helpers on Bacon::Context.
1614
+
1615
+ * Deprecated "set_option" and "set_options"; use "set" instead.
1616
+
1617
+ * Deprecated the "env" option ("options.env"); use "environment" instead.
1618
+
1619
+ * Deprecated the request level "stop" method; use "halt" instead.
1620
+
1621
+ * Deprecated the request level "entity_tag" method; use "etag" instead.
1622
+ Both "entity_tag" and "etag" were previously supported.
1623
+
1624
+ * Deprecated the request level "headers" method (HTTP response headers);
1625
+ use "response['Header-Name']" instead.
1626
+
1627
+ * Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
1628
+
1629
+ * Deprecated setting Sinatra.application = nil to reset an application.
1630
+ This should no longer be necessary.
1631
+
1632
+ * Deprecated "Sinatra.default_options"; use
1633
+ "Sinatra::Default.set(key, value)" instead.
1634
+
1635
+ * Deprecated the "ServerError" exception. All Exceptions are now
1636
+ treated as internal server errors and result in a 500 response
1637
+ status.
1638
+
1639
+ * Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it"
1640
+ test helper methods. Use "get", "post", "put", "delete", and "head",
1641
+ respectively, instead.
1642
+
1643
+ * Removed Event and EventContext classes. Applications are defined in a
1644
+ subclass of Sinatra::Base; each request is processed within an
1645
+ instance.
1646
+
1647
+ ## 0.3.3 / 2009-01-06
1648
+
1649
+ * Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
1650
+
1651
+ * Log unhandled exception backtraces to rack.errors.
1652
+
1653
+ * Use RACK_ENV environment variable to establish Sinatra
1654
+ environment when given. Thin sets this when started with
1655
+ the -e argument.
1656
+
1657
+ * BUG: raising Sinatra::NotFound resulted in a 500 response
1658
+ code instead of 404.
1659
+
1660
+ * BUG: use_in_file_templates! fails with CR/LF [#45]
1661
+
1662
+ * BUG: Sinatra detects the app file and root path when run under
1663
+ thin/passenger.
1664
+
1665
+ ## 0.3.2
1666
+
1667
+ * BUG: Static and send_file read entire file into String before
1668
+ sending. Updated to stream with 8K chunks instead.
1669
+
1670
+ * Rake tasks and assets for building basic documentation website.
1671
+ See http://sinatra.rubyforge.org
1672
+
1673
+ * Various minor doc fixes.
1674
+
1675
+ ## 0.3.1
1676
+
1677
+ * Unbreak optional path parameters [jeremyevans]
1678
+
1679
+ ## 0.3.0
1680
+
1681
+ * Add sinatra.gemspec w/ support for github gem builds. Forks can now
1682
+ enable the build gem option in github to get free username-sinatra.gem
1683
+ builds: gem install username-sinatra.gem --source=http://gems.github.com/
1684
+
1685
+ * Require rack-0.4 gem; removes frozen rack dir.
1686
+
1687
+ * Basic RSpec support; require 'sinatra/test/rspec' instead of
1688
+ 'sinatra/test/spec' to use. [avdi]
1689
+
1690
+ * before filters can modify request environment vars used for
1691
+ routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
1692
+ type functionality.
1693
+
1694
+ * In-file templates now uses @@ instead of ## as template separator.
1695
+
1696
+ * Top-level environment test predicates: development?, test?, production?
1697
+
1698
+ * Top-level "set", "enable", and "disable" methods for tweaking
1699
+ app options. [rtomayko]
1700
+
1701
+ * Top-level "use" method for building Rack middleware pipelines
1702
+ leading to app. See README for usage. [rtomayko]
1703
+
1704
+ * New "reload" option - set false to disable reloading in development.
1705
+
1706
+ * New "host" option - host/ip to bind to [cschneid]
1707
+
1708
+ * New "app_file" option - override the file to reload in development
1709
+ mode [cschneid]
1710
+
1711
+ * Development error/not_found page cleanup [sr, adamwiggins]
1712
+
1713
+ * Remove a bunch of core extensions (String#to_param, String#from_param,
1714
+ Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
1715
+
1716
+ * Various grammar and formatting fixes to README; additions on
1717
+ community and contributing [cypher]
1718
+
1719
+ * Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
1720
+
1721
+ * Specs, documentation and fixes for splat'n routes [vic]
1722
+
1723
+ * Fix whitespace errors across all source files. [rtomayko]
1724
+
1725
+ * Fix streaming issues with Mongrel (body not closed). [bmizerany]
1726
+
1727
+ * Fix various issues with environment not being set properly (configure
1728
+ blocks not running, error pages not registering, etc.) [cypher]
1729
+
1730
+ * Fix to allow locals to be passed to ERB templates [cschneid]
1731
+
1732
+ * Fix locking issues causing random errors during reload in development.
1733
+
1734
+ * Fix for escaped paths not resolving static files [Matthew Walker]
1735
+
1736
+ ## 0.2.1
1737
+
1738
+ * File upload fix and minor tweaks.
1739
+
1740
+ ## 0.2.0
1741
+
1742
+ * Initial gem release of 0.2 codebase.