Commit Graph
129 Commits
Author SHA1 Message Date
Brenda WallaceandDaniel O'Connor 8474bdd416 remove newsletter (#4974)
* Remove unused bluecloth gem

Last released in 2011. It was only required, never called; kramdown
renders the markdown.

* Add specs for Tilt markdown rendering and posts markdown partial

* Remove rails_12factor gem

Last released in 2014. Rails 5+ does this via RAILS_SERVE_STATIC_FILES
and RAILS_LOG_TO_STDOUT, which production.rb already reads.

* Remove memcachier gem from Gemfile and Gemfile.lock

* Remove unused webrat gem

Last released in 2011. Nothing requires it; the specs use Rails'
assert_select and Capybara matchers. Only generator comments mention it.

* Remove crowdin-cli gem

Last released in 2018. Crowdin now ships its own standalone CLI, which
reads crowdin.yml and doesn't need the gem. Also drops the dependencies
only it used (rest-client, gli, crowdin-api and friends).

* Removes the crowdin-cli gem (last released 2018), the dependencies only
it needed, and crowdin.yml. Crowdin was never set up: the config still
has a placeholder project ID and nothing else in the repo mentions it.

Assisted by Claude

* Remove newsletter functionality and associated views and tests

* Remove newsletter functionality and related code across the application

* keep the column

* Remove stale test step

* add back newsletter

