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,48 +0,0 @@
1
- = New Features
2
-
3
- * A type_routing plugin has been added. This plugin allows routing
4
- based on the requested type, which can be submitted either via a
5
- file extension or Accept header:
6
-
7
- plugin :type_routing
8
-
9
- route do |r|
10
- r.get 'a' do
11
- r.html{ "<h1>This is the HTML response</h1>" }
12
- r.json{ '{"json": "ok"}' }
13
- r.xml{ "<root>This is the XML response</root>" }
14
- end
15
- end
16
-
17
- # /a or /a.html => HTML response
18
- # /a.json => JSON response
19
- # /a.xml => XML response
20
-
21
- The response content type is set appropriately when the r.html,
22
- r.json, or r.xml block is yielded to. Using plugin options, you can
23
- add support for custom types, and choose whether to use only file
24
- extensions or only Accept headers for type matching.
25
-
26
- * A request_headers plugin has been added. This allows easier access
27
- to request headers. For example, to access a header called
28
- X-My-Header, by default you would need to use the CGI mangled name:
29
-
30
- r.env['HTTP_X_MY_HEADER']
31
-
32
- The request_headers plugin allows the easier to use:
33
-
34
- r.headers['X-My-Header']
35
-
36
- * An unescape_path plugin has been added. By default, Roda does not
37
- unescape a URL-encoded PATH_INFO before routing. This plugin allows
38
- URL-encoded PATH_INFO to work, supporting %2f as well as / as path
39
- separators, and having captures return unescaped values:
40
-
41
- plugin :unescape_path
42
-
43
- route do |r|
44
- # Assume /b/a URL encoded at %2f%62%2f%61
45
- r.on :x, /(.)/ do |*x|
46
- # x => ['b', 'a']
47
- end
48
- end
@@ -1,62 +0,0 @@
1
- = New Plugins
2
-
3
- * A run_append_slash plugin has been added, which automatically uses
4
- "/" as the path instead of an empty path when calling rack
5
- applications with r.run:
6
-
7
- route do |r|
8
- r.on "a" do
9
- r.run App
10
- end
11
- end
12
-
13
- # without run_append_slash:
14
- # GET /a => App gets "" as PATH_INFO
15
- # GET /a/ => App gets "/" as PATH_INFO
16
-
17
- # with run_append_slash:
18
- # GET /a => App gets "/" as PATH_INFO
19
- # GET /a/ => App gets "/" as PATH_INFO
20
-
21
- By default, the path is modified directly, but if you want to
22
- redirect instead, you can pass a :use_redirects option when loading
23
- the plugin.
24
-
25
- = New Features
26
-
27
- * The assets plugin now supports an :sri option to enable subresource
28
- integrity on the link/script tags generated by the assets helper.
29
- This option takes either :sha256, :sha384, or :sha512 values,
30
- specifying the hash algorithm to use. Roda 3 will default to using
31
- :sri => :sha256.
32
-
33
- * The assets plugin now supports a :postprocessor option, which should
34
- be a callable object. If the option is given, it will be called with
35
- the filename, type, and rendered asset output of the file (CSS/JS),
36
- and should return the postprocessed content to use. This allows any
37
- type of custom postprocessing to be done, such as CSS autoprefixing.
38
-
39
- * The render plugin now supports a :layout_opts=>:merge_locals option,
40
- which will automatically merge view template locals into layout
41
- template locals. This is useful if you want to use the same local
42
- variable for both templates.
43
-
44
- * The error_handler plugin now supports a :classes option, allowing
45
- you to override which exception classes to handle. This allows it
46
- to be used with libraries which use exception classes that
47
- subclass from Exception instead of StandardError.
48
-
49
- = Other Improvements
50
-
51
- * The type_routing plugin now works correctly when using r.run.
52
- Previously, if the type routing plugin recognized and removed
53
- the file extension used in the requested path, it would not
54
- add the file extension back to the path when passing the request
55
- to another rack app.
56
-
57
- = Backwards Compatibility
58
-
59
- * In the assets plugin, Roda::RodaRequest.assets_matchers now uses
60
- symbols instead of strings as the first argument in each entry.
61
- This should not affect you unless you were accessing the values
62
- directly.
@@ -1,69 +0,0 @@
1
- = New Plugins
2
-
3
- * A static_routing plugin has been added, which can give a 3-4x
4
- increase in performance for large number of static routes, and
5
- makes routing O(1) for static routes. Static routes are routes
6
- that match full paths, with no placeholders, and are checked before
7
- using the normal routing tree.
8
-
9
- Static routes are defined via class-level static_* routing methods.
10
- There is a static_* routing method for each HTTP verb (e.g.
11
- static_get), as well as a static_route method, which will work
12
- for any HTTP verb, with the verb-specific method taking priority.
13
- By using static_route, you can get significantly faster performance
14
- while retaining some of the benefits of Roda's routing tree design
15
- (simple shared logic with verb specific behavior). Example:
16
-
17
- plugin :static_routing
18
-
19
- static_route '/foo' do |r|
20
- @var = :foo
21
-
22
- r.get do
23
- 'Not actually reached'
24
- end
25
-
26
- r.post{'static POST /#{@var}'}
27
- end
28
-
29
- static_get '/foo' do |r|
30
- 'static GET /foo'
31
- end
32
-
33
- route do |r|
34
- 'Not a static route'
35
- end
36
-
37
- Because static routing routes on the full path instead of by
38
- path segment, the methods takes the full path as a string,
39
- including the leading slash.
40
-
41
- * An assets_preloading plugin has been added, which makes it simple
42
- to generate HTML link tags or a Link header value to tell the
43
- browser to preload assets for performance reasons.
44
-
45
- # In routes, using the Link header:
46
- response.headers['Link'] = preload_assets_link_header(:css)
47
-
48
- # In templates, using a link tag:
49
- <%= preload_assets_link_tags(:css) %>
50
-
51
- = New Features
52
-
53
- * RodaRequest#real_remaining_path has been added. This is designed
54
- to be overridden by plugins that modify remaining_path for internal
55
- routing purposes. RodaRequest#run now uses real_remaining_path
56
- when passing requests to other rack applications.
57
-
58
- * An assets_paths method has been added to the assets plugin. This
59
- is similar to the assets method, but it returns an array of paths
60
- to the assets, instead of a HTML link/script tag.
61
-
62
- = Other Improvements
63
-
64
- * The public plugin now works correctly when used with the
65
- type_routing plugin, for paths ending in extensions that
66
- type_routing is configured to handle.
67
-
68
- * The head plugin now works with the not_allowed plugin if it is
69
- loaded after the not_allowed plugin.
@@ -1,30 +0,0 @@
1
- = Improvements
2
-
3
- * The indifferent_params plugin is now optimized when using Rack 2,
4
- using Rack 2's query_parser API, and it no longer needs to do a
5
- deep copy of the params.
6
-
7
- * The Content-Type and Content-Length headers are no longer added
8
- for 1xx, 204, 205, and 304 responses.
9
-
10
- * The assets_paths method in the assets plugin now works
11
- correctly when subresource integrity is enabled.
12
-
13
- * The asset paths are now escaped in tags by the assets and
14
- assets_preloading plugins. While it's unlikely a developer
15
- would use an asset path that requires escaping, that case is
16
- now handled correctly.
17
-
18
- * The h plugin no longer calls Rack::Utils.escape_html, instead
19
- implementing it's own html escaping.
20
-
21
- * The assets plugin now uses the h plugin, instead of calling
22
- Rack::Utils.escape_html.
23
-
24
- = Backwards Compatibility
25
-
26
- * The h plugin's html escaping no longer escapes "/", which is
27
- a behavior change if you are using any recent version of rack.
28
- The security arguments made to escape "/" could be applied to
29
- many other characters, so if you want to escape "/", you should
30
- probably use a separate method that escapes all \W characters.
@@ -1,97 +0,0 @@
1
- = New Plugins
2
-
3
- * A shared_vars plugin has been added, for sharing variables between
4
- multiple Roda apps. Example:
5
-
6
- class API < Roda
7
- plugin :shared_vars
8
- route do |r|
9
- user = shared[:user]
10
- # ...
11
- end
12
- end
13
-
14
- class App < Roda
15
- plugin :shared_vars
16
-
17
- route do |r|
18
- r.on :user_id do |user_id|
19
- shared[:user] = User[user_id]
20
- r.run API
21
- end
22
- end
23
- end
24
-
25
- If you pass a hash to shared, it will update the shared
26
- variables with the content of the hash:
27
-
28
- route do |r|
29
- r.on :user_id do |user_id|
30
- shared(:user => User[user_id])
31
- r.run API
32
- end
33
- end
34
-
35
- You can also pass a block to shared, which will set the
36
- shared variables only for the given block, restoring the
37
- previous shared variables afterward:
38
-
39
- route do |r|
40
- r.on :user_id do |user_id|
41
- shared(:user => User[user_id]) do
42
- r.run API
43
- end
44
- end
45
- end
46
-
47
- * The partials method added by the padrino_render plugin has been
48
- extracted into a partials plugin, for users who want to use the
49
- partials method without having render use a layout by default.
50
-
51
- = Other New Features
52
-
53
- * The render plugin when using the :escape option now additionally
54
- supports an :escape_safe_classes option, which accepts a class or
55
- array of classes that should not be automatically escaped when using
56
- <%= %> tags. This makes easier to integrate with helpers or
57
- external libraries that return already html escaped strings, without
58
- using <%== %> tags.
59
-
60
- For complete control, an :escaper option is also supported, which
61
- will be used for escaping <%= %> strings. The value of this option
62
- should be an object that responds to escape_xml with a single
63
- argument and returns an output string.
64
-
65
- * A Roda#delay method has been added to the chunked plugin, which
66
- delays execution of the given block until right before the content
67
- template is rendered. This allows you to continue to use the
68
- routing tree to DRY up your code even when streaming template
69
- rendering. Example:
70
-
71
- r.on 'albums/:d' do |album_id|
72
- delay do
73
- @album = Album[album_id]
74
- end
75
- r.get 'info' do
76
- chunked(:info)
77
- end
78
- r.get 'tracks' do
79
- chunked(:tracks)
80
- end
81
- end
82
-
83
- * The path plugin now supports a :by_name option, which makes lookup
84
- of the class be by name as opposed to by reference. This is
85
- designed for use in development when doing code reloading.
86
-
87
- * Roda.path_block has been added to the path plugin for returning the
88
- block associated with the given class.
89
-
90
- = Other Improvements
91
-
92
- * The default_headers plugin now defaults to the same headers that
93
- Roda uses by default (just the Content-Type header with text/html
94
- value). Previously, it did not set a Content-Type header if you
95
- didn't specify one.
96
-
97
- * In the path plugin, Roda#path now works correctly in subclasses.
@@ -1,5 +0,0 @@
1
- = New Features
2
-
3
- * The render plugin now supports :erubi as an :escape option value,
4
- which will change the plugin to use Erubi instead of Erubis as the
5
- template processor. Erubi is a simplified Erubis fork.
@@ -1,17 +0,0 @@
1
- = New Features
2
-
3
- * The streaming plugin now supports a handle_stream_error method to
4
- handle exceptions when using stream(:loop=>true). This method
5
- takes the exception and the stream object, and can be used to log
6
- errors, output errors into the stream, close the stream, ignore
7
- errors, or any other error handling.
8
-
9
- = Other Improvements
10
-
11
- * A couple of unused variable assignments have been removed, providing
12
- a minor speedup.
13
-
14
- * The specs no longer produce deprecation warnings when using Minitest
15
- 5.10.
16
-
17
- * Some verbose warnings have been removed from the specs.
@@ -1,41 +0,0 @@
1
- = New Features
2
-
3
- * An :unsupported_block_result => :raise option is now supported
4
- for Roda applications. This will raise a RodaError if an
5
- unsupported value is returned from a match block or the
6
- route block. This can make it easier to discover potential
7
- problems in the routing tree. This option may become the
8
- default behavior in Roda 3.
9
-
10
- * An :unsupported_matcher => :raise option is now supported for
11
- Roda applications. This will raise a RodaError if you use an
12
- unsupported value as a matcher. This can make it easier to
13
- discover potential problems in the routing tree. This option
14
- may become the default behavior in Roda 3.
15
-
16
- * A :verbatim_string_matcher option is now supported for Roda
17
- applications. This will make all string matchers only match
18
- the path verbatim, disallowing the use of a colon for
19
- placeholders in the string. It's recommended that users
20
- switch to using separate symbol arguments for placeholders.
21
-
22
- If you enable this option, you need to change code such as:
23
-
24
- r.is "foo/:bar" do |bar|
25
- end
26
-
27
- to:
28
-
29
- r.is "foo", :bar do |bar|
30
- end
31
-
32
- If you are looking to convert an existing routing tree
33
- from using placeholders in strings to separate symbol
34
- arguments, you can scan your routing tree for potential
35
- usage of placeholders in strings:
36
-
37
- grep ' r\..*['\''"].*:.*['\''"]' app.rb
38
-
39
- This option may become the default behavior in Roda 3, with
40
- a plugin added to support the current default behavior of
41
- allowing placeholders in string matchers.
@@ -1,29 +0,0 @@
1
- = New Features
2
-
3
- * An :explicit_cache option has been added to the render plugin.
4
- This is similar to the :cache=>false option, but instead of
5
- disabling caching completely, this disables caching by default but
6
- allows for explicit caching of templates by providing the :cache
7
- option to view/render.
8
-
9
- In development mode, Roda now defaults to :explicit_cache=>true
10
- instead of :cache=>false.
11
-
12
- * An :inherit_cache option has been added to the render plugin,
13
- making subclasses of that class start with a dup of the template
14
- cache, instead of starting with an empty template cache. This can
15
- result in less memory used.
16
-
17
- * Roda#error_email in the error_email plugin now accepts non-Exception
18
- arguments (such as strings). This can be useful in conditions that
19
- are errors you may want to notify about, where an exception hasn't
20
- been raised.
21
-
22
- * Roda#error_email_content has been added to the error_email plugin.
23
- This can be used to create the email message, which can be delivered
24
- via another mechanism, and may make testing easier.
25
-
26
- = Other Improvements
27
-
28
- * Roda.freeze in the static_routing plugin now returns self, fixing
29
- code such as Roda.freeze.app.
@@ -1,65 +0,0 @@
1
- = New Features
2
-
3
- * The middleware plugin now accepts a block that can be used to
4
- implement configurable middleware. This allows you to load the
5
- Roda application as middleware in another application, and provide
6
- options/block that are passed to the block you passed when loading
7
- the middleware plugin. Example:
8
-
9
- class Mid < Roda
10
- plugin :middleware do |middleware, *args, &block|
11
- middleware.opts[:middleware_args] = args
12
- block.call(middleware)
13
- end
14
- end
15
-
16
- class App < Roda
17
- use Mid, :foo, :bar do |middleware|
18
- middleware.opts[:middleware_args] << :baz
19
- end
20
- end
21
-
22
- Note that when passing a block when loading the middleware plugin,
23
- using the middleware in another rack application will actually
24
- load a subclass of the middleware (Mid in the example above).
25
- This allows you to use the Roda middleware multiple times in the
26
- same process with different configurations.
27
-
28
- * The cookies plugin now accepts options that are used as the default
29
- options when setting and deleting cookies:
30
-
31
- plugin :cookies, :path => '/foo', :domain => 'example.com'
32
-
33
- * A strip_path_prefix plugin has been added, which can be used to
34
- strip prefixes from internal paths. Internally Sequel stores
35
- most paths as absolute paths, but there are cases where this
36
- doesn't work well, such as symlink changes and chroot. This
37
- plugin supports those scenarios.
38
-
39
- * A disallow_file_uploads plugin has been added, which raises
40
- an exception if the user attempts a multipart file upload.
41
- More exactly, it makes the application raise an exception if
42
- attempting to parse a request body when the user has submitted
43
- a multipart file upload. This is useful if you don't need to
44
- support file uploads in your application, or cases where no
45
- paths are writable by the application (due to chroot or system call
46
- filtering).
47
-
48
- * The :freeze_middleware option has been added, which freezes all
49
- middleware instances when building the rack application. This
50
- can help find thread safety issues in middleware.
51
-
52
- = Other Improvements
53
-
54
- * The h plugin is now about 6x faster on ruby 2.3+ due to the use
55
- of cgi/escape.
56
-
57
- * The static_routing plugin now works with the hooks plugin if the
58
- hooks plugin is loaded first.
59
-
60
- * The render plugin's render cache is no longer cleared when loading
61
- the plugin multiple times.
62
-
63
- = Backwards Compatibility
64
-
65
- * The h plugin now escapes ' as &#39; instead of &#x27;.