* Add ecocrop_data table, import rake task, and view table on crop show
- Add migration creating ecocrop_data table with columns matching CGIAR EcoCrop schema
- Add EcocropData model and Crop#ecocrop_data matching by scientific name
- Add import:ecocrop_data rake task to download parquet file and populate database
- Add _ecocrop_data partial displaying ecological requirements, CC-BY-4.0 license link, and FAO citation on crop show
- Add model, rake task, and view tests
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Make citation text smaller and URLs clickable in EcoCrop section
- Add small styling to citation text in _ecocrop_data partial
- Turn FAO and CGIAR dataset URLs into clickable links
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Implement Atproto::ClientConfig for managing OAuth client configuration.
- Create Atproto::Http module for handling HTTP requests with SSRF protection.
- Develop Atproto::Identity class to resolve handles to DIDs and validate DID documents.
- Introduce Atproto::Jws for generating and signing JWTs for OAuth.
- Create Atproto::OauthClient to manage the OAuth authorization flow with Bluesky.
- Add OmniAuth strategy for Bluesky sign-in, allowing users to authenticate using their Bluesky handle.
- Update views to include Bluesky sign-in options and handle connections.
- Modify routes to expose OAuth client metadata.
- Allow members to sign in without an email address when using Bluesky.
- Add tests for Bluesky authorization and sign-in processes.
* Add user behaviour detection service for spam scoring
Implement UserBehaviourDetectionService to evaluate members for spam indicators:
- Check email confirmation status
- Inspect bio, posts, and comments for spam-related keywords (such as "Sports Betting")
- Display spam score on admin member screens with badges and tooltips
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Calculate and persist spam_score on member updates
- Add `spam_score` integer column to members table with migration and schema update
- Add `update_spam_score!` method to Member model
- Call `update_spam_score!` on successful member updates in RegistrationsController#update and MembersController#finish_signup
- Use persisted member `spam_score` in Admin::MembersHelper#spam_score_badge
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Renumber migration to resolve duplicate version conflict
- Renumber migration from 20261031020000 to 20261031060000
- Update db/schema.rb version to 2026_10_31_060000
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Introduced ocr_text, ocr_engine, and ocr_at attributes to Photo model.
- Implemented awaiting_ocr scope to fetch photos needing OCR processing.
- Updated PhotoAssociation model to remove awaiting_text scope.
- Modified Seed model to include packet_texts method for retrieving OCR results.
- Enhanced PhotoResource and SeedResource to handle new OCR attributes.
- Created migration to add OCR fields to photos and remove packet_text from seeds.
- Updated read_packets.py script to save OCR results directly to photos.
- Added tests for new OCR functionality and removed outdated packet_text tests.
- Update the growstuff rake tasks to log ReminderEvent when planting and harvest reminders are sent.
- Create a factory for ReminderEvent to facilitate testing.
- Implement model specs for ReminderEvent, including validations and weekly counts.
- Add request specs for Admin::ReminderStatsController to verify reminder statistics.
- Enhance unsubscribe specs to ensure ReminderEvent is logged correctly on unsubscriptions.
- Update task specs for growstuff to verify ReminderEvent counts for sent reminders.
What a packet says about sowing it. When to sow is the months, as many as the
packet says: a form sends twelve chips to tick, with the seasons as shortcuts
for the grower's hemisphere (none where we do not know it, rather than a
guess), and the list shows them as runs like "Oct-Feb". How to sow is text, in
the packet's words. Germination is a range of days, as maturity is.
A migration adds four columns to seeds. The facts are on the packet sheet, in
the order they happen, and editable from the pencils, from Edit all and from the
standalone form.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Added useDraftAutosave hook to handle automatic saving of post drafts.
- Enhanced PostEditor component to include a preview tab that fetches and displays rendered markdown.
- Updated Post model to manage draft state and associated published_at timestamp.
- Introduced card_photo association to Post for representing a primary image.
- Modified post form to support draft saving and publishing actions.
- Updated navigation to include links to drafts.
- Added tests for draft saving, preview functionality, and card photo validation.
- Created migrations for new database fields related to drafts and card photos.
The text read from a packet is kept in seeds.packet_text but is not on any form
or page yet: the OCR script will fill it in a follow-up. The column's migration
comment had an apostrophe that broke its string, so it did not run.
- Introduced a Rake task `packets:needing_ocr` to list photos of seed packets that lack text, outputting results as JSON lines.
- Created a Python script `read_packets.py` to process the output of the Rake task, downloading images and performing OCR to extract text.
- Updated model specs for `Crop` to ensure proper handling of photos associated with different seeds.
- Refactored API request specs for `Photos` and `Seeds`, removing unnecessary attributes from the response.
- Added tests for the new Rake task to ensure correct functionality and output format.
- Added `tesseract.js` as a dependency in `package.json`.
- Created a new spec file for `PhotosHelper` to test `packet_image_urls` method.
- Enhanced `Crop` model tests to ensure packet photos do not interfere with crop photos.
- Introduced validation tests for `Seed` model, covering row spacing and variety constraints.
- Updated API response in `seeds_request_spec.rb` to include variety, batch number, and row spacing.
- Updated `yarn.lock` to reflect new dependencies and versions.
* Remove unused bluecloth gem
Last released in 2011. It was only required, never called; kramdown
renders the markdown.
* Add specs for Tilt markdown rendering and posts markdown partial
* Remove rails_12factor gem
Last released in 2014. Rails 5+ does this via RAILS_SERVE_STATIC_FILES
and RAILS_LOG_TO_STDOUT, which production.rb already reads.
* Remove memcachier gem from Gemfile and Gemfile.lock
* Remove unused webrat gem
Last released in 2011. Nothing requires it; the specs use Rails'
assert_select and Capybara matchers. Only generator comments mention it.
* Remove crowdin-cli gem
Last released in 2018. Crowdin now ships its own standalone CLI, which
reads crowdin.yml and doesn't need the gem. Also drops the dependencies
only it used (rest-client, gli, crowdin-api and friends).
* Removes the crowdin-cli gem (last released 2018), the dependencies only
it needed, and crowdin.yml. Crowdin was never set up: the config still
has a placeholder project ID and nothing else in the repo mentions it.
Assisted by Claude
* Remove newsletter functionality and associated views and tests
* Remove newsletter functionality and related code across the application
* keep the column
* Remove stale test step
* add back newsletter
* Add migration to update newsletter column comment in members table
---------
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
Admins switch features on and off at /admin/features, kept in Flipper.
Job ideas (the page, the banners and the overlay) only show while its
flag is on. Features are off until switched on.
Closes#5050
- Introduced JobIdeaDismissal model to manage dismissed job ideas for members.
- Added associations and validations for job idea dismissals in the Member model.
- Created JobIdeas service to generate job ideas based on templates and last year's activities.
- Implemented JobIdeas::LastYear and JobIdeas::Templates classes to fetch relevant job ideas.
- Added migration for job_idea_dismissals table and updated schema.
- Developed tests for job idea dismissal functionality and related services.
- Introduced a has_many association in CropJobStep for jobs with dependent nullify.
- Added crop_job_step reference to Job model with optional association.
- Created migration to add crop_job_step reference to jobs table with foreign key.
- Updated schema to reflect the new association.
- Added tests for crop_job_step association in Job model.
* Add comment support for plantings
- Add polymorphic comments association, subject, and author methods to Planting.
- Add comments_count column migration for Planting counter cache.
- Update CommentsController and comments view templates to support Planting.
- Render comments list and form on Planting show view.
- Add specs for Planting comments in models, controllers, and requests.
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* put 4.0.7 back
* Opt comments on posts into record-page styling temporarily
* Drop hr
* Flatten comments
* Update schema
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
- Renamed all instances of 'Activity' to 'Job' in views, controllers, and models.
- Updated routes to reflect the change from activities to jobs.
- Modified database schema to rename the activities table to jobs and adjusted related columns.
- Updated locale files to change activity-related translations to jobs.
- Adjusted tests to ensure they reference jobs instead of activities.
- Removed the category field from jobs as they are now a plain list.
- Updated seed data and sample data generation to create jobs instead of activities.
- Deleted Elasticsearch gems from Gemfile and Gemfile.lock.
- Updated README and TECH documentation to reflect the removal of Elasticsearch.
- Removed Elasticsearch-related code from models, controllers, services, and factories.
- Adjusted tests to eliminate dependencies on Elasticsearch.
- Cleaned up Docker configuration and environment variables related to Elasticsearch.
- Added a TODO file for future gem reviews and potential removals.