Skip to content

Allow passing a user class to the test app generator#222

Merged
mergify[bot] merged 2 commits intosolidusio:mainfrom
mamhoff:allow-passing-user-class-for-test-app
Dec 3, 2024
Merged

Allow passing a user class to the test app generator#222
mergify[bot] merged 2 commits intosolidusio:mainfrom
mamhoff:allow-passing-user-class-for-test-app

Conversation

@mamhoff
Copy link
Copy Markdown
Contributor

@mamhoff mamhoff commented Nov 30, 2024

Currently, solidus_auth_devise is tested with a dummy app that specifies Spree::LegacyUser in its `spree.rb initializer. That's not great, but there's no way of fixing it if the rake task install does not pass through the user class option.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Nov 30, 2024

It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:

  • bug for bugfixes.
  • enhancement for new features and improvements.
  • documentation for documentation changes.
  • security for security patches.
  • removed for feature removals.
  • infrastructure for internal changes that should not go in the changelog.

Additionally, the maintainer may also want to add one of the following:

  • breaking for breaking changes.
  • deprecated for feature deprecations.

Once the correct labels have been set, simply remove the needs changelog label label from this PR so I can merge it.

@mergify mergify Bot added the needs changelog label Needs a label to determine the type of change. label Nov 30, 2024
@mamhoff mamhoff force-pushed the allow-passing-user-class-for-test-app branch from 03d369c to 18e6dd9 Compare December 1, 2024 11:54
@tvdeyen tvdeyen added enhancement Improves an existing feature. and removed needs changelog label Needs a label to determine the type of change. labels Dec 2, 2024
Currently, solidus_auth_devise is tested with a dummy app that specifies
`Spree::LegacyUser` in its `spree.rb initializer. That's not great, but
there's no way of fixing it if the rake task install does not pass
through the user class option.

The way to use this feature would be in an extension's Rakefile:

```rb
SolidusDevSupport::RakeTasks.install(user_class: "Spree::User")
```
The Gemfile that's generated for testing extensions contains
solidus_auth_devise, which sets the user class for the app to
Spree::User. The generator in this Rakefile should be set up to do the
same.
@mamhoff mamhoff force-pushed the allow-passing-user-class-for-test-app branch from a16f047 to a498d16 Compare December 3, 2024 16:46
@mergify mergify Bot merged commit 119c91e into solidusio:main Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants