Commit Graph

1036 Commits

Author SHA1 Message Date
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]
ac1463e2cf Add international alternate names for crops (#4132)
* I will add the international alternate names for the crops.

* Mark required

* Update factory

* Add placeholder

* Fix seeds

* Add language, though hardcoded to EN in most places

---------

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 21:44:41 +09:30
google-labs-jules[bot]
8564ec7a7c Add comments to photos (#4130)
* Add comments to photos

Extend the photo show page to support comments by logged in users.

- Make the Comment model polymorphic.
- Update the Photo and Post models to have comments.
- Update the comments controller to handle the polymorphic association.
- Update the photo show page to display comments and a comment form.
- Create a reusable comments partial.

* Add migration

* Fix tests

* Fix tests

* Slightly fix tests

* Fix variables

* Add field

* Refactor slightly

* Refactor slightly

* Refactor slightly

* Refactor

* Photos respond to this as well

* Refactor to polymorphic_url

* Rename

* Wrong relationship

* Refactor and fix tests

* Fix relationships

* Fix rendering

* Fix tests

* Fix model tests

* Fix test

* Fix test

* Fix test

* Fix test

* Fix controller spec

* Fix view tests

---------

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 21:10:16 +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
google-labs-jules[bot]
76a6c1d849 Merge pull request #4131 from Growstuff/feature/add-social-media-links
feat: Add social media links to user profiles
2025-08-24 16:21:05 +09:30
google-labs-jules[bot]
d383c8e2e4 Add filtering for tradeable seeds (#4111)
* feat: Add filtering for tradeable seeds

This change introduces a new feature to filter seeds based on their tradeability.

- Adds a link on the homepage to view all tradeable seeds.
- Modifies the seeds controller to support filtering by `tradeable_to`, allowing multiple values to be selected.
- Adds links to the seeds index page to filter by the various `tradeable_to` values.

* Update index.html.haml

---------

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-10 15:44:01 +09:30
Daniel O'Connor
681f3780ad Default a new activity as being done today 2024-10-13 12:41:59 +10: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
83f2cf4a3c Require name, handle errors on crop create (#3799)
* Fix #3278 by ensuring we rebuild names on error

* Require a URL

* Require a name

* 'Only required for wrangers, and only when approving

* Re-add expectation
2024-07-23 19:44:21 +09:30
Daniel O'Connor
7e2be8efd9 Rubocop Rails 7.1 2024-07-13 06:29:08 +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
d542326047 Ruby 3.2: Rubocop - Rails/FilePath (#3783)
* Rails/FilePath
2024-07-13 15:13:56 +09:30
Daniel O'Connor
1176d18918 Ruby 3.2: Rubocop - Fix Lint/symbol conversion (#3781)
* Lint/SymbolConversion: Unnecessary symbol conversion; use error: instead.
2024-07-13 15:11:49 +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
47ad915ab3 Remove sort form (#3679)
* Remove sort form

* Remove stale test
2024-03-17 21:56:36 +10: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
3738d7cc21 Seeds > Photos - Fix tests not running and fix tests (#3621)
* Rename, so it runs in CI

* Fix specs slightly

* Fix tests
2024-02-04 15:05:43 +10:30
Daniel O'Connor
6102f0629b Revert 140fe7a (#3612)
* Revert 140fe7a

* Split rendering behaviour
2024-02-04 10:25:41 +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
140fe7a087 Bump searchkick, elasticsearch (#3602)
* Bump searchkick

* Bump to 7.0.0

* Fix

* Fix crop search
2024-01-26 23:01:39 +10:30
Daniel O'Connor
8546794311 Recaptcha (#3586)
* add recaptcha on register view

Update new.html.haml to add it

* Update Gemfile to add recaptcha

* Update env-example to show recaptcha

* More view corrections for recaptcha

* Update registrations_controller.rb to add recaptcha

* Update env-example with test config

* Recaptcha help text

* Fix trailing spaces

* Fix trailing space

* Add Recaptcha to gemfile.lock

* Fixing Gemfile.lock space

* Typo on comments in view

* Update app/views/devise/registrations/new.html.haml

* Fix signup

---------

Co-authored-by: Cesy <cesy.avon@gmail.com>
2024-01-21 15:20:03 +10:30
Daniel O'Connor
b77df88df9 Issues/1475: Ensure we have pagination (#3193)
* Paginate, 100 at a time

* Limited i18n

* Paginate roles

* Pagination

* Pagination

* i18n and pagination

* Paginate alternate names

* Silence code climate

* Rewrite coverage as a feature

* Remove coverage in favour of crops/scientific_name_spec

* Add missing admin link

* Rewrite coverage as feature

* Rewrite coverage

---------

Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2024-01-21 14:19:36 +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
ee45b518ce Rubocop fixes (Stacked PR) (#3454)
* Fix todo

* Rubcop

* Rubocop

* Rubocop

* Rename harvests_routing_spec.rb to harvests_controller_routing_spec.rb

Making codeclimate happier

* Rename for CodeFactor: updates_routing_spec.rb to posts_controller_updates_routing_spec.rb

For codefactor

* Rename for CodeFactor: follows_routing_spec.rb to follows_controller_routing_spec.rb

* Rename for CodeFactor: forums_routing_spec.rb to forums_controller_routing_spec.rb

* Rename spec/routing/roles_routing_spec.rb to spec/routing/admin/roles_controller_routing_spec.rb

* Rename authentications_routing_spec.rb to authentications_controller_routing_spec.rb

* Rename for CodeFactor: plantings_routing_spec.rb to plantings_controller_routing_spec.rb

* Rename for CodeFactor: scientific_names_routing_spec.rb to scientific_names_controller_routing_spec.rb

* Rename for CodeFactor: seeds_routing_spec.rb to seeds_controller_routing_spec.rb

* Rename for CodeFactor: comments_routing_spec.rb to comments_controller_routing_spec.rb

* Rename for CodeFactor: garden_types_routing_spec.rb to garden_types_controller_routing_spec.rb

* Rename for CodeFactor: admin_routing_spec.rb to admin_controller_routing_spec.rb

* Rename for CodeFactor: gardens_routing_spec.rb to gardens_controller_routing_spec.rb

* Rename for CodeFactor: photos_routing_spec.rb to photos_controller_routing_spec.rb

* Rename for CodeFactor: plant_parts_routing_spec.rb to plant_parts_controller_routing_spec.rb

* Rename for CodeFactor: crops_routing_spec.rb to crops_controller_routing_spec.rb

* [CodeFactor] Apply fixes

* Rename

* Code factor bot

---------

Co-authored-by: Cesy <cesy.avon@gmail.com>
Co-authored-by: codefactor-io <support@codefactor.io>
2024-01-07 21:05:59 +10:30
Daniel O'Connor
5b89aff98a Fix #3049 2023-03-13 08:05:31 +00:00
Daniel O'Connor
d3063f844d Remove facebook auth. They wanted to dictate the behaviour of an application they didn't own, so I told them to get stuffed a few years ago 2022-12-10 15:52:12 +10:30
Daniel O'Connor
a8b8a58f33 Various rspec autocorrections 2022-11-08 00:09:50 +10:30
Daniel O'Connor
4310a6f717 DEPRECATION WARNING: TimeWithZone#to_s(:number) is deprecated. Please use TimeWithZone#to_fs(:number) instead. 2022-11-07 22:27:45 +10:30
Daniel O'Connor
302483f66d DEPRECATION WARNING: TimeWithZone#to_s(:number) is deprecated. Please use TimeWithZone#to_fs(:number) instead. 2022-11-07 22:26:57 +10:30
Daniel O'Connor
f75d2f33a5 DEPRECATION WARNING: TimeWithZone#to_s(:number) is deprecated. Please use TimeWithZone#to_fs(:number) instead. 2022-11-07 22:24:03 +10:30
Daniel O'Connor
5f556d7b0c deprecations 2022-11-06 17:44:23 +10:30
Daniel O'Connor
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda Wallace
108a2052ca protect against not finding a crop 2021-01-27 07:50:19 +13:00
codefactor-io
84d02b169a [CodeFactor] Apply fixes 2021-01-05 19:46:07 +13:00
Brenda Wallace
60c74ddff3 Reconnecting stale flickr auth tokens 2021-01-05 19:46:07 +13:00
Brenda
0b3583e099 DRY crops controller more 2020-08-26 12:36:58 +12:00
Brenda Wallace
4906aaa180 Rename Notifer to NotifierMailer 2020-08-26 12:36:58 +12:00
Brenda
ef37f74c0f Splitting up complex method in photos controller 2020-08-26 12:36:58 +12:00
Brenda Wallace
9dbf8b7c8f New robocops 2020-08-26 12:36:58 +12:00
Brenda Wallace
5d43575eae Merge branch 'feature/crop-action-modals' of github.com:Br3nda/growstuff into feature/crop-action-modals
Conflicts:
app/views/harvests/_modal.html.haml
2020-02-29 09:38:21 +13:00
Brenda
d2509afca2 Harvest button on plantings 2020-02-29 09:33:40 +13:00
codefactor-io
28ff058366 [CodeFactor] Apply fixes 2020-02-22 23:04:59 +00:00
Brenda
36bad1cda0 Fix mobile display of member profiles 2020-02-23 11:42:07 +13:00
Brenda
d3cdaea218 Show member plantings summary on member page 2020-02-20 23:01:04 +13:00
Brenda
821ddd90cb fix specs 2020-02-10 14:21:03 +13:00
codefactor-io
34ddf8e98f [CodeFactor] Apply fixes 2020-01-21 13:12:28 +13:00
codefactor-io
6c9a15f95e [CodeFactor] Apply fixes 2020-01-11 21:29:37 +00:00
Brenda Wallace
cdff37b2eb style fix ups 2020-01-11 22:57:09 +13:00