Skip to content

Commit

Permalink
Bump version to 3.86.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Nov 12, 2024
1 parent e6c84e8 commit 711460e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= master
= 3.86.0 (2024-11-12)

* Add conditional_sessions plugin, for using the sessions plugin for only a subset of requests (jeremyevans)

Expand Down
38 changes: 38 additions & 0 deletions doc/release_notes/3.86.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= New Features

* A conditional_sessions plugin has been added. This allows you to
only support sessions for a subset of the application's requests.
You pass a block when loading the plugin, and sessions are only
supported if the block returns truthy. The block is evaluated
in request scope.

As an example, if you do not want to support sessions for request
paths starting with /static, you could use:

plugin :conditional_sessions, secret: ENV["SECRET"] do
!path_info.start_with?('/static')
end

With this example, if the request path starts with /static:

* The request methods +session+, +session_created_at+, and
+session_updated_at+ all raise an exception.
* The request +persist_session+ and route scope +clear_session+
methods do nothing and return nil.

Options passed when loading the plugin are passed to the sessions
plugin.

* In the content_security_policy plugin, you can now call
response.skip_content_security_policy! to skip the setting of the
response header.

* In the permissions_policy plugin, you can now call
response.skip_permissions_policy! to skip the setting of the
response header.

= Other Improvements

* When using the autoload_hash_branches and/or autoload_named_routes
plugins, Roda.freeze now works correctly if the Roda class is
already frozen.
2 changes: 1 addition & 1 deletion lib/roda/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Roda
RodaMajorVersion = 3

# The minor version of Roda, updated for new feature releases of Roda.
RodaMinorVersion = 85
RodaMinorVersion = 86

# The patch version of Roda, updated only for bug fixes from the last
# feature release.
Expand Down

0 comments on commit 711460e

Please sign in to comment.