Commit Graph
38 Commits
Author SHA1 Message Date
a2abe79e6f Fix Translation missing en.seeds.updated (#5100)
* Fix missing en.seeds.updated translation

Add missing updated key under the seeds scope in config/locales/en.yml
and add controller test verifying flash notice on seed update.

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

* Update SeedsController test route parameter to use slug

Seeds routes use param: :slug. Updated test parameter key from id to slug.

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

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 19:56:13 +10:30
Brenda Wallace 0e11e0bf80 Fix seed index specs to use match_array for crop uniqueness and correct seed count for CSV format 2026-10-16 17:32:09 +13:00
Brenda Wallace db8ad5a1f5 Enable view rendering for 'GET index as the results alone' in SeedsController specs 2026-10-16 17:32:09 +13:00
Brenda Wallace c8c32014bb tidying up, as react components 2026-10-16 17:32:09 +13:00
Brenda Wallace d1366a0128 Update seed creation in sorting tests to include tradable_to attribute 2026-10-16 17:32:09 +13:00
Brenda Wallace 0ea9f36ece Refactor follow creation in specs to use factory method for consistency 2026-10-16 17:32:09 +13:00
Brenda Wallace eca77c8e4e Refactor follow creation to use create! method and update seed packet rule matcher for case insensitivity 2026-10-16 17:32:09 +13:00
Brenda Wallace 1b9e6d036f Add seed filtering, messaging features, and enhance seed helper methods
- Implemented filtering for seeds based on source (own, bought, traded, heirloom) and sow-by dates in the SeedsController.
- Added feature specs for seed filtering and messaging functionalities.
- Enhanced SeedsHelper with methods for seed source labels, packet rules, and distance calculations.
- Updated views to reflect changes in seed display and filtering options.
- Created request specs for message creation and conversation handling related to seeds.
2026-10-16 17:32:09 +13:00
Brenda Wallace 439826a849 Implement sorting of seeds by distance from the current member's location in the index action and update view to reflect sorting status. 2026-10-11 19:19:42 +13:00
6e7cf1c813 Refactor Seeds to remove Elasticsearch dependency (#4684)
* Refactor Seeds to remove Elasticsearch dependency

This commit refactors the `SeedsController` and `Seed` model to remove
dependency on Elasticsearch and Searchkick.

Key changes:
- Removed `SearchSeeds` concern from the `Seed` model.
- Reimplemented `Seed.homepage_records` using ActiveRecord.
- Refactored `SeedsController#index` to use ActiveRecord for filtering,
  eager loading, and pagination.
- Deleted `app/models/concerns/search_seeds.rb`.
- Updated relevant specs to remove Searchkick-specific tags and setup.

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

* Remove Seed.reindex

* Remove trait

* Fix tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-06-24 21:54:43 +09:30
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 f1acb35520 Merge pull request #4537 from Growstuff/FactoryBot/SyntaxMethods
Rubocop: FactoryBot/SyntaxMethods
2026-04-23 22:29:24 +09:30
Daniel O'Connor d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda Wallace 8dfb8ff954 Update params in seeds controller spec 2020-01-08 08:10:16 +13:00
Brenda Wallace 0d08f48b71 turn on ES indexing in some controllers 2019-12-27 09:15:53 +13:00
codefactor-io e8760f9c38 [CodeFactor] Apply fixes 2019-12-20 03:33:23 +00:00
Brenda Wallace 8faa712e07 be_success -> be_successfull
fixes a deprecation warning
2019-06-27 22:26:15 +12:00
Awesome Code 284bb81bbf Auto corrected by following Lint Ruby RSpecEmptyLine 2019-02-09 03:05:40 +00:00
Brenda Wallace 9760c02b77 User owner's slug to filter seeds 2019-01-06 08:45:42 +13:00
Brenda Wallace 59cca1b8cb Upgraded controller specs for rails 5 2018-04-02 16:18:46 +12:00
Brenda Wallace fa32537c3b Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5
Conflicts:
	.rubocop_todo.yml
	Gemfile.lock
	app/assets/javascripts/application.js
	app/assets/javascripts/members.js.erb
	app/assets/stylesheets/predictions.sass
	app/controllers/crops_controller.rb
	app/controllers/orders_controller.rb
	app/controllers/plantings_controller.rb
	app/models/account.rb
	app/models/account_type.rb
	app/models/member.rb
	app/models/order.rb
	app/models/order_item.rb
	app/models/product.rb
	app/views/gardens/show.html.haml
	app/views/layouts/application.html.haml
	config/initializers/assets.rb
	config/routes.rb
	db/schema.rb
	package-lock.json
	spec/controllers/account_types_controller_spec.rb
	spec/controllers/admin/orders_controller_spec.rb
	spec/controllers/comments_controller_spec.rb
	spec/controllers/gardens_controller_spec.rb
	spec/controllers/harvests_controller_spec.rb
	spec/controllers/member_controller_spec.rb
	spec/controllers/order_items_controller_spec.rb
	spec/controllers/orders_controller_spec.rb
	spec/controllers/photo_associations_controller_spec.rb
	spec/controllers/photos_controller_spec.rb
	spec/controllers/plantings_controller_spec.rb
	spec/controllers/seeds_controller_spec.rb
	spec/controllers/shop_controller_spec.rb
	spec/features/crops/crop_detail_page_spec.rb
	spec/models/member_spec.rb
	spec/models/post_spec.rb
	spec/views/crops/_planting_advice.html.haml_spec.rb
	spec/views/home/_crops.html.haml_spec.rb
	spec/views/orders/show.html.haml_spec.rb
	spec/views/posts/show.html.haml_spec.rb
	spec/views/shop/index_spec.rb
2018-04-02 10:59:13 +12:00
Brenda Wallace f9d4e1d6ae Ancestry of food. Seeds -> Planting -> Seeds -> Planting (#1550)
* Add seed ancestry, and seeds.finished_at
* Plantings and seeds produce each other
* Permissions for seeds actions
* View update, for seed actions, and planting ancestry
* Routes for seeds
* Scopes for harvests
* Spec updates for seeds
* Removed in-line style
* Add seed ancestry, and seeds.finished_at
* Plantings and seeds produce each other
* Permissions for seeds actions
* View update, for seed actions, and planting ancestry
* Routes for seeds
* Scopes for harvests
* Spec updates for seeds
* Moved finishable to a concern
* Seeds.finished_at
* rubocop fixes
* Made seeds sown migration the most recent
* Specs for home page
* Only show current seeds on home page
* Seeds appear for logged in or not
* Buttons to mark seeds finished
* JS for marking seeds finished
* Some actions only appear if seed or planting is active
* Fixed up display of home page
* Fixed typo in admin members#index
* Tidying up actions on all the things
* Harvest description in #index
* Truncate garden description if long
* Updated link label in view spec
* Show planted_from always, becuase it might be a parent seed
* find correct link in spec adding photos to garden
* fixed spec finding link to edit garden
* Better harvest description truncation
* Helping spec find the edit button
* specs for the home page
* Re-instate crops js, but in the correct file now
* Fixed link to garden in actions
* Tweaking mobile view
2018-03-12 08:39:32 +13:00
Brenda Wallace 65b4c7dbc1 Revert "Auto corrected by following Style/StringLiterals"
This reverts commit ab56a3c6b3.
2018-02-09 07:58:47 +13:00
Awesome Code ab56a3c6b3 Auto corrected by following Style/StringLiterals 2018-02-07 10:20:26 +13:00
Brenda Wallace 2f9610a60f Http positional arguments in rails 5 2018-01-04 21:28:48 +13:00
milesgould bb6e9e32e6 De-deprecate controller and view specs
We deprecated controller and view specs on the grounds that they were
brittle, and were a poorer measure of user experience than feature
specs. However, feature specs have their own problems: they're much
slower to run, and flakier (see #901). We also ran into a few cases
where feature specs erroneously passed because they were checking for
the presence of a string that occurred in the error page!

Hence, we're cautiously un-deprecating controller and view specs.

Fixes #1132
2017-11-24 19:02:54 +13:00
Logan Gingerich 10a8df47a9 Factorygirl to factorybot - fixes #1413 (#1425)
* FactoryGirl Changed to FactoryBot

file fix

changes based on comments received

Bundle Update on 2017-10-29

style update to align hash literal

added package-lock

* indentation fixes with rubocop

* name added to contributors
2017-11-01 15:03:31 +00:00
Brenda Wallace 40a981c94d Removed unnecesary braces on hash args 2017-01-22 15:10:11 +13:00
Brenda Wallace 723ebff923 Spacing fixes 2016-11-26 12:13:17 +13:00
Brenda Wallace 62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
Daniel O'Connor 4b4e0cf69a $ rubocop --only HashSyntax --auto-correct
483 files inspected, 2018 offenses detected, 2018 offenses corrected
2016-05-19 15:53:11 -04:00
Taylor Griffin 95974ab21b add deprecation not to all controller and view specs 2015-02-12 19:52:53 +11:00
Taylor Griffin 7fc886f43c implement custom Sweeper class as stop gap against errors when running specs 2014-11-16 12:01:27 +11:00
Skud 7c6d7ba3a9 rearranged routing to avoid ?owner_id=99 2013-07-26 15:29:30 +10:00
Skud 491e97c997 connected seeds into other parts of the site 2013-07-15 23:29:14 +10:00
Skud 91ea5146ac rails g scaffold seed... 2013-07-15 22:53:29 +10:00