Commit Graph

653 Commits

Author SHA1 Message Date
Daniel O'Connor
488e402a3a Adjust copy of activities and prompts (#4260)
* Adjust copy

* Adjust copy

* Move repeat prompt

* Improve prompts

* Clean up schema

* Fix spec
2025-09-21 14:58:13 +09:30
google-labs-jules[bot]
449ab1f6c0 Add ability to create companion plantings
This change adds the ability for crop wranglers to create and manage companion plantings for crops.

- Adds a `source_url` to the `CropCompanion` model to store an optional reference URL.
- Restricts the management of companion plantings to users with the `crop_wrangler` role.
- Creates a new admin interface for managing companion plantings for a specific crop.
- Updates the crop show page to display companions from both the crop and its parent crop.
2025-09-21 00:49:11 +00:00
Daniel O'Connor
04680b196a Rubocop 2025-09-20 10:15:41 +00:00
google-labs-jules[bot]
5db6a86607 Add ability to copy/duplicate an activity 2025-09-20 08:54:12 +00:00
Daniel O'Connor
ce7ce70d5f Merge pull request #4222 from Growstuff/feature/add-activity-prompts
feat: Add prompts for new activities
2025-09-20 17:49:47 +09:30
google-labs-jules[bot]
02db5b8130 Add API token generation, authentication, and CRUD for a number of the API resources (#4237)
* feat: Add API token generation and authentication

This commit introduces API token generation and authentication for write operations.

- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.

* feat: Add API token generation and authentication

This commit introduces API token generation and authentication for write operations.

- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.

* Mark as editable

* Refactor

* WIP - Authentication

* Implement more test coverage

* Split 401 and 403

* Before Create hooks

* Update harvest specs, defaulting to the first plant part - this may not be right

* Update coverage

* Update coverage

* Rubocop

* Rubocop

* Rubocop

* Fix coverage

* For now, mark photos immutable again

* Fix specs

* Fix specs

* Rubocop

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-09-10 19:50:06 +09:30
google-labs-jules[bot]
e5c71f1dc4 Merge pull request #4230 from Growstuff/feature/add-more-filters
feat: Add more filters to API resources
2025-09-09 21:34:49 +09:30
Daniel O'Connor
7dc66cb199 Merge pull request #4173 from Growstuff/translate-confirm
Garden Delete - Extract strings and fix missing translation bug
2025-08-31 14:39:32 +09:30
Daniel O'Connor
0544abcd8f Github lure 2025-08-31 03:16:28 +00:00
Daniel O'Connor
73fb43fc4f Styling 2025-08-31 03:00:07 +00:00
Daniel O'Connor
532afafa0e Restyle slightly 2025-08-31 02:55:02 +00:00
google-labs-jules[bot]
378bd0d8f1 feat: Add PWA installation instructions to homepage
This commit adds instructions for mobile users on how to install the Growstuff website as a Progressive Web App (PWA).

The changes include:
- A new section on the homepage with instructions for both iOS and Android devices. This section is only visible to logged-out users.
- New translations for the instructions in the `en.yml` locale file.
- Basic styling for the new section.
- Updated feature tests to verify the new section's visibility.
2025-08-31 02:25:55 +00:00
Daniel O'Connor
1657a527e9 Remove Openfarm data fetching 2025-08-27 14:20:22 +00:00
google-labs-jules[bot]
ba6ec689c5 Merge pull request #4150 from Growstuff/feature/failed-plantings
Add failed status to plantings
2025-08-27 23:42:53 +09:30
google-labs-jules[bot]
a98990ccd2 Add transplant feature for plantings (#4133)
* Add ability to transplant a planting

* Fix view tests

* Transplantable gardens

* Add spec

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-08-24 22:31:14 +09:30
google-labs-jules[bot]
0b639d5940 Remove twitter authentication
This change removes the twitter authentication feature from the application.

It removes the `omniauth-twitter` gem and all related code from controllers, views, and tests. It also removes the twitter icon and environment variable settings.
2025-08-24 07:03:20 +00:00
Daniel O'Connor
6ae2de7e47 Merge pull request #4086 from Growstuff/mailboxer-translations
Mailboxer translations
2025-08-10 14:57:39 +09:30
Daniel O'Connor
1c97ba1495 Garden collaboration (small part of community gardens) (#3862)
* Add collaboration model

* Permissions and garden show

* List by owner, or where I am a collaborator

* Add index

* Add permissions

* Typo

* Typo

* Add route

* Update schema

* Update schema

* Add CRUD

* Add CRUD

* Add CRUD

* Factory

* Add validations

* Rubocop

* Rubocop

* Rubocop

* Unique index

* Fix

* Make CI more fine grained for faster feedback

* Swap order

* Fix path, fail-fast

* Fix spec

* Remove 'significant drop in coverage' as not everything runs in one giant run

* Fix tests?
2024-09-29 18:28:52 +09:30
Daniel O'Connor
c28b2c0c38 Likes: Add capability to Activities, Plantings, Harvests (#3805)
* Ability to like activities

* Ability to like activities

* Add likeable everywhere

* Refactor

* Remove extra newline

* Typo

* Use classes, not IDs

* Explicitly wait for ajax

* Fix tests

* Move likes under owner

* Add separation

* Move harvest likes near actions

* Rearrange harvests

* Render likes under owner

* Make harvest consistent with other views

* Move planting detail into header

* Move detail into header

* Move detail into header

* Revert

* Fix header

* Move likes into jumotrons

* Fix name

* Change all actions to be after likes and a span

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* i18n and accessibility

* Fix name

* Temporarily make ack into a div

* Update app/views/photos/_actions.html.haml
2024-07-24 17:07:56 +09:30
Daniel O'Connor
e7a0d0276f Photos > Show crop link (#3803)
* Fix #3802 Show crop link

* Fix #3802 Show crop link

* Fix missing arg

* Fix missing arg

* Translations
2024-07-17 20:06:32 +09:30
Daniel O'Connor
5ba25b8e76 Rubocop Rails 7.1 2024-07-13 06:28:30 +00:00
Daniel O'Connor
81060cccf7 Ruby 3.2: Rubocop - Lint/* and Style/* (#3786)
* Rubocop - Layout/*
* Rubocop - Lint and Style
2024-07-13 15:38:37 +09:30
Daniel O'Connor
4f5c47ba58 Ruby 3.2: Rubocop - Layout/* (#3785)
* Rubocop - Layout/*

* Regenerate
2024-07-13 15:19:09 +09:30
Daniel O'Connor
d542326047 Ruby 3.2: Rubocop - Rails/FilePath (#3783)
* Rails/FilePath
2024-07-13 15:13:56 +09:30
Daniel O'Connor
26189855cc Reduce visual impact of hover, and make snappier (#3712)
* Reduce visual impact of hover, and make snappier

* Better seed

* Improve seeding

* Fix codespaces login
2024-04-07 22:17:16 +09:30
Daniel O'Connor
5be0153c74 Activities (#3646)
* Implement activities

* Add activities to timeline

* Add factory

* Add coverage

* Fix misc issues

* Activities display

* Add activities to garden and plantings

* Add activities to garden and plantings

* Add planting

* Add to planting, harvest show

* More CRUD

* More CRUD

* index

* index

* Extract card view

* Permissions

* Add edit

* Remove workaround fro vs code

* Fix title

* CSV

* CSV

* Add RSS, ical

* Extend ical slightly

* Cleanup

* Rubocop

* Remove doubled form

* Change icon

* Fix short description

* Add menus

* Put homepage widget in

* Add activity icon - MIT licenced - https://www.svgrepo.com/svg/336823/plan

* Naming

* Missing files

* Revert VS Code lag induced change

* Update app/views/home/_harvests.html.haml

* Update activities_controller.rb

* Update activities_controller.rb

* Update app/controllers/activities_controller.rb

* Update index.html.haml

* Apply suggestions from code review

* Apply suggestions from code review

* Typo

* Translation

* Apply suggestions from code review

* Update app/views/plantings/index.ics.erb

* Update app/models/activity.rb

* Update plantings_spec.rb

* Update plantings_spec.rb

* We are now rendering an extra event, so check the next one for the old behaviour
2024-03-10 11:36:24 +10:30
Daniel O'Connor
008667515e Swap from ugifier to terser 2024-01-27 01:28:55 +00:00
Daniel O'Connor
f338274611 Rails 7.1 (#3590)
* Rails 7.1

* Update application.rb

* Bump searchkick

* Bump to 7.0.0

* Fix

* Fix crop search

* Sync translation

* Drop required from form group

* Loosen specs further

* Fix Gemfile

* Update seeds_request_spec.rb

* Update test.rb

* Rename
2024-01-27 10:06:47 +10:30
Daniel O'Connor
ad4a6e17e2 iCalendar feed of plantings (#3588)
* Register mime type

* Add rough first pass

* Index predictions, and add links

* Trailing space

* Fix implementation

* Fix names, make public

* Fix names, make public

* Fix

* Fix tyyos

* Add date

* If there are no predictions, keep growing

* Add a todo

* Fix factories

* Specs
2024-01-27 00:38:33 +10:30
Daniel O'Connor
1f0cfa9b6c Add GBIF to our scientific names, so that our crops can associate creative commons photos (#3559)
* Add GBIF cient

* Add lookup

* Add autocomplete for GBIF lookup

* Add extra detail to scientific names

* Autocomplete

* Add routes

* Rmeove mapping

* Add autocomplete

* Update GBIF data on save

* db/schema

* Style

* Extract service

* Add concern

* Add concern

* Save photos

* Initial coverage

* Coverage

* Add coverage

* Shut up, codeclimate

* Shut up, codeclimate

* Unused

* Shut up, codeclimate

* Apply suggestions from code review

* Remove localhost

* Fix rubocop

* Fix rubocop

* Add UI links

* Add rake

* Indent

* Update Gemfile.lock

* Update lib/tasks/gbif.rake

* Update app/views/crops/_scientific_names.html.haml

* Rubocop

* Expand edit photo form

* Fix error

* Add model validations

* Skip photos without backlinks

* Fix tests

* Add photo words

* Allow blank

* Rubocop and handle invalid legacy data

* Apply suggestions from code review

* Update lib/tasks/gbif.rake
2024-01-21 13:22:25 +10:30
Daniel O'Connor
4435407b95 Suppress Time.to_s warning until next rails (#3548)
* Fix warning

* Update config/application.rb
2024-01-07 13:27:57 +10:30
Daniel O'Connor
235109ccee Fix deprecation 2024-01-07 01:57:19 +00:00
Daniel O'Connor
4a07c46049 Set env var 2023-04-13 16:50:23 +01:00
Daniel O'Connor
763a547613 Add elasticsearch config 2023-04-13 16:50:23 +01:00
Daniel O'Connor
ac61ae3a56 Update database.yml 2023-04-13 16:50:23 +01:00
Cesy
a4098e9a59 Another attempt at postgres for codespaces 2023-04-13 16:50:23 +01:00
Cesy
3820b01769 Adding codespace host so you can view things in the browser 2023-04-13 16:50:23 +01:00
Daniel O'Connor
e1fb08707a Issue/2419: Limit map to the most recent plantings only (#3191)
* For now, drop mapbox for OSM tiles

* For now, drop mapbox for OSM tiles

* Use OSM tiles

* Remove mapbox secrets for now. If we bring back mapbox; we should re-enstate

* Only show up to 200 plantings

* Update app/assets/javascripts/members.js.erb

* [CodeFactor] Apply fixes

* Update production.rb

---------

Co-authored-by: codefactor-io <support@codefactor.io>
2023-03-13 15:13:28 +10:30
Daniel O'Connor
b3179a8f2d Add missing migration for #3247 [Stacked PR] (#3275)
* Add missing migration for #3247

* [CodeFactor] Apply fixes

* Update 20230313015323_create_active_storage_tables.active_storage.rb

* Rubocop

* Permit a number of safe classes to serialise as YAML

---------

Co-authored-by: codefactor-io <support@codefactor.io>
2023-03-13 13:48:25 +10:30
Daniel O'Connor
449c6c4487 Issue/3189: Fix map displays by dropping mapbox (#3190)
* For now, drop mapbox for OSM tiles

* For now, drop mapbox for OSM tiles

* Use OSM tiles

* Remove mapbox secrets for now. If we bring back mapbox; we should re-enstate

* Update members.js.erb

* Change placeholder
2023-03-13 13:04:16 +10:30
Cesy
60608411ed Merge branch 'dev' into issue/1642 2022-12-17 10:41:35 +00:00
Cesy
59c212ecf5 Switching from SendGrid to Mailgun for sending emails 2022-12-15 10:35:52 +00:00
Daniel O'Connor
28d550d67f Drop test 2022-12-10 15:55:57 +10:30
Daniel O'Connor
07feb1cd85 Drop tests 2022-12-10 15:54:58 +10:30
Daniel O'Connor
d3df63912c Typo 2022-11-07 23:56:37 +10:30
Daniel O'Connor
55ccf8e1af Bump defaults 2022-11-06 16:44:06 +10:30
Daniel O'Connor
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Daniel O'Connor
89bb30011c Fixes #3402 (#3043) 2022-05-01 17:10:05 +09:30
Brenda Wallace
60c74ddff3 Reconnecting stale flickr auth tokens 2021-01-05 19:46:07 +13:00
Brenda Wallace
958ee66e79 Apply suggestions from code review 2020-08-26 12:36:58 +12:00