README cleanup; drop unused RSpecSupport module#4
Merged
Conversation
Mixed-mode setup (devise :database_authenticatable + :omniauthable on the same model) was carrying its weight as an option in the README, but the gem now mounts session routes unconditionally and the password-form flow it implied isn't something the gem adds value to. Drops the second model snippet and the explanatory paragraph; the gem is positioned as OIDC-only. Adds a Testing section documenting ActiveAdmin::Oidc::TestHelpers (stub_oidc_sign_in / stub_oidc_failure / reset_oidc_stubs) and the opt-in RSpecSupport.install! filter machinery (for hosts where OIDC is optional and want oidc_mode: tag + CI_RUN_OIDC env filtering). Minor wording fixes: 'Session routes' description in the engine-features list now notes scope is derived from admin_user_class, not hardcoded; mention that hosts mounting Devise inside an engine need to pass router_name: to devise_for too; updated Custom login view rationale to drop the password-form reference.
No host app uses ActiveAdmin::Oidc::RSpecSupport.install! — known consumers either inlined the equivalent four lines of RSpec.configure directly or never integrated TestHelpers at all. The CI_RUN_OIDC env var and automatic :omniauthable skip logic were carrying weight for a use case nobody has. Removes the RSpecSupport module from lib/activeadmin/oidc/test_helpers.rb. README's Testing section now shows the direct setup (include TestHelpers with :oidc_mode tag + after hook for reset_oidc_stubs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devise :database_authenticatable, :rememberable, :omniauthable). The gem is positioned as OIDC-only and mounts session routes unconditionally — there is no value in pairing it with:database_authenticatable.ActiveAdmin::Oidc::RSpecSupportmodule entirely. No host app uses it: known consumers either inlined the equivalent four lines ofRSpec.configuredirectly or never integratedTestHelpersat all. TheCI_RUN_OIDCenv filter + automatic:omniauthableskip logic was carrying its weight for a use case nobody has.## Testingsection documentingActiveAdmin::Oidc::TestHelpers(stub_oidc_sign_in/stub_oidc_failure/reset_oidc_stubs) with the direct RSpec setup snippet.config.admin_user_class(not hardcoded:admin_user); engine-mounted Devise hosts needrouter_name:on bothDevise.router_name = …anddevise_for; the custom-login-view rationale no longer mentions the dropped password-form path.Test plan
:database_authenticatable.lib/activeadmin/oidc/test_helpers.rb— the three method names + the:oidc_modetag setup match.rake spec:allis green.