642 Commits

Author SHA1 Message Date
Daniel O'Connor
ae639b6e74 Adjust expectation 2025-12-13 02:12:20 +00:00
Daniel O'Connor
ba9117db4d I have added the before_destroy callback to the Crop model to destroy all CropCompanion records where the crop is crop_b. (#4266)
I have added a new test to `spec/models/crop_spec.rb` to verify that deleting a crop also destroys the associated `CropCompanion` records.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-29 15:32:47 +10:30
Daniel O'Connor
ce946c3a83 Rubocop fixes 2025-09-20 09:45:56 +00:00
google-labs-jules[bot]
4d3c4ca10d Merge pull request #4154 from Growstuff/finish-expired-seeds-task
Add maintenance task to finish expired seeds
2025-08-28 00:16:16 +09:30
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
Daniel O'Connor
948bb78656 Fix percentage grown 2025-08-27 13:44:44 +00:00
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
Daniel O'Connor
4f5c47ba58 Ruby 3.2: Rubocop - Layout/* (#3785)
* Rubocop - Layout/*

* Regenerate
2024-07-13 15:19:09 +09:30
Daniel O'Connor
000f4979db Trial Ruby32 (#3418)
* Ruby 3.2/Bundler 2.4

* Fix creation

* Upgrade to js-routes 2. Put all js routes into a global namespace.

* Remove js-routes

* Remove

* Adjust ownership

* Appease codeclimate for the nth time

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Swap to will paginate successor for bootstrap

* Update app/views/members/show.html.haml

* Update app/views/plantings/index.rss.haml

* Update .env

* Update .devcontainer/.env

* Fix spec

* Update spec

* Fix spec

* Pin to 2.4.22

* 3 space indent

* Regenerate

* Update rubocop
2024-07-13 14:45:33 +09:30
Daniel O'Connor
725c146e2d Improve profile page on mobile (#3711)
* Avoid showing when there are 0 things

* Styling

* Styling

* Collapse stats by default on small screens

* Add ARIA skip links

* Refactoring out of partial, and use CSS to set order on mobile

* Remove partial

* Update expectations

* Fix visual appearance on Ban button on your own profile for admins

* Typo

* Stale expectation
2024-04-07 21:43:52 +09:30
Daniel O'Connor
1d52f8fcad Rename 2024-01-22 08:31:33 +00:00
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
d22215f870 Merge branch 'bump-ruby-3.1.x' into rubocop-safe 2022-11-08 00:32:36 +10:30
Daniel O'Connor
96147809ee Fix deprecations 2022-11-08 00:30:44 +10:30
Daniel O'Connor
d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor
2db3d1bacc Various corrections 2022-11-08 00:21:23 +10:30
Daniel O'Connor
e2942f17c7 Rubocop corrections 2022-11-08 00:18:35 +10:30
Daniel O'Connor
d3df63912c Typo 2022-11-07 23:56:37 +10:30
Daniel O'Connor
b846d995ef Regenerate 2022-11-07 23:34:43 +10:30
Daniel O'Connor
82c7c12cbe Described class 2022-11-07 23:32:12 +10:30
Daniel O'Connor
0843cbde9a Fix specs 2022-11-07 23:32:05 +10:30
Daniel O'Connor
9c0bc3762c Fix specs 2022-11-07 23:32:02 +10:30
Daniel O'Connor
89a2dda637 Revert "Rubocop - auto corrections"
This reverts commit 39ea0d4882.
2022-11-07 23:21:05 +10:30
Daniel O'Connor
39ea0d4882 Rubocop - auto corrections 2022-11-06 16:35:09 +10:30
Daniel O'Connor
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda Wallace
9dbf8b7c8f New robocops 2020-08-26 12:36:58 +12:00
Awesome Code
8b2fc2fb0b Auto corrected by following Lint Ruby RSpec/ExampleWording 2020-04-14 09:07:08 +12:00
Awesome Code
132a961008 Auto corrected by following Lint Ruby RSpec/HookArgument 2020-03-04 00:37:36 +00:00
Awesome Code
4cbe6ca244 Auto corrected by following Lint Ruby RSpec/DescribedClass 2020-03-03 22:33:13 +00:00
Martina Simicic
b0a5223d97 Account for finished planting when counting days of life 2020-02-04 10:50:00 +13:00
codefactor-io
34ddf8e98f [CodeFactor] Apply fixes 2020-01-21 13:12:28 +13:00
Brenda Wallace
6cce74cf4d tests we find home page records for plantings 2020-01-12 09:52:47 +13:00
Brenda Wallace
709ca5a04f Fix seeds ES query 2020-01-11 23:10:33 +13:00
Brenda Wallace
c6988e2189 Re-instate the plantings quick actions 2020-01-05 21:31:51 +13:00
codefactor-io
7e30b6b6e0 [CodeFactor] Apply fixes 2020-01-03 11:28:51 +00:00
Brenda Wallace
e24ef32fe6 like spec, don't make so many photso 2020-01-01 08:41:34 +13:00
Brenda Wallace
676345815c tests for photos searching 2019-12-31 21:02:38 +13:00
Brenda Wallace
a3215d2555 Rubocop fixes 2019-12-31 14:47:15 +13:00
Brenda Wallace
c2b4c67077 crop compantion tests 2019-12-28 09:34:04 +13:00
Brenda Wallace
8bec2a277d Merge branch 'dev' into cache/harvests 2019-12-21 16:59:47 +13:00
Brenda Wallace
9c2beb304f show days of progress (#2344)
* show days of progress
* Update planting model spec to use age_in_days
2019-12-21 16:49:43 +13:00
codefactor-io
e8760f9c38 [CodeFactor] Apply fixes 2019-12-20 03:33:23 +00:00
Brenda Wallace
04fd1a343a Rubocop update (#2334)
* Update rubocop config

* Rubocop update - for rubocop 0.77

* [CodeFactor] Apply fixes

* rubocop fixes

* [CodeFactor] Apply fixes to commit 2826c2e
2019-12-16 22:35:33 +13:00
Brenda Wallace
34fcbffd24 Fix specs 2019-12-04 21:15:50 +13:00
Brenda
607eae2a43 Small improvements to crops controller to reduce query count 2019-12-04 21:02:33 +13:00
Brenda Wallace
8678a6dd8a Fix model spec 2019-12-04 20:59:56 +13:00
Brenda Wallace
e7c30ef448 Wrapped long lines 2019-11-24 12:18:04 +13:00
Brenda Wallace
2538b71225 Planting model spec for perenial harvests 2019-11-24 11:37:33 +13:00
Brenda Wallace
5793f26b6f stub tests 2019-11-24 08:41:12 +13:00
Brenda Wallace
1697f3e758 Update model spec for location 2019-11-16 13:07:38 +13:00