Commit Graph

405 Commits

Author SHA1 Message Date
google-labs-jules[bot]
4643fbd92e Associate post with crop from crop show page
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-05-01 11:35:58 +00:00
google-labs-jules[bot]
3c70ba12ca Allow filtering Flickr photos by tag when adding photos
- Update MemberFlickr concern to support tag-based search using flickr.photos.search
- Update PhotosController to handle the 'tag' parameter
- Add tag search input field to the 'New Photo' view
- Add test case to verify tag filtering in PhotosController spec

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-28 02:59:21 +00:00
google-labs-jules[bot]
ff9d99afe5 Improve Charts::CropsController with caching and refactoring
- Added Rails.cache.fetch to `sunniness` and `planted_from` actions.
- Refactored crop loading into a `before_action :set_crop`.
- Updated specs to verify caching behavior and ensure coverage.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-27 07:46:08 +00:00
Daniel O'Connor
5174b1236e Merge pull request #4567 from Growstuff/memory-optimisation-3
Members - Nearest To - Memory improvements
2026-04-26 22:57:01 +09:30
Daniel O'Connor
8cfef5ce1a Rubocop fixes 2026-04-26 13:09:00 +00:00
Daniel O'Connor
2aa697a6d6 Add comprehensive test coverage for forums (#4561)
* Add comprehensive test coverage for forums

- Added `spec/controllers/forums_controller_spec.rb` to test all CRUD actions and authorization for guest, member, and admin roles.
- Added `spec/features/forums_spec.rb` to cover user-facing features such as browsing forums and creating posts from within a forum.
- Updated `spec/requests/forums_spec.rb` to cover basic request flow and JSON response formats.

Note: Tests were verified for content and logic but execution in the sandbox environment was blocked by missing infrastructure (PostgreSQL and Elasticsearch).

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

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-04-26 14:18:28 +09:30
google-labs-jules[bot]
6c7903c2a5 Fix RSpec/ExpectInHook offenses
- Move expectations from `before` hooks to `it` blocks.
- Ensure controller actions are called after expectations are set in controller specs.
- Replace synchronization expectations in hooks with Capybara `find` calls.
- Remove RSpec/ExpectInHook from .rubocop_todo.yml.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-25 18:39:43 +00:00
Daniel O'Connor
dfa963cd65 Rubocop: RSpec/EmptyExampleGroup (#4554)
* Rubocop: RSpec/EmptyExampleGroup

* Undo renaming

* Apply suggestion from @CloCkWeRX

* Apply suggestion from @CloCkWeRX
2026-04-26 03:18:50 +09:30
Daniel O'Connor
163289e853 Fix RSpec/IndexedLet RuboCop issues in spec files (#4556)
* Fix RSpec/IndexedLet RuboCop issues in spec files

Replace indexed let variable names with descriptive names across 11 spec files.
This improves readability and complies with the RSpec/IndexedLet rule.

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

* Rubocop

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-04-26 03:10:03 +09:30
Daniel O'Connor
8de6b083f9 Rubocop: RSpecRails/HaveHttpStatus 2026-04-23 14:13:47 +00:00
Daniel O'Connor
ba75afb3f5 Rubocop: RSpecRails/InferredSpecType 2026-04-23 13:39:46 +00:00
Daniel O'Connor
6ba4f39b4a Rubocop: Lint/EmptyBlock 2026-04-23 13:14:39 +00:00
Daniel O'Connor
f1acb35520 Merge pull request #4537 from Growstuff/FactoryBot/SyntaxMethods
Rubocop: FactoryBot/SyntaxMethods
2026-04-23 22:29:24 +09:30
Daniel O'Connor
474f09e110 Merge pull request #4332 from Growstuff/crops-controller
Add coverage for crops
2025-11-29 15:32:08 +10:30
Daniel O'Connor
ce946c3a83 Rubocop fixes 2025-09-20 09:45:56 +00:00
google-labs-jules[bot]
bc11a1b8db Merge pull request #4209 from Growstuff/extend-crop-model
Extend Crop Model and Migrate Data from OpenFarm
2025-09-07 20:03:18 +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
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
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
e69467f056 Ruby 3.2: Rubocop - RSpec/excessive docstring spacing (#3782)
* RSpec/ExcessiveDocstringSpacing
2024-07-13 15:12:56 +09: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
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda Wallace
43a577fa50 Update rubocop config 2021-01-05 19:46:07 +13:00
Brenda Wallace
0108224e4e Tests for crop creation 2020-08-26 12:36:58 +12:00
Brenda Wallace
8016a35e49 Adding contributor check to github actions 2020-08-26 12:36:58 +12:00
Brenda Wallace
bcc722d0c2 Updating content type in tests to include charset 2020-08-26 12:36:58 +12:00
Brenda Wallace
f1d830bfa9 fixed ambiguous negative 2020-08-26 12:36:58 +12:00
codefactor-io
4ff95fbac9 [CodeFactor] Apply fixes 2020-01-21 22:26:08 +13:00
codefactor-io
6c9a15f95e [CodeFactor] Apply fixes 2020-01-11 21:29:37 +00:00
Brenda Wallace
8dfb8ff954 Update params in seeds controller spec 2020-01-08 08:10:16 +13:00
Brenda Wallace
8a6c4a774a reindexs photo in photo controller spec 2020-01-06 21:53:02 +13:00
codefactor-io
7e30b6b6e0 [CodeFactor] Apply fixes 2020-01-03 11:28:51 +00:00
Brenda Wallace
b556c4b8f4 Merge branch 'dev' into cache/harvests 2020-01-02 15:42:17 +13:00
Martina Simicic
9eb5fe7947 Use specific error for raise_error expectation 2020-01-02 14:18:51 +13:00
Brenda Wallace
76e649a0a8 update likes controller spec for new params 2020-01-01 09:26:54 +13:00
Brenda Wallace
f76266a716 photos controller working with ES 2019-12-31 21:46:42 +13:00
Brenda Wallace
8ee332edd8 update harvests controller 2019-12-28 09:20:18 +13:00
Brenda Wallace
ce909332b7 plantings controller update 2019-12-28 09:15:52 +13:00
codefactor-io
1bb8770a6e [CodeFactor] Apply fixes 2019-12-27 06:51:32 +00:00
Brenda Wallace
75ed36d16c Merge branch 'cache/harvests' of github.com:Br3nda/growstuff into cache/harvests 2019-12-27 19:50:52 +13:00
Brenda Wallace
a015110b05 Reindex before running plantings controller specs 2019-12-27 19:50:46 +13:00
codefactor-io
2685cc70a7 [CodeFactor] Apply fixes to commit 1c7816c 2019-12-27 04:21:06 +00:00
Brenda Wallace
1c7816c951 fixing photos by crop query in photos controller 2019-12-27 17:20:28 +13:00
Brenda
42e225469a Routes using slugs (instead of ids)
this seems to be intended by the models having slugs (added about 7 years ago) but the routes weren't using them
2019-12-26 23:30:23 +00:00
Brenda Wallace
0d08f48b71 turn on ES indexing in some controllers 2019-12-27 09:15:53 +13:00
Brenda
bdee705b55 Update with frozen literals 2019-12-26 13:38:17 +13:00
Brenda Wallace
b8c94c13cc refactor to use search:true instead of reindex 2019-12-24 22:15:01 +13:00