-
Notifications
You must be signed in to change notification settings - Fork 5
Add BetterTogether::Seed #790
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
Draft
rsmithlal
wants to merge
16
commits into
main
Choose a base branch
from
feature/the-seed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
Signed-off-by: Robert Smith <[email protected]>
Signed-off-by: Robert Smith <[email protected]>
| # PATCH/PUT /seeds/1 | ||
| def update | ||
| if @seed.update(seed_params) | ||
| redirect_to @seed, notice: 'Seed was successfully updated.', status: :see_other |
Check notice
Code scanning / Brakeman
Possible unprotected redirect. Note
Possible unprotected redirect.
| @@ -0,0 +1,10 @@ | |||
| <p style="color: green"><%= notice %></p> | |||
|
|
|||
| <%= render @seed %> | |||
Check notice
Code scanning / Brakeman
Render path contains parameter value. Note
Render path contains parameter value.
Signed-off-by: Robert Smith <[email protected]>
…th validation, size limits, and safe YAML loading; add corresponding tests.
…ding safe YAML loading, file path validation, file size limits, and enhanced import infrastructure; add extensive testing coverage.
…rt process; update migrations, factories, and specs accordingly.
…hods and update specs accordingly
…ling; update specs to reflect changes in person lookup logic
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 of Changes
This pull request introduces BetterTogether::Seed, a new interoperable data protocol for the Community Engine platform. The Seed facilitates structured import/export of data, supporting:
Key Features & Changes
1. New
BetterTogether::SeedModelpayload) and metadata (origin), including:2. Seedable Concern for Models
Seedablemodule that any model can include to become seed-exportable.#plant,#export_as_seed, and#export_as_seed_yaml.PersonWizardWizardStepWizardStepDefinition3. SeedsController for CRUD UI
/seedsin the admin panel.4. Import/Export Workflow
config/seeds/...).5. Schema Migration
better_together_seedswith:seedableassociation.originandpayloadJSONB columns (indexed for performance).type+identifierfor fast lookup.6. FactoryBot Factories & Shared Example
shared_examplesfile to ensure any seedable model behaves correctly.Why This Matters
The Seed is a foundational piece of Community Engine’s commitment to data sovereignty. By enabling structured data import/export in a standard format, it:
✅ Empowers communities to migrate between platforms with minimal friction.
✅ Enables true data ownership, giving admins the ability to back up and restore their data anytime.
✅ Sets the groundwork for future federated platform collaboration, where platforms can exchange content in a structured, permissioned way.
Testing & Coverage
Seedmodel.Seedableconcern.Files Changed
Migration Required
✅ Yes –
create_better_together_seedsRelated Issues
Suggested Next Steps
Seedstructure and format for third-party implementers.