Commit Graph

7 Commits

Author SHA1 Message Date
Daniel O'Connor
8e7dd25e98 Add rake task to cleanup inactive members (#4574)
* Add members:cleanup_inactive rake task

This task identifies and deletes members who have not logged in for over
24 months and have no gardens, plantings, or other activity (posts,
comments, seeds, harvests, etc).

Includes support for DRY_RUN=true to preview deletions.
Added tests in spec/tasks/members_spec.rb.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Refactor activity check to Member#has_activity? and update rake task

- Added `Member#has_activity?` to encapsulate the check for gardens, plantings, and other activity.
- Updated `members:cleanup_inactive` rake task to use `Member#has_activity?`.
- Maintained `DRY_RUN` support and existing tests.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Apply suggestion from @CloCkWeRX

* Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-04-27 01:40:54 +09:30
Daniel O'Connor
d625eb2dbd Rubocop: Style/FrozenStringLiteralComment 2026-04-23 14:30:02 +00:00
Daniel O'Connor
be59bd9f27 Delete spec/tasks/sitemap_cached_spec.rb 2025-12-02 01:58:19 +10:30
google-labs-jules[bot]
7f75aed146 feat: Add sitemap generator
Adds the `sitemap_generator` gem to generate a sitemap.

- Includes static routes and dynamic routes for active crops, plantings, seeds, photos, posts, and members.
- Implements a caching mechanism to ensure the sitemap is generated no more frequently than every 72 hours.
- Updates `robots.txt` to point to the new sitemap.
- Includes a unit test for the caching Rake task.
2025-12-01 14:31:54 +00:00
google-labs-jules[bot]
620337fbac Merge pull request #4353 from Growstuff/feat/import-australian-food-data
Add Rake Task to Import Australian Food Data
2025-12-01 19:43:14 +10:30
Daniel O'Connor
79a54351e3 Delete spec/tasks/openfarm_rake_spec.rb 2025-08-24 21:02:13 +09:30
google-labs-jules[bot]
4829d5513c This commit adds a rake task to delete all pictures that have 'OpenFarm' as their source. This is useful for cleaning up data imported from OpenFarm. 2025-08-10 00:58:03 +00:00