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,14 +0,0 @@
1
- = New Features
2
-
3
- * An error_mail plugin has been added for reporting exceptions raised
4
- via email. This is similar to the existing error_email plugin, but
5
- uses the mail library instead of net/smtp directly. If you are
6
- already using the mail library and the error_email plugin in your
7
- application, it's recommended to switch to the error_mail plugin.
8
- Example:
9
-
10
- plugin :error_mail, :to=>'to@example.com', :from=>'from@example.com'
11
- plugin :error_handler do |e|
12
- error_mail(e)
13
- 'Internal Server Error'
14
- end
@@ -1,13 +0,0 @@
1
- = New Features
2
-
3
- * The csrf plugin now supports a :skip_middleware option, which adds
4
- the methods without adding the middleware. This is designed for
5
- cases where you are using multiple rack apps, where the rack_csrf
6
- middleware is loaded in an earlier rack app, and you want to avoid
7
- the duplicate CSRF checks.
8
-
9
- = Other Improvements
10
-
11
- * The type_routing plugin now supports using multiple extensions
12
- where one extension is a suffix of another extension, such as
13
- using gz and tar.gz.
@@ -1,56 +0,0 @@
1
- = New Features
2
-
3
- * String and Integer class matchers have been added. The
4
- String class matches any non-empty segment and yields it as a
5
- string. This is the same as the behavior of the symbol matchers,
6
- but without the duplication. So instead of:
7
-
8
- r.is "album", :album_name do |album_name|
9
- end
10
-
11
- you can now do:
12
-
13
- r.is "album", String do |album_name|
14
- end
15
-
16
- This makes it a bit more intuitive that you want to match
17
- any string, and avoids the redundancy between the symbol
18
- name and block argument name.
19
-
20
- The Integer class matches any integer segment (\d+) and yields it
21
- as an integer:
22
-
23
- r.is "album", Integer do |album_id|
24
- # does not match "/albums/foo"
25
- # matches "/albums/1", yielding 1 (not "1")
26
- end
27
-
28
- Previously, the :d matcher in the symbol_matchers plugin could
29
- be used to only match integer segments, but it yielded results
30
- as strings and not integers, so you still needed to convert the
31
- type manually. Using Integer is a bit more intuitive than
32
- using :d, and it handles the type conversion for you.
33
-
34
- * A class_matchers plugin has been added for matching additional
35
- classes, with user-specified regexps and type conversion. For
36
- example, if you want to match YYYY-MM-DD segments and yield
37
- them to the match blocks as ruby Date objects, you can do:
38
-
39
- plugin :class_matchers
40
-
41
- class_matcher(Date, /(\d\d\d\d)-(\d\d)-(\d\d)/) do |y, m, d|
42
- [Date.new(y.to_i, m.to_i, d.to_i)]
43
- end
44
-
45
- and then in your routing tree, you can do:
46
-
47
- r.on "posts", Date do |date|
48
- # does not match "/posts/foo" or "/posts/2017-01"
49
- # matches "/posts/2017-01-13", yielding Date.new(2017, 1, 13)
50
- end
51
-
52
- = Backwards Compatibility
53
-
54
- * If you were using the Integer and String classes as matchers
55
- before and expected them to always match, you'll need to
56
- change your code to use true instead.
@@ -1,17 +0,0 @@
1
- = New Features
2
-
3
- * A status_303 plugin has been added, which changes the default
4
- redirect status from 302 to 303 if the HTTP version is 1.1 and
5
- the request is not a GET request.
6
-
7
- = Other Improvements
8
-
9
- * Roda is now optimized for ruby 2.3+ using frozen string literals
10
- instead of constant references. This improves performance on ruby
11
- 2.3+, and decreases performance on ruby <2.3.
12
-
13
- = Backwards Compatibility
14
-
15
- * Many now unused internal constants are now deprecated, and
16
- attempting to access them will result in deprecation warnings
17
- on ruby 2.3+.
@@ -1,156 +0,0 @@
1
- = Deprecated Features
2
-
3
- Roda 2.29.0 will be the last minor release of Roda 2. Roda 3.0.0
4
- will be released next month and will remove support for the following
5
- deprecated features. All of these features will have deprecation
6
- warnings if used in Roda 2.29.0.
7
-
8
- * The use of placeholders in string matchers is now deprecated.
9
- So code such as:
10
-
11
- r.get "users/:user_id" do |id|
12
- end
13
-
14
- should be switched to using a class matcher such as String or
15
- Integer:
16
-
17
- r.get "users", Integer do |id|
18
- end
19
-
20
- or a symbol matcher:
21
-
22
- r.get "users", :user_id do |id|
23
- end
24
-
25
- If you really want to keep support for placeholders in string
26
- matchers, the support is available in the new
27
- placeholder_string_matchers plugin.
28
-
29
- * The :format, :opt, and :optd default symbol matchers are now
30
- deprecated in the symbol_matchers plugin. These matchers
31
- only made sense when placeholder string matchers are used,
32
- which will no longer be the default behavior in Roda 3. These
33
- methods can be defined manually if you are going to use the
34
- placeholder_string_matchers plugin and still want to use
35
- these symbol matchers:
36
-
37
- symbol_matcher(:format, /(?:\.(\w+))?/)
38
- symbol_matcher(:opt, /(?:\/([^\/]+))?/)
39
- symbol_matcher(:optd, /(?:\/(\d+))?/)
40
-
41
- * Ignoring unsupported match block return values is now deprecated.
42
- Doing so can hide errors and make debugging more difficult. If you
43
- get a deprecation warning related to this, just make sure the match
44
- block returns nil or false to specify the match block return value
45
- should be ignored.
46
-
47
- * Treating unsupported matchers as always matching is now deprecated.
48
- Doing so can hide errors and make debugging more difficult. If you
49
- get a deprecation warning related to this, switch the matcher to
50
- true instead of an unsupported object.
51
-
52
- * The render plugin's handling of plugin level locals and merging of
53
- template and layout locals is now deprecated. Users of these
54
- features should switch to the new render_locals plugin.
55
-
56
- * The view_options plugin's handling of per-branch view and layout
57
- locals is now deprecated. Users of these feature should switch to
58
- the new branch_locals plugin.
59
-
60
- * The render plugin's support for Erubis escaping is now deprecated.
61
- In Roda 3, the render plugin :escape option will use Erubi escaping.
62
- Switch to using :escape=>:erubi temporarily to avoid the deprecation
63
- warning.
64
-
65
- * Using the render plugin to render a template that is outside one of
66
- the allowed paths is now deprecated unless the :check_paths option
67
- has been set to false. In Roda 3, the default behavior will change
68
- to checking that template files are in one of the allowed paths.
69
-
70
- * The :ext option in the render plugin is now deprecated, users should
71
- switch to using the :engine option, which has always had priority.
72
-
73
- * Using the :cache=>true option to the view/render method in the
74
- render plugin is now deprecated if the :cache=>nil/false option
75
- was given when loading the plugin. In Roda 3, the default behavior
76
- will change so that the :cache=>nil/false plugin option still
77
- allows caching via the :cache=>true method option. Users can use
78
- the :explicit_cache=>true render plugin option instead of the
79
- :cache=>nil render plugin option to work around the deprecation
80
- warning.
81
-
82
- * Attempting to use multi_route while routing with a namespace that
83
- hasn't yet been defined is now deprecated. The previous behavior
84
- was to ignore undefined namespaces, but that is more likely to
85
- hide an error than be desired behavior. In Roda 3, using an
86
- undefined namespace will raise an error.
87
-
88
- * The streaming plugin's support for EventMachine is now deprecated,
89
- as is related support for Stream#callback. The streaming plugin
90
- will be much simpler in Roda 3 by dropping this support.
91
-
92
- * Calling content_for in the content_for plugin multiple times with
93
- the same argument is now deprecated unless the content_for
94
- plugin :append option is used to specify behavior. The default
95
- behavior in Roda 3 will change to appending to the existing
96
- content instead of overwriting the existing content.
97
-
98
- * The :host matcher in the header_matchers plugin is now deprecated
99
- when using a regexp value unless the :host_matcher_captures app
100
- option is used. In Roda 3, the :host matcher will automatically
101
- yield any regexp captures to the match block.
102
-
103
- * The :header matcher in the header_matchers plugin is now deprecated
104
- unless the :header_matcher_prefix app option is used. In Roda 3,
105
- the :header matcher will always prefix the argument given with
106
- HTTP_.
107
-
108
- * The websockets plugin is now deprecated. It was one of the less
109
- commonly used plugins, and the tests for it were subject to race
110
- conditions and failed occassionally, and even when they worked
111
- they almost doubled the testing time. Anyone wanting to use it
112
- should consider maintaining it as an external plugin.
113
-
114
- * The per_thread_caching, static_path_info, and view_subdirs
115
- plugins are now deprecated. static_path_info has been a no-op since
116
- Roda 3, view_subdirs is just an alias for view_options, and
117
- per_thread_caching doesn't change behavior and is unlikely to
118
- significantly increase performance.
119
-
120
- * Additional internal constants are now deprecated. Deprecation
121
- warnings for accessing these constants will only be displayed on
122
- ruby 2.3+.
123
-
124
- = Forward Compatibility
125
-
126
- Roda 3.0.0 will also include some behavior changes which will not
127
- have deprecation warnings:
128
-
129
- * Ruby 1.8.7 support will be dropped. Ruby 1.9.2 will be the new
130
- minimum supported version.
131
-
132
- * Subclassing a Roda app that uses the render plugin will always
133
- use a copy of the superclass's template cache.
134
-
135
- * The assets plugin will default to using subresource integrity
136
- using SHA256 for compiled assets, and using SHA256 instead of
137
- SHA1 for compiled asset hashes.
138
-
139
- * Using an Roda app as middleware will now always use a subclass
140
- of the app for the middleware.
141
-
142
- * public_send will be used instead of send internally unless it is
143
- expected that private methods will be called.
144
-
145
- * The match methods added by the symbol_matchers and hash_matchers
146
- plugins will be private instead of public.
147
-
148
- = New Features
149
-
150
- * The render plugin now has the :layout_opts=>:views plugin option
151
- respect the :root app option.
152
-
153
- * RodaPlugins::OPTS and RodaPlugins::EMPTY_ARRAY have been added.
154
- These are a frozen empty hash and a frozen empty array, and
155
- they are designed for use in plugins so that similar objects are
156
- not needed to be defined separately in each plugin.
@@ -1,109 +0,0 @@
1
- = New Plugins
2
-
3
- * A json_parser plugin has been added, for parsing request bodies in
4
- JSON format. This is faster than using a middleware to perform
5
- the same task. This plugin supports a :parser option to use a
6
- custom JSON parser, an :include_request option to include the
7
- request when calling the parser, and a :error_handler option for
8
- a proc to call with the request if there is an error when parsing.
9
- Example:
10
-
11
- plugin :json_parser,
12
- :parser=>JSON.method(:parse),
13
- :include_request=>false,
14
- :error_handler=>proc{|r| r.halt [400, {}, []]}
15
-
16
- * A path_rewriter plugin has been added, allowing for the rewriting
17
- of paths before routing. This allows you to rewrite just the
18
- routing path (the default), or PATH_INFO as well as the routing
19
- path (if the :path_info option is used). This is useful if you
20
- want to internally treat one path exactly the same as another
21
- path.
22
-
23
- By default, path rewriting is done on prefixes, so any path that
24
- starts with the prefix will be rewritten. You can pass a
25
- Regexp when rewriting the path for more complete control.
26
-
27
- Examples:
28
-
29
- plugin :path_rewriter
30
- rewrite_path '/a', '/b'
31
- # GET /a treated as GET /b
32
- # GET /a/c treated as GET /b/c
33
-
34
- rewrite_path /\A\/c\z/, '/d'
35
- # GET /c treated as GET /d
36
- # GET /c/e no change
37
-
38
- * A precompiled_templates plugin has been added, for precompiling
39
- templates before starting the application. This can save a
40
- substantial amount of memory if you are using large templates or
41
- a large number of small templates in conjunction when using
42
- application preloading with a forking webserver. Example:
43
-
44
- plugin :precompile_templates
45
- precompile_templates "views/\*\*/*.erb"
46
- precompile_templates "views/users/_*.erb", :locals=>[:user]
47
-
48
- * A heartbeat plugin has been added, for easily handling
49
- heartbeat/status requests. If a heartbeat/status request comes in,
50
- it will get a 200 response with a body of "OK". This is designed
51
- for automated systems that check if the application is functioning.
52
- The default heartbeat path is /heartbeat, but you can choose a
53
- different one using the :path option.
54
-
55
- plugin :heartbeat, :path=>'/heartbeat'
56
-
57
- = Other New Features
58
-
59
- * The json plugin now supports a :serializer option to use a custom
60
- serializer. Additionally, it now supports a :include_request
61
- option to include the request when calling the serializer.
62
-
63
- * In the render plugin, the render/view methods now support a
64
- :cache=>false option to not cache the template. This can be useful
65
- for large but rarely used templates, or where a new template object
66
- is created for every render/view call.
67
-
68
- * In the render plugin, the render/view methods now support a
69
- :cache_key option to force a specific cache key. Manually setting
70
- cache keys can result in improved performance, as automatically
71
- determining the cache key can be a relatively expensive operation.
72
-
73
- * The render plugin now supports a :engine_opts option, to specify
74
- per-template engine options. :engine options should be a hash
75
- keyed by render engine strings, with values being hashes of
76
- template options.
77
-
78
- * In the mailer plugin, a no_mail! method is now supported when
79
- mailing, which will skip the current mail. This makes it easier
80
- to delay the decision about actually sending the email till it is
81
- time to send the email, which makes it easier to avoid race
82
- conditions if you are using a job queue for mailing.
83
-
84
- = Other Improvements
85
-
86
- * Roda avoids rehashing hashes at runtime in some places, for a minor
87
- speedup.
88
-
89
- * If the :template_block is given to render/view, default to not
90
- caching the template, since it is likely the template block is
91
- specific to the request. Allow for the :cache=>true option to be
92
- used to force the caching of the template.
93
-
94
- * Roda now returns a 404 response for unmatched GET requests when
95
- using the assets and json plugins where r.assets is the last
96
- method called in a route block.
97
-
98
- = Backwards Compatibility
99
-
100
- * In the render plugin, the :ext option to the plugin and to the
101
- render/view methods is now replaced by the :engine option.
102
- Previously, :engine was used by default if :ext was not given. In
103
- general, there is no need for two separate options, the engine is
104
- used as the extension by Tilt.
105
-
106
- In general, this is a backwards compatible change, except when
107
- both :ext and :engine were specified differently as plugin options,
108
- and an inline template is used with render or view without either
109
- the :ext or :engine options being specified.
@@ -1,55 +0,0 @@
1
- = New Plugins
2
-
3
- * A websocket plugin has been added, for websocket support using
4
- faye-websocket. Here's an example of a simple echo service using
5
- websockets:
6
-
7
- plugin :websockets
8
-
9
- route do |r|
10
- r.get "echo" do
11
- r.websocket do |ws|
12
- # Routing block taken for a websocket request to /echo
13
-
14
- # ws is a Faye::WebSocket instance, so you can use the
15
- # Faye::WebSocket API
16
- ws.on(:message) do |event|
17
- ws.send(event.data)
18
- end
19
- end
20
-
21
- # View rendered if a regular GET request to /echo
22
- view "echo"
23
- end
24
- end
25
-
26
- * A status_handler plugin has been added, which allows Roda to
27
- specially handle arbitrary status codes. Usage is similar to the
28
- not_found plugin (which now uses status_handler internally):
29
-
30
- plugin :status_handler
31
-
32
- status_handler 403 do
33
- "You are forbidden from seeing that!"
34
- end
35
- status_handler 404 do
36
- "Where did it go?"
37
- end
38
-
39
- = Other New Features
40
-
41
- * The assets plugin now supports a :gzip option, which will save
42
- gzipped versions when compiling assets. When serving compiled
43
- assets, if the request accepts gzip encoding, it will serve
44
- the gzipped version. This also plays nicely with nginx's
45
- gzip_static support.
46
-
47
- * The assets plugin now supports Google Closure Compiler, Uglifier,
48
- and MinJS for minifying javascript. You can now specify which
49
- css and js compressors to use via the :css_compressor and
50
- :js_compressor options.
51
-
52
- = Backwards Compatibility
53
-
54
- * Roda.plugin now always returns nil. Previously the return value
55
- could be non-nil if the plugin used a configure method.
@@ -1,23 +0,0 @@
1
- = New Features
2
-
3
- * The assets plugin now supports a :compiled_asset_host option, which
4
- specifies a hostname used to serve compiled assets.
5
-
6
- * The render plugin now supports a :cache_class option, which
7
- specificies a class to use for the thread-safe template cache.
8
- This can be used to setup LRU caching or caching that checks
9
- modify times on the underlying template files.
10
-
11
- * r.multi_run in the multi_run plugin now accepts a block, and calls
12
- the block before dispatching to the related rack application. This
13
- can be used to modify the environment before dispatching. Example:
14
-
15
- r.multi_run do |prefix|
16
- env['authenticated'] = true
17
- end
18
-
19
- = Backwards Compatibility
20
-
21
- * The :by_name option to the path plugin now defaults to true in
22
- development mode. This should only negatively affect applications
23
- that register anonymous classes with the path plugin.