Commit Graph

11723 Commits

Author SHA1 Message Date
Daniel O'Connor
f1c2a2a7fb Refactor author field to include type and name release79 2025-12-02 22:59:38 +10:30
Daniel O'Connor
48f96faba4 Include datePublished in social media posting
Added 'datePublished' field to social media posting data.
2025-12-02 22:58:05 +10:30
Daniel O'Connor
a0e8beb372 Update _head.html.haml 2025-12-02 22:51:08 +10:30
Daniel O'Connor
d91799cd51 Update _head.html.haml 2025-12-02 22:47:14 +10:30
Daniel O'Connor
840f57aa8f Delete public/google0bcc8a39985c1800.html 2025-12-02 22:46:06 +10:30
Daniel O'Connor
d28d2ebffd Add files via upload 2025-12-02 22:41:12 +10:30
Daniel O'Connor
fe51feb1b5 Merge pull request #4374 from Growstuff/CloCkWeRX-patch-2
Update sitemap URL in robots.txt
2025-12-02 22:36:42 +10:30
Daniel O'Connor
dad09384df Update sitemap URL in robots.txt 2025-12-02 22:36:29 +10:30
google-labs-jules[bot]
d7452280da Merge pull request #4372 from Growstuff/fix-sitemap-upload
Fix Sitemap Upload to S3
2025-12-02 22:21:26 +10:30
Daniel O'Connor
0d799f00f7 Merge pull request #4369 from Growstuff/sitemap-s3-upload
Upload Sitemap to S3
2025-12-02 02:08:11 +10:30
Daniel O'Connor
4ef1120ccb Merge pull request #4370 from Growstuff/CloCkWeRX-patch-2
Delete spec/tasks/sitemap_cached_spec.rb
2025-12-02 02:06:24 +10:30
Daniel O'Connor
4b9b85bdce bundle 2025-12-01 15:34:26 +00:00
google-labs-jules[bot]
e4c98487ba feat: Add more pages to sitemap
This commit adds static pages, harvests, posts, and photos to the sitemap.
2025-12-01 15:32:06 +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]
62be64fd38 feat: Upload sitemap to S3 bucket
This commit configures the sitemap generation process to upload the sitemap to an S3 bucket instead of the local filesystem.

It introduces the `aws-sdk-s3` gem to handle the S3 communication. A new configuration file, `config/sitemap.rb`, has been added to define the S3 adapter and specify the models to be included in the sitemap. The S3 bucket, access keys, and region are configured via environment variables.
2025-12-01 15:27:59 +00:00
Daniel O'Connor
18df97acd6 Merge pull request #4368 from Growstuff/feature/add-sitemap-generator
Add Sitemap Generator
2025-12-02 01:32:39 +10:30
Daniel O'Connor
7ea74d8604 Delete config/sitemap.rb 2025-12-02 01:10:35 +10:30
Daniel O'Connor
0054e7d868 Delete lib/tasks/sitemap_cached.rake 2025-12-02 01:10:06 +10:30
Daniel O'Connor
b34442b16b bundle 2025-12-01 14:37:50 +00:00
Daniel O'Connor
0c6cb5b6fd Merge pull request #4367 from Growstuff/feature/dynamic-meta-descriptions
Add dynamic meta descriptions
2025-12-02 01:04:58 +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]
91e1f1c004 feat: Add dynamic meta descriptions
This commit improves the meta descriptions for several pages by making them dynamic and object-specific.

- The default meta description in `app/views/layouts/_head.html.haml` has been updated to include a mention of open data.
- The `show.html.haml` views for crops, seeds, plantings, harvests, and members now have a `content_for :meta_description` block. This block uses the object's description or bio if available, and falls back to a generated string if not.
2025-12-01 14:21:43 +00:00
Daniel O'Connor
9e68fba87c Merge pull request #4366 from Growstuff/add-rack-deflater
Add and configure rack-deflater
2025-12-02 00:41:04 +10:30
Daniel O'Connor
ff658c0eb6 Merge pull request #4365 from Growstuff/add-meta-descriptions
Add meta descriptions to pages
2025-12-02 00:40:23 +10:30
Daniel O'Connor
88c63900c5 Update Gemfile 2025-12-02 00:33:28 +10:30
google-labs-jules[bot]
b029c65692 feat: Add and configure rack-deflater
This change adds the `rack-deflater` gem to the project and configures the application to use it. This will enable gzip compression for HTTP responses, improving performance by reducing the size of the data sent to the client.
2025-12-01 13:57:52 +00:00
Daniel O'Connor
d6a643fd88 Merge pull request #4364 from Growstuff/fix-nutrition-data-rendering
Fix nutrition data rendering
2025-12-02 00:25:34 +10:30
google-labs-jules[bot]
2742dba7fa feat: Add meta descriptions to pages
Adds a meta description tag to the landing, crops, plantings, harvests, seeds, and comments pages.

Also creates a new index page for comments.
2025-12-01 13:54:54 +00:00
Daniel O'Connor
e168070f08 Merge pull request #4363 from Growstuff/add-wikidata-pattern
Add pattern attribute to wikidata input on scientific names
2025-12-02 00:24:51 +10:30
google-labs-jules[bot]
65def47ead Fix: Correct nutrition data rendering and add AFCD name
This commit addresses two issues in the nutritional data view:

