Skip to content

Fix plantings ICS feed regression and enable request spec#4687

Merged
CloCkWeRX merged 5 commits into
devfrom
fix-plantings-ics-regression-925842142388956801
Jun 24, 2026
Merged

Fix plantings ICS feed regression and enable request spec#4687
CloCkWeRX merged 5 commits into
devfrom
fix-plantings-ics-regression-925842142388956801

Conversation

@CloCkWeRX

Copy link
Copy Markdown
Collaborator

This PR fixes the regression in the plantings ICS feed that occurred after migrating the PlantingsController from Elasticsearch to ActiveRecord.

Key changes:

  1. View Update: Modified app/views/plantings/index.ics.erb to access attributes via method calls (e.g., planting.quantity) rather than hash keys (e.g., planting['quantity']). This ensures compatibility with ActiveRecord objects returned by the controller. It also correctly handles Date and Time objects.
  2. Test Enablement: Removed the pending status from the ICS request spec in spec/requests/plantings_spec.rb. Updated the test to correctly account for the mirrored 'Harvest' events generated for future plantings, bringing the expected event count to 7.
  3. Faraday Compatibility: Added an initializer config/initializers/faraday_patch.rb to provide a compatibility shim for Searchkick when running with Faraday 2.x, which moved some error classes.

These changes ensure the plantings calendar feed is functional and properly tested.


PR created automatically by Jules for task 925842142388956801 started by @CloCkWeRX

- Update `app/views/plantings/index.ics.erb` to use ActiveRecord method calls instead of hash bracket access.
- Enable `spec/requests/plantings_spec.rb` and update it to account for mirrored harvest events.
- Add `config/initializers/faraday_patch.rb` to fix Searchkick/Faraday 2.x compatibility issues.

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

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Comment thread spec/requests/plantings_spec.rb Outdated
Comment thread spec/requests/plantings_spec.rb Outdated
Comment thread spec/requests/plantings_spec.rb Outdated
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
@CloCkWeRX CloCkWeRX merged commit c9b8c54 into dev Jun 24, 2026
16 checks passed
@CloCkWeRX CloCkWeRX deleted the fix-plantings-ics-regression-925842142388956801 branch June 24, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant