sinatra-acd 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +5 -0
- data/AUTHORS +61 -0
- data/CHANGES +1293 -0
- data/Gemfile +76 -0
- data/LICENSE +23 -0
- data/README.de.md +2864 -0
- data/README.es.md +2786 -0
- data/README.fr.md +2924 -0
- data/README.hu.md +694 -0
- data/README.ja.md +2726 -0
- data/README.ko.md +2832 -0
- data/README.md +2980 -0
- data/README.pt-br.md +965 -0
- data/README.pt-pt.md +791 -0
- data/README.ru.md +2799 -0
- data/README.zh.md +2158 -0
- data/Rakefile +199 -0
- data/examples/chat.rb +61 -0
- data/examples/simple.rb +3 -0
- data/examples/stream.ru +26 -0
- data/lib/sinatra.rb +4 -0
- data/lib/sinatra/base.rb +2044 -0
- data/lib/sinatra/images/404.png +0 -0
- data/lib/sinatra/images/500.png +0 -0
- data/lib/sinatra/main.rb +34 -0
- data/lib/sinatra/show_exceptions.rb +345 -0
- data/lib/sinatra/version.rb +3 -0
- data/sinatra.gemspec +19 -0
- data/test/asciidoctor_test.rb +72 -0
- data/test/base_test.rb +171 -0
- data/test/builder_test.rb +91 -0
- data/test/coffee_test.rb +90 -0
- data/test/compile_test.rb +183 -0
- data/test/contest.rb +100 -0
- data/test/creole_test.rb +65 -0
- data/test/delegator_test.rb +160 -0
- data/test/encoding_test.rb +20 -0
- data/test/erb_test.rb +116 -0
- data/test/extensions_test.rb +98 -0
- data/test/filter_test.rb +487 -0
- data/test/haml_test.rb +109 -0
- data/test/helper.rb +131 -0
- data/test/helpers_test.rb +1917 -0
- data/test/integration/app.rb +79 -0
- data/test/integration_helper.rb +236 -0
- data/test/integration_test.rb +104 -0
- data/test/less_test.rb +69 -0
- data/test/liquid_test.rb +77 -0
- data/test/mapped_error_test.rb +285 -0
- data/test/markaby_test.rb +80 -0
- data/test/markdown_test.rb +82 -0
- data/test/mediawiki_test.rb +68 -0
- data/test/middleware_test.rb +68 -0
- data/test/nokogiri_test.rb +67 -0
- data/test/public/favicon.ico +0 -0
- data/test/rabl_test.rb +89 -0
- data/test/rack_test.rb +45 -0
- data/test/radius_test.rb +59 -0
- data/test/rdoc_test.rb +66 -0
- data/test/readme_test.rb +130 -0
- data/test/request_test.rb +97 -0
- data/test/response_test.rb +63 -0
- data/test/result_test.rb +76 -0
- data/test/route_added_hook_test.rb +59 -0
- data/test/routing_test.rb +1412 -0
- data/test/sass_test.rb +115 -0
- data/test/scss_test.rb +88 -0
- data/test/server_test.rb +48 -0
- data/test/settings_test.rb +582 -0
- data/test/sinatra_test.rb +12 -0
- data/test/slim_test.rb +102 -0
- data/test/static_test.rb +236 -0
- data/test/streaming_test.rb +149 -0
- data/test/stylus_test.rb +90 -0
- data/test/templates_test.rb +382 -0
- data/test/textile_test.rb +65 -0
- data/test/views/a/in_a.str +1 -0
- data/test/views/ascii.erb +2 -0
- data/test/views/b/in_b.str +1 -0
- data/test/views/calc.html.erb +1 -0
- data/test/views/error.builder +3 -0
- data/test/views/error.erb +3 -0
- data/test/views/error.haml +3 -0
- data/test/views/error.sass +2 -0
- data/test/views/explicitly_nested.str +1 -0
- data/test/views/foo/hello.test +1 -0
- data/test/views/hello.asciidoc +1 -0
- data/test/views/hello.builder +1 -0
- data/test/views/hello.coffee +1 -0
- data/test/views/hello.creole +1 -0
- data/test/views/hello.erb +1 -0
- data/test/views/hello.haml +1 -0
- data/test/views/hello.less +5 -0
- data/test/views/hello.liquid +1 -0
- data/test/views/hello.mab +1 -0
- data/test/views/hello.md +1 -0
- data/test/views/hello.mediawiki +1 -0
- data/test/views/hello.nokogiri +1 -0
- data/test/views/hello.rabl +2 -0
- data/test/views/hello.radius +1 -0
- data/test/views/hello.rdoc +1 -0
- data/test/views/hello.sass +2 -0
- data/test/views/hello.scss +3 -0
- data/test/views/hello.slim +1 -0
- data/test/views/hello.str +1 -0
- data/test/views/hello.styl +2 -0
- data/test/views/hello.test +1 -0
- data/test/views/hello.textile +1 -0
- data/test/views/hello.wlang +1 -0
- data/test/views/hello.yajl +1 -0
- data/test/views/layout2.builder +3 -0
- data/test/views/layout2.erb +2 -0
- data/test/views/layout2.haml +2 -0
- data/test/views/layout2.liquid +2 -0
- data/test/views/layout2.mab +2 -0
- data/test/views/layout2.nokogiri +3 -0
- data/test/views/layout2.rabl +3 -0
- data/test/views/layout2.radius +2 -0
- data/test/views/layout2.slim +3 -0
- data/test/views/layout2.str +2 -0
- data/test/views/layout2.test +1 -0
- data/test/views/layout2.wlang +2 -0
- data/test/views/nested.str +1 -0
- data/test/views/utf8.erb +2 -0
- data/test/wlang_test.rb +87 -0
- data/test/yajl_test.rb +86 -0
- metadata +280 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 14474ba8fbf4006ff68fef6a6bca660d28011035
|
4
|
+
data.tar.gz: 3bcbea634d57cc0abe1bf26daad5985fa88b8c17
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2a3ecdf32b446b05bc9e24ee79bbd6a114e3279b9dc5f8907a67ae0bd40e22368ee082ee21e117eb6c968c541a4cf07a42a8334f84b57aa06edbf8e5bd3437c4
|
7
|
+
data.tar.gz: 5d839a5457d745ef288b7d612d5a847145326da069c3d637da38e8ec2401b3517e68ced302fc55d77c3c8ae17f17d19099caf2805dc516efa57119204f67f75d
|
data/.yardopts
ADDED
data/AUTHORS
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
Sinatra was designed and developed by Blake Mizerany (bmizerany) in
|
2
|
+
California.
|
3
|
+
|
4
|
+
Sinatra would not have been possible without strong company backing.
|
5
|
+
In the past, financial and emotional support have been provided mainly by
|
6
|
+
[Heroku](http://heroku.com), [GitHub](http://github.com) and
|
7
|
+
[Engine Yard](http://www.engineyard.com/), and is now taken care of by
|
8
|
+
[Travis CI](http://travis-ci.com/).
|
9
|
+
|
10
|
+
Special thanks to the following extraordinary individuals, who-out which
|
11
|
+
Sinatra would not be possible:
|
12
|
+
|
13
|
+
* Ryan Tomayko (rtomayko) for constantly fixing whitespace errors 60d5006
|
14
|
+
* Ezra Zygmuntowicz (ezmobius) for initial help and letting Blake steal
|
15
|
+
some of merbs internal code.
|
16
|
+
* Ari Lerner (http://xnot.org/) for his evangelism, spirit, and gumption
|
17
|
+
that got Sinatra recognized from Day 1.
|
18
|
+
* Christopher Schneid (cschneid) for The Book, the blog (gittr.com),
|
19
|
+
irclogger.com, and a bunch of useful patches.
|
20
|
+
* Markus Prinz (cypher) for patches over the years, caring about
|
21
|
+
the README, and hanging in there when times were rough.
|
22
|
+
* Simon Rozet (sr) for a ton of doc patches, HAML options, and all that
|
23
|
+
advocacy stuff he's going to do for 1.0.
|
24
|
+
* Erik Kastner (kastner) for fixing `MIME_TYPES` under Rack 0.5.
|
25
|
+
* Ben Bleything (bleything) for caring about HTTP status codes and doc fixes.
|
26
|
+
* Igal Koshevoy (igal) for root path detection under Thin/Passenger.
|
27
|
+
* Jon Crosby (jcrosby) for coffee breaks, doc fixes, and just because, man.
|
28
|
+
* Karel Minarik (karmi) for screaming until the website came back up.
|
29
|
+
* Jeremy Evans (jeremyevans) for unbreaking optional path params (twice!)
|
30
|
+
* The GitHub guys for stealing Blake's table.
|
31
|
+
* Nickolas Means (nmeans) for Sass template support.
|
32
|
+
* Victor Hugo Borja (vic) for splat'n routes specs and doco.
|
33
|
+
* Avdi Grimm (avdi) for basic RSpec support.
|
34
|
+
* Jack Danger Canty for a more accurate root directory and for making me
|
35
|
+
watch [this](http://www.youtube.com/watch?v=ueaHLHgskkw) just now.
|
36
|
+
* Mathew Walker for making escaped paths work with static files.
|
37
|
+
* Millions of Us for having the problem that led to Sinatra's conception.
|
38
|
+
* Songbird for the problems that helped Sinatra's future become realized.
|
39
|
+
* Rick Olson (technoweenie) for the killer plug at RailsConf '08.
|
40
|
+
* Steven Garcia for the amazing custom artwork you see on 404's and 500's
|
41
|
+
* Pat Nakajima (nakajima) for fixing non-nested params in nested params Hash's.
|
42
|
+
* Konstantin Haase for his hard work and ongoing commitment to improving
|
43
|
+
Sinatra, for 1.1.0, 1.2.0 and beyond..
|
44
|
+
* Zachary Scott for adding Konstantin to the AUTHORS file. He also did help
|
45
|
+
writing the book, but mainly for adding Konstantin.
|
46
|
+
* Gabriel Andretta for having people wonder whether our documentation is
|
47
|
+
actually in English or in Spanish.
|
48
|
+
* Vasily Polovnyov, Nickolay Schwarz, Luciano Sousa, Wu Jiang, Mickael Riga,
|
49
|
+
Bernhard Essl, Janos Hardi, Kouhei Yanagita and "burningTyger" for willingly
|
50
|
+
translating whatever ends up in the README.
|
51
|
+
* [Wordy](http://www.wordy.com/) for proofreading our README. 73e137d
|
52
|
+
* cactus for digging through code and specs, multiple times.
|
53
|
+
* Nicolás Sanguinetti (foca) for strong demand of karma and shaping
|
54
|
+
helpers/register.
|
55
|
+
|
56
|
+
and last but not least:
|
57
|
+
|
58
|
+
* Frank Sinatra (chairman of the board) for having so much class he
|
59
|
+
deserves a web-framework named after him.
|
60
|
+
|
61
|
+
For a complete list of all contributors to Sinatra itself, run `rake authors`.
|
data/CHANGES
ADDED
@@ -0,0 +1,1293 @@
|
|
1
|
+
= 1.4.5 / 2014-04-08
|
2
|
+
|
3
|
+
* Improve tests and documentation. (Seiichi Yonezawa, Mike Gehard, Andrew
|
4
|
+
Deitrick, Matthew Nicholas Bradley, GoGo tanaka, Carlos Lazo, Shim Tw,
|
5
|
+
kyoendo, Roman Kuznietsov, Stanislav Chistenko, Ryunosuke SATO, Ben Lewis,
|
6
|
+
wuleicanada, Patricio Mac Adden, Thais Camilo)
|
7
|
+
|
8
|
+
* Fix Ruby warnings. (Vipul A M, Piotr Szotkowski)
|
9
|
+
|
10
|
+
* Fix template cache memory leak. (Scott Holden)
|
11
|
+
|
12
|
+
* Work around UTF-8 bug in JRuby. (namusyaka)
|
13
|
+
|
14
|
+
* Don't set charset for JSON mime-type (Sebastian Borrazas)
|
15
|
+
|
16
|
+
* Fix bug in request.accept? that might trigger a NoMethodError. (sbonami)
|
17
|
+
|
18
|
+
= 1.4.4 / 2013-10-21
|
19
|
+
|
20
|
+
* Allow setting layout to false specifically for a single rendering engine.
|
21
|
+
(Matt Wildig)
|
22
|
+
|
23
|
+
* Allow using wildcard in argument passed to `request.accept?`. (wilkie)
|
24
|
+
|
25
|
+
* Treat missing Accept header like wild card. (Patricio Mac Adden)
|
26
|
+
|
27
|
+
* Improve tests and documentation. (Darío Javier Cravero, Armen P., michelc,
|
28
|
+
Patricio Mac Adden, Matt Wildig, Vipul A M, utenmiki, George Timoschenko,
|
29
|
+
Diogo Scudelletti)
|
30
|
+
|
31
|
+
* Fix Ruby warnings. (Vipul A M, Patricio Mac Adden)
|
32
|
+
|
33
|
+
* Improve self-hosted server started by `run!` method or in classic mode.
|
34
|
+
(Tobias Bühlmann)
|
35
|
+
|
36
|
+
* Reduce objects allocated per request. (Vipul A M)
|
37
|
+
|
38
|
+
* Drop unused, undocumented options hash from Sinatra.new. (George Timoschenko)
|
39
|
+
|
40
|
+
* Keep Content-Length header when response is a `Rack::File` or when streaming.
|
41
|
+
(Patricio Mac Adden, George Timoschenko)
|
42
|
+
|
43
|
+
* Use reel if it's the only server available besides webrick. (Tobias Bühlmann)
|
44
|
+
|
45
|
+
* Add `disable :traps` so setting up signal traps for self hosted server can be
|
46
|
+
skipped. (George Timoschenko)
|
47
|
+
|
48
|
+
* The `status` option passed to `send_file` may now be a string. (George
|
49
|
+
Timoschenko)
|
50
|
+
|
51
|
+
* Reduce file size of dev mode images for 404 and 500 pages. (Francis Go)
|
52
|
+
|
53
|
+
= 1.4.3 / 2013-06-07
|
54
|
+
|
55
|
+
* Running a Sinatra file directly or via `run!` it will now ignore an
|
56
|
+
empty $PORT env variable. (noxqsgit)
|
57
|
+
|
58
|
+
* Improve documentation. (burningTyger, Patricio Mac Adden,
|
59
|
+
Konstantin Haase, Diogo Scudelletti, Dominic Imhof)
|
60
|
+
|
61
|
+
* Expose matched pattern as env["sinatra.route"]. (Aman Gupta)
|
62
|
+
|
63
|
+
* Fix warning on Ruby 2.0. (Craig Little)
|
64
|
+
|
65
|
+
* Improve running subset of tests in isolation. (Viliam Pucik)
|
66
|
+
|
67
|
+
* Reorder private/public methods. (Patricio Mac Adden)
|
68
|
+
|
69
|
+
* Loosen version dependency for rack, so it runs with Rails 3.2.
|
70
|
+
(Konstantin Haase)
|
71
|
+
|
72
|
+
* Request#accept? now returns true instead of a truthy value. (Alan Harris)
|
73
|
+
|
74
|
+
= 1.4.2 / 2013-03-21
|
75
|
+
|
76
|
+
* Fix parsing error for case where both the pattern and the captured part
|
77
|
+
contain a dot. (Florian Hanke, Konstantin Haase)
|
78
|
+
|
79
|
+
* Missing Accept header is treated like */*. (Greg Denton)
|
80
|
+
|
81
|
+
* Improve documentation. (Patricio Mac Adden, Joe Bottigliero)
|
82
|
+
|
83
|
+
= 1.4.1 / 2013-03-15
|
84
|
+
|
85
|
+
* Make delegated methods available in config.ru (Konstantin Haase)
|
86
|
+
|
87
|
+
= 1.4.0 / 2013-03-15
|
88
|
+
|
89
|
+
* Add support for LINK and UNLINK requests. (Konstantin Haase)
|
90
|
+
|
91
|
+
* Add support for Yajl templates. (Jamie Hodge)
|
92
|
+
|
93
|
+
* Add support for Rabl templates. (Jesse Cooke)
|
94
|
+
|
95
|
+
* Add support for Wlang templates. (Bernard Lambeau)
|
96
|
+
|
97
|
+
* Add support for Stylus templates. (Juan David Pastas, Konstantin Haase)
|
98
|
+
|
99
|
+
* You can now pass a block to ERb, Haml, Slim, Liquid and Wlang templates,
|
100
|
+
which will be used when calling `yield` in the template. (Alexey Muranov)
|
101
|
+
|
102
|
+
* When running in classic mode, no longer include Sinatra::Delegator in Object,
|
103
|
+
instead extend the main object only. (Konstantin Haase)
|
104
|
+
|
105
|
+
* Improved route parsing: "/:name.?:format?" with "/foo.png" now matches to
|
106
|
+
{name: "foo", format: "png"} instead of {name: "foo.png"}. (Florian Hanke)
|
107
|
+
|
108
|
+
* Add :status option support to send_file. (Konstantin Haase)
|
109
|
+
|
110
|
+
* The `provides` condition now respects an earlier set content type.
|
111
|
+
(Konstantin Haase)
|
112
|
+
|
113
|
+
* Exception#code is only used when :use_code is enabled. Moreover, it will
|
114
|
+
be ignored if the value is not between 400 and 599. You should use
|
115
|
+
Exception#http_status instead. (Konstantin Haase)
|
116
|
+
|
117
|
+
* Status, headers and body will be set correctly in an after filter when using
|
118
|
+
halt in a before filter or route. (Konstantin Haase)
|
119
|
+
|
120
|
+
* Sinatra::Base.new now returns a Sinatra::Wrapper instance, exposing
|
121
|
+
#settings and #helpers, yet going through the middleware stack on #call.
|
122
|
+
It also implements a nice #inspect, so it plays nice with Rails' `rake
|
123
|
+
routes`. (Konstantin Haase)
|
124
|
+
|
125
|
+
* In addition to WebRick, Thin and Mongrel, Sinatra will now automatically pick
|
126
|
+
up Puma, Trinidad, ControlTower or Net::HTTP::Server when installed. The
|
127
|
+
logic for picking the server has been improved and now depends on the Ruby
|
128
|
+
implementation used. (Mark Rada, Konstantin Haase, Patricio Mac Adden)
|
129
|
+
|
130
|
+
* "Sinatra doesn't know this ditty" pages now show the app class when running
|
131
|
+
a modular application. This helps detecting where the response came from when
|
132
|
+
combining multiple modular apps. (Konstantin Haase)
|
133
|
+
|
134
|
+
* When port is not set explicitly, use $PORT env variable if set and only
|
135
|
+
default to 4567 if not. Plays nice with foreman. (Konstantin Haase)
|
136
|
+
|
137
|
+
* Allow setting layout on a per engine basis. (Zachary Scott, Konstantin Haase)
|
138
|
+
|
139
|
+
* You can now use `register` directly in a classic app. (Konstantin Haase)
|
140
|
+
|
141
|
+
* `redirect` now accepts URI or Addressable::URI instances. (Nicolas
|
142
|
+
Sanguinetti)
|
143
|
+
|
144
|
+
* Have Content-Disposition header also include file name for `inline`, not
|
145
|
+
just for `attachment`. (Konstantin Haase)
|
146
|
+
|
147
|
+
* Better compatibility to Rack 1.5. (James Tucker, Konstantin Haase)
|
148
|
+
|
149
|
+
* Make route parsing regex more robust. (Zoltan Dezso, Konstantin Haase)
|
150
|
+
|
151
|
+
* Improve Accept header parsing, expose parameters. (Pieter van de Bruggen,
|
152
|
+
Konstantin Haase)
|
153
|
+
|
154
|
+
* Add `layout_options` render option. Allows you, amongst other things, to
|
155
|
+
render a layout from a different folder. (Konstantin Haase)
|
156
|
+
|
157
|
+
* Explicitly setting `layout` to `nil` is treated like setting it to `false`.
|
158
|
+
(richo)
|
159
|
+
|
160
|
+
* Properly escape attributes in Content-Type header. (Pieter van de Bruggen)
|
161
|
+
|
162
|
+
* Default to only serving localhost in development mode. (Postmodern)
|
163
|
+
|
164
|
+
* Setting status code to 404 in error handler no longer triggers not_found
|
165
|
+
handler. (Konstantin Haase)
|
166
|
+
|
167
|
+
* The `protection` option now takes a `session` key for force
|
168
|
+
disabling/enabling session based protections. (Konstantin Haase)
|
169
|
+
|
170
|
+
* Add `x_cascade` option to disable `X-Cascade` header on missing route.
|
171
|
+
(Konstantin Haase)
|
172
|
+
|
173
|
+
* Improve documentation. (Kashyap, Stanislav Chistenko, Zachary Scott,
|
174
|
+
Anthony Accomazzo, Peter Suschlik, Rachel Mehl, ymmtmsys, Anurag Priyam,
|
175
|
+
burningTyger, Tony Miller, akicho8, Vasily Polovnyov, Markus Prinz,
|
176
|
+
Alexey Muranov, Erik Johnson, Vipul A M, Konstantin Haase)
|
177
|
+
|
178
|
+
* Convert documentation to Markdown. (Kashyap, Robin Dupret, burningTyger,
|
179
|
+
Vasily Polovnyov, Iain Barnett, Giuseppe Capizzi, Neil West)
|
180
|
+
|
181
|
+
* Don't set not_found content type to HTML in development mode with custom
|
182
|
+
not_found handler. (Konstantin Haase)
|
183
|
+
|
184
|
+
* Fix mixed indentation for private methods. (Robin Dupret)
|
185
|
+
|
186
|
+
* Recalculate Content-Length even if hard coded if body is reset. Relevant
|
187
|
+
mostly for error handlers. (Nathan Esquenazi, Konstantin Haase)
|
188
|
+
|
189
|
+
* Plus sign is once again kept as such when used for URL matches. (Konstantin
|
190
|
+
Haase)
|
191
|
+
|
192
|
+
* Take views option into account for template caching. (Konstantin Haase)
|
193
|
+
|
194
|
+
* Consistent use of `headers` instead of `header` internally. (Patricio Mac Adden)
|
195
|
+
|
196
|
+
* Fix compatibility to RDoc 4. (Bohuslav Kabrda)
|
197
|
+
|
198
|
+
* Make chat example work with latest jQuery. (loveky, Tony Miller)
|
199
|
+
|
200
|
+
* Make tests run without warnings. (Patricio Mac Adden)
|
201
|
+
|
202
|
+
* Make sure value returned by `mime_type` is a String or nil, even when a
|
203
|
+
different object is passed in, like an AcceptEntry. (Konstantin Haase)
|
204
|
+
|
205
|
+
* Exceptions in `after` filter are now handled like any other exception.
|
206
|
+
(Nathan Esquenazi)
|
207
|
+
|
208
|
+
= 1.3.6 (backport release) / 2013-03-15
|
209
|
+
|
210
|
+
Backported from 1.4.0:
|
211
|
+
|
212
|
+
* Take views option into account for template caching. (Konstantin Haase)
|
213
|
+
|
214
|
+
* Improve documentation (Konstantin Haase)
|
215
|
+
|
216
|
+
* No longer override `define_singleton_method`. (Konstantin Haase)
|
217
|
+
|
218
|
+
= 1.3.5 / 2013-02-25
|
219
|
+
|
220
|
+
* Fix for RubyGems 2.0 (Uchio KONDO)
|
221
|
+
|
222
|
+
* Improve documentation (Konstantin Haase)
|
223
|
+
|
224
|
+
* No longer override `define_singleton_method`. (Konstantin Haase)
|
225
|
+
|
226
|
+
= 1.3.4 / 2013-01-26
|
227
|
+
|
228
|
+
* Improve documentation. (Kashyap, Stanislav Chistenko, Konstantin Haase,
|
229
|
+
ymmtmsys, Anurag Priyam)
|
230
|
+
|
231
|
+
* Adjustments to template system to work with Tilt edge. (Konstantin Haase)
|
232
|
+
|
233
|
+
* Fix streaming with latest Rack release. (Konstantin Haase)
|
234
|
+
|
235
|
+
* Fix default content type for Sinatra::Response with latest Rack release.
|
236
|
+
(Konstantin Haase)
|
237
|
+
|
238
|
+
* Fix regression where + was no longer treated like space. (Ross Boucher)
|
239
|
+
|
240
|
+
* Status, headers and body will be set correctly in an after filter when using
|
241
|
+
halt in a before filter or route. (Konstantin Haase)
|
242
|
+
|
243
|
+
= 1.3.3 / 2012-08-19
|
244
|
+
|
245
|
+
* Improved documentation. (burningTyger, Konstantin Haase, Gabriel Andretta,
|
246
|
+
Anurag Priyam, michelc)
|
247
|
+
|
248
|
+
* No longer modify the load path. (Konstantin Haase)
|
249
|
+
|
250
|
+
* When keeping a stream open, set up callback/errback correctly to deal with
|
251
|
+
clients closing the connection. (Konstantin Haase)
|
252
|
+
|
253
|
+
* Fix bug where having a query param and a URL param by the same name would
|
254
|
+
concatenate the two values. (Konstantin Haase)
|
255
|
+
|
256
|
+
* Prevent duplicated log output when application is already wrapped in a
|
257
|
+
`Rack::CommonLogger`. (Konstantin Haase)
|
258
|
+
|
259
|
+
* Fix issue where `Rack::Link` and Rails were preventing indefinite streaming.
|
260
|
+
(Konstantin Haase)
|
261
|
+
|
262
|
+
* No longer cause warnings when running Ruby with `-w`. (Konstantin Haase)
|
263
|
+
|
264
|
+
* HEAD requests on static files no longer report a Content-Length of 0, but
|
265
|
+
instead the proper length. (Konstantin Haase)
|
266
|
+
|
267
|
+
* When protecting against CSRF attacks, drop the session instead of refusing
|
268
|
+
the request. (Konstantin Haase)
|
269
|
+
|
270
|
+
= 1.3.2 / 2011-12-30
|
271
|
+
|
272
|
+
* Don't automatically add `Rack::CommonLogger` if `Rack::Server` is adding it,
|
273
|
+
too. (Konstantin Haase)
|
274
|
+
|
275
|
+
* Setting `logging` to `nil` will avoid setting up `Rack::NullLogger`.
|
276
|
+
(Konstantin Haase)
|
277
|
+
|
278
|
+
* Route specific params are now available in the block passed to #stream.
|
279
|
+
(Konstantin Haase)
|
280
|
+
|
281
|
+
* Fix bug where rendering a second template in the same request, after the
|
282
|
+
first one raised an exception, skipped the default layout. (Nathan Baum)
|
283
|
+
|
284
|
+
* Fix bug where parameter escaping got enabled when disabling a different
|
285
|
+
protection. (Konstantin Haase)
|
286
|
+
|
287
|
+
* Fix regression: Filters without a pattern may now again manipulate the params
|
288
|
+
hash. (Konstantin Haase)
|
289
|
+
|
290
|
+
* Added examples directory. (Konstantin Haase)
|
291
|
+
|
292
|
+
* Improved documentation. (Gabriel Andretta, Markus Prinz, Erick Zetta, Just
|
293
|
+
Lest, Adam Vaughan, Aleksander Dąbrowski)
|
294
|
+
|
295
|
+
* Improved MagLev support. (Tim Felgentreff)
|
296
|
+
|
297
|
+
= 1.3.1 / 2011-10-05
|
298
|
+
|
299
|
+
* Support adding more than one callback to the stream object. (Konstantin
|
300
|
+
Haase)
|
301
|
+
|
302
|
+
* Fix for infinite loop when streaming on 1.9.2 with Thin from a modular
|
303
|
+
application (Konstantin Haase)
|
304
|
+
|
305
|
+
= 1.3.0 / 2011-09-30
|
306
|
+
|
307
|
+
* Added `stream` helper method for easily creating streaming APIs, Server
|
308
|
+
Sent Events or even WebSockets. See README for more on that topic.
|
309
|
+
(Konstantin Haase)
|
310
|
+
|
311
|
+
* If a HTTP 1.1 client is redirected from a different verb than GET, use 303
|
312
|
+
instead of 302 by default. You may still pass 302 explicitly. Fixes AJAX
|
313
|
+
redirects in Internet Explorer 9 (to be fair, everyone else is doing it
|
314
|
+
wrong and IE is behaving correct). (Konstantin Haase)
|
315
|
+
|
316
|
+
* Added support for HTTP PATCH requests. (Konstantin Haase)
|
317
|
+
|
318
|
+
* Use rack-protection to defend against common opportunistic attacks.
|
319
|
+
(Josh Lane, Jacob Burkhart, Konstantin Haase)
|
320
|
+
|
321
|
+
* Support for Creole templates, Creole is a standardized wiki markup,
|
322
|
+
supported by many wiki implementations. (Konstanin Haase)
|
323
|
+
|
324
|
+
* The `erubis` method has been deprecated. If Erubis is available, Sinatra
|
325
|
+
will automatically use it for rendering ERB templates. `require 'erb'`
|
326
|
+
explicitly to prevent that behavior. (Magnus Holm, Ryan Tomayko, Konstantin
|
327
|
+
Haase)
|
328
|
+
|
329
|
+
* Patterns now match against the escaped URLs rather than the unescaped
|
330
|
+
version. This makes Sinatra confirm with RFC 2396 section 2.2 and RFC 2616
|
331
|
+
section 3.2.3 (escaped reserved characters should not be treated like the
|
332
|
+
unescaped version), meaning that "/:name" will also match `/foo%2Fbar`, but
|
333
|
+
not `/foo/bar`. To avoid incompatibility, pattern matching has been
|
334
|
+
adjusted. Moreover, since we do no longer need to keep an unescaped version
|
335
|
+
of path_info around, we handle all changes to `env['PATH_INFO']` correctly.
|
336
|
+
(Konstantin Haase)
|
337
|
+
|
338
|
+
* `settings.app_file` now defaults to the file subclassing `Sinatra::Base` in
|
339
|
+
modular applications. (Konstantin Haase)
|
340
|
+
|
341
|
+
* Set up `Rack::Logger` or `Rack::NullLogger` depending on whether logging
|
342
|
+
was enabled or not. Also, expose that logger with the `logger` helper
|
343
|
+
method. (Konstantin Haase)
|
344
|
+
|
345
|
+
* The sessions setting may be an options hash now. (Konstantin Haase)
|
346
|
+
|
347
|
+
* Important: Ruby 1.8.6 support has been dropped. This version also depends
|
348
|
+
on at least Rack 1.3.0. This means that it is incompatible with Rails prior
|
349
|
+
to 3.1.0. Please use 1.2.x if you require an earlier version of Ruby or
|
350
|
+
Rack, which we will continue to supply with bug fixes. (Konstantin Haase)
|
351
|
+
|
352
|
+
* Renamed `:public` to `:public_folder` to avoid overriding Ruby's built-in
|
353
|
+
`public` method/keyword. `set(:public, ...)` is still possible but shows a
|
354
|
+
warning. (Konstantin Haase)
|
355
|
+
|
356
|
+
* It is now possible to use a different target class for the top level DSL
|
357
|
+
(aka classic style) than `Sinatra::Application` by setting
|
358
|
+
`Delegator.target`. This was mainly introduced to ease testing. (Konstantin
|
359
|
+
Haase)
|
360
|
+
|
361
|
+
* Error handlers defined for an error class will now also handle subclasses
|
362
|
+
of that class, unless more specific error handlers exist. (Konstantin
|
363
|
+
Haase)
|
364
|
+
|
365
|
+
* Error handling respects Exception#code, again. (Konstantin Haase)
|
366
|
+
|
367
|
+
* Changing a setting will merge hashes: `set(:x, :a => 1); set(:x :b => 2)`
|
368
|
+
will result in `{:a => 1, :b => 2}`. Use `set(:x, {:a => 1}, true)` to
|
369
|
+
avoid this behavior. (Konstantin Haase)
|
370
|
+
|
371
|
+
* Added `request.accept?` and `request.preferred_type` to ease dealing with
|
372
|
+
`Accept` headers. (Konstantin Haase)
|
373
|
+
|
374
|
+
* Added `:static_cache_control` setting to automatically set cache control
|
375
|
+
headers to static files. (Kenichi Nakamura)
|
376
|
+
|
377
|
+
* Added `informal?`, `success?`, `redirect?`, `client_error?`,
|
378
|
+
`server_error?` and `not_found?` helper methods to ease dealing with status
|
379
|
+
codes. (Konstantin Haase)
|
380
|
+
|
381
|
+
* Uses SecureRandom to generate default session secret. (Konstantin Haase)
|
382
|
+
|
383
|
+
* The `attachment` helper will set Content-Type (if it hasn't been set yet)
|
384
|
+
depending on the supplied file name. (Vasiliy Ermolovich)
|
385
|
+
|
386
|
+
* Conditional requests on `etag` helper now work properly for unsafe HTTP
|
387
|
+
methods. (Matthew Schinckel, Konstantin Haase)
|
388
|
+
|
389
|
+
* The `last_modified` helper does not stop execution and change the status code
|
390
|
+
if the status code is something different than 200. (Konstantin Haase)
|
391
|
+
|
392
|
+
* Added support for If-Unmodified-Since header. (Konstantin Haase)
|
393
|
+
|
394
|
+
* `Sinatra::Base.run!` now prints to stderr rather than stdout. (Andrew
|
395
|
+
Armenia)
|
396
|
+
|
397
|
+
* `Sinatra::Base.run!` takes a block allowing access to the Rack handler.
|
398
|
+
(David Waite)
|
399
|
+
|
400
|
+
* Automatic `app_file` detection now works in directories containing brackets
|
401
|
+
(Konstantin Haase)
|
402
|
+
|
403
|
+
* Exception objects are now passed to error handlers. (Konstantin Haase)
|
404
|
+
|
405
|
+
* Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori
|
406
|
+
Ishikawa, Konstantin Haase)
|
407
|
+
|
408
|
+
* Also specify charset in Content-Type header for JSON. (Konstantin Haase)
|
409
|
+
|
410
|
+
* Rack handler names will not be converted to lower case internally, this
|
411
|
+
allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2.
|
412
|
+
Example: `ruby app.rb -s Mongrel2` (Konstantin Haase)
|
413
|
+
|
414
|
+
* Ignore `to_ary` on response bodies. Fixes compatibility to Rails 3.1.
|
415
|
+
(Konstantin Haase)
|
416
|
+
|
417
|
+
* Middleware setup is now distributed across multiple methods, allowing
|
418
|
+
Sinatra extensions to easily hook into the setup process. (Konstantin
|
419
|
+
Haase)
|
420
|
+
|
421
|
+
* Internal refactoring and minor performance improvements. (Konstantin Haase)
|
422
|
+
|
423
|
+
* Move Sinatra::VERSION to separate file, so it can be checked without
|
424
|
+
loading Sinatra. (Konstantin Haase)
|
425
|
+
|
426
|
+
* Command line options now complain if value passed to `-p` is not a valid
|
427
|
+
integer. (Konstantin Haase)
|
428
|
+
|
429
|
+
* Fix handling of broken query params when displaying exceptions. (Luke
|
430
|
+
Jahnke)
|
431
|
+
|
432
|
+
= 1.2.9 (backports release) / 2013-03-15
|
433
|
+
|
434
|
+
IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
|
435
|
+
|
436
|
+
* Display EOL warning when loading Sinatra. (Konstantin Haase)
|
437
|
+
|
438
|
+
* Improve documentation. (Anurag Priyam, Konstantin Haase)
|
439
|
+
|
440
|
+
* Do not modify the load path. (Konstantin Haase)
|
441
|
+
|
442
|
+
* Display deprecation warning if RUBY_IGNORE_CALLERS is used. (Konstantin Haase)
|
443
|
+
|
444
|
+
* Add backports library so we can still run on Ruby 1.8.6. (Konstantin Haase)
|
445
|
+
|
446
|
+
= 1.2.8 (backports release) / 2011-12-30
|
447
|
+
|
448
|
+
Backported from 1.3.2:
|
449
|
+
|
450
|
+
* Fix bug where rendering a second template in the same request after the
|
451
|
+
first one raised an exception skipped the default layout (Nathan Baum)
|
452
|
+
|
453
|
+
= 1.2.7 (backports release) / 2011-09-30
|
454
|
+
|
455
|
+
Custom changes:
|
456
|
+
|
457
|
+
* Fix Ruby 1.8.6 issue with Accept header parsing. (Konstantin Haase)
|
458
|
+
|
459
|
+
Backported from 1.3.0:
|
460
|
+
|
461
|
+
* Ignore `to_ary` on response bodies. Fixes compatibility to Rails 3.1.
|
462
|
+
(Konstantin Haase)
|
463
|
+
|
464
|
+
* `Sinatra.run!` now prints to stderr rather than stdout. (Andrew Armenia)
|
465
|
+
|
466
|
+
* Automatic `app_file` detection now works in directories containing brackets
|
467
|
+
(Konstantin Haase)
|
468
|
+
|
469
|
+
* Improved documentation. (Emanuele Vicentini, Peter Higgins, Takanori
|
470
|
+
Ishikawa, Konstantin Haase)
|
471
|
+
|
472
|
+
* Also specify charset in Content-Type header for JSON. (Konstantin Haase)
|
473
|
+
|
474
|
+
* Rack handler names will not be converted to lower case internally, this
|
475
|
+
allows you to run Sinatra with custom Rack handlers, like Kirk or Mongrel2.
|
476
|
+
Example: `ruby app.rb -s Mongrel2` (Konstantin Haase)
|
477
|
+
|
478
|
+
* Fix uninitialized instance variable warning. (David Kellum)
|
479
|
+
|
480
|
+
* Command line options now complain if value passed to `-p` is not a valid
|
481
|
+
integer. (Konstantin Haase)
|
482
|
+
|
483
|
+
* Fix handling of broken query params when displaying exceptions. (Luke
|
484
|
+
Jahnke)
|
485
|
+
|
486
|
+
= 1.2.6 / 2011-05-01
|
487
|
+
|
488
|
+
* Fix broken delegation, backport delegation tests from Sinatra 1.3.
|
489
|
+
(Konstantin Haase)
|
490
|
+
|
491
|
+
= 1.2.5 / 2011-04-30
|
492
|
+
|
493
|
+
* Restore compatibility with Ruby 1.8.6. (Konstantin Haase)
|
494
|
+
|
495
|
+
= 1.2.4 / 2011-04-30
|
496
|
+
|
497
|
+
* Sinatra::Application (classic style) does not use a session secret in
|
498
|
+
development mode, so sessions are not invalidated after every request when
|
499
|
+
using Shotgun. (Konstantin Haase)
|
500
|
+
|
501
|
+
* The request object was shared between multiple Sinatra instances in the
|
502
|
+
same middleware chain. This caused issues if any non-sinatra routing
|
503
|
+
happend in-between two of those instances, or running a request twice
|
504
|
+
against an application (described in the README). The caching was reverted.
|
505
|
+
See GH#239 and GH#256 for more infos. (Konstantin Haase)
|
506
|
+
|
507
|
+
* Fixes issues where the top level DSL was interfering with method_missing
|
508
|
+
proxies. This issue surfaced when Rails 3 was used with older Sass versions
|
509
|
+
and Sinatra >= 1.2.0. (Konstantin Haase)
|
510
|
+
|
511
|
+
* Sinatra::Delegator.delegate is now able to delegate any method names, even
|
512
|
+
those containing special characters. This allows better integration into
|
513
|
+
other programming languages on Rubinius (probably on the JVM, too), like
|
514
|
+
Fancy. (Konstantin Haase)
|
515
|
+
|
516
|
+
* Remove HEAD request logic and let Rack::Head handle it instead. (Paolo
|
517
|
+
"Nusco" Perrotta)
|
518
|
+
|
519
|
+
= 1.2.3 / 2011-04-13
|
520
|
+
|
521
|
+
* This release is compatible with Tilt 1.3, it will still work with Tilt 1.2.2,
|
522
|
+
however, if you want to use a newer Tilt version, you have to upgrade to at
|
523
|
+
least this version of Sinatra. (Konstantin Haase)
|
524
|
+
|
525
|
+
* Helpers dealing with time, like `expires`, handle objects that pretend to be
|
526
|
+
numbers, like `ActiveSupport::Duration`, better. (Konstantin Haase)
|
527
|
+
|
528
|
+
= 1.2.2 / 2011-04-08
|
529
|
+
|
530
|
+
* The `:provides => :js` condition now matches both `application/javascript`
|
531
|
+
and `text/javascript`. The `:provides => :xml` condition now matches both
|
532
|
+
`application/xml` and `text/xml`. The `Content-Type` header is set
|
533
|
+
accordingly. If the client accepts both, the `application/*` version is
|
534
|
+
preferred, since the `text/*` versions are deprecated. (Konstantin Haase)
|
535
|
+
|
536
|
+
* The `provides` condition now handles wildcards in `Accept` headers correctly.
|
537
|
+
Thus `:provides => :html` matches `text/html`, `text/*` and `*/*`.
|
538
|
+
(Konstantin Haase)
|
539
|
+
|
540
|
+
* When parsing `Accept` headers, `Content-Type` preferences are honored
|
541
|
+
according to RFC 2616 section 14.1. (Konstantin Haase)
|
542
|
+
|
543
|
+
* URIs passed to the `url` helper or `redirect` may now use any schema to be
|
544
|
+
identified as absolute URIs, not only `http` or `https`. (Konstantin Haase)
|
545
|
+
|
546
|
+
* Handles `Content-Type` strings that already contain parameters correctly in
|
547
|
+
`content_type` (example: `content_type "text/plain; charset=utf-16"`).
|
548
|
+
(Konstantin Haase)
|
549
|
+
|
550
|
+
* If a route with an empty pattern is defined (`get("") { ... }`) requests with
|
551
|
+
an empty path info match this route instead of "/". (Konstantin Haase)
|
552
|
+
|
553
|
+
* In development environment, when running under a nested path, the image URIs
|
554
|
+
on the error pages are set properly. (Konstantin Haase)
|
555
|
+
|
556
|
+
= 1.2.1 / 2011-03-17
|
557
|
+
|
558
|
+
* Use a generated session secret when using `enable :sessions`. (Konstantin
|
559
|
+
Haase)
|
560
|
+
|
561
|
+
* Fixed a bug where the wrong content type was used if no content type was set
|
562
|
+
and a template engine was used with a different engine for the layout with
|
563
|
+
different default content types, say Less embedded in Slim. (Konstantin
|
564
|
+
Haase)
|
565
|
+
|
566
|
+
* README translations improved (Gabriel Andretta, burningTyger, Sylvain Desvé,
|
567
|
+
Gregor Schmidt)
|
568
|
+
|
569
|
+
= 1.2.0 / 2011-03-03
|
570
|
+
|
571
|
+
* Added `slim` rendering method for rendering Slim templates. (Steve
|
572
|
+
Hodgkiss)
|
573
|
+
|
574
|
+
* The `markaby` rendering method now allows passing a block, making inline
|
575
|
+
usage possible. Requires Tilt 1.2 or newer. (Konstantin Haase)
|
576
|
+
|
577
|
+
* All render methods now take a `:layout_engine` option, allowing to use a
|
578
|
+
layout in a different template language. Even more useful than using this
|
579
|
+
directly (`erb :index, :layout_engine => :haml`) is setting this globally for
|
580
|
+
a template engine that otherwise does not support layouts, like Markdown or
|
581
|
+
Textile (`set :markdown, :layout_engine => :erb`). (Konstantin Haase)
|
582
|
+
|
583
|
+
* Before and after filters now support conditions, both with and without
|
584
|
+
patterns (`before '/api/*', :agent => /Songbird/`). (Konstantin Haase)
|
585
|
+
|
586
|
+
* Added a `url` helper method which constructs absolute URLs. Copes with
|
587
|
+
reverse proxies and Rack handlers correctly. Aliased to `to`, so you can
|
588
|
+
write `redirect to('/foo')`. (Konstantin Haase)
|
589
|
+
|
590
|
+
* If running on 1.9, patterns for routes and filters now support named
|
591
|
+
captures: `get(%r{/hi/(?<name>[^/?#]+)}) { "Hi #{params['name']}" }`.
|
592
|
+
(Steve Price)
|
593
|
+
|
594
|
+
* All rendering methods now take a `:scope` option, which renders them in
|
595
|
+
another context. Note that helpers and instance variables will be
|
596
|
+
unavailable if you use this feature. (Paul Walker)
|
597
|
+
|
598
|
+
* The behavior of `redirect` can now be configured with `absolute_redirects`
|
599
|
+
and `prefixed_redirects`. (Konstantin Haase)
|
600
|
+
|
601
|
+
* `send_file` now allows overriding the Last-Modified header, which defaults
|
602
|
+
to the file's mtime, by passing a `:last_modified` option. (Konstantin Haase)
|
603
|
+
|
604
|
+
* You can use your own template lookup method by defining `find_template`.
|
605
|
+
This allows, among other things, using more than one views folder.
|
606
|
+
(Konstantin Haase)
|
607
|
+
|
608
|
+
* Largely improved documentation. (burningTyger, Vasily Polovnyov, Gabriel
|
609
|
+
Andretta, Konstantin Haase)
|
610
|
+
|
611
|
+
* Improved error handling. (cactus, Konstantin Haase)
|
612
|
+
|
613
|
+
* Skip missing template engines in tests correctly. (cactus)
|
614
|
+
|
615
|
+
* Sinatra now ships with a Gemfile for development dependencies, since it eases
|
616
|
+
supporting different platforms, like JRuby. (Konstantin Haase)
|
617
|
+
|
618
|
+
= 1.1.4 (backports release) / 2011-04-13
|
619
|
+
|
620
|
+
* Compatible with Tilt 1.3. (Konstantin Haase)
|
621
|
+
|
622
|
+
= 1.1.3 / 2011-02-20
|
623
|
+
|
624
|
+
* Fixed issues with `user_agent` condition if the user agent header is missing.
|
625
|
+
(Konstantin Haase)
|
626
|
+
|
627
|
+
* Fix some routing tests that have been skipped by accident (Ross A. Baker)
|
628
|
+
|
629
|
+
* Fix rendering issues with Builder and Nokogiri (Konstantin Haase)
|
630
|
+
|
631
|
+
* Replace last_modified helper with better implementation. (cactus,
|
632
|
+
Konstantin Haase)
|
633
|
+
|
634
|
+
* Fix issue with charset not being set when using `provides` condition.
|
635
|
+
(Konstantin Haase)
|
636
|
+
|
637
|
+
* Fix issue with `render` not picking up all alternative file extensions for
|
638
|
+
a rendering engine - it was not possible to register ".html.erb" without
|
639
|
+
tricks. (Konstantin Haase)
|
640
|
+
|
641
|
+
= 1.1.2 / 2010-10-25
|
642
|
+
|
643
|
+
Like 1.1.1, but with proper CHANGES file.
|
644
|
+
|
645
|
+
= 1.1.1 / 2010-10-25
|
646
|
+
|
647
|
+
* README has been translated to Russian (Nickolay Schwarz, Vasily Polovnyov)
|
648
|
+
and Portuguese (Luciano Sousa).
|
649
|
+
|
650
|
+
* Nested templates without a `:layout` option can now be used from the layout
|
651
|
+
template without causing an infinite loop. (Konstantin Haase)
|
652
|
+
|
653
|
+
* Inline templates are now encoding aware and can therefore be used with
|
654
|
+
unicode characters on Ruby 1.9. Magic comments at the beginning of the file
|
655
|
+
will be honored. (Konstantin Haase)
|
656
|
+
|
657
|
+
* Default `app_file` is set correctly when running with bundler. Using
|
658
|
+
bundler caused Sinatra not to find the `app_file` and therefore not to find
|
659
|
+
the `views` folder on it's own. (Konstantin Haase)
|
660
|
+
|
661
|
+
* Better handling of Content-Type when using `send_file`: If file extension
|
662
|
+
is unknown, fall back to `application/octet-stream` and do not override
|
663
|
+
content type if it has already been set, except if `:type` is passed
|
664
|
+
explicitly (Konstantin Haase)
|
665
|
+
|
666
|
+
* Path is no longer cached if changed between handlers that do pattern
|
667
|
+
matching. This means you can change `request.path_info` in a pattern
|
668
|
+
matching before filter. (Konstantin Haase)
|
669
|
+
|
670
|
+
* Headers set by cache_control now always set max_age as an Integer, making
|
671
|
+
sure it is compatible with RFC2616. (Konstantin Haase)
|
672
|
+
|
673
|
+
* Further improved handling of string encodings on Ruby 1.9, templates now
|
674
|
+
honor default_encoding and URLs support unicode characters. (Konstantin
|
675
|
+
Haase)
|
676
|
+
|
677
|
+
= 1.1.0 / 2010-10-24
|
678
|
+
|
679
|
+
* Before and after filters now support pattern matching, including the
|
680
|
+
ability to use captures: "before('/user/:name') { |name| ... }". This
|
681
|
+
avoids manual path checking. No performance loss if patterns are avoided.
|
682
|
+
(Konstantin Haase)
|
683
|
+
|
684
|
+
* It is now possible to render SCSS files with the `scss` method, which
|
685
|
+
behaves exactly like `sass` except for the different file extension and
|
686
|
+
assuming the SCSS syntax. (Pedro Menezes, Konstantin Haase)
|
687
|
+
|
688
|
+
* Added `liquid`, `markdown`, `nokogiri`, `textile`, `rdoc`, `radius`,
|
689
|
+
`markaby`, and `coffee` rendering methods for rendering Liquid, Markdown,
|
690
|
+
Nokogiri, Textile, RDoc, Radius, Markaby and CoffeeScript templates.
|
691
|
+
(Konstantin Haase)
|
692
|
+
|
693
|
+
* Now supports byte-range requests (the HTTP_RANGE header) for static files.
|
694
|
+
Multi-range requests are not supported, however. (Jens Alfke)
|
695
|
+
|
696
|
+
* You can now use #settings method from class and top level for convenience.
|
697
|
+
(Konstantin Haase)
|
698
|
+
|
699
|
+
* Setting multiple values now no longer relies on #to_hash and therefore
|
700
|
+
accepts any Enumerable as parameter. (Simon Rozet)
|
701
|
+
|
702
|
+
* Nested templates default the `layout` option to `false` rather than `true`.
|
703
|
+
This eases the use of partials. If you wanted to render one haml template
|
704
|
+
embedded in another, you had to call `haml :partial, {}, :layout => false`.
|
705
|
+
As you almost never want the partial to be wrapped in the standard layout
|
706
|
+
in this situation, you now only have to call `haml :partial`. Passing in
|
707
|
+
`layout` explicitly is still possible. (Konstantin Haase)
|
708
|
+
|
709
|
+
* If a the return value of one of the render functions is used as a response
|
710
|
+
body and the content type has not been set explicitly, Sinatra chooses a
|
711
|
+
content type corresponding to the rendering engine rather than just using
|
712
|
+
"text/html". (Konstantin Haase)
|
713
|
+
|
714
|
+
* README is now available in Chinese (Wu Jiang), French (Mickael Riga),
|
715
|
+
German (Bernhard Essl, Konstantin Haase, burningTyger), Hungarian (Janos
|
716
|
+
Hardi) and Spanish (Gabriel Andretta). The extremely outdated Japanese
|
717
|
+
README has been updated (Kouhei Yanagita).
|
718
|
+
|
719
|
+
* It is now possible to access Sinatra's template_cache from the outside.
|
720
|
+
(Nick Sutterer)
|
721
|
+
|
722
|
+
* The `last_modified` method now also accepts DateTime instances and makes
|
723
|
+
sure the header will always be set to a string. (Konstantin Haase)
|
724
|
+
|
725
|
+
* 599 now is a legal status code. (Steve Shreeve)
|
726
|
+
|
727
|
+
* This release is compatible with Ruby 1.9.2. Sinatra was trying to read
|
728
|
+
non existent files Ruby added to the call stack. (Shota Fukumori,
|
729
|
+
Konstantin Haase)
|
730
|
+
|
731
|
+
* Prevents a memory leak on 1.8.6 in production mode. Note, however, that
|
732
|
+
this is due to a bug in 1.8.6 and request will have the additional overhead
|
733
|
+
of parsing templates again on that version. It is recommended to use at
|
734
|
+
least Ruby 1.8.7. (Konstantin Haase)
|
735
|
+
|
736
|
+
* Compares last modified date correctly. `last_modified` was halting only
|
737
|
+
when the 'If-Modified-Since' header date was equal to the time specified.
|
738
|
+
Now, it halts when is equal or later than the time specified (Gabriel
|
739
|
+
Andretta).
|
740
|
+
|
741
|
+
* Sinatra is now usable in combination with Rails 3. When mounting a Sinatra
|
742
|
+
application under a subpath in Rails 3, the PATH_INFO is not prefixed with
|
743
|
+
a slash and no routes did match. (José Valim)
|
744
|
+
|
745
|
+
* Better handling of encodings in 1.9, defaults params encoding to UTF-8.
|
746
|
+
(Konstantin Haase)
|
747
|
+
|
748
|
+
* `show_exceptions` handling is now triggered after custom error handlers, if
|
749
|
+
it is set to `:after_handlers`, thus not disabling those handler in
|
750
|
+
development mode. (pangel, Konstantin Haase)
|
751
|
+
|
752
|
+
* Added ability to handle weighted HTTP_ACCEPT headers. (Davide D'Agostino)
|
753
|
+
|
754
|
+
* `send_file` now always respects the `:type` option if set. Previously it
|
755
|
+
was discarded if no matching mime type was found, which made it impossible
|
756
|
+
to directly pass a mime type. (Konstantin Haase)
|
757
|
+
|
758
|
+
* `redirect` always redirects to an absolute URI, even if a relative URI was
|
759
|
+
passed. Ensures compatibility with RFC 2616 section 14.30. (Jean-Philippe
|
760
|
+
Garcia Ballester, Anthony Williams)
|
761
|
+
|
762
|
+
* Broken examples for using Erubis, Haml and Test::Unit in README have been
|
763
|
+
fixed. (Nick Sutterer, Doug Ireton, Jason Stewart, Eric Marden)
|
764
|
+
|
765
|
+
* Sinatra now handles SIGTERM correctly. (Patrick Collison)
|
766
|
+
|
767
|
+
* Fixes an issue with inline templates in modular applications that manually
|
768
|
+
call `run!`. (Konstantin Haase)
|
769
|
+
|
770
|
+
* Spaces after inline template names are now ignored (Konstantin Haase)
|
771
|
+
|
772
|
+
* It's now possible to use Sinatra with different package management
|
773
|
+
systems defining a custom require. (Konstantin Haase)
|
774
|
+
|
775
|
+
* Lighthouse has been dropped in favor of GitHub issues.
|
776
|
+
|
777
|
+
* Tilt is now a dependency and therefore no longer ships bundled with
|
778
|
+
Sinatra. (Ryan Tomayko, Konstantin Haase)
|
779
|
+
|
780
|
+
* Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer supported.
|
781
|
+
(Konstantin Haase)
|
782
|
+
|
783
|
+
= 1.0 / 2010-03-23
|
784
|
+
|
785
|
+
* It's now possible to register blocks to run after each request using
|
786
|
+
after filters. After filters run at the end of each request, after
|
787
|
+
routes and error handlers. (Jimmy Schementi)
|
788
|
+
|
789
|
+
* Sinatra now uses Tilt <http://github.com/rtomayko/tilt> for rendering
|
790
|
+
templates. This adds support for template caching, consistent
|
791
|
+
template backtraces, and support for new template engines, like
|
792
|
+
mustache and liquid. (Ryan Tomayko)
|
793
|
+
|
794
|
+
* ERB, Erubis, and Haml templates are now compiled the first time
|
795
|
+
they're rendered instead of being string eval'd on each invocation.
|
796
|
+
Benchmarks show a 5x-10x improvement in render time. This also
|
797
|
+
reduces the number of objects created, decreasing pressure on Ruby's
|
798
|
+
GC. (Ryan Tomayko)
|
799
|
+
|
800
|
+
* New 'settings' method gives access to options in both class and request
|
801
|
+
scopes. This replaces the 'options' method. (Chris Wanstrath)
|
802
|
+
|
803
|
+
* New boolean 'reload_templates' setting controls whether template files
|
804
|
+
are reread from disk and recompiled on each request. Template read/compile
|
805
|
+
is cached by default in all environments except development. (Ryan Tomayko)
|
806
|
+
|
807
|
+
* New 'erubis' helper method for rendering ERB template with Erubis. The
|
808
|
+
erubis gem is required. (Dylan Egan)
|
809
|
+
|
810
|
+
* New 'cache_control' helper method provides a convenient way of
|
811
|
+
setting the Cache-Control response header. Takes a variable number
|
812
|
+
of boolean directives followed by a hash of value directives, like
|
813
|
+
this: cache_control :public, :must_revalidate, :max_age => 60
|
814
|
+
(Ryan Tomayko)
|
815
|
+
|
816
|
+
* New 'expires' helper method is like cache_control but takes an
|
817
|
+
integer number of seconds or Time object:
|
818
|
+
expires 300, :public, :must_revalidate
|
819
|
+
(Ryan Tomayko)
|
820
|
+
|
821
|
+
* New request.secure? method for checking for an SSL connection.
|
822
|
+
(Adam Wiggins)
|
823
|
+
|
824
|
+
* Sinatra apps can now be run with a `-o <addr>` argument to specify
|
825
|
+
the address to bind to. (Ryan Tomayko)
|
826
|
+
|
827
|
+
* Rack::Session::Cookie is now added to the middleware pipeline when
|
828
|
+
running in test environments if the :sessions option is set.
|
829
|
+
(Simon Rozet)
|
830
|
+
|
831
|
+
* Route handlers, before filters, templates, error mappings, and
|
832
|
+
middleware are now resolved dynamically up the inheritance hierarchy
|
833
|
+
when needed instead of duplicating the superclass's version when
|
834
|
+
a new Sinatra::Base subclass is created. This should fix a variety
|
835
|
+
of issues with extensions that need to add any of these things
|
836
|
+
to the base class. (Ryan Tomayko)
|
837
|
+
|
838
|
+
* Exception error handlers always override the raise_errors option now.
|
839
|
+
Previously, all exceptions would be raised outside of the application
|
840
|
+
when the raise_errors option was enabled, even if an error handler was
|
841
|
+
defined for that exception. The raise_errors option now controls
|
842
|
+
whether unhandled exceptions are raised (enabled) or if a generic 500
|
843
|
+
error is returned (disabled). (Ryan Tomayko)
|
844
|
+
|
845
|
+
* The X-Cascade response header is set to 'pass' when no matching route
|
846
|
+
is found or all routes pass. (Josh Peek)
|
847
|
+
|
848
|
+
* Filters do not run when serving static files anymore. (Ryan Tomayko)
|
849
|
+
|
850
|
+
* pass takes an optional block to be used as the route handler if no
|
851
|
+
subsequent route matches the request. (Blake Mizerany)
|
852
|
+
|
853
|
+
The following Sinatra features have been obsoleted (removed entirely) in
|
854
|
+
the 1.0 release:
|
855
|
+
|
856
|
+
* The `sinatra/test` library is obsolete. This includes the `Sinatra::Test`
|
857
|
+
module, the `Sinatra::TestHarness` class, and the `get_it`, `post_it`,
|
858
|
+
`put_it`, `delete_it`, and `head_it` helper methods. The
|
859
|
+
[`Rack::Test` library](http://gitrdoc.com/brynary/rack-test) should
|
860
|
+
be used instead.
|
861
|
+
|
862
|
+
* Test framework specific libraries (`sinatra/test/spec`,
|
863
|
+
`sinatra/test/bacon`,`sinatra/test/rspec`, etc.) are obsolete. See
|
864
|
+
http://www.sinatrarb.com/testing.html for instructions on setting up a
|
865
|
+
testing environment under each of these frameworks.
|
866
|
+
|
867
|
+
* `Sinatra::Default` is obsolete; use `Sinatra::Base` instead.
|
868
|
+
`Sinatra::Base` acts more like `Sinatra::Default` in development mode.
|
869
|
+
For example, static file serving and sexy development error pages are
|
870
|
+
enabled by default.
|
871
|
+
|
872
|
+
* Auto-requiring template libraries in the `erb`, `builder`, `haml`,
|
873
|
+
and `sass` methods is obsolete due to thread-safety issues. You must
|
874
|
+
require the template libraries explicitly in your app.
|
875
|
+
|
876
|
+
* The `:views_directory` option to rendering methods is obsolete; use
|
877
|
+
`:views` instead.
|
878
|
+
|
879
|
+
* The `:haml` and `:sass` options to rendering methods are obsolete.
|
880
|
+
Template engine options should be passed in the second Hash argument
|
881
|
+
instead.
|
882
|
+
|
883
|
+
* The `use_in_file_templates` method is obsolete. Use
|
884
|
+
`enable :inline_templates` or `set :inline_templates, 'path/to/file'`
|
885
|
+
|
886
|
+
* The 'media_type' helper method is obsolete. Use 'mime_type' instead.
|
887
|
+
|
888
|
+
* The 'mime' main and class method is obsolete. Use 'mime_type' instead.
|
889
|
+
|
890
|
+
* The request-level `send_data` method is no longer supported.
|
891
|
+
|
892
|
+
* The `Sinatra::Event` and `Sinatra::EventContext` classes are no longer
|
893
|
+
supported. This may effect extensions written for versions prior to 0.9.2.
|
894
|
+
See [Writing Sinatra Extensions](http://www.sinatrarb.com/extensions.html)
|
895
|
+
for the officially supported extensions API.
|
896
|
+
|
897
|
+
* The `set_option` and `set_options` methods are obsolete; use `set`
|
898
|
+
instead.
|
899
|
+
|
900
|
+
* The `:env` setting (`settings.env`) is obsolete; use `:environment`
|
901
|
+
instead.
|
902
|
+
|
903
|
+
* The request level `stop` method is obsolete; use `halt` instead.
|
904
|
+
|
905
|
+
* The request level `entity_tag` method is obsolete; use `etag`
|
906
|
+
instead.
|
907
|
+
|
908
|
+
* The request level `headers` method (HTTP response headers) is obsolete;
|
909
|
+
use `response['Header-Name']` instead.
|
910
|
+
|
911
|
+
* `Sinatra.application` is obsolete; use `Sinatra::Application` instead.
|
912
|
+
|
913
|
+
* Using `Sinatra.application = nil` to reset an application is obsolete.
|
914
|
+
This should no longer be necessary.
|
915
|
+
|
916
|
+
* Using `Sinatra.default_options` to set base configuration items is
|
917
|
+
obsolete; use `Sinatra::Base.set(key, value)` instead.
|
918
|
+
|
919
|
+
* The `Sinatra::ServerError` exception is obsolete. All exceptions raised
|
920
|
+
within a request are now treated as internal server errors and result in
|
921
|
+
a 500 response status.
|
922
|
+
|
923
|
+
* The `:methodoverride' option to enable/disable the POST _method hack is
|
924
|
+
obsolete; use `:method_override` instead.
|
925
|
+
|
926
|
+
= 0.9.2 / 2009-05-18
|
927
|
+
|
928
|
+
* This version is compatible with Rack 1.0. [Rein Henrichs]
|
929
|
+
|
930
|
+
* The development-mode unhandled exception / error page has been
|
931
|
+
greatly enhanced, functionally and aesthetically. The error
|
932
|
+
page is used when the :show_exceptions option is enabled and an
|
933
|
+
exception propagates outside of a route handler or before filter.
|
934
|
+
[Simon Rozet / Matte Noble / Ryan Tomayko]
|
935
|
+
|
936
|
+
* Backtraces that move through templates now include filenames and
|
937
|
+
line numbers where possible. [#51 / S. Brent Faulkner]
|
938
|
+
|
939
|
+
* All templates now have an app-level option for setting default
|
940
|
+
template options (:haml, :sass, :erb, :builder). The app-level
|
941
|
+
option value must be a Hash if set and is merged with the
|
942
|
+
template options specified to the render method (Base#haml,
|
943
|
+
Base#erb, Base#builder). [S. Brent Faulkner, Ryan Tomayko]
|
944
|
+
|
945
|
+
* The method signature for all template rendering methods has
|
946
|
+
been unified: "def engine(template, options={}, locals={})".
|
947
|
+
The options Hash now takes the generic :views, :layout, and
|
948
|
+
:locals options but also any template-specific options. The
|
949
|
+
generic options are removed before calling the template specific
|
950
|
+
render method. Locals may be specified using either the
|
951
|
+
:locals key in the options hash or a second Hash option to the
|
952
|
+
rendering method. [#191 / Ryan Tomayko]
|
953
|
+
|
954
|
+
* The receiver is now passed to "configure" blocks. This
|
955
|
+
allows for the following idiom in top-level apps:
|
956
|
+
configure { |app| set :foo, app.root + '/foo' }
|
957
|
+
[TJ Holowaychuck / Ryan Tomayko]
|
958
|
+
|
959
|
+
* The "sinatra/test" lib is deprecated and will be removed in
|
960
|
+
Sinatra 1.0. This includes the Sinatra::Test module and
|
961
|
+
Sinatra::TestHarness class in addition to all the framework
|
962
|
+
test helpers that were deprecated in 0.9.1. The Rack::Test
|
963
|
+
lib should be used instead: http://gitrdoc.com/brynary/rack-test
|
964
|
+
[#176 / Simon Rozet]
|
965
|
+
|
966
|
+
* Development mode source file reloading has been removed. The
|
967
|
+
"shotgun" (http://rtomayko.github.com/shotgun/) program can be
|
968
|
+
used to achieve the same basic functionality in most situations.
|
969
|
+
Passenger users should use the "tmp/always_restart.txt"
|
970
|
+
file (http://tinyurl.com/c67o4h). [#166 / Ryan Tomayko]
|
971
|
+
|
972
|
+
* Auto-requiring template libs in the erb, builder, haml, and
|
973
|
+
sass methods is deprecated due to thread-safety issues. You must
|
974
|
+
require the template libs explicitly in your app file. [Simon Rozet]
|
975
|
+
|
976
|
+
* A new Sinatra::Base#route_missing method was added. route_missing
|
977
|
+
is sent when no route matches the request or all route handlers
|
978
|
+
pass. The default implementation forwards the request to the
|
979
|
+
downstream app when running as middleware (i.e., "@app" is
|
980
|
+
non-nil), or raises a NotFound exception when no downstream app
|
981
|
+
is defined. Subclasses can override this method to perform custom
|
982
|
+
route miss logic. [Jon Crosby]
|
983
|
+
|
984
|
+
* A new Sinatra::Base#route_eval method was added. The method
|
985
|
+
yields to the block and throws :halt with the result. Subclasses
|
986
|
+
can override this method to tap into the route execution logic.
|
987
|
+
[TJ Holowaychuck]
|
988
|
+
|
989
|
+
* Fix the "-x" (enable request mutex / locking) command line
|
990
|
+
argument. Passing -x now properly sets the :lock option.
|
991
|
+
[S. Brent Faulkner, Ryan Tomayko]
|
992
|
+
|
993
|
+
* Fix writer ("foo=") and predicate ("foo?") methods in extension
|
994
|
+
modules not being added to the registering class.
|
995
|
+
[#172 / Pat Nakajima]
|
996
|
+
|
997
|
+
* Fix in-file templates when running alongside activesupport and
|
998
|
+
fatal errors when requiring activesupport before sinatra
|
999
|
+
[#178 / Brian Candler]
|
1000
|
+
|
1001
|
+
* Fix various issues running on Google AppEngine.
|
1002
|
+
[Samuel Goebert, Simon Rozet]
|
1003
|
+
|
1004
|
+
* Fix in-file templates __END__ detection when __END__ exists with
|
1005
|
+
other stuff on a line [Yoji Shidara]
|
1006
|
+
|
1007
|
+
= 0.9.1.1 / 2009-03-09
|
1008
|
+
|
1009
|
+
* Fix directory traversal vulnerability in default static files
|
1010
|
+
route. See [#177] for more info.
|
1011
|
+
|
1012
|
+
= 0.9.1 / 2009-03-01
|
1013
|
+
|
1014
|
+
* Sinatra now runs under Ruby 1.9.1 [#61]
|
1015
|
+
|
1016
|
+
* Route patterns (splats, :named, or Regexp captures) are now
|
1017
|
+
passed as arguments to the block. [#140]
|
1018
|
+
|
1019
|
+
* The "helpers" method now takes a variable number of modules
|
1020
|
+
along with the normal block syntax. [#133]
|
1021
|
+
|
1022
|
+
* New request-level #forward method for middleware components: passes
|
1023
|
+
the env to the downstream app and merges the response status, headers,
|
1024
|
+
and body into the current context. [#126]
|
1025
|
+
|
1026
|
+
* Requests are now automatically forwarded to the downstream app when
|
1027
|
+
running as middleware and no matching route is found or all routes
|
1028
|
+
pass.
|
1029
|
+
|
1030
|
+
* New simple API for extensions/plugins to add DSL-level and
|
1031
|
+
request-level methods. Use Sinatra.register(mixin) to extend
|
1032
|
+
the DSL with all public methods defined in the mixin module;
|
1033
|
+
use Sinatra.helpers(mixin) to make all public methods defined
|
1034
|
+
in the mixin module available at the request level. [#138]
|
1035
|
+
See http://www.sinatrarb.com/extensions.html for details.
|
1036
|
+
|
1037
|
+
* Named parameters in routes now capture the "." character. This makes
|
1038
|
+
routes like "/:path/:filename" match against requests like
|
1039
|
+
"/foo/bar.txt"; in this case, "params[:filename]" is "bar.txt".
|
1040
|
+
Previously, the route would not match at all.
|
1041
|
+
|
1042
|
+
* Added request-level "redirect back" to redirect to the referring
|
1043
|
+
URL.
|
1044
|
+
|
1045
|
+
* Added a new "clean_trace" option that causes backtraces dumped
|
1046
|
+
to rack.errors and displayed on the development error page to
|
1047
|
+
omit framework and core library backtrace lines. The option is
|
1048
|
+
enabled by default. [#77]
|
1049
|
+
|
1050
|
+
* The ERB output buffer is now available to helpers via the @_out_buf
|
1051
|
+
instance variable.
|
1052
|
+
|
1053
|
+
* It's now much easier to test sessions in unit tests by passing a
|
1054
|
+
":session" option to any of the mock request methods. e.g.,
|
1055
|
+
get '/', {}, :session => { 'foo' => 'bar' }
|
1056
|
+
|
1057
|
+
* The testing framework specific files ('sinatra/test/spec',
|
1058
|
+
'sinatra/test/bacon', 'sinatra/test/rspec', etc.) have been deprecated.
|
1059
|
+
See http://sinatrarb.com/testing.html for instructions on setting up
|
1060
|
+
a testing environment with these frameworks.
|
1061
|
+
|
1062
|
+
* The request-level #send_data method from Sinatra 0.3.3 has been added
|
1063
|
+
for compatibility but is deprecated.
|
1064
|
+
|
1065
|
+
* Fix :provides causing crash on any request when request has no
|
1066
|
+
Accept header [#139]
|
1067
|
+
|
1068
|
+
* Fix that ERB templates were evaluated twice per "erb" call.
|
1069
|
+
|
1070
|
+
* Fix app-level middleware not being run when the Sinatra application is
|
1071
|
+
run as middleware.
|
1072
|
+
|
1073
|
+
* Fixed some issues with running under Rack's CGI handler caused by
|
1074
|
+
writing informational stuff to stdout.
|
1075
|
+
|
1076
|
+
* Fixed that reloading was sometimes enabled when starting from a
|
1077
|
+
rackup file [#110]
|
1078
|
+
|
1079
|
+
* Fixed that "." in route patterns erroneously matched any character
|
1080
|
+
instead of a literal ".". [#124]
|
1081
|
+
|
1082
|
+
= 0.9.0.4 / 2009-01-25
|
1083
|
+
|
1084
|
+
* Using halt with more than 1 args causes ArgumentError [#131]
|
1085
|
+
* using halt in a before filter doesn't modify response [#127]
|
1086
|
+
* Add deprecated Sinatra::EventContext to unbreak plugins [#130]
|
1087
|
+
* Give access to GET/POST params in filters [#129]
|
1088
|
+
* Preserve non-nested params in nested params hash [#117]
|
1089
|
+
* Fix backtrace dump with Rack::Lint [#116]
|
1090
|
+
|
1091
|
+
= 0.9.0.3 / 2009-01-21
|
1092
|
+
|
1093
|
+
* Fall back on mongrel then webrick when thin not found. [#75]
|
1094
|
+
* Use :environment instead of :env in test helpers to
|
1095
|
+
fix deprecation warnings coming from framework.
|
1096
|
+
* Make sinatra/test/rspec work again [#113]
|
1097
|
+
* Fix app_file detection on windows [#118]
|
1098
|
+
* Fix static files with Rack::Lint in pipeline [#121]
|
1099
|
+
|
1100
|
+
= 0.9.0.2 / 2009-01-18
|
1101
|
+
|
1102
|
+
* Halting a before block should stop processing of routes [#85]
|
1103
|
+
* Fix redirect/halt in before filters [#85]
|
1104
|
+
|
1105
|
+
= 0.9.0 / 2009-01-18
|
1106
|
+
|
1107
|
+
* Works with and requires Rack >= 0.9.1
|
1108
|
+
|
1109
|
+
* Multiple Sinatra applications can now co-exist peacefully within a
|
1110
|
+
single process. The new "Sinatra::Base" class can be subclassed to
|
1111
|
+
establish a blank-slate Rack application or middleware component.
|
1112
|
+
Documentation on using these features is forth-coming; the following
|
1113
|
+
provides the basic gist: http://gist.github.com/38605
|
1114
|
+
|
1115
|
+
* Parameters with subscripts are now parsed into a nested/recursive
|
1116
|
+
Hash structure. e.g., "post[title]=Hello&post[body]=World" yields
|
1117
|
+
params: {'post' => {'title' => 'Hello', 'body' => 'World'}}.
|
1118
|
+
|
1119
|
+
* Regular expressions may now be used in route pattens; captures are
|
1120
|
+
available at "params[:captures]".
|
1121
|
+
|
1122
|
+
* New ":provides" route condition takes an array of mime types and
|
1123
|
+
matches only when an Accept request header is present with a
|
1124
|
+
corresponding type. [cypher]
|
1125
|
+
|
1126
|
+
* New request-level "pass" method; immediately exits the current block
|
1127
|
+
and passes control to the next matching route.
|
1128
|
+
|
1129
|
+
* The request-level "body" method now takes a block; evaluation is
|
1130
|
+
deferred until an attempt is made to read the body. The block must
|
1131
|
+
return a String or Array.
|
1132
|
+
|
1133
|
+
* New "route conditions" system for attaching rules for when a route
|
1134
|
+
matches. The :agent and :host route options now use this system.
|
1135
|
+
|
1136
|
+
* New "dump_errors" option controls whether the backtrace is dumped to
|
1137
|
+
rack.errors when an exception is raised from a route. The option is
|
1138
|
+
enabled by default for top-level apps.
|
1139
|
+
|
1140
|
+
* Better default "app_file", "root", "public", and "views" location
|
1141
|
+
detection; changes to "root" and "app_file" automatically cascade to
|
1142
|
+
other options that depend on them.
|
1143
|
+
|
1144
|
+
* Error mappings are now split into two distinct layers: exception
|
1145
|
+
mappings and custom error pages. Exception mappings are registered
|
1146
|
+
with "error(Exception)" and are run only when the app raises an
|
1147
|
+
exception. Custom error pages are registered with "error(status_code)",
|
1148
|
+
where "status_code" is an integer, and are run any time the response
|
1149
|
+
has the status code specified. It's also possible to register an error
|
1150
|
+
page for a range of status codes: "error(500..599)".
|
1151
|
+
|
1152
|
+
* In-file templates are now automatically imported from the file that
|
1153
|
+
requires 'sinatra'. The use_in_file_templates! method is still available
|
1154
|
+
for loading templates from other files.
|
1155
|
+
|
1156
|
+
* Sinatra's testing support is no longer dependent on Test::Unit. Requiring
|
1157
|
+
'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness
|
1158
|
+
class, which can be used with any test framework. The 'sinatra/test/unit',
|
1159
|
+
'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files
|
1160
|
+
can be required to setup a framework-specific testing environment. See the
|
1161
|
+
README for more information.
|
1162
|
+
|
1163
|
+
* Added support for Bacon (test framework). The 'sinatra/test/bacon' file
|
1164
|
+
can be required to setup Sinatra test helpers on Bacon::Context.
|
1165
|
+
|
1166
|
+
* Deprecated "set_option" and "set_options"; use "set" instead.
|
1167
|
+
|
1168
|
+
* Deprecated the "env" option ("options.env"); use "environment" instead.
|
1169
|
+
|
1170
|
+
* Deprecated the request level "stop" method; use "halt" instead.
|
1171
|
+
|
1172
|
+
* Deprecated the request level "entity_tag" method; use "etag" instead.
|
1173
|
+
Both "entity_tag" and "etag" were previously supported.
|
1174
|
+
|
1175
|
+
* Deprecated the request level "headers" method (HTTP response headers);
|
1176
|
+
use "response['Header-Name']" instead.
|
1177
|
+
|
1178
|
+
* Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
|
1179
|
+
|
1180
|
+
* Deprecated setting Sinatra.application = nil to reset an application.
|
1181
|
+
This should no longer be necessary.
|
1182
|
+
|
1183
|
+
* Deprecated "Sinatra.default_options"; use
|
1184
|
+
"Sinatra::Default.set(key, value)" instead.
|
1185
|
+
|
1186
|
+
* Deprecated the "ServerError" exception. All Exceptions are now
|
1187
|
+
treated as internal server errors and result in a 500 response
|
1188
|
+
status.
|
1189
|
+
|
1190
|
+
* Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it"
|
1191
|
+
test helper methods. Use "get", "post", "put", "delete", and "head",
|
1192
|
+
respectively, instead.
|
1193
|
+
|
1194
|
+
* Removed Event and EventContext classes. Applications are defined in a
|
1195
|
+
subclass of Sinatra::Base; each request is processed within an
|
1196
|
+
instance.
|
1197
|
+
|
1198
|
+
= 0.3.3 / 2009-01-06
|
1199
|
+
|
1200
|
+
* Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
|
1201
|
+
|
1202
|
+
* Log unhandled exception backtraces to rack.errors.
|
1203
|
+
|
1204
|
+
* Use RACK_ENV environment variable to establish Sinatra
|
1205
|
+
environment when given. Thin sets this when started with
|
1206
|
+
the -e argument.
|
1207
|
+
|
1208
|
+
* BUG: raising Sinatra::NotFound resulted in a 500 response
|
1209
|
+
code instead of 404.
|
1210
|
+
|
1211
|
+
* BUG: use_in_file_templates! fails with CR/LF (#45)
|
1212
|
+
|
1213
|
+
* BUG: Sinatra detects the app file and root path when run under
|
1214
|
+
thin/passenger.
|
1215
|
+
|
1216
|
+
= 0.3.2
|
1217
|
+
|
1218
|
+
* BUG: Static and send_file read entire file into String before
|
1219
|
+
sending. Updated to stream with 8K chunks instead.
|
1220
|
+
|
1221
|
+
* Rake tasks and assets for building basic documentation website.
|
1222
|
+
See http://sinatra.rubyforge.org
|
1223
|
+
|
1224
|
+
* Various minor doc fixes.
|
1225
|
+
|
1226
|
+
= 0.3.1
|
1227
|
+
|
1228
|
+
* Unbreak optional path parameters [jeremyevans]
|
1229
|
+
|
1230
|
+
= 0.3.0
|
1231
|
+
|
1232
|
+
* Add sinatra.gemspec w/ support for github gem builds. Forks can now
|
1233
|
+
enable the build gem option in github to get free username-sinatra.gem
|
1234
|
+
builds: gem install username-sinatra.gem --source=http://gems.github.com/
|
1235
|
+
|
1236
|
+
* Require rack-0.4 gem; removes frozen rack dir.
|
1237
|
+
|
1238
|
+
* Basic RSpec support; require 'sinatra/test/rspec' instead of
|
1239
|
+
'sinatra/test/spec' to use. [avdi]
|
1240
|
+
|
1241
|
+
* before filters can modify request environment vars used for
|
1242
|
+
routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
|
1243
|
+
type functionality.
|
1244
|
+
|
1245
|
+
* In-file templates now uses @@ instead of ## as template separator.
|
1246
|
+
|
1247
|
+
* Top-level environment test predicates: development?, test?, production?
|
1248
|
+
|
1249
|
+
* Top-level "set", "enable", and "disable" methods for tweaking
|
1250
|
+
app options. [rtomayko]
|
1251
|
+
|
1252
|
+
* Top-level "use" method for building Rack middleware pipelines
|
1253
|
+
leading to app. See README for usage. [rtomayko]
|
1254
|
+
|
1255
|
+
* New "reload" option - set false to disable reloading in development.
|
1256
|
+
|
1257
|
+
* New "host" option - host/ip to bind to [cschneid]
|
1258
|
+
|
1259
|
+
* New "app_file" option - override the file to reload in development
|
1260
|
+
mode [cschneid]
|
1261
|
+
|
1262
|
+
* Development error/not_found page cleanup [sr, adamwiggins]
|
1263
|
+
|
1264
|
+
* Remove a bunch of core extensions (String#to_param, String#from_param,
|
1265
|
+
Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
|
1266
|
+
|
1267
|
+
* Various grammar and formatting fixes to README; additions on
|
1268
|
+
community and contributing [cypher]
|
1269
|
+
|
1270
|
+
* Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
|
1271
|
+
|
1272
|
+
* Specs, documentation and fixes for splat'n routes [vic]
|
1273
|
+
|
1274
|
+
* Fix whitespace errors across all source files. [rtomayko]
|
1275
|
+
|
1276
|
+
* Fix streaming issues with Mongrel (body not closed). [bmizerany]
|
1277
|
+
|
1278
|
+
* Fix various issues with environment not being set properly (configure
|
1279
|
+
blocks not running, error pages not registering, etc.) [cypher]
|
1280
|
+
|
1281
|
+
* Fix to allow locals to be passed to ERB templates [cschneid]
|
1282
|
+
|
1283
|
+
* Fix locking issues causing random errors during reload in development.
|
1284
|
+
|
1285
|
+
* Fix for escaped paths not resolving static files [Matthew Walker]
|
1286
|
+
|
1287
|
+
= 0.2.1
|
1288
|
+
|
1289
|
+
* File upload fix and minor tweaks.
|
1290
|
+
|
1291
|
+
= 0.2.0
|
1292
|
+
|
1293
|
+
* Initial gem release of 0.2 codebase.
|