1.  **Fixes String Interpolation:** The HAML template incorrectly used an escaped hash (`\#{...}`) in string interpolations, which prevented the nutritional values from being rendered. This has been corrected by removing the backslash.
2.  **Adds AFCD Name:** The view now displays the `food_name` from the Australian Food Classification Data to provide more context to the user.
2025-12-01 13:41:31 +00:00
google-labs-jules[bot]
b5aaf2a124 feat: Add pattern attribute to wikidata input
Adds a pattern attribute to the wikidata input on scientific names to enforce the 'Q' followed by numbers format.
2025-12-01 13:30:24 +00:00
Daniel O'Connor
16956682a9 Merge pull request #4362 from Growstuff/feature/nutritional-data-partial
feat: Add nutritional data partial to crops and harvests
2025-12-01 23:58:17 +10:30
Daniel O'Connor
9ed06bebe6 Merge branch 'dev' into feature/nutritional-data-partial 2025-12-01 23:56:35 +10:30
Daniel O'Connor
e372ef3341 Merge pull request #4361 from Growstuff/improve-wikidata-rake-task
Improve Wikidata Rake Task
2025-12-01 23:56:10 +10:30
google-labs-jules[bot]
c45b75a967 feat: Add nutritional data partial to crops and harvests
This commit introduces a new partial to display nutritional data from the Australian Food Composition Database.

Key changes:
- Adds a database index to the `public_food_key` on the `crops` table.
- Establishes a `has_one` relationship between `Crop` and `AustralianFoodClassificationData`.
- Creates a `_nutritional_data.html.haml` partial to display a summary of key nutritional information.
- Renders the partial on the `show` pages for both crops and harvests.
2025-12-01 12:53:03 +00:00
google-labs-jules[bot]
72e7b7323f feat(rake): Prioritize scientific_names.wikidata_id in task
Improves the `wikidata:import_alternate_names` Rake task to first use the `wikidata_id` from the `scientific_names` table.

- Checks for a `wikidata_id` on a crop's `scientific_names`.
- Falls back to the existing `en_wikipedia_url` if no `wikidata_id` is found.
- Adds logging to indicate the source of the Wikidata ID.
- Improves error handling.
2025-12-01 12:52:49 +00:00
google-labs-jules[bot]
87f79fb071 feat(rake): Prioritize scientific names in Wikidata task
Improves the `wikidata:import_alternate_names` Rake task to first look up a crop's Wikidata ID using its scientific names.

- Iterates through a crop's scientific names to find a Wikidata ID.
- Falls back to the existing `en_wikipedia_url` if no ID is found via scientific names.
- Adds more detailed logging to the task.
- Improves error handling by checking for non-existent Wikipedia pages and using `.dig` for safer hash access.
2025-12-01 12:44:46 +00:00
Daniel O'Connor
c94cf21f72 Merge pull request #4359 from Growstuff/add-public-food-key-to-data-improvement
Add missing public food key id to data improvement page
2025-12-01 21:45:48 +10:30
google-labs-jules[bot]
31c72799ea feat: Add missing public food key id to data improvement page
This change adds a new tab to the data improvement page to show crops that are missing a public food key id.

I was unable to run tests or perform frontend verification due to a known issue with the Ruby environment.
2025-12-01 11:04:01 +00:00
Daniel O'Connor
9ae47afe04 Reduce to member login_name 2025-12-01 10:02:23 +00:00
Daniel O'Connor
e7d8ec6fd0 Fix styling 2025-12-01 09:29:42 +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
release78
2025-12-01 19:43:14 +10:30
Daniel O'Connor
4de062838b Merge pull request #4354 from Growstuff/fix-crops-show-spec
Fix crops/show view spec
2025-12-01 19:42:56 +10:30
Daniel O'Connor
2aaca7b713 Bump rubocop-rails from 2.34.1 to 2.34.2 (#4355)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.34.1 to 2.34.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.34.1...v2.34.2)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-version: 2.34.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 19:42:04 +10:30
google-labs-jules[bot]
323c7dc3ee Optimize Data Improvement Page (#4356)
* feat: Add data improvement page to crops controller

This commit introduces a new data improvement page to the crops controller. The page displays tabbed lists of crops with missing data, allowing users to easily identify areas for data quality improvement.

The following data quality categories are included:
- Crops without photos
- Crops without descriptions
- Crops without a youtube video
- Crops without alternate names
- Crops without a scientific name with a wikidata id
- Crops without row spacing
- Crops without sun requirements
- Crops without height

All lists are sorted by planting count in descending order.

* refactor: Optimize data improvement page to load tab data on demand

This commit refactors the data improvement page to load data for each tab on demand, rather than loading all queries at once. This improves the performance of the page by only executing the query for the currently active tab.

The controller action now uses a `case` statement based on a `tab` URL parameter to execute the appropriate query. The view has been updated to pass this parameter when a tab is clicked.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-12-01 19:41:28 +10:30
Daniel O'Connor
d1509a303e Merge branch 'dev' into fix-crops-show-spec 2025-12-01 19:02:11 +10:30
dependabot[bot]
05e4ae7fbf Bump rubocop-rails from 2.34.1 to 2.34.2
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.34.1 to 2.34.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.34.1...v2.34.2)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-version: 2.34.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 07:54:43 +00:00
google-labs-jules[bot]
30e7c5d01c Merge pull request #4352 from Growstuff/add-public-food-key
feat: Add Public Food Key to Crop model
2025-12-01 18:02:33 +10:30
Daniel O'Connor
ff6a6e2e11 Remove defunct gitter 2025-12-01 18:00:44 +10:30
google-labs-jules[bot]
6f0d0afdb8 Fix(specs): Initialize @version_members in crops/show view spec
The `crops/show` view spec was failing with a `NoMethodError` because
the `@version_members` instance variable was `nil`. This variable is used
in the `_history` partial, which is rendered by the `show` view.

This commit fixes the spec by initializing `@version_members` to an
empty hash in the `before` block of the spec. This ensures that the
view can render without errors during the test run.
2025-12-01 02:34:46 +00:00