* Add migration to update newsletter column comment in members table

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 11:48:36 +10:30
Brenda Wallace 12633ac9e7 Refactor nursery management: Introduce NurseryScoped concern and restructure nursery-related controllers
- Created NurseryScoped module to handle nursery authentication and setup.
- Refactored GardensController to remove nursery-related actions and utilize the new NurseryScoped.
- Added new Nurseries::DeclinesController for handling nursery decline actions.
- Introduced Nurseries::LeftoversController for managing leftover plantings in the nursery.
- Created Nurseries::PlantOutsController for handling the planting out of seedlings from the nursery.
- Added NurseriesController to manage nursery display and creation.
- Updated routes to reflect new nursery structure and actions.
- Modified views to accommodate new nursery management flow and updated links.
- Enhanced models to support nursery functionality, including plant_out and finish_leftovers methods.
- Updated tests to reflect changes in nursery handling and ensure functionality.
2026-10-17 17:38:38 +13:00
Brenda Wallace bd3c015f60 Add nursery functionality to gardens: implement nursery scope, validations, and migration; update member model to manage nursery creation and ensure uniqueness. 2026-10-16 23:14:28 +13:00
4d87d9ccb9 Optimize places memory usage by paginating, plucking fields, and limiting nearest_to (#4792)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2026-09-20 13:30:42 +09:30
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 f1acb35520 Merge pull request #4537 from Growstuff/FactoryBot/SyntaxMethods
Rubocop: FactoryBot/SyntaxMethods
2026-04-23 22:29:24 +09: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 b846d995ef Regenerate 2022-11-07 23:34:43 +10:30
Daniel O'Connor b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda 7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace f676054cd6 switch to member.discard 2019-08-10 16:09:57 +12:00
Awesome Code e7713ab24b Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace 2019-03-20 15:01:33 +13:00
Awesome Code da997ae538 Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace 2019-03-20 15:01:33 +13:00
Awesome Code 689baa85a3 Auto corrected by following Lint Ruby RSpec/ExampleWording 2019-02-11 10:17:54 +13:00
Awesome Code 490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +13:00
Awesome Code 284bb81bbf Auto corrected by following Lint Ruby RSpecEmptyLine 2019-02-09 03:05:40 +00:00
Brenda Wallace 550860178e Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5 2018-09-11 16:07:30 +12:00
Awesome Code 90f4db4853 Auto corrected by following Ruby rspec layout 2018-09-10 22:20:12 +00:00
Brenda Wallace 326e972e9b Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5 2018-06-04 16:21:51 +12:00
Awesome Code afc4441ce1 Auto corrected by following FactoryBot/CreateList 2018-04-20 22:19:04 +00:00
Brenda Wallace a00237dfcb Style fixes after rubocop upgrade 2018-04-02 15:48:16 +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 42de726405 Removing shop, products, accounts, orders 2018-02-09 10:53:05 +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
Awesome Code dea7ce241b Auto corrected by following RSpec/EmptyLineAfterFinalLet 2018-01-23 09:00:34 +13:00
Brenda Wallace 8e0b7d9ded Merge branch 'charts' into upgrade/rails-5
Conflicts:
	app/assets/javascripts/crops.js.erb
	spec/controllers/comments_controller_spec.rb
	spec/controllers/harvests_controller_spec.rb
	spec/controllers/photos_controller_spec.rb
	spec/controllers/plantings_controller_spec.rb
	spec/models/post_spec.rb
	spec/views/home/_crops.html.haml_spec.rb
2018-01-11 08:34:20 +13:00
Awesome Code e46f530dc3 Auto corrected by following RSpec/EmptyLineAfterFinalLet 2018-01-09 02:00:40 +00:00
Brenda Wallace 22fd422a6d Look for eq false in member spec 2018-01-06 11:49:35 +13:00
Brenda Wallace 7bb49f337f Fixing up member's account model creation, post rails 5 upgrade 2018-01-06 11:31:04 +13:00
Brenda Wallace f4af682d45 Updated code for Rail 5 2018-01-03 17:12:17 +13:00
Brenda Wallace 3cc637017d Avoid {} for multiline 2017-12-06 14:29:21 +13:00
Brenda Wallace f499f245de Added new line after block end, for rubocpo 2017-12-06 14:08:05 +13:00
Brenda Wallace 6aa689b0d8 Removed some model ordering specs 2017-11-29 20:59:37 +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 46efcf3e61 Spec for Forum owners and Crop creators deleting their accounts 2017-06-09 23:25:40 +12:00
Brenda Wallace 910a9673dc Unsubscribes newsletter before member destroying 2017-06-09 22:39:07 +12:00
Brenda Wallace 582dd2c9fd Checks the deleted members are not found 2017-06-09 21:28:47 +12:00
Brenda Wallace 85a368999b we love rubocop 2017-04-13 14:30:51 +12:00
Daniel O'Connor 6ba4b4560e Fix #1305 by adding aggregation
Expand test coverage
member_id is owner_id on plantings
Argue with ActionView::Template::Error about what we can group on

Rename variable
2017-04-13 14:30:41 +12:00
Brenda Wallace 50624fb2cb Style/MultilineBlockLayout fix 2017-02-19 16:17:03 +13:00
Brenda Wallace e184503caa Fix up to match rubocop's MultilineMethodCallBraceLayout recommendation 2017-02-19 16:17:03 +13:00
Brenda Wallace a46b8ebe76 Fix up all UnneededInterpolation 2017-02-16 12:26:47 +13:00
Brenda Wallace ff50ec65d0 Merge remote-tracking branch 'upstream/dev' into HEAD 2017-01-22 18:26:29 +13:00
Brenda Wallace 0fa9f54c9c Rename member.has_role? to role? 2017-01-14 20:54:43 +13:00
Brenda Wallace f214f608ff Rename member.is_paid? to paid? 2017-01-14 20:51:22 +13:00
Miles Gould 4b1cdc5650 Test Model.newsletter_(un)subscribe
I'm not very happy with this change as-is. The tests are very shallow
(they wouldn't have caught the bug @tconquest and I found in this code,
for instance), and use the deprecated `receive_message_chain` method.
From the RSpec docs:

"Chains can be arbitrarily long, which makes it quite painless to
violate the Law of Demeter in violent ways, so you should consider any
use of receive_message_chain a code smell.  Even though not all code
smells indicate real problems (think fluent interfaces),
receive_message_chain still results in brittle examples. For example, if
you write allow(foo).to receive_message_chain(:bar, :baz => 37) in a
spec and then the implementation calls foo.baz.bar, the stub will not
work."

Further work needed.
2016-12-19 22:15:53 +00:00
Miles Gould 4f1c94bfb9 Fix warnings in member_spec 2016-12-19 20:44:18 +00:00
Miles Gould 70f589d59b Replace instance vars with locals in member_spec 2016-12-19 20:33:43 +00:00