Commit Graph

179 Commits

Author SHA1 Message Date
Daniel O'Connor
d542326047 Ruby 3.2: Rubocop - Rails/FilePath (#3783)
* Rails/FilePath
2024-07-13 15:13:56 +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
6102f0629b Revert 140fe7a (#3612)
* Revert 140fe7a

* Split rendering behaviour
2024-02-04 10:25:41 +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
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
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
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
codefactor-io
6c9a15f95e [CodeFactor] Apply fixes 2020-01-11 21:29:37 +00:00
codefactor-io
7e30b6b6e0 [CodeFactor] Apply fixes 2020-01-03 11:28:51 +00:00
Brenda Wallace
d46883f39b don't query for photos that we never read 2020-01-01 12:32:23 +13:00
Brenda Wallace
4940b79043 more tidy, crops controller 2019-12-28 10:08:50 +13:00
codefactor-io
f8916dfecb [CodeFactor] Apply fixes 2019-12-20 04:16:33 +00:00
Brenda Wallace
9d68ab0228 Rubocop fix of controller 2019-12-20 17:13:54 +13:00
Brenda Wallace
38e36c4a2c Merge remote-tracking branch 'upstream/dev' into cache/harvests
Conflicts:
	.rubocop_todo.yml
	app/controllers/likes_controller.rb
	app/models/concerns/crop_search.rb
	app/services/crop_search_service.rb
2019-12-19 10:28:17 +13: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
codefactor-io
18f016766a [CodeFactor] Apply fixes to commit 282791d 2019-12-09 09:20:19 +00:00
Brenda Wallace
282791d91b Pull crops and harvests from elasticsearch 2019-12-09 22:19:20 +13:00
Brenda
607eae2a43 Small improvements to crops controller to reduce query count 2019-12-04 21:02:33 +13:00
codefactor-io
a23963ba96 [CodeFactor] Apply fixes 2019-11-23 19:58:22 +00:00
Brenda Wallace
c0fabc7002 Reducing unnecesary and extra queries 2019-11-24 08:57:34 +13:00
Brenda Wallace
a437338961 Fix markers on crops#show map 2019-11-16 11:35:45 +13:00
Brenda Wallace
c6f4eef291 Show more results in searches 2019-10-21 16:24:31 +13:00
Brenda Wallace
b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00
Brenda Wallace
7b5698f977 👩‍🌾 Import openfarm data (#2177)
* Pull in openfarm icons, photos, info
* Truncating member location
* tidying up harvest display, and reducing duplication in css styles
* Tiny crop chip
* only show crop charts if there is data to show
* Make the styles more Growstuff
* Fixed links to openfarm
* Updating specs to cope with new photo sources
fix broken garden timeline on some pages
* Update homepage blurb
* Import crop companions
* More fluid page
* use thumbnail unless the source is flickr
* Messing with homepage
* Added crop growing_degree_days
* expect full size url on photos helper spec
* formatted dates from seeds#show
* tidy up places#show
* Move progress bar
* Quicker buttons for approve/reject crops
* Remove kaminari gem
* use crop cards on hierarchy page
* more crops on crops#index
* Wrap photo creation in transaction
* Wrap crop companions in a transaction
2019-09-28 17:23:25 +12:00
Brenda Wallace
b2d8818ae1 don't notify wranglers if there are none 2019-08-17 14:43:32 +12:00
Brenda Wallace
8faa712e07 be_success -> be_successfull
fixes a deprecation warning
2019-06-27 22:26:15 +12:00
Brenda Wallace
74e6a7cf2f Rename @matches to @crops 2019-04-08 21:39:20 +12:00
Brenda Wallace
77d1fc7347 Move crop searching specs from the crop model to the crop search service 2019-04-08 21:39:20 +12:00
Brenda Wallace
789cffeca1 Eager loading 2019-04-08 21:39:20 +12:00
Brenda Wallace
150d44ad6f named arguments for search 2019-04-08 21:39:20 +12:00
Brenda Wallace
61e0c2eb1d Swap elasticssearch for searchkick 2019-04-08 21:39:20 +12:00
Brenda Wallace
0c868d3edb Merge branch 'dev' into photos/seeds 2019-02-16 12:37:53 +13:00
Brenda Wallace
d3a542727c Fixing crop deleting and adding tests 2019-02-15 08:45:18 +13:00
Brenda Wallace
6167af700d Rubocop lint tidy 2019-02-05 12:37:09 +13:00
Brenda Wallace
9c4e649c5d Split up photos on crops#show by model type 2019-02-05 12:31:59 +13:00
Brenda Wallace
f1ad9cc3c7 Rubocop fix up 2019-02-04 20:55:04 +13:00
Brenda Wallace
ab880514c2 Further tidy of photo display 2019-02-04 20:43:52 +13:00
Brenda Wallace
d1a3f41462 Throw if can't find the @crop 2019-01-18 20:04:19 +13:00
Brenda Wallace
3212f748b4 Update crops_controller.rb 2019-01-18 20:03:22 +13:00
Brenda Wallace
e8d2226ac6 Look up crop by slug 2019-01-06 08:45:42 +13:00
Brenda Wallace
1e266a92f6 Members slug used in rotes 2019-01-06 08:45:42 +13:00
Brenda Wallace
7b01fcbd4b Align all the hashes 2018-12-30 15:22:29 +13:00
Brenda Wallace
3ad048b7e8 Fixed linter issue, empty line after guard clause 2018-09-13 23:10:43 +12:00
Brenda Wallace
84e47b721b removed duplicate crop chart methods 2018-04-02 11:36: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
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