From 49433b4efb521791fe1d0cd5ac474f1987317688 Mon Sep 17 00:00:00 2001 From: barseek Date: Thu, 22 Jun 2023 19:43:48 +0200 Subject: [PATCH 1/5] Add top level & method documentation into Devise::Passkeys::Model --- lib/devise/passkeys/model.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/devise/passkeys/model.rb b/lib/devise/passkeys/model.rb index 692aa89..c473a53 100644 --- a/lib/devise/passkeys/model.rb +++ b/lib/devise/passkeys/model.rb @@ -2,7 +2,10 @@ module Devise module Models + # This is the actual module that gets included in your + # model when you write `devise :passkey_authenticatable` module PasskeyAuthenticatable + # This is a callback called right after a successful passkey authentication def after_passkey_authentication; end end end From 97554cffa0d64e4064b058de7911915d97ab6037 Mon Sep 17 00:00:00 2001 From: barseek Date: Thu, 22 Jun 2023 19:48:31 +0200 Subject: [PATCH 2/5] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bafdeec..022b07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - https://github.com/ruby-passkeys/devise-passkeys/pull/7/ - Bump `Devise` requirement to `>= 4.7.1` - https://github.com/ruby-passkeys/devise-passkeys/pull/11 +- Document `Devise::Passkeys::Model` + - https://github.com/ruby-passkeys/devise-passkeys/pull/12 ## [0.1.0] - 2023-05-07 From bf287c14eff38d044e525f4d05fdc4dd09d60dc1 Mon Sep 17 00:00:00 2001 From: Thomas Cannon Date: Thu, 22 Jun 2023 21:43:08 -0400 Subject: [PATCH 3/5] Configure YARD to use Markdown as the markup format * Markdown is widly supported & used across the industry (especially when compared to RDOC) --- .yardopts | 1 + 1 file changed, 1 insertion(+) create mode 100644 .yardopts diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..29c933b --- /dev/null +++ b/.yardopts @@ -0,0 +1 @@ +--markup markdown From 1b254e12166dbf45ff38f477d5d6e84dc4cba50f Mon Sep 17 00:00:00 2001 From: Thomas Cannon Date: Thu, 22 Jun 2023 21:49:21 -0400 Subject: [PATCH 4/5] Editing for `Devise::Models::PasskeyAuthenticatable` documentation * Added some more clarity about how the method is added * Note that `after_passkey_authentication` is a no-op by default, but can be overridden --- lib/devise/passkeys/model.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/devise/passkeys/model.rb b/lib/devise/passkeys/model.rb index c473a53..6165d77 100644 --- a/lib/devise/passkeys/model.rb +++ b/lib/devise/passkeys/model.rb @@ -3,9 +3,12 @@ module Devise module Models # This is the actual module that gets included in your - # model when you write `devise :passkey_authenticatable` + # model when you include `:passkey_authenticatable` in the + # `devise` call (eg: `devise :passkey_authenticatable, ...`). module PasskeyAuthenticatable - # This is a callback called right after a successful passkey authentication + # This is a callback that is called right after a successful passkey authentication. + # + # By default, it is a no-op, but you can override it in your model for any custom behavior (such as notifying users of a new login). def after_passkey_authentication; end end end From 1440e87a92bd78b90b18ea541445432aae824a7f Mon Sep 17 00:00:00 2001 From: Thomas Cannon Date: Thu, 22 Jun 2023 21:51:40 -0400 Subject: [PATCH 5/5] Add `@Vagab` to list of contributors --- THANKS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/THANKS.md b/THANKS.md index 81c3183..1c53146 100644 --- a/THANKS.md +++ b/THANKS.md @@ -5,3 +5,4 @@ - [@heliocola](https://github.com/heliocola) - [@johalloran01](https://github.com/johalloran01) - [@tcannonfodder](https://github.com/tcannonfodder) +- [@Vagab](https://github.com/Vagab)