Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rake task to retrieve a list of available factories #5093

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rainerdema
Copy link
Contributor

Summary

⚠️ WIP ⚠️

This is a first test to simplify the identification of the factories available in your Solidus environment during the implementation of the specs.

The idea is to use a rake task to print a list of all the available factories in Solidus and all the Solidus extensions included in your project.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@rainerdema rainerdema self-assigned this May 25, 2023
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label May 25, 2023
@kennyadsl
Copy link
Member

Nice idea! As a preliminary thought, is there a way to make this available locally only (I guess in development or test env only)? I can't see any scenario when this is used in production, and I'm not even sure we are distributing factories via the gem in those environments (so it will probably only return an empty list there).

@rainerdema
Copy link
Contributor Author

Nice idea! As a preliminary thought, is there a way to make this available locally only (I guess in development or test env only)? I can't see any scenario when this is used in production, and I'm not even sure we are distributing factories via the gem in those environments (so it will probably only return an empty list there).

Thanks for the feedback @kennyadsl!
I wanted to push the idea essentially to start a conversation about this. 💯

Yeah, surely the rake task path is not ideal, but in this way, I quickly managed to have an ordered list of available factories.
Anyway, I completely agree. Maybe this could become a local support tool for development, even if, for the moment, I'm not sure how. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants