roda 3.28.0 → 3.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +10 -0
  3. data/README.rdoc +10 -0
  4. data/doc/release_notes/3.29.0.txt +15 -0
  5. data/lib/roda.rb +1 -0
  6. data/lib/roda/plugins/caching.rb +2 -0
  7. data/lib/roda/plugins/common_logger.rb +1 -1
  8. data/lib/roda/plugins/exception_page.rb +7 -1
  9. data/lib/roda/plugins/indifferent_params.rb +2 -0
  10. data/lib/roda/version.rb +1 -1
  11. metadata +4 -214
  12. data/Rakefile +0 -108
  13. data/doc/release_notes/1.0.0.txt +0 -329
  14. data/doc/release_notes/1.1.0.txt +0 -226
  15. data/doc/release_notes/1.2.0.txt +0 -406
  16. data/doc/release_notes/1.3.0.txt +0 -109
  17. data/doc/release_notes/2.0.0.txt +0 -75
  18. data/doc/release_notes/2.1.0.txt +0 -124
  19. data/doc/release_notes/2.10.0.txt +0 -27
  20. data/doc/release_notes/2.11.0.txt +0 -70
  21. data/doc/release_notes/2.12.0.txt +0 -40
  22. data/doc/release_notes/2.13.0.txt +0 -10
  23. data/doc/release_notes/2.14.0.txt +0 -44
  24. data/doc/release_notes/2.15.0.txt +0 -53
  25. data/doc/release_notes/2.16.0.txt +0 -48
  26. data/doc/release_notes/2.17.0.txt +0 -62
  27. data/doc/release_notes/2.18.0.txt +0 -69
  28. data/doc/release_notes/2.19.0.txt +0 -30
  29. data/doc/release_notes/2.2.0.txt +0 -97
  30. data/doc/release_notes/2.20.0.txt +0 -5
  31. data/doc/release_notes/2.21.0.txt +0 -17
  32. data/doc/release_notes/2.22.0.txt +0 -41
  33. data/doc/release_notes/2.23.0.txt +0 -29
  34. data/doc/release_notes/2.24.0.txt +0 -65
  35. data/doc/release_notes/2.25.0.txt +0 -14
  36. data/doc/release_notes/2.26.0.txt +0 -13
  37. data/doc/release_notes/2.27.0.txt +0 -56
  38. data/doc/release_notes/2.28.0.txt +0 -17
  39. data/doc/release_notes/2.29.0.txt +0 -156
  40. data/doc/release_notes/2.3.0.txt +0 -109
  41. data/doc/release_notes/2.4.0.txt +0 -55
  42. data/doc/release_notes/2.5.0.txt +0 -23
  43. data/doc/release_notes/2.5.1.txt +0 -4
  44. data/doc/release_notes/2.6.0.txt +0 -21
  45. data/doc/release_notes/2.7.0.txt +0 -75
  46. data/doc/release_notes/2.8.0.txt +0 -44
  47. data/doc/release_notes/2.9.0.txt +0 -6
  48. data/spec/all.rb +0 -1
  49. data/spec/assets/css/app.scss +0 -1
  50. data/spec/assets/css/no_access.css +0 -1
  51. data/spec/assets/css/raw.css +0 -1
  52. data/spec/assets/js/head/app.js +0 -1
  53. data/spec/composition_spec.rb +0 -31
  54. data/spec/define_roda_method_spec.rb +0 -274
  55. data/spec/env_spec.rb +0 -11
  56. data/spec/freeze_spec.rb +0 -37
  57. data/spec/integration_spec.rb +0 -209
  58. data/spec/matchers_spec.rb +0 -832
  59. data/spec/opts_spec.rb +0 -42
  60. data/spec/plugin/_after_hook_spec.rb +0 -19
  61. data/spec/plugin/all_verbs_spec.rb +0 -29
  62. data/spec/plugin/assets_preloading_spec.rb +0 -98
  63. data/spec/plugin/assets_spec.rb +0 -745
  64. data/spec/plugin/backtracking_array_spec.rb +0 -42
  65. data/spec/plugin/branch_locals_spec.rb +0 -106
  66. data/spec/plugin/caching_spec.rb +0 -337
  67. data/spec/plugin/chunked_spec.rb +0 -201
  68. data/spec/plugin/class_level_routing_spec.rb +0 -164
  69. data/spec/plugin/class_matchers_spec.rb +0 -40
  70. data/spec/plugin/common_logger_spec.rb +0 -85
  71. data/spec/plugin/content_for_spec.rb +0 -162
  72. data/spec/plugin/content_security_policy_spec.rb +0 -175
  73. data/spec/plugin/cookies_spec.rb +0 -51
  74. data/spec/plugin/csrf_spec.rb +0 -111
  75. data/spec/plugin/default_headers_spec.rb +0 -82
  76. data/spec/plugin/default_status_spec.rb +0 -95
  77. data/spec/plugin/delay_build_spec.rb +0 -23
  78. data/spec/plugin/delegate_spec.rb +0 -23
  79. data/spec/plugin/delete_empty_headers_spec.rb +0 -27
  80. data/spec/plugin/direct_call_spec.rb +0 -28
  81. data/spec/plugin/disallow_file_uploads_spec.rb +0 -25
  82. data/spec/plugin/drop_body_spec.rb +0 -24
  83. data/spec/plugin/early_hints_spec.rb +0 -19
  84. data/spec/plugin/empty_root_spec.rb +0 -14
  85. data/spec/plugin/environments_spec.rb +0 -42
  86. data/spec/plugin/error_email_spec.rb +0 -97
  87. data/spec/plugin/error_handler_spec.rb +0 -216
  88. data/spec/plugin/error_mail_spec.rb +0 -93
  89. data/spec/plugin/exception_page_spec.rb +0 -168
  90. data/spec/plugin/flash_spec.rb +0 -121
  91. data/spec/plugin/h_spec.rb +0 -11
  92. data/spec/plugin/halt_spec.rb +0 -119
  93. data/spec/plugin/hash_matcher_spec.rb +0 -27
  94. data/spec/plugin/hash_routes_spec.rb +0 -535
  95. data/spec/plugin/head_spec.rb +0 -52
  96. data/spec/plugin/header_matchers_spec.rb +0 -98
  97. data/spec/plugin/heartbeat_spec.rb +0 -74
  98. data/spec/plugin/hooks_spec.rb +0 -152
  99. data/spec/plugin/indifferent_params_spec.rb +0 -14
  100. data/spec/plugin/json_parser_spec.rb +0 -141
  101. data/spec/plugin/json_spec.rb +0 -83
  102. data/spec/plugin/mail_processor_spec.rb +0 -451
  103. data/spec/plugin/mailer_spec.rb +0 -282
  104. data/spec/plugin/match_affix_spec.rb +0 -43
  105. data/spec/plugin/match_hook_spec.rb +0 -79
  106. data/spec/plugin/middleware_spec.rb +0 -237
  107. data/spec/plugin/middleware_stack_spec.rb +0 -81
  108. data/spec/plugin/module_include_spec.rb +0 -48
  109. data/spec/plugin/multi_route_spec.rb +0 -268
  110. data/spec/plugin/multi_run_spec.rb +0 -87
  111. data/spec/plugin/multi_view_spec.rb +0 -50
  112. data/spec/plugin/multibyte_string_matcher_spec.rb +0 -44
  113. data/spec/plugin/named_templates_spec.rb +0 -96
  114. data/spec/plugin/not_allowed_spec.rb +0 -69
  115. data/spec/plugin/not_found_spec.rb +0 -128
  116. data/spec/plugin/optimized_string_matchers_spec.rb +0 -43
  117. data/spec/plugin/padrino_render_spec.rb +0 -34
  118. data/spec/plugin/param_matchers_spec.rb +0 -69
  119. data/spec/plugin/params_capturing_spec.rb +0 -33
  120. data/spec/plugin/partials_spec.rb +0 -43
  121. data/spec/plugin/pass_spec.rb +0 -29
  122. data/spec/plugin/path_matchers_spec.rb +0 -42
  123. data/spec/plugin/path_rewriter_spec.rb +0 -45
  124. data/spec/plugin/path_spec.rb +0 -222
  125. data/spec/plugin/placeholder_string_matchers_spec.rb +0 -126
  126. data/spec/plugin/precompile_templates_spec.rb +0 -61
  127. data/spec/plugin/public_spec.rb +0 -85
  128. data/spec/plugin/render_each_spec.rb +0 -82
  129. data/spec/plugin/render_locals_spec.rb +0 -114
  130. data/spec/plugin/render_spec.rb +0 -912
  131. data/spec/plugin/request_aref_spec.rb +0 -51
  132. data/spec/plugin/request_headers_spec.rb +0 -39
  133. data/spec/plugin/response_request_spec.rb +0 -43
  134. data/spec/plugin/route_block_args_spec.rb +0 -86
  135. data/spec/plugin/route_csrf_spec.rb +0 -305
  136. data/spec/plugin/run_append_slash_spec.rb +0 -77
  137. data/spec/plugin/run_handler_spec.rb +0 -53
  138. data/spec/plugin/sessions_spec.rb +0 -452
  139. data/spec/plugin/shared_vars_spec.rb +0 -45
  140. data/spec/plugin/sinatra_helpers_spec.rb +0 -537
  141. data/spec/plugin/slash_path_empty_spec.rb +0 -22
  142. data/spec/plugin/static_routing_spec.rb +0 -192
  143. data/spec/plugin/static_spec.rb +0 -30
  144. data/spec/plugin/status_303_spec.rb +0 -28
  145. data/spec/plugin/status_handler_spec.rb +0 -158
  146. data/spec/plugin/streaming_spec.rb +0 -246
  147. data/spec/plugin/strip_path_prefix_spec.rb +0 -24
  148. data/spec/plugin/symbol_matchers_spec.rb +0 -51
  149. data/spec/plugin/symbol_status_spec.rb +0 -25
  150. data/spec/plugin/symbol_views_spec.rb +0 -32
  151. data/spec/plugin/timestamp_public_spec.rb +0 -85
  152. data/spec/plugin/type_routing_spec.rb +0 -348
  153. data/spec/plugin/typecast_params_spec.rb +0 -1370
  154. data/spec/plugin/unescape_path_spec.rb +0 -22
  155. data/spec/plugin/view_options_spec.rb +0 -170
  156. data/spec/plugin_spec.rb +0 -71
  157. data/spec/redirect_spec.rb +0 -41
  158. data/spec/request_spec.rb +0 -97
  159. data/spec/response_spec.rb +0 -199
  160. data/spec/route_spec.rb +0 -39
  161. data/spec/session_middleware_spec.rb +0 -129
  162. data/spec/session_spec.rb +0 -37
  163. data/spec/spec_helper.rb +0 -137
  164. data/spec/version_spec.rb +0 -14
  165. data/spec/views/_test.erb +0 -1
  166. data/spec/views/a.erb +0 -1
  167. data/spec/views/a.rdoc +0 -2
  168. data/spec/views/about.erb +0 -1
  169. data/spec/views/about.str +0 -1
  170. data/spec/views/about/_test.css.gz +0 -0
  171. data/spec/views/about/_test.erb +0 -1
  172. data/spec/views/about/_test.erb.gz +0 -0
  173. data/spec/views/about/comp_test.erb +0 -1
  174. data/spec/views/b.erb +0 -1
  175. data/spec/views/c.erb +0 -1
  176. data/spec/views/comp_layout.erb +0 -1
  177. data/spec/views/comp_test.erb +0 -1
  178. data/spec/views/content-yield.erb +0 -1
  179. data/spec/views/each.str +0 -1
  180. data/spec/views/home.erb +0 -2
  181. data/spec/views/home.str +0 -2
  182. data/spec/views/iv.erb +0 -1
  183. data/spec/views/layout-alternative.erb +0 -2
  184. data/spec/views/layout-yield.erb +0 -3
  185. data/spec/views/layout.erb +0 -2
  186. data/spec/views/layout.str +0 -2
  187. data/spec/views/multiple-layout.erb +0 -1
  188. data/spec/views/multiple.erb +0 -1
@@ -1,406 +0,0 @@
1
- = New Plugins
2
-
3
- * A static_path_info plugin has been added, which doesn't modify
4
- SCRIPT_NAME/PATH_INFO during routing, only before dispatching
5
- the request to another rack application via r.run. This is
6
- faster and avoids problems caused by changing SCRIPT_NAME/PATH_INFO
7
- during routing, such as methods that return paths that depend on
8
- SCRIPT_NAME. This behavior will become Roda's default starting
9
- in Roda 2, and it is recommended that all Roda apps use it.
10
-
11
- * A mailer plugin has been added, which allows you to use Roda's
12
- render plugin to create email bodies, and allows you to use Roda's
13
- routing tree features to DRY up your mailing code similar to how it
14
- DRYs up your web code.
15
-
16
- Here is an example routing tree using the mailer plugin:
17
-
18
- class Mailer < Roda
19
- plugin :render
20
- plugin :mailer
21
-
22
- route do |r|
23
- r.on "user/:d" do |user_id|
24
- # DRY up code by setting shared behavior in higher level
25
- # branches, instead of duplicating it inside each subtree.
26
- @user = User[user_id]
27
- from 'notifications@example.com'
28
- to @user.email
29
-
30
- r.mail "open_account" do
31
- subject 'Welcome to example.com'
32
- render(:open_account)
33
- end
34
-
35
- r.mail "close_account" do
36
- subject 'Thank you for using example.com'
37
- render(:close_account)
38
- end
39
- end
40
- end
41
- end
42
-
43
- With your routing tree setup, you can use the sendmail method to
44
- send email:
45
-
46
- Mailer.sendmail("/user/1/open_account")
47
-
48
- If you want a Mail::Message object returned for further modification
49
- before sending, you can use mail instead of of sendmail:
50
-
51
- Mailer.mail("/user/2/close_account").deliver
52
-
53
- * A delegate plugin has been added, allowing you to easily create
54
- methods in the route block scope that delegate to the request or
55
- response. While Roda does not pollute your namespaces by default,
56
- this allows you to choose to do so yourself if you find it offers
57
- a nicer API. Example:
58
-
59
- class App < Roda
60
- plugin :delegate
61
- request_delegate :root, :on, :is, :get, :post, :redirect
62
-
63
- route do |r|
64
- root do
65
- redirect "/hello"
66
- end
67
-
68
- on "hello" do
69
- get "world" do
70
- "Hello world!"
71
- end
72
-
73
- is do
74
- get do
75
- "Hello!"
76
- end
77
-
78
- post do
79
- puts "Someone said hello!"
80
- redirect
81
- end
82
- end
83
- end
84
- end
85
- end
86
-
87
- * A class_level_routing plugin has been added, allowing you to define
88
- your routes at the class level if desired. The routes defined at
89
- the class level can still use a routing tree for further routing.
90
- Example:
91
-
92
- class App < Roda
93
- plugin :class_level_routing
94
-
95
- root do
96
- request.redirect "/hello"
97
- end
98
-
99
- get "hello/world" do
100
- "Hello world!"
101
- end
102
-
103
- is "hello" do
104
- request.get do
105
- "Hello!"
106
- end
107
-
108
- request.post do
109
- puts "Someone said hello!"
110
- request.redirect
111
- end
112
- end
113
- end
114
-
115
- * A named_templates plugin has been added, for creating inline
116
- templates associated with a given name, that are used by
117
- the render plugin's render/view method in preference to
118
- templates stored in the filesystem. This makes it simpler to
119
- ship single-file Roda applications that use templates. Example:
120
-
121
- class App < Roda
122
- plugin :named_templates
123
-
124
- template :layout do
125
- "<html><body><%= yield %></body></html>"
126
- end
127
- template :index do
128
- "<p>Hello <%= @user %>!</p>"
129
- end
130
-
131
- route do |r|
132
- @user = 'You'
133
- render(:index)
134
- end
135
- # => "<html><body><p>Hello You!</p></body></html>"
136
- end
137
-
138
- * A multi_run plugin has been added, for dispatching to multiple
139
- rack applications based on the request path prefix. This
140
- provides a similar API as the multi_route plugin, but allows
141
- you to separate your applications per routing subtree, as
142
- opposed to multi_route which uses the same application for
143
- all routing subtrees.
144
-
145
- With the multi_run plugin, you call the class level run method
146
- with the routing prefix and the rack application to use, and
147
- you call r.multi_run to dispatch to all of the applications
148
- based on the prefix.
149
-
150
- class App < Roda
151
- plugin :multi_run
152
-
153
- run "foo", Foo
154
- run "bar", Bar
155
- run "baz", Baz
156
-
157
- route do |r|
158
- r.multi_run
159
- end
160
- end
161
-
162
- In this case, Foo, Bar, and Baz, can be subclasses of App, which
163
- allows them to share methods that should be shared, but still
164
- define methods themselves that are not shared by the other
165
- applications.
166
-
167
- * A sinatra_helpers plugin has been added, that ports over most
168
- of the Sinatra::Helpers methods that haven't already been added
169
- by other plugins. All of the methods are added either to the
170
- request or response class as appropriate. By default, delegate
171
- methods are also added to the route block scope, but you can
172
- turn this off by passing a :delegate=>false option when loading
173
- the plugin, which avoids polluting the route block namespace.
174
-
175
- The sinatra_helpers plugin adds the following request methods:
176
-
177
- * back
178
- * error
179
- * not_found
180
- * uri
181
- * send_file
182
-
183
- And the following response methods:
184
-
185
- * body
186
- * body=
187
- * status
188
- * headers
189
- * mime_type
190
- * content_type
191
- * attachment
192
- * informational?
193
- * success?
194
- * redirect?
195
- * client_error?
196
- * not_found?
197
- * server_error?
198
-
199
- * A slash_path_empty plugin has been added, which changes Roda
200
- so that "/" is considered an empty path when doing a
201
- terminal match via r.is or r.get/r.post with a path.
202
-
203
- class App < Roda
204
- plugin :slash_path_empty
205
-
206
- route do |r|
207
- r.get "albums" do
208
- # matches both GET /albums and GET /albums/
209
- end
210
- end
211
- end
212
-
213
- * An empty_root plugin has been added, which makes r.root match
214
- the empty string, in addition to /. This can be useful in
215
- cases where a partial match on the patch has been completed.
216
-
217
- class App < Roda
218
- plugin :empty_root
219
-
220
- route do |r|
221
- r.on "albums" do
222
- r.root do
223
- # matches both GET /albums and GET /albums/
224
- end
225
- end
226
- end
227
- end
228
-
229
- * A match_affix plugin has been added, for overriding the default
230
- prefix/suffix used in match patterns. For example, if you want
231
- to require that a leading / be specified in your routes. and
232
- you want to consume any trailing slash:
233
-
234
- class App < Roda
235
- plugin :match_affix, "", /(\/|\z)/
236
-
237
- route do |r|
238
- r.on "/albums" do |s|
239
- # GET /albums # s => ""
240
- # GET /albums/ # s => "/"
241
- end
242
- end
243
- end
244
-
245
- * An environments plugin has been added, giving some simple
246
- helpers for executing code in different environments. Example:
247
-
248
- class App < Roda
249
- plugin :environments
250
-
251
- environment # => :development
252
- development? # => true
253
- test? # => false
254
- production? # => false
255
-
256
- # Set the environment for the application
257
- self.environment = :test
258
- test? # => true
259
-
260
- configure do
261
- # called, as no environments given
262
- end
263
-
264
- configure :development, :production do
265
- # not called, as no environments match
266
- end
267
-
268
- configure :test do
269
- # called, as environment given matches current environment
270
- end
271
- end
272
-
273
- * A drop_body plugin has been added, which automatically drops the
274
- body, Content-Type header, and Content-Length header when the
275
- response status indicates no body (100-102, 204, 205, 304).
276
-
277
- * A delay_build plugin has been added, which delays building the
278
- rack application until Roda.app is called, and only rebuilds the
279
- rack application if build! is called. This removes O(n^2)
280
- performance in the pathological case of adding a route block
281
- and then calling Roda.use many times to add middlewares, though
282
- you have to add a few hundred middlewares for the difference
283
- to be noticeable.
284
-
285
- = New Features
286
-
287
- * r.remaining_path and r.matched_path have been added for returning
288
- the remaining path that will be used for matching, and for
289
- returning the path already matched. Currently, these just provide
290
- the PATH_INFO and SCRIPT_NAME, but starting in Roda 2 PATH_INFO
291
- and SCRIPT_NAME will not be modified during routing, and you'll
292
- need to use these methods if you want to find out the remaining
293
- or already matched paths.
294
-
295
- * The render plugin now supports a :template option to render/view
296
- to specify the template to use, instead of requiring a separate
297
- argument.
298
-
299
- * The render plugin now supports a :template_class option, allowing
300
- you to override the default template class that Roda would use.
301
-
302
- * The render plugin now supports a :template_block option, specifying
303
- the block to pass when creating a template.
304
-
305
- * The path class method added by the path plugin now accepts :name,
306
- :url, :url_only, and :add_script_name options:
307
-
308
- :name :: Specifies name for method
309
- :url :: Creates a url method in addition to a path method
310
- :url_only :: Only creates a url method, not a path method
311
- :add_script_name :: prefixes the path with SCRIPT_NAME
312
-
313
- Note that if you plan to use :add_script_name, you should use
314
- the static_path_info plugin so that the method created does not
315
- return different results depending on where you are in the
316
- routing tree.
317
-
318
- * A :user_agent hash matcher has been added to the header_matchers
319
- plugin.
320
-
321
- * An inherit_middleware class accessor has been added. This can
322
- be set to false if you do not want subclasses to inherit
323
- middleware from the superclass. This is useful if the
324
- superclass dispatches to the subclass via r.run, as otherwise
325
- it would have to run the same middleware stack twice.
326
-
327
- * A clear_middleware! class accessor has been added, allowing
328
- you to clear the current middleware stack.
329
-
330
- * RodaRequest#default_redirect_status has been added, allowing
331
- plugins to override the default status used for redirect if
332
- a status is not given.
333
-
334
- * Roda{Request,Response}#roda_class has been added, which
335
- returns the Roda class related to the given request/response.
336
-
337
- = Other Improvements
338
-
339
- * The render plugin no longer caches templates by default if
340
- RACK_ENV is development.
341
-
342
- * When subclassing a Roda app, unfrozen Array/Hash entries in the
343
- opts hash are now duped into the subclass, so the subclass
344
- no longer needs to dup them manually. Note that plugins that
345
- use nested arrays/hashes in the opts hash still need to dup
346
- manually inside ClassMethods#inherited. For the plugins where
347
- it is possible, it is recommended to store plugin options in a
348
- frozen object in the opts hash, and require loading the plugin
349
- again to modify the plugin options.
350
-
351
- * Caching of templates is now fixed when the render/view :opts is
352
- used to specify template options per-call.
353
-
354
- * An explicit :default_encoding of nil in the render plugin's
355
- :opts hash is no longer overwritten with
356
- Encoding.default_external.
357
-
358
- * Roda#session now returns the same object as RodaRequest#session.
359
-
360
- * The view_subdirs, content_for, and render_each plugins now all
361
- depend on the render plugin.
362
-
363
- * The not_allowed plugin now depends on the all_verbs plugin.
364
-
365
- * Local/instance variables are now used in more places instead of
366
- method calls, improving performance.
367
-
368
- = Backwards Compatibility
369
-
370
- * The render plugin's render/view methods no longer pass the given
371
- hash directly to the underlying template. To pass options to the
372
- template engine, use a separate hash under the :opts key:
373
-
374
- render :file, :opts=>{:foo=>'bar'}
375
-
376
- This is more consistent with the class-level render plugin options,
377
- which also uses :opts to pass options to the template engine.
378
-
379
- The :js_opts and :css_opts options to the assets plugin are now
380
- passed as the :opts hash, so they continue to affect the template
381
- engine, so they no longer specify general render method options.
382
-
383
- * Modifying render_opts :layout after loading the render plugin
384
- now has no effect. You need to use plugin :render, :layout=>'...'
385
- to set the layout to use now.
386
-
387
- * Default headers are not set on a response until the response is
388
- finished. This allows you to check for header presence during
389
- routing to detect whether the header was specifically set for the
390
- current request.
391
-
392
- * RodaRequest.consume_pattern no longer captures anything by default.
393
- Previously, it did so in order to update SCRIPT_NAME, but that is
394
- now handled differently. This should only affect external plugins
395
- that attempt to override RodaRequest#consume.
396
-
397
- * RodaRequest.def_verb_method has been removed.
398
-
399
- * The hooks, default_headers, json, and multi_route plugins all store
400
- their class-level metadata in the opts hash instead of separate
401
- class instance variables. This should have no affect unless you
402
- were accessing the class instance variables directly.
403
-
404
- * The render plugin internals changed significantly, it now passes
405
- internal data using a hash. This should only affect users that
406
- were overriding render plugin methods.
@@ -1,109 +0,0 @@
1
- = Preparation for Roda 2
2
-
3
- * In Roda 2 (the next version), the PATH_INFO and SCRIPT_NAME
4
- env variables will not be modified during routing. Instead,
5
- Roda will use the static_path_info plugin behavior by default.
6
- Users are strongly encouraged to use the static_path_info
7
- plugin to make sure their apps will work with Roda 2.
8
-
9
- * In Roda 2, Roda#initialize will take the env hash, and #call
10
- will take the route block. The private #_route method will be
11
- eliminated. This should not affect applications, but it will
12
- affect plugins that override these methods.
13
-
14
- * The issues mentioned below should all have deprecation warnings,
15
- except where noted.
16
-
17
- == New Plugins to Replace Deprecated Features
18
-
19
- * RodaResponse#set_cookie and #delete_cookie have been moved to the
20
- cookies plugin.
21
-
22
- * Roda.request_module and .response_module have been moved to the
23
- module_include plugin.
24
-
25
- * Roda.hash_matcher has been moved to the hash_matcher plugin.
26
-
27
- * The :extension hash matcher has been moved to the path_machers
28
- plugin. This plugin also contains new :prefix and :suffix hash
29
- matchers.
30
-
31
- * The :param and :param! hash matchers have been moved to the
32
- param_matchers plugin.
33
-
34
- == Other Deprecation Issues
35
-
36
- * The :opts render plugin option and :opts option to render and
37
- view are now deprecated. Use the :template_opts option instead.
38
-
39
- * RodaRequest#full_path_info has been deprecated, switch to using
40
- #path.
41
-
42
- * Mutating plugin option hashes for the chunked, default_headers,
43
- error_email, json, and render plugins is now deprecated, these
44
- option hashes will be frozen in Roda 2.
45
-
46
- * The :header hash matcher in the header_matchers plugin now
47
- gives a deprecation warning, because in Roda 2, the matcher will
48
- yield the value of the header to the block. To get the new
49
- behavior and silence the deprecation warning, you need to set an
50
- option:
51
-
52
- Roda.opts[:match_header_yield] = true
53
-
54
- * Mutating json_result_classes directly in the json plugin is now
55
- deprecated. You should now pass a :classes option to the plugin
56
- specifying the classes to convert, if you want to handle classes
57
- other than Array and Hash. There will not be a deprecation warning
58
- if you attempt to mutate json_result_classes.
59
-
60
- = New Features
61
-
62
- * The Roda.freeze method now freezes internal datastructures to avoid
63
- thread safety issues. The plugins that ship with Roda will freeze
64
- their datastructures when Roda.freeze is called. It is recommended
65
- that production applications call freeze on the application after
66
- fully loading it, especially if they are using a threaded webserver
67
- and a non-MRI ruby.
68
-
69
- * A delete_empty_headers plugin has been added that automatically
70
- deletes headers set to the empty string. This makes it simpler to
71
- delete default headers if they shouldn't be set for a specific
72
- request.
73
-
74
- * A class_delegate method has been added to the delegate plugin. This
75
- makes it easier to create instance methods that call class methods.
76
-
77
- * Roda::RodaMajorVersion, RodaMinorVersion, and RodaPatchVersion
78
- constants have been added.
79
-
80
- = Other Improvements
81
-
82
- * The error_handler plugin now uses a new response instead of reusing
83
- the existing response. This fixes cases where changing the
84
- Content-Type and then raising an exception would result in a error
85
- page that used the previously set Content-Type.
86
-
87
- * The not_found plugin now clears previous set headers before calling
88
- not found. This fixes cases where Content-Type was set previously,
89
- and also fixes an incorrect Content-Length being used for the
90
- response.
91
-
92
- * The static_path_info plugin now restores the original SCRIPT_NAME
93
- and PATH_INFO before returning from r.run, fixing usage with some
94
- middleware.
95
-
96
- * The multi_run plugin now works when subclassing the app.
97
-
98
- * The default_headers plugin is now faster by skipping an unnecessary
99
- hash duplication.
100
-
101
- * A Gemfile has been added to make development slightly easier.
102
-
103
- = Backwards Compatibility
104
-
105
- * RodaResponse is no longer a subclass of Rack::Response, it is now a
106
- subclass of Object. This shouldn't have an effect unless you were
107
- calling a method on an instance that was defined by Rack::Response
108
- and not RodaResponse, but most of those methods would have raised
109
- exceptions.