Skip to content

Commit

Permalink
Ensure on_rotation appears in RDoc [ci-skip]
Browse files Browse the repository at this point in the history
When a `:method:` doc is immediately followed by the `private` keyword,
RDoc will hide that doc as if it were a private method.

To ensure that `ActiveSupport::MessageEncryptors#on_rotation` and
`ActiveSupport::MessageVerifiers#on_rotation` both appear in the
rendered docs, this commit adds a delimiter comment before each
`private` keyword.
  • Loading branch information
jonathanhefner committed Oct 7, 2023
1 parent c8b3642 commit 4726b1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions activesupport/lib/active_support/message_encryptors.rb
Expand Up @@ -130,6 +130,7 @@ class MessageEncryptors < Messages::RotationCoordinator
# indicate whether old option sets are still in use or can be removed from
# rotation.

##
private
def build(salt, secret_generator:, secret_generator_options:, **options)
secret_length = MessageEncryptor.key_len(*options[:cipher])
Expand Down
1 change: 1 addition & 0 deletions activesupport/lib/active_support/message_verifiers.rb
Expand Up @@ -126,6 +126,7 @@ class MessageVerifiers < Messages::RotationCoordinator
# indicate whether old option sets are still in use or can be removed from
# rotation.

##
private
def build(salt, secret_generator:, secret_generator_options:, **options)
MessageVerifier.new(secret_generator.call(salt, **secret_generator_options), **options)
Expand Down

0 comments on commit 4726b1a

Please sign in to comment.