Compare commits

...

101 Commits

Author SHA1 Message Date
dependabot[bot]
47ef858cdf Merge pull request #3697 from Growstuff/dependabot/bundler/axe-core-rspec-4.9.0 2024-03-30 06:27:21 +00:00
dependabot[bot]
627e6d0267 Bump axe-core-rspec from 4.8.2 to 4.9.0
Bumps [axe-core-rspec](https://github.com/dequelabs/axe-core-gems) from 4.8.2 to 4.9.0.
- [Release notes](https://github.com/dequelabs/axe-core-gems/releases)
- [Changelog](https://github.com/dequelabs/axe-core-gems/blob/v4.9.0/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core-gems/compare/v4.8.2...v4.9.0)

---
updated-dependencies:
- dependency-name: axe-core-rspec
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 06:06:17 +00:00
dependabot[bot]
785129e113 Merge pull request #3695 from Growstuff/dependabot/bundler/axe-core-capybara-4.9.0 2024-03-30 06:04:00 +00:00
dependabot[bot]
f7d6438e0a Bump axe-core-capybara from 4.8.2 to 4.9.0
Bumps [axe-core-capybara](https://github.com/dequelabs/axe-core-gems) from 4.8.2 to 4.9.0.
- [Release notes](https://github.com/dequelabs/axe-core-gems/releases)
- [Changelog](https://github.com/dequelabs/axe-core-gems/blob/v4.9.0/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core-gems/compare/v4.8.2...v4.9.0)

---
updated-dependencies:
- dependency-name: axe-core-capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 05:45:22 +00:00
dependabot[bot]
9a6b0745b7 Merge pull request #3694 from Growstuff/dependabot/bundler/selenium-webdriver-4.19.0 2024-03-30 05:43:31 +00:00
dependabot[bot]
844bfb3e1a Bump selenium-webdriver from 4.18.1 to 4.19.0
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.18.1 to 4.19.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.18.1...selenium-4.19.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 05:26:41 +00:00
dependabot[bot]
3f936b2269 Merge pull request #3696 from Growstuff/dependabot/bundler/sprockets-3.7.3 2024-03-30 05:25:05 +00:00
dependabot[bot]
b218886069 Bump sprockets from 3.7.2 to 3.7.3
Bumps [sprockets](https://github.com/rails/sprockets) from 3.7.2 to 3.7.3.
- [Release notes](https://github.com/rails/sprockets/releases)
- [Changelog](https://github.com/rails/sprockets/blob/v3.7.3/CHANGELOG.md)
- [Commits](https://github.com/rails/sprockets/compare/v3.7.2...v3.7.3)

---
updated-dependencies:
- dependency-name: sprockets
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 11:57:41 +00:00
Daniel O'Connor
f8764f4953 Merge pull request #3698 from Growstuff/dependabot/bundler/terser-1.2.1
Bump terser from 1.2.0 to 1.2.1
2024-03-29 22:25:39 +10:30
dependabot[bot]
5d09a8271c Bump terser from 1.2.0 to 1.2.1
Bumps [terser](https://github.com/ahorek/terser-ruby) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/ahorek/terser-ruby/releases)
- [Changelog](https://github.com/ahorek/terser-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ahorek/terser-ruby/compare/1.2.0...1.2.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 07:07:43 +00:00
dependabot[bot]
c9261b1c6a Merge pull request #3693 from Growstuff/dependabot/bundler/faker-3.3.0 2024-03-26 08:52:21 +00:00
dependabot[bot]
719644c8a5 Bump faker from 3.2.3 to 3.3.0
Bumps [faker](https://github.com/faker-ruby/faker) from 3.2.3 to 3.3.0.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v3.2.3...v3.3.0)

---
updated-dependencies:
- dependency-name: faker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-26 07:46:08 +00:00
Daniel O'Connor
803a00f1c4 Merge pull request #3688 from Growstuff/dependabot/bundler/rubocop-rails-2.24.1
Bump rubocop-rails from 2.24.0 to 2.24.1
2024-03-26 07:42:14 +10:30
Daniel O'Connor
bfae190608 Merge pull request #3692 from Growstuff/dependabot/bundler/rdoc-6.6.3.1
Bump rdoc from 6.6.2 to 6.6.3.1
2024-03-26 07:41:53 +10:30
Daniel O'Connor
bcc818c23b Merge pull request #3690 from Growstuff/dependabot/bundler/carrierwave-3.0.7
Bump carrierwave from 3.0.5 to 3.0.7
2024-03-26 07:41:32 +10:30
dependabot[bot]
c853e08b2c Bump rdoc from 6.6.2 to 6.6.3.1
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.6.2 to 6.6.3.1.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.6.2...v6.6.3.1)

---
updated-dependencies:
- dependency-name: rdoc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 19:59:23 +00:00
dependabot[bot]
c9c4df39ed Bump carrierwave from 3.0.5 to 3.0.7
Bumps [carrierwave](https://github.com/carrierwaveuploader/carrierwave) from 3.0.5 to 3.0.7.
- [Release notes](https://github.com/carrierwaveuploader/carrierwave/releases)
- [Changelog](https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md)
- [Commits](https://github.com/carrierwaveuploader/carrierwave/compare/v3.0.5...v3.0.7)

---
updated-dependencies:
- dependency-name: carrierwave
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 19:47:29 +00:00
dependabot[bot]
ab32e251b9 Bump rubocop-rails from 2.24.0 to 2.24.1
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.24.0 to 2.24.1.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.24.0...v2.24.1)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 10:14:28 +00:00
dependabot[bot]
226b1c7ab1 Merge pull request #3689 from Growstuff/dependabot/bundler/ruby-units-4.0.3 2024-03-25 10:11:51 +00:00
dependabot[bot]
ccb7dbc17c Bump ruby-units from 4.0.2 to 4.0.3
Bumps [ruby-units](https://github.com/olbrich/ruby-units) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/olbrich/ruby-units/releases)
- [Changelog](https://github.com/olbrich/ruby-units/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/olbrich/ruby-units/compare/v4.0.2...v4.0.3)

---
updated-dependencies:
- dependency-name: ruby-units
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 07:30:36 +00:00
Daniel O'Connor
2f5d397f25 Merge branch 'mainline' into dev 2024-03-24 22:20:07 +10:30
Daniel O'Connor
eb6f032272 Attempt to fix inbox (#3687)
* Move delete button

* Swap for different displays

* Swap for different displays

* Reorganise

* Reorganise

* Update spec

* Update spec
2024-03-24 22:19:30 +10:30
Daniel O'Connor
bac825fe65 Merge pull request #3686 from Growstuff/opacity
Improve readibility
2024-03-24 20:36:14 +10:30
Daniel O'Connor
c7de9a4d91 Improve readibility 2024-03-24 09:50:56 +00:00
Daniel O'Connor
7c6508e387 Overflow of location badges (#3685)
* Swap to CSS for truncation

* Adjust styling on mobile

* Contain more

* Contain more

* All badges clip

* Adjust badges to truncate again

* Adjust badges to truncate again

* Apply suggestions from code review
2024-03-24 20:16:56 +10:30
Daniel O'Connor
84809d0490 Merge pull request #3681 from Growstuff/bs-5-minor
Add bootstrap 5 fixes which weren't in the activities branch
2024-03-23 16:56:05 +10:30
Daniel O'Connor
da37fd854d Add bootstrap 5 fixes which weren't in the activities branch 2024-03-23 05:49:06 +00:00
Daniel O'Connor
d282cadd91 Merge pull request #3666 from Growstuff/dev
Release for March 2024
2024-03-23 14:53:31 +10:30
dependabot[bot]
890f3d042a Merge pull request #3680 from Growstuff/dependabot/bundler/rspec-rails-6.1.2 2024-03-19 10:14:28 +00:00
dependabot[bot]
29b10c18d7 Bump rspec-rails from 6.1.1 to 6.1.2
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 6.1.1 to 6.1.2.
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v6.1.1...v6.1.2)

---
updated-dependencies:
- dependency-name: rspec-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 07:22:10 +00:00
Daniel O'Connor
47ad915ab3 Remove sort form (#3679)
* Remove sort form

* Remove stale test
2024-03-17 21:56:36 +10:30
dependabot[bot]
ecfb402266 Merge pull request #3678 from Growstuff/dependabot/bundler/rubocop-1.62.1 2024-03-12 11:16:11 +00:00
dependabot[bot]
48b3b53f2e Bump rubocop from 1.62.0 to 1.62.1
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.62.0 to 1.62.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.62.0...v1.62.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 07:12:28 +00:00
Daniel O'Connor
d30854dd51 Merge pull request #3677 from Growstuff/labelling
Use correct translation for buttons
2024-03-12 00:52:14 +10:30
Daniel O'Connor
514b90c93a Fix #3676 2024-03-11 12:23:49 +00:00
Daniel O'Connor
938084612e Merge branch 'mainline' into dev 2024-03-10 20:45:30 +10:30
Daniel O'Connor
0713244116 Merge pull request #3664 from Growstuff/awesomecode-lint-javascript-unicorn-prefer-prototype-methods-60687
Auto corrected by following Lint Javascript unicorn/prefer-prototype-methods
2024-03-10 20:43:59 +10:30
Awesome Code
4d25de4663 Auto corrected by following Lint Javascript unicorn/prefer-prototype-methods 2024-03-10 01:19:43 +00:00
Daniel O'Connor
7d63234841 Upgrade to bootstrap 5 (#3605)
* Upgrade boostrap

* Remove deprecated bootstrap toggles

* Migrate other details

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Fix spec

* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view

* Fix spec

* Cleanup

* Cleanup
2024-03-10 11:49:22 +10:30
Daniel O'Connor
5be0153c74 Activities (#3646)
* Implement activities

* Add activities to timeline

* Add factory

* Add coverage

* Fix misc issues

* Activities display

* Add activities to garden and plantings

* Add activities to garden and plantings

* Add planting

* Add to planting, harvest show

* More CRUD

* More CRUD

* index

* index

* Extract card view

* Permissions

* Add edit

* Remove workaround fro vs code

* Fix title

* CSV

* CSV

* Add RSS, ical

* Extend ical slightly

* Cleanup

* Rubocop

* Remove doubled form

* Change icon

* Fix short description

* Add menus

* Put homepage widget in

* Add activity icon - MIT licenced - https://www.svgrepo.com/svg/336823/plan

* Naming

* Missing files

* Revert VS Code lag induced change

* Update app/views/home/_harvests.html.haml

* Update activities_controller.rb

* Update activities_controller.rb

* Update app/controllers/activities_controller.rb

* Update index.html.haml

* Apply suggestions from code review

* Apply suggestions from code review

* Typo

* Translation

* Apply suggestions from code review

* Update app/views/plantings/index.ics.erb

* Update app/models/activity.rb

* Update plantings_spec.rb

* Update plantings_spec.rb

* We are now rendering an extra event, so check the next one for the old behaviour
2024-03-10 11:36:24 +10:30
Daniel O'Connor
80ee85f41a Merge pull request #3662 from Growstuff/dependabot/bundler/rubocop-1.62.0
Bump rubocop from 1.61.0 to 1.62.0
2024-03-10 10:33:42 +10:30
dependabot[bot]
f31ce97759 Bump rubocop from 1.61.0 to 1.62.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.61.0 to 1.62.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.61.0...v1.62.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-07 08:26:25 +00:00
dependabot[bot]
42921e2df2 Merge pull request #3658 from Growstuff/dependabot/bundler/rubocop-rspec-2.27.1 2024-03-07 08:24:32 +00:00
dependabot[bot]
b1d6297ccd Bump rubocop-rspec from 2.27.0 to 2.27.1
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.27.0 to 2.27.1.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.27.0...v2.27.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 10:05:27 +00:00
dependabot[bot]
eb721d1c13 Merge pull request #3660 from Growstuff/dependabot/bundler/rack-cors-2.0.2 2024-03-06 10:04:22 +00:00
dependabot[bot]
9a6c1237f8 Bump rack-cors from 2.0.1 to 2.0.2
Bumps [rack-cors](https://github.com/cyu/rack-cors) from 2.0.1 to 2.0.2.
- [Changelog](https://github.com/cyu/rack-cors/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cyu/rack-cors/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: rack-cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 07:40:29 +00:00
dependabot[bot]
2b168dca6a Merge pull request #3659 from Growstuff/dependabot/bundler/pg-1.5.6 2024-03-04 10:09:34 +00:00
dependabot[bot]
2bcf036c39 Bump pg from 1.5.5 to 1.5.6
Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.5 to 1.5.6.
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.5.5...v1.5.6)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 09:52:33 +00:00
Cesy
97afe86705 Merge pull request #3657 from Growstuff/dependabot/bundler/rubocop-rails-2.24.0
Bump rubocop-rails from 2.23.1 to 2.24.0
2024-03-04 09:48:03 +00:00
dependabot[bot]
43ea14e400 Bump rubocop-rails from 2.23.1 to 2.24.0
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.23.1 to 2.24.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.23.1...v2.24.0)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 08:04:12 +00:00
dependabot[bot]
6bc5393fc2 Merge pull request #3655 from Growstuff/dependabot/bundler/rubocop-1.61.0 2024-03-03 08:40:21 +00:00
dependabot[bot]
139f975788 Bump rubocop from 1.60.2 to 1.61.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.60.2 to 1.61.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.60.2...v1.61.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-03 06:47:28 +00:00
dependabot[bot]
0a7d4fbb9f Merge pull request #3656 from Growstuff/dependabot/bundler/rubocop-rspec-2.27.0 2024-03-03 06:46:27 +00:00
dependabot[bot]
9541d143db Bump rubocop-rspec from 2.26.1 to 2.27.0
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.26.1 to 2.27.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.26.1...v2.27.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 07:25:50 +00:00
Daniel O'Connor
cb670191d6 Merge pull request #3645 from Growstuff/planning
Planning future plantings - Minor UX changes
2024-03-01 06:27:32 +10:30
dependabot[bot]
9765ea16d0 Merge pull request #3652 from Growstuff/dependabot/bundler/dotenv-rails-3.1.0 2024-02-29 10:15:52 +00:00
dependabot[bot]
f9d87e5e2c Bump dotenv-rails from 3.0.3 to 3.1.0
Bumps [dotenv-rails](https://github.com/bkeepers/dotenv) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/bkeepers/dotenv/releases)
- [Changelog](https://github.com/bkeepers/dotenv/blob/main/Changelog.md)
- [Commits](https://github.com/bkeepers/dotenv/compare/v3.0.3...v3.1.0)

---
updated-dependencies:
- dependency-name: dotenv-rails
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 09:33:17 +00:00
dependabot[bot]
128db15e79 Merge pull request #3654 from Growstuff/dependabot/bundler/chartkick-5.0.6 2024-02-29 09:27:37 +00:00
dependabot[bot]
38073295f6 Bump chartkick from 5.0.5 to 5.0.6
Bumps [chartkick](https://github.com/ankane/chartkick) from 5.0.5 to 5.0.6.
- [Changelog](https://github.com/ankane/chartkick/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/chartkick/compare/v5.0.5...v5.0.6)

---
updated-dependencies:
- dependency-name: chartkick
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 07:07:48 +00:00
Daniel O'Connor
f6ac14ac0f Merge pull request #3651 from Growstuff/dependabot/bundler/dotenv-rails-3.0.3
Bump dotenv-rails from 3.0.2 to 3.0.3
2024-02-27 18:50:24 +10:30
dependabot[bot]
d3421cde34 Bump dotenv-rails from 3.0.2 to 3.0.3
Bumps [dotenv-rails](https://github.com/bkeepers/dotenv) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/bkeepers/dotenv/releases)
- [Changelog](https://github.com/bkeepers/dotenv/blob/main/Changelog.md)
- [Commits](https://github.com/bkeepers/dotenv/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: dotenv-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 07:40:00 +00:00
Daniel O'Connor
cf26b16579 Merge pull request #3650 from Growstuff/dependabot/bundler/listen-3.9.0
Bump listen from 3.8.0 to 3.9.0
2024-02-26 22:23:55 +10:30
dependabot[bot]
87f5115748 Bump listen from 3.8.0 to 3.9.0
Bumps [listen](https://github.com/guard/listen) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.8.0...v3.9.0)

---
updated-dependencies:
- dependency-name: listen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 08:16:27 +00:00
dependabot[bot]
025abde6cc Merge pull request #3649 from Growstuff/dependabot/bundler/rails-7.1.3.2 2024-02-24 14:43:53 +00:00
dependabot[bot]
b3293fddfd Bump rails from 7.1.3 to 7.1.3.2
Bumps [rails](https://github.com/rails/rails) from 7.1.3 to 7.1.3.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v7.1.3...v7.1.3.2)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 07:55:45 +00:00
dependabot[bot]
60bec845c3 Merge pull request #3636 from Growstuff/dependabot/bundler/dalli-3.2.8 2024-02-20 21:00:29 +00:00
dependabot[bot]
66745b327d Bump dalli from 3.2.7 to 3.2.8
Bumps [dalli](https://github.com/petergoldstein/dalli) from 3.2.7 to 3.2.8.
- [Changelog](https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/petergoldstein/dalli/compare/v3.2.7...v3.2.8)

---
updated-dependencies:
- dependency-name: dalli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-20 10:27:55 +00:00
dependabot[bot]
8bd0c5c369 Merge pull request #3647 from Growstuff/dependabot/bundler/sidekiq-7.2.2 2024-02-20 10:26:53 +00:00
dependabot[bot]
0e398be4bf Bump sidekiq from 7.2.1 to 7.2.2
Bumps [sidekiq](https://github.com/sidekiq/sidekiq) from 7.2.1 to 7.2.2.
- [Changelog](https://github.com/sidekiq/sidekiq/blob/main/Changes.md)
- [Commits](https://github.com/sidekiq/sidekiq/compare/v7.2.1...v7.2.2)

---
updated-dependencies:
- dependency-name: sidekiq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-20 10:01:58 +00:00
dependabot[bot]
5e4702c205 Merge pull request #3648 from Growstuff/dependabot/bundler/selenium-webdriver-4.18.1 2024-02-20 10:00:56 +00:00
dependabot[bot]
c4788e1774 Bump selenium-webdriver from 4.17.0 to 4.18.1
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.17.0 to 4.18.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.17.0...selenium-4.18.1)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-20 07:21:11 +00:00
dependabot[bot]
1a95a46df5 Merge pull request #3640 from Growstuff/dependabot/bundler/letter_opener-1.9.0 2024-02-18 08:40:48 +00:00
dependabot[bot]
261f2fb758 Bump letter_opener from 1.8.1 to 1.9.0
Bumps [letter_opener](https://github.com/ryanb/letter_opener) from 1.8.1 to 1.9.0.
- [Changelog](https://github.com/ryanb/letter_opener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ryanb/letter_opener/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: letter_opener
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-18 08:15:05 +00:00
Daniel O'Connor
ee4b2e1699 Merge pull request #3642 from Growstuff/dependabot/bundler/pg-1.5.5
Bump pg from 1.5.4 to 1.5.5
2024-02-18 18:43:32 +10:30
Daniel O'Connor
8593d2dfd9 Add rake task for clean up of old content (#3644) 2024-02-18 18:43:14 +10:30
Daniel O'Connor
e486db26db Fix icons 2024-02-18 03:40:27 +00:00
Daniel O'Connor
c0bcafdf51 Deal with future plantings 2024-02-18 03:33:34 +00:00
Daniel O'Connor
db71544a76 Explain you can plan out what you want to plant 2024-02-18 03:27:57 +00:00
Daniel O'Connor
f010320e51 Explain you can plan out what you want to plant 2024-02-18 03:27:47 +00:00
Daniel O'Connor
7b68e51328 Explain you can plan out what you want to plant 2024-02-18 03:26:46 +00:00
Daniel O'Connor
42e1dbb4da Rearrange member profile so that current progress is reported first, harvests second 2024-02-18 03:23:30 +00:00
dependabot[bot]
18ddcf9a33 Bump pg from 1.5.4 to 1.5.5
Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.4 to 1.5.5.
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-18 02:34:12 +00:00
dependabot[bot]
a4797c3f67 Merge pull request #3643 from Growstuff/dependabot/bundler/dotenv-rails-3.0.2 2024-02-18 02:33:07 +00:00
dependabot[bot]
fe4a64d16a Bump dotenv-rails from 3.0.1 to 3.0.2
Bumps [dotenv-rails](https://github.com/bkeepers/dotenv) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/bkeepers/dotenv/releases)
- [Changelog](https://github.com/bkeepers/dotenv/blob/main/Changelog.md)
- [Commits](https://github.com/bkeepers/dotenv/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: dotenv-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 07:33:31 +00:00
dependabot[bot]
63e542a5f9 Merge pull request #3639 from Growstuff/dependabot/bundler/haml_lint-0.57.0 2024-02-15 08:58:33 +00:00
dependabot[bot]
3b2ef62e75 Bump haml_lint from 0.56.0 to 0.57.0
Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.56.0 to 0.57.0.
- [Release notes](https://github.com/sds/haml-lint/releases)
- [Changelog](https://github.com/sds/haml-lint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sds/haml-lint/compare/v0.56.0...v0.57.0)

---
updated-dependencies:
- dependency-name: haml_lint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 08:39:27 +00:00
dependabot[bot]
343384cf6f Merge pull request #3638 from Growstuff/dependabot/bundler/axe-core-capybara-4.8.2 2024-02-15 08:35:40 +00:00
dependabot[bot]
7829040d59 Bump axe-core-capybara from 4.8.1 to 4.8.2
Bumps [axe-core-capybara](https://github.com/dequelabs/axe-core-gems) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/dequelabs/axe-core-gems/releases)
- [Changelog](https://github.com/dequelabs/axe-core-gems/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core-gems/compare/v4.8.1...v4.8.2)

---
updated-dependencies:
- dependency-name: axe-core-capybara
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 08:10:57 +00:00
dependabot[bot]
5f3ce28a53 Merge pull request #3641 from Growstuff/dependabot/bundler/dotenv-rails-3.0.1 2024-02-15 08:09:36 +00:00
dependabot[bot]
ba0211ac5b Bump dotenv-rails from 2.8.1 to 3.0.1
Bumps [dotenv-rails](https://github.com/bkeepers/dotenv) from 2.8.1 to 3.0.1.
- [Release notes](https://github.com/bkeepers/dotenv/releases)
- [Changelog](https://github.com/bkeepers/dotenv/blob/main/Changelog.md)
- [Commits](https://github.com/bkeepers/dotenv/compare/v2.8.1...v3.0.1)

---
updated-dependencies:
- dependency-name: dotenv-rails
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 07:42:25 +00:00
dependabot[bot]
84254aee67 Merge pull request #3637 from Growstuff/dependabot/bundler/axe-core-rspec-4.8.2 2024-02-14 07:09:30 +00:00
dependabot[bot]
5740b80093 Bump axe-core-rspec from 4.8.1 to 4.8.2
Bumps [axe-core-rspec](https://github.com/dequelabs/axe-core-gems) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/dequelabs/axe-core-gems/releases)
- [Changelog](https://github.com/dequelabs/axe-core-gems/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core-gems/compare/v4.8.1...v4.8.2)

---
updated-dependencies:
- dependency-name: axe-core-rspec
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 07:30:36 +00:00
Daniel O'Connor
e703cbcb81 Merge pull request #3634 from Growstuff/dependabot/bundler/scout_apm-5.3.7
Bump scout_apm from 5.3.5 to 5.3.7
2024-02-08 21:19:31 +10:30
dependabot[bot]
4b9d52d936 Bump scout_apm from 5.3.5 to 5.3.7
Bumps [scout_apm](https://github.com/scoutapp/scout_apm_ruby) from 5.3.5 to 5.3.7.
- [Changelog](https://github.com/scoutapp/scout_apm_ruby/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/scoutapp/scout_apm_ruby/compare/v5.3.5...v5.3.7)

---
updated-dependencies:
- dependency-name: scout_apm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 08:35:27 +00:00
Cesy
a2a4dee126 Merge pull request #3633 from Growstuff/dependabot/bundler/ruby-units-4.0.2
Bump ruby-units from 4.0.1 to 4.0.2
2024-02-08 08:34:19 +00:00
dependabot[bot]
07658adb42 Bump ruby-units from 4.0.1 to 4.0.2
Bumps [ruby-units](https://github.com/olbrich/ruby-units) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/olbrich/ruby-units/releases)
- [Changelog](https://github.com/olbrich/ruby-units/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/olbrich/ruby-units/compare/v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: ruby-units
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:34:16 +00:00
dependabot[bot]
8ccba6ba74 Merge pull request #3630 from Growstuff/dependabot/bundler/nokogiri-1.16.2 2024-02-06 09:03:29 +00:00
dependabot[bot]
bd32c012dd Bump nokogiri from 1.16.0 to 1.16.2
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.0 to 1.16.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.0...v1.16.2)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 03:52:35 +00:00
dependabot[bot]
7738014481 Merge pull request #3629 from Growstuff/dependabot/bundler/haml_lint-0.56.0 2024-02-05 10:09:51 +00:00
dependabot[bot]
c49ac079aa Bump haml_lint from 0.55.0 to 0.56.0
Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.55.0 to 0.56.0.
- [Release notes](https://github.com/sds/haml-lint/releases)
- [Changelog](https://github.com/sds/haml-lint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sds/haml-lint/compare/v0.55.0...v0.56.0)

---
updated-dependencies:
- dependency-name: haml_lint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 07:20:57 +00:00
Daniel O'Connor
42c39a1c98 Merge pull request #3626 from Growstuff/dev
Release 56/Feb
2024-02-04 18:12:12 +10:30
99 changed files with 1101 additions and 296 deletions

View File

@@ -24,7 +24,7 @@ gem 'rswag-api'
gem 'rswag-ui'
# CSS framework
gem "bootstrap", ">= 4.6.2"
gem "bootstrap", ">= 5.0.0"
gem 'material-sass', '4.1.1'
# Icons used by bootstrap/material-sass

View File

@@ -33,35 +33,35 @@ GEM
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
actioncable (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
actionmailbox (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3)
actionpack (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activesupport (= 7.1.3)
actionmailer (7.1.3.2)
actionpack (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activesupport (= 7.1.3.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3)
actionview (= 7.1.3)
activesupport (= 7.1.3)
actionpack (7.1.3.2)
actionview (= 7.1.3.2)
activesupport (= 7.1.3.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@@ -69,15 +69,15 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3)
actionpack (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
actiontext (7.1.3.2)
actionpack (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3)
activesupport (= 7.1.3)
actionview (7.1.3.2)
activesupport (= 7.1.3.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
@@ -92,22 +92,22 @@ GEM
active_utils (3.4.1)
activesupport (>= 4.2)
i18n
activejob (7.1.3)
activesupport (= 7.1.3)
activejob (7.1.3.2)
activesupport (= 7.1.3.2)
globalid (>= 0.3.6)
activemodel (7.1.3)
activesupport (= 7.1.3)
activerecord (7.1.3)
activemodel (= 7.1.3)
activesupport (= 7.1.3)
activemodel (7.1.3.2)
activesupport (= 7.1.3.2)
activerecord (7.1.3.2)
activemodel (= 7.1.3.2)
activesupport (= 7.1.3.2)
timeout (>= 0.4.0)
activestorage (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activesupport (= 7.1.3)
activestorage (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activesupport (= 7.1.3.2)
marcel (~> 1.0)
activesupport (7.1.3)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -120,15 +120,15 @@ GEM
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
autoprefixer-rails (10.4.7.0)
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
axe-core-api (4.8.1)
axe-core-api (4.9.0)
dumb_delegator
virtus
axe-core-capybara (4.8.1)
axe-core-capybara (4.9.0)
axe-core-api
dumb_delegator
axe-core-rspec (4.8.1)
axe-core-rspec (4.9.0)
axe-core-api
dumb_delegator
virtus
@@ -149,20 +149,19 @@ GEM
erubi (~> 1.4)
parser (>= 2.4)
smart_properties
bigdecimal (3.1.6)
bigdecimal (3.1.7)
bluecloth (2.2.0)
bonsai-elasticsearch-rails (7.0.1)
elasticsearch-model (< 8)
elasticsearch-rails (< 8)
bootstrap (4.6.2)
bootstrap (5.3.2)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.16.1, < 2)
sassc-rails (>= 2.0.0)
popper_js (>= 2.11.8, < 3)
bootstrap-datepicker-rails (1.9.0.1)
railties (>= 3.0)
bootstrap_form (4.5.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
bootstrap_form (5.4.0)
actionpack (>= 6.1)
activemodel (>= 6.1)
builder (3.2.4)
bullet (7.1.6)
activesupport (>= 3.0.0)
@@ -184,14 +183,14 @@ GEM
capybara-screenshot (1.0.26)
capybara (>= 1.0, < 4)
launchy
carrierwave (3.0.5)
carrierwave (3.0.7)
activemodel (>= 6.0.0)
activesupport (>= 6.0.0)
addressable (~> 2.6)
image_processing (~> 1.1)
marcel (~> 1.0.0)
ssrf_filter (~> 1.0)
chartkick (5.0.5)
chartkick (5.0.6)
codeclimate-test-reporter (1.0.9)
simplecov (<= 0.13)
coderay (1.1.3)
@@ -211,8 +210,7 @@ GEM
crass (1.0.6)
csv_shaper (1.3.2)
activesupport (>= 3.0.0)
dalli (3.2.7)
base64
dalli (3.2.8)
database_cleaner (2.0.2)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.1.0)
@@ -228,16 +226,15 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.5.0)
diff-lcs (1.5.1)
discard (1.3.0)
activerecord (>= 4.2, < 8)
docile (1.1.5)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
drb (2.2.0)
ruby2_keywords
dotenv (3.1.0)
dotenv-rails (3.1.0)
dotenv (= 3.1.0)
railties (>= 6.1)
drb (2.2.1)
dumb_delegator (1.0.0)
elasticsearch (7.0.0)
elasticsearch-api (= 7.0.0)
@@ -255,13 +252,13 @@ GEM
erubi (1.12.0)
erubis (2.7.0)
excon (0.109.0)
execjs (2.8.1)
execjs (2.9.1)
factory_bot (6.4.5)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.2.3)
faker (3.3.0)
i18n (>= 1.8.11, < 2)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
@@ -298,7 +295,7 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.55.0)
haml_lint (0.57.0)
haml (>= 5.0)
parallel (~> 1.10)
rainbow
@@ -315,7 +312,7 @@ GEM
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
i18n-tasks (1.0.13)
activesupport (>= 4.0.2)
@@ -336,7 +333,7 @@ GEM
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
io-console (0.7.2)
irb (1.11.1)
irb (1.12.0)
rdoc
reline (>= 0.4.2)
jquery-rails (4.6.0)
@@ -355,14 +352,14 @@ GEM
kramdown (2.4.0)
rexml
language_server-protocol (3.17.0.3)
launchy (2.5.0)
addressable (~> 2.7)
launchy (2.5.2)
addressable (~> 2.8)
leaflet-rails (1.9.4)
actionpack (>= 4.2.0)
railties (>= 4.2.0)
letter_opener (1.8.1)
letter_opener (1.9.0)
launchy (>= 2.2, < 3)
listen (3.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.22.0)
@@ -376,7 +373,7 @@ GEM
mailboxer (0.15.1)
carrierwave (>= 0.5.8)
rails (>= 5.0.0)
marcel (1.0.2)
marcel (1.0.4)
material-sass (4.1.1)
autoprefixer-rails (>= 6.0.3)
sass (>= 3.5.2)
@@ -391,7 +388,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.21.2)
minitest (5.22.3)
moneta (1.0.0)
msgpack (1.7.2)
multi_json (1.15.0)
@@ -399,7 +396,7 @@ GEM
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-imap (0.4.9.1)
net-imap (0.4.10)
date
net-protocol
net-pop (0.1.2)
@@ -409,10 +406,10 @@ GEM
net-smtp (0.4.0.1)
net-protocol
nio4r (2.7.0)
nokogiri (1.16.0)
nokogiri (1.16.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-linux)
nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
oauth (0.5.6)
oj (3.16.3)
@@ -436,12 +433,12 @@ GEM
racc
percy-capybara (5.0.0)
capybara (>= 3)
pg (1.5.4)
pg (1.5.6)
platform-api (3.6.0)
heroics (~> 0.1.1)
moneta (~> 1.0.0)
rate_throttle_client (~> 0.1.0)
popper_js (1.16.1)
popper_js (2.11.8)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
@@ -452,8 +449,8 @@ GEM
nio4r (~> 2.0)
query_diet (0.7.1)
racc (1.7.3)
rack (2.2.8)
rack-cors (2.0.1)
rack (2.2.9)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (3.2.0)
base64 (>= 0.1.0)
@@ -465,20 +462,20 @@ GEM
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3)
actioncable (= 7.1.3)
actionmailbox (= 7.1.3)
actionmailer (= 7.1.3)
actionpack (= 7.1.3)
actiontext (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activemodel (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
actionmailer (= 7.1.3.2)
actionpack (= 7.1.3.2)
actiontext (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activemodel (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
bundler (>= 1.15.0)
railties (= 7.1.3)
railties (= 7.1.3.2)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -498,9 +495,9 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
railties (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -513,44 +510,44 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.6.2)
rdoc (6.6.3.1)
psych (>= 4.0.0)
recaptcha (5.16.0)
redis-client (0.19.1)
redis-client (0.20.0)
connection_pool
regexp_parser (2.9.0)
reline (0.4.2)
reline (0.4.3)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
rouge (4.1.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-activemodel-mocks (1.2.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
rspec-mocks (>= 2.99, < 4.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.1.1)
rspec-support (~> 3.13.0)
rspec-rails (6.1.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rspectre (0.1.0)
parser (>= 3.2.2.1)
rspec (~> 3.9)
@@ -565,7 +562,7 @@ GEM
rswag-ui (2.13.0)
actionpack (>= 3.1, < 7.2)
railties (>= 3.1, < 7.2)
rubocop (1.60.2)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
@@ -573,29 +570,28 @@ GEM
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.23.1)
rubocop-rails (2.24.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.26.1)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.27.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby-units (4.0.1)
ruby-vips (2.2.0)
ruby-units (4.0.3)
ruby-vips (2.2.1)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
@@ -610,17 +606,17 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
scout_apm (5.3.5)
scout_apm (5.3.7)
parser
searchkick (5.3.1)
activemodel (>= 6.1)
hashie
selenium-webdriver (4.17.0)
selenium-webdriver (4.19.0)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sidekiq (7.2.1)
sidekiq (7.2.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
@@ -631,7 +627,8 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
smart_properties (1.17.0)
sprockets (3.7.2)
sprockets (3.7.3)
base64
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
@@ -644,9 +641,9 @@ GEM
temple (0.10.3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.2.0)
terser (1.2.1)
execjs (>= 0.3.0, < 3)
thor (1.3.0)
thor (1.3.1)
thread_safe (0.3.6)
tilt (2.3.0)
timecop (0.9.8)
@@ -686,7 +683,7 @@ GEM
webrick
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.12)
zeitwerk (2.6.13)
PLATFORMS
ruby
@@ -701,7 +698,7 @@ DEPENDENCIES
better_errors
bluecloth
bonsai-elasticsearch-rails
bootstrap (>= 4.6.2)
bootstrap (>= 5.0.0)
bootstrap-datepicker-rails
bootstrap_form (>= 4.5.0)
bullet

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!-- MIT Licenced, https://www.svgrepo.com/svg/336823/plan -->
<svg width="800px" height="800px" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
<path d="M5 19H43V41C43 42.1046 42.1046 43 41 43H7C5.89543 43 5 42.1046 5 41V19Z" fill="#2F88FF" stroke="#000000" stroke-width="4" stroke-linejoin="round"/>
<path d="M5 10C5 8.89543 5.89543 8 7 8H41C42.1046 8 43 8.89543 43 10V19H5V10Z" stroke="#000000" stroke-width="4" stroke-linejoin="round"/>
<path d="M16 31L22 37L34 25" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 5V13" stroke="#000000" stroke-width="4" stroke-linecap="round"/>
<path d="M32 5V13" stroke="#000000" stroke-width="4" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 916 B

View File

@@ -18,6 +18,17 @@
// = require jquery-ui/widgets/autocomplete
// = require bootstrap-sprockets
// = require bootstrap-datepicker
// = require bootstrap
// = require material
// = require_tree .
document.addEventListener('DOMContentLoaded', function(event) {
var popoverTrigger = Array.prototype.slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
popoverTrigger.map(function(popoverTrigger2) {
return new bootstrap.Popover(popoverTrigger2);
});
var tooltipTrigger = Array.prototype.slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTrigger.map(function(tooltipTrigger2) {
return new bootstrap.Tooltip(tooltipTrigger2);
});
});

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
jQuery ->
$("a[rel=popover]").popover()
$(".tooltip").tooltip()
$("a[rel=tooltip]").tooltip()

View File

@@ -1 +0,0 @@
$('.dropdown-toggle').dropdown();

View File

@@ -1,3 +0,0 @@
$(function() {
$('[data-toggle="tooltip"]').tooltip();
});

View File

@@ -40,9 +40,22 @@
height: 250px;
width: 100%;
}
.card {
.badge-location {
background-color: darken($blue, 10%);
border-radius: 5%;
color: $white;
.badge-location {
background-color: darken($blue, 10%);
border-radius: 5%;
color: $white;
}
.fa-map-marker {
padding-right: 0.5em;
}
}
.badge {
text-overflow: ellipsis;
white-space: normal;
align-items: end;
max-height: 1rlh;
-webkit-line-clamp: 1;
}
}

View File

@@ -1,6 +1,6 @@
.seed-card {
.text {
opacity: 0.8;
opacity: 0.95;
margin: 0;
padding: 0;
position: absolute;

View File

@@ -0,0 +1,88 @@
# frozen_string_literal: true
class ActivitiesController < DataController
def index
@show_all = params[:all] == '1'
where = {}
where['active'] = true unless @show_all
if params[:member_slug]
@owner = Member.find_by(slug: params[:member_slug])
where['owner_id'] = @owner.id unless @owner.nil?
end
@activities = Activity.search(
where:,
page: params[:page],
limit: 30,
boost_by: [:created_at],
load: false
)
@filename = "Growstuff-#{specifics}Activities-#{Time.zone.now.to_fs(:number)}.csv"
respond_with(@activities)
end
def show
respond_with @activity
end
def new
@activity = Activity.new(
owner: current_member
)
if params[:garden_id]
@activity.garden = Garden.find_by(
owner: current_member,
id: params[:garden_id]
)
end
if params[:planting_id]
@activity.planting = Planting.find_by(
owner: current_member,
id: params[:planting_id]
)
end
respond_with @activity
end
def edit
# the following are needed to display the form but aren't used
@gardens = @activity.owner.gardens.active.order_by_name
@plantings = @activity.owner.plantings.active
end
def create
@activity = Activity.new(activity_params)
@activity.owner = current_member
@activity.save
respond_with @activity
end
def update
@activity.update(activity_params)
respond_with @activity
end
def destroy
@activity.destroy
respond_with @activity, location: @activity.garden
end
private
def activity_params
params.require(:activity).permit(
:name, :description, :category, :finished,
:garden_id, :planting_id, :due_date
)
end
def specifics
if @owner.present?
"#{@owner.to_param}-"
end
end
end

View File

@@ -10,7 +10,6 @@ class CropsController < ApplicationController
responders :flash
def index
@sort = params[:sort]
@crops = Crop.search('*', boost_by: %i(plantings_count harvests_count),
limit: 100,
page: params[:page],

View File

@@ -16,6 +16,7 @@ class GardensController < DataController
def show
@current_plantings = @garden.plantings.current.includes(:crop, :owner).order(planted_at: :desc)
@current_activities = @garden.activities.current.includes(:owner).order(created_at: :desc)
@finished_plantings = @garden.plantings.finished.includes(:crop)
@suggested_companions = Crop.approved.where(
id: CropCompanion.where(crop_a_id: @current_plantings.select(:crop_id)).select(:crop_b_id)

View File

@@ -36,6 +36,7 @@ class PlantingsController < DataController
def show
@photos = @planting.photos.includes(:owner).order(date_taken: :desc)
@harvests = Harvest.search(where: { planting_id: @planting.id })
@current_activities = @planting.activities.current.includes(:owner).order(created_at: :desc)
@matching_seeds = matching_seeds
@crop = @planting.crop

View File

@@ -18,6 +18,30 @@ module ButtonsHelper
end
end
def garden_plan_something_button(garden, classes: "btn btn-default")
return unless can? :edit, garden
link_to new_activity_path(garden_id: garden.id), class: classes do
activity_icon + ' ' + t('buttons.new_activity')
end
end
def plan_something_button
return unless can? :create, Activity
link_to new_activity_path, class: "btn btn-default" do
activity_icon + ' ' + t('buttons.new_activity')
end
end
def planting_plan_something_button(planting, classes: "btn btn-default")
return unless can? :edit, planting
link_to new_activity_path(planting_id: planting.id), class: classes do
activity_icon + ' ' + t('buttons.new_activity')
end
end
def garden_mark_active_button(garden, classes: 'btn')
link_to t('buttons.mark_as_active'),
garden_path(garden, garden: { active: 1 }),
@@ -59,6 +83,19 @@ module ButtonsHelper
edit_button(edit_planting_path(planting), classes:)
end
def activity_edit_button(activity, classes: "btn btn-raised btn-info")
edit_button(edit_activity_path(activity), classes:)
end
def activity_finish_button(activity, classes: 'btn btn-default btn-secondary')
return unless can?(:edit, activity) || activity.finished
link_to activity_path(slug: activity.slug, activity: { finished: 1 }),
method: :put, class: "#{classes} append-date" do
finished_icon + ' ' + t('buttons.mark_as_finished')
end
end
def planting_finish_button(planting, classes: 'btn btn-default btn-secondary')
return unless can?(:edit, planting) || planting.finished

View File

@@ -11,10 +11,12 @@ module GardensHelper
end
end
# TODO: Not used?
def display_garden_name(garden)
truncate(garden.name, length: 50, separator: ' ', omission: '... ')
end
# TODO: Only used by specs?
def display_garden_plantings(plantings)
if plantings.blank?
"None"

View File

@@ -71,6 +71,10 @@ module IconsHelper
icon('fas', 'seedling')
end
def activity_icon
icon('fas', 'fa-truck-pickup')
end
def post_icon
image_icon 'post'
end

View File

@@ -109,6 +109,10 @@ class Ability
can :update, Planting, garden: { owner_id: member.id }, crop: { approval_status: 'approved' }
can :destroy, Planting, garden: { owner_id: member.id }, crop: { approval_status: 'approved' }
can :create, Activity
can :update, Activity, owner_id: member.id
can :destroy, Activity, owner_id: member.id
can :create, Harvest
can :update, Harvest, owner_id: member.id
can :destroy, Harvest, owner_id: member.id

32
app/models/activity.rb Normal file
View File

@@ -0,0 +1,32 @@
# frozen_string_literal: true
class Activity < ApplicationRecord
extend FriendlyId
include Ownable
include Finishable
include SearchActivities
belongs_to :garden, optional: true
belongs_to :planting, optional: true
friendly_id :activity_slug, use: %i(slugged finders)
CATEGORIES = ["General", "Weeding", "Soil Cultivation", "Fertilizing", "Pruning", "Topical Application/Treating", "Watering"]
validates :name, presence: true
validates :category, inclusion: { in: CATEGORIES }, presence: true
validates :owner, presence: true
validates :slug, uniqueness: true
delegate :location, :latitude, :longitude, to: :owner
delegate :login_name, :slug, :location, to: :owner, prefix: true
def activity_slug
"#{owner.login_name}-#{name}-#{id}".downcase.tr(' ', '-')
end
def to_s
name
end
end

View File

@@ -77,9 +77,22 @@ module PredictPlanting
finish_predicted_at <= Time.zone.today
end
# Deactivate any plantings over time_limit that are super late in small batches.
def self.archive!(time_limit: 3.years.ago, limit: 100)
active_plantings = Planting.annual.active.where("planted_at < ?", time_limit).order(planted_at: :asc).limit(limit)
active_plantings.each do |planting|
if planting.finish_is_predicatable? && planting.super_late?
planting.finished = true
planting.save
end
end
end
private
def calculate_percentage_grown
return 0 if age_in_days < 0
percent = (age_in_days / expected_lifespan.to_f) * 100
(percent > 100 ? 100 : percent)
end

View File

@@ -0,0 +1,62 @@
# frozen_string_literal: true
module SearchActivities
extend ActiveSupport::Concern
included do
searchkick merge_mappings: true,
settings: { number_of_shards: 1, number_of_replicas: 0 },
mappings: {
properties: {
active: { type: :boolean },
created_at: { type: :integer }
}
}
def search_data
{
slug:,
active:,
finished: finished?,
name:,
due_date:,
category:,
garden_id:,
garden_name: garden&.name,
planting_id:,
planting_name: planting&.crop&.name,
description:,
# owner
owner_id:,
owner_login_name:,
owner_slug:,
# timestamps
created_at: created_at.to_i,
updated_at: updated_at.to_i
}
end
def self.homepage_records(limit)
records = []
owners = []
1..limit.times do
where = {
# photos_count: { gt: 0 },
owner_id: { not: owners }
}
one_record = search('*',
limit: 1,
where:,
boost_by: [:created_at],
load: false).first
return records if one_record.nil?
owners << one_record.owner_id
records << one_record
end
records
end
end
end

View File

@@ -9,6 +9,7 @@ class Garden < ApplicationRecord
has_many :plantings, dependent: :destroy
has_many :crops, through: :plantings
has_many :activities, dependent: :destroy
belongs_to :garden_type, optional: true
@@ -78,6 +79,16 @@ class Garden < ApplicationRecord
def reindex(refresh: false); end
# Deactivate any gardens with no active plantings
def self.archive!(time_limit: 3.years.ago, limit: 100)
Garden.active.where("updated_at < ?", time_limit).order(updated_at: :asc).limit(limit).each do |active_garden|
unless active_garden.plantings.active.any?
garden.active = false
garden.save
end
end
end
protected
def strip_blanks

View File

@@ -19,6 +19,7 @@ class Member < ApplicationRecord
has_many :plantings, foreign_key: 'owner_id', dependent: :destroy, inverse_of: :owner
has_many :seeds, foreign_key: 'owner_id', dependent: :destroy, inverse_of: :owner
has_many :harvests, foreign_key: 'owner_id', dependent: :destroy, inverse_of: :owner
has_many :activities, foreign_key: 'owner_id', dependent: :destroy, inverse_of: :owner
has_and_belongs_to_many :roles
has_many :notifications, foreign_key: 'recipient_id', inverse_of: :recipient
has_many :sent_notifications, foreign_key: 'sender_id', inverse_of: :sender, class_name: "Notification"

View File

@@ -22,6 +22,7 @@ class Planting < ApplicationRecord
belongs_to :garden
belongs_to :crop, counter_cache: true
has_many :harvests, dependent: :destroy
has_many :activities, dependent: :destroy
#
# Ancestry of food

View File

@@ -17,10 +17,21 @@ class TimelineService
.union_all(comments_query)
.union_all(photos_query)
.union_all(seeds_query)
.union_all(activities_query)
.where.not(event_at: nil)
.order(event_at: :desc)
end
def self.activities_query
Activity.select(
:id,
"'activity' as event_type",
'COALESCE(activities.due_date, activities.created_at) as event_at',
:owner_id,
'null as crop_id'
)
end
def self.plantings_query
Planting.select(
:id,

View File

@@ -0,0 +1,9 @@
- if can?(:edit, activity)
.dropdown.activity-actions
%a#activity-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"}
= activity_edit_button(activity, classes: 'dropdown-item')
- if activity.active
= activity_finish_button(activity, classes: 'dropdown-item')
.dropdown-divider
= delete_button(activity, classes: 'dropdown-item text-danger')

View File

@@ -0,0 +1,35 @@
- cache activity do
.card.activity{class: activity.active ? '' : 'card-finished'}
= link_to activity_path(slug: activity.slug) do
-# = image_tag activity.thumbnail_url ? activity.thumbnail_url : placeholder_image, class: 'img-card', alt: planting.crop_name
- if member_signed_in? && current_member.id == activity.owner_id
= link_to activity_path(slug: activity.slug) do
.activity-quick-actions
.dropdown
%a.activity-menu.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'}
.dropdown-menu{"aria-labelledby" => "activity-menu"}
= link_to edit_activity_path(slug: activity.slug), class: 'dropdown-item' do
= edit_icon
= t('buttons.edit')
- if activity.active
= activity_finish_button(activity, classes: 'dropdown-item')
- if can? :destroy, activity
.dropdown-divider
= delete_button(activity, classes: 'dropdown-item text-danger')
= link_to activity_path(slug: activity.slug) do
.card-body.text-center
%h4= activity.name
.text-center= activity.description
- if activity.garden
.text-center= activity.garden
- if activity.planting
.text-center= activity.planting
.card-footer
.float-right
%span.chip.member-chip
= link_to member_path(slug: activity.owner_slug) do
= activity.owner_login_name

View File

@@ -0,0 +1,7 @@
#{link_to event_model.category, event_model} - #{event_model.name}
- if event_model.planting
%span on #{link_to event_model.planting, event_model.planting}
- if event_model.garden
%span in #{link_to event_model.garden, event_model.garden}

View File

@@ -0,0 +1,55 @@
.card.col-md-8.col-lg-7.mx-auto.float-none.white.z-depth-1.py-2.px-2
.card-header
- if content_for? :title
%h1.h2-responsive.text-center
= planting_icon
%strong=yield :title
= bootstrap_form_for(@activity) do |f|
.card-body
= required_field_help_text
- if @activity.errors.any?
#error_explanation
%h2
= pluralize(@activity.errors.size, "error")
prohibited this activity from being saved:
%ul
- @activity.errors.full_messages.each do |msg|
%li= msg
.row
.col-md-12
= f.text_field :name, required: true, label: 'What needs to be done?'
.row
.col-md-4
= f.select(:category, Activity::CATEGORIES, include_blank: true)
.row
.col-md-12
= f.text_area :description, rows: 6, label: 'Tell us more about it'
.row
.col-md-4
= f.collection_radio_buttons(:garden_id, @activity.owner.gardens.active,
:id, :name,
label: 'Is this for a specific garden?')
= link_to "Add a garden.", new_garden_path
.col-md-4
= f.collection_radio_buttons(:planting_id, @activity.owner.plantings.active,
:id, :crop_name,
label: 'Is this for a specific planting?')
= link_to "Add a planting.", new_planting_path
.col-md-4
= f.text_field :due_date,
value: @activity.due_date ? @activity.due_date.to_fs(:ymd) : '',
class: 'add-datepicker', label: 'When?'
%hr
.row
.col-md-6
= f.check_box :finished, label: 'Mark as finished'
%span.help-block= t('.finish_helper')
.card-footer
.text-right= f.submit 'Save'

View File

@@ -0,0 +1,20 @@
.card
.card-body
.row
.col
%h4
Planned by
= link_to @activity.owner, @activity.owner
= link_to "view all #{@activity.owner}'s activities", member_activities_path(@activity.owner)
- if @activity.garden
%p
Planned in
= link_to @activity.garden, @activity.garden
- if @activity.planting
%p
Planned for
= link_to @activity.planting, @activity.planting
.col= render "members/avatar", member: @activity.owner

View File

@@ -0,0 +1,3 @@
= content_for :title, "Editing activity"
= render 'form'

View File

@@ -0,0 +1,47 @@
csv.headers :id,
:growstuff_url,
:name,
:category,
:description,
:owner_id,
:owner_name,
:garden_id,
:garden_name,
:planting_id,
:planting_name,
:due_date,
:finished,
:date_added,
:last_modified,
:license
@activities.each do |a|
csv.row a do |csv, activity|
csv.cell :id
csv.cell :growstuff_url, activity_url(a.slug)
csv.cell :name, a.description
csv.cell :category, a.description
csv.cell :description, a.description
csv.cell :owner_id, a.owner_id
csv.cell :owner_name, a.owner_login_name
csv.cell :garden_id, a.garden_id
csv.cell :garden_name, a.garden_name
csv.cell :planting_id, a.planting_id
csv.cell :planting_name, a.planting_name
csv.cell :due_date, a.due_date ? a.due_date : ''
csv.cell :finished
csv.cell :date_added, Time.at(a.created_at).to_fs(:db)
csv.cell :last_modified, Time.at(a.updated_at).to_fs(:db)
csv.cell :license, "CC-BY-SA Growstuff http://growstuff.org/"
end
end

View File

@@ -0,0 +1,43 @@
- content_for :title, title('activities', @owner, nil, @planting)
- content_for :breadcrumbs do
- if @owner
%li.breadcrumb-item= link_to 'Activities', activities_path
%li.breadcrumb-item.active= link_to "#{@owner}'s activities", activities_path(owner: @owner)
- else
%li.breadcrumb-item.active= link_to 'Activities', activities_path
.row
.col-md-2
%h1
= activity_icon
= title('activities', @owner, nil, @planting)
= render 'layouts/nav', model: Activity
= link_to show_inactive_tickbox_path('activities', owner: @owner, crop: nil, show_all: @show_all) do
= check_box_tag 'active', 'all', @show_all
include finished activities
%hr
- if @owner.present?
= render @owner, cached: true
%section.open-data
%h2 Open Data
%p= t('label.data')
- ['csv', 'json', 'rss'].each do |format|
.badge.badge-info
= link_to (@owner ? member_activities_path(@owner, format: format) : activities_path(format: format)) do
= icon 'fas', format.to_s
= format.upcase
- if @owner
.badge.badge-info= link_to "iCal", member_activities_path(@owner, format: 'ics', protocol: 'webcal', only_path: false)
.badge.badge-success= link_to 'API Methods', '/api-docs'
.col-md-10
%section
%h2= title('activities', @owner, nil, @planting)
= will_paginate @activities
.index-cards
- @activities.each do |a|
= render 'activities/card', activity: a
= will_paginate @activities

View File

@@ -0,0 +1,37 @@
<%
# TODO Refactor to a Activity <-> Ical view class?
cal = Icalendar::Calendar.new
cal.description = "Activities by #{@owner.login_name}"
@activities.each do |activity|
event = Icalendar::Event.new
lines = []
lines << "Garden: #{activity['garden_name'] ? activity['garden_name'] : 'N/A' }"
lines << "Planting: #{activity['planting_name'] ? activity['planting_name'] : 'N/A' }"
lines << activity.description
finish_date = Date.parse(activity['due_date']) rescue nil
event.dtstart = Time.at(activity['created_at'])
event.dtend = finish_date || 1.day.from_now
event.summary = "#{activity['name']} - #{activity['category']}"
event.description = lines.join("\n")
event.ip_class = "PUBLIC"
event.url = activity_url(slug: activity['slug'])
cal.add_event(event)
if finish_date && finish_date > Date.today
todo = Icalendar::Todo.new
todo.dtstart = finish_date || Date.today
todo.due = finish_date
todo.summary = "#{activity['name']} - #{activity['category']}"
todo.description = lines.join("\n")
cal.add_todo(todo)
end
end
cal.publish
%>
<%= cal.to_ical %>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
%rss{ version: 2.0 }
%channel
%title
Recent activities from #{@owner ? @owner : 'all members'} (#{ENV['GROWSTUFF_SITE_NAME']})
%link= activities_url
- @activities.each do |activity|
%item
%title #{activity['name']}
%pubdate= activity['created_at'].to_fs(:rfc822)
%description
:escaped
<p>Category: #{activity['category']}</p>
<p>Due Date: #{activity['due_date'] ? activity['due_date'] : 'unknown' }</p>
<p>Garden: #{activity['garden_name'] ? activity['garden_name'] : 'N/A' }</p>
<p>Planting: #{activity['planting_name'] ? activity['planting_name'] : 'N/A' }</p>
:escaped_markdown
#{ strip_tags markdownify(activity['description']) }
%link= activity_url(slug: activity['slug'])
%guid= activity_url(slug: activity['slug'])

View File

@@ -0,0 +1,3 @@
= content_for :title, t('activities.plan_something')
= render 'form'

View File

@@ -0,0 +1,51 @@
= content_for :title, @activity.name
- content_for :opengraph do
= tag("meta", property: "og:title", content: @activity.name)
- if @activity.description
= tag("meta", property: "og:description", content: og_description(@activity.description))
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
- content_for :breadcrumbs do
%li.breadcrumb-item= link_to 'Activities', activities_path
%li.breadcrumb-item= link_to @activity.owner, member_activities_path(@activity.owner)
%li.breadcrumb-item.active= link_to @activity.name, @activity
.activity
.row
.col-md-8.col-xs-12
.jumbotron
.d-flex.justify-content-between
%h1.display-3
%strong= @activity.name.titleize
%small.text-muted= @activity.category
%tt
= @activity.due_date
.col-md-4.col-xs-12
= render 'activities/owner', planting: @activity
.col-md-8.col-xs-12
- if @activity.description.present?
= cute_icon
.card
.card-header
%h2 Description
.card-body
:markdown
#{strip_tags markdownify(@activity.description)}
- if @activity.garden
%section.gardens
%a{name: 'gardens'}
= render 'gardens/card', garden: @activity.garden
- if @activity.planting
%section.plantings
%a{name: 'plantings'}
= render 'plantings/card', planting: @activity.planting
.col-md-4.col-xs-12
= render 'activities/actions', activity: @activity

View File

@@ -6,7 +6,7 @@
- if can?(:edit, comment) || can?(:destroy, comment)
%hr/
.dropdown
%button#comment-edit-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button"} Actions
%button#comment-edit-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button"} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "comment-edit-button"}
- if can? :edit, comment
= link_to edit_comment_path(comment), class: 'dropdown-item' do

View File

@@ -8,33 +8,27 @@
.col-2.offset-md-2
%h1= @box
.col-8
= button_tag(type: 'submit', class: 'btn btn-default') do
= icon 'fas', 'trash-alt'
= 'Delete Selected'
.row
.col-md-2.py-4
- @boxes.each do |box_name, counts|
= link_to conversations_path(box: box_name), class: "nav-link list-group-item d-flex justify-content-between #{box_name == @box ? 'active' : ''} #{box_name}" do
%span
= box_name
- if counts['unread'].positive?
%span.badge.badge-info=counts['unread']
- else
%span
%span
= icon 'fas', box_name
= box_name
.col-md-10
.list-group
- @conversations.each do |conversation|
.list-group-item
.row
.col-md-1
.col-1
- if conversation.receipts_for(current_member).last.is_unread?
%h1= icon 'far', 'envelope'
- else
%h1.text-muted= icon 'far', 'envelope-open'
.col-md-10
.col-9
.text-right.float-right
- conversation.recipients.each do |member|
- if member != current_member
@@ -50,11 +44,15 @@
#{time_ago_in_words conversation.messages.last.created_at} ago
%span.text-muted= conversation.messages.last.created_at
= truncate(strip_tags(conversation.messages.last.body), length: 150, separator: ' ', omission: '... ')
.col-md-1
.col-1
- if @box == 'trash'
= link_to conversation_path(conversation, box: @box), method: :put, class: 'restore', title: "Restore" do
= icon 'fas', 'trash-restore'
- else
= check_box_tag 'conversation_ids[]', conversation.id, false, class: 'selectable', "aria-label": "Select for deletion"
.offset-9.col-3
= button_tag(type: 'submit', class: 'btn btn-default') do
= icon 'fas', 'trash-alt'
= 'Delete'
- unless @conversations.empty?
= will_paginate @conversations

View File

@@ -4,7 +4,7 @@
- crop.alternate_names.each do |an|
- if can? :edit, an
.dropdown.planting-actions
%a#crop-actions-altnames.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button", :href => '#'}
%a#crop-actions-altnames.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", :type => "button", :href => '#'}
= an.name
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "crop-actions-altnames"}
- if can? :edit, an

View File

@@ -3,7 +3,8 @@
alt: "Image of #{crop.name}", class: 'image-responsive crop-image'),
crop.name,
rel: "popover",
'data-trigger': 'hover',
'data-title': crop.name,
'data-content': render(partial: 'crops/popover', locals: { crop: crop }),
'data-html': true
'data-bs-toggle': 'popover',
'data-bs-trigger': 'hover',
'data-bs-title': crop.name,
'data-bs-content': render(partial: 'crops/popover', locals: { crop: crop }),
'data-bs-html': true

View File

@@ -6,7 +6,7 @@
- crop.scientific_names.each do |sn|
- if can? :edit, sn
.dropdown.planting-actions
%a#planting-actions-scinames.dropdown-toggle.card-link{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button", :href => '#'}= sn.name
%a#planting-actions-scinames.dropdown-toggle.card-link{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", :type => "button", :href => '#'}= sn.name
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"}
= link_to edit_scientific_name_path(sn), class: 'dropdown-item' do
= edit_icon

View File

@@ -4,7 +4,7 @@
You are a
%strong CROP WRANGLER
.dropdown.crop-actions
%a#crop-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button", href: '#'} Actions
%a#crop-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", :type => "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "crop-actions-button"}
= link_to edit_crop_path(crop), class: 'dropdown-item' do
= edit_icon

View File

@@ -9,15 +9,6 @@
- content_for :breadcrumbs do
%li.breadcrumb-item.active= link_to 'Crops', crops_path
= bootstrap_form_tag(url: crops_path, method: :get, layout: :inline) do |f|
.input-group
= f.select "sort",
options_for_select({ "popularity": 'popular',
"alphabetically": 'alpha' },
@sort || 'popular'),
label: 'Sort by'
= f.submit "Show"
%section.crops
%h2= t('.title')
= will_paginate @crops

View File

@@ -10,15 +10,15 @@
.card
%ul#myTab.nav.nav-tabs{role: "tablist"}
%li.nav-item
%a#profile-tab.nav-link.active{"aria-controls" => "profile", "aria-selected" => "true", "data-toggle" => "tab", href: "#profile", role: "tab"} Profile
%a#profile-tab.nav-link.active{"aria-controls" => "profile", "aria-selected" => "true", "data-bs-toggle" => "tab", href: "#profile", role: "tab"} Profile
%li.nav-item
%a#email-tab.nav-link{"aria-controls" => "email", "aria-selected" => "false", "data-toggle" => "tab", href: "#email", role: "tab"} Email
%a#email-tab.nav-link{"aria-controls" => "email", "aria-selected" => "false", "data-bs-toggle" => "tab", href: "#email", role: "tab"} Email
%li.nav-item
%a#apps-tab.nav-link{"aria-controls" => "apps", "aria-selected" => "false", "data-toggle" => "tab", href: "#apps", role: "tab"} Apps
%a#apps-tab.nav-link{"aria-controls" => "apps", "aria-selected" => "false", "data-bs-toggle" => "tab", href: "#apps", role: "tab"} Apps
%li.nav-item
%a#password-tab.nav-link{"aria-controls" => "password", "aria-selected" => "false", "data-toggle" => "tab", href: "#password", role: "tab"} Password
%a#password-tab.nav-link{"aria-controls" => "password", "aria-selected" => "false", "data-bs-toggle" => "tab", href: "#password", role: "tab"} Password
%li.nav-item
%a#delete-tab.nav-link.text-danger{"aria-controls" => "delete", "aria-selected" => "false", "data-toggle" => "tab", href: "#delete", role: "tab"} Delete Account
%a#delete-tab.nav-link.text-danger{"aria-controls" => "delete", "aria-selected" => "false", "data-bs-toggle" => "tab", href: "#delete", role: "tab"} Delete Account
.card-body
#myTabContent.tab-content
#profile.tab-pane.fade.show.active{"aria-labelledby" => "profile-tab", role: "tabpanel"}

View File

@@ -14,8 +14,8 @@
- @forum.errors.full_messages.each do |msg|
%li= msg
= f.text_field :name
= f.text_area :description, rows: 6
= f.select(:owner_id, Member.all.order(:login_name).pluck(:login_name, :id))
= f.text_field :name, required: true
= f.text_area :description, rows: 6, required: true
= f.select(:owner_id, Member.all.order(:login_name).pluck(:login_name, :id), required: true)
.card-footer
.text-right= f.submit 'Save'

View File

@@ -1,10 +1,11 @@
- if can?(:edit, garden)
.dropdown.garden-actions
%a#garden-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
%a#garden-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "garden-actions-button"}
- if can?(:edit, garden)
= garden_plant_something_button(garden, classes: 'dropdown-item') if garden.active
- if garden.active
= garden_plant_something_button(garden, classes: 'dropdown-item')
= garden_plan_something_button(garden, classes: 'dropdown-item')
= garden_mark_inactive_button(garden, classes: 'dropdown-item')
- else
= garden_mark_active_button(garden, classes: 'dropdown-item')

View File

@@ -0,0 +1,37 @@
.card
.card-header
.row
.col-12.col-md-3
%h2= link_to garden.name, garden, name: "garden-#{garden.id}"
.row
.col-md-3
- if @owner.blank?
owner:
= render 'members/tiny', member: garden.owner
= image_tag garden_image_path(garden), alt: garden.name, class: 'img-card'
.col-md-9
%section
= render 'gardens/actions', garden: garden
- active_plantings = garden.plantings.active
%section
- if active_plantings.perennial.any?
%strong Perennials:
- active_plantings.perennial.each do |planting|
= link_to planting do
= crop_icon planting.crop
= planting.crop
- else
%p No perennial plantings
%hr
%section
- if active_plantings.annual.any?
= render 'plantings/progress_list', plantings: garden.plantings.active.annual
- else
%p No annual plantings

View File

@@ -17,4 +17,4 @@
.col-lg-2.col-sm-4.col-xs-6
= render "plantings/thumbnail", planting: planting
- else
no plantings
no plantings

View File

@@ -42,43 +42,7 @@
- else
= link_to garden.name, gardens_path(anchor: "garden-#{garden.id}")
- @gardens.each do |garden|
.card
.card-header
.row
.col-12.col-md-3
%h2= link_to garden.name, garden, name: "garden-#{garden.id}"
.row
.col-md-3
- if @owner.blank?
owner:
= render 'members/tiny', member: garden.owner
= image_tag garden_image_path(garden), alt: garden.name, class: 'img-card'
.col-md-9
%section
= render 'gardens/actions', garden: garden
- active_plantings = garden.plantings.active
%section
- if active_plantings.perennial.any?
%strong Perennials:
- active_plantings.perennial.each do |planting|
= link_to planting do
= crop_icon planting.crop
= planting.crop
- else
%p No perennial plantings
%hr
%section
- if active_plantings.annual.any?
= render 'plantings/progress_list', plantings: garden.plantings.active.annual
- else
%p No annual plantings
= render 'gardens/card', garden: garden
.row
.col-12= page_entries_info @gardens

View File

@@ -56,10 +56,21 @@
.col-md-12
%p Nothing is currently planted here.
%section.companions
%h2 Suggestioned companions
- @suggested_companions.each do |companion|
= render 'crops/tiny', crop: companion
%section
%h2 Current activities in garden
.index-cards
- if @current_activities&.size&.positive?
- @current_activities.each do |activity|
= render "activities/card", activity: activity
- else
.col-md-12
%p Nothing is currently planned here.
- if @suggested_companions.any?
%section.companions
%h2 Suggestioned companions
- @suggested_companions.each do |companion|
= render 'crops/tiny', crop: companion
%section= render 'previously'

View File

@@ -1,6 +1,6 @@
- if can?(:edit, harvest)
.dropdown.harvest-actions
%a#harvest-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
%a#harvest-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "harvest-actions-button"}
= harvest_edit_button(harvest, classes: 'dropdown-item')
= add_photo_button(harvest, classes: 'dropdown-item')

View File

@@ -3,7 +3,8 @@
class: 'image-responsive crop-image'),
harvest,
rel: "popover",
'data-trigger': 'hover',
'data-title': harvest.to_s,
'data-content': render('harvests/popover', harvest: harvest),
'data-html': true
'data-bs-toggle': 'popover',
'data-bs-trigger': 'hover',
'data-bs-title': harvest.to_s,
'data-bs-content': render('harvests/popover', harvest: harvest),
'data-bs-html': true

View File

@@ -3,7 +3,7 @@
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{harvest.crop.name} harvest
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%button.close{"aria-label" => "Close", "data-bs-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} &#215;
.modal-body
%p Select which plant part you have havested
@@ -26,6 +26,6 @@
= plant_part_icon(plant_part.name)
= plant_part
%a.btn#modalHarvestButton{"data-target" => "#modelHarvestForm", "data-toggle" => "modal", href: ""}
%a.btn#modalHarvestButton{"data-bs-target" => "#modelHarvestForm", "data-bs-toggle" => "modal", href: ""}
= harvest_icon
Record harvest

View File

@@ -0,0 +1,10 @@
%h2= t('.recent_activities')
- Activity.homepage_records(6).each do |activity|
- cache activity do
= link_to activity_path(slug: activity.slug), class: 'list-group-item list-group-item-action flex-column align-items-start' do
.d-flex.w-100.justify-content-between.homepage--list-item
%div
%h4= activity.name
%span.badge.badge-success= activity.category
%small.text-muted
by #{activity.owner_login_name}

View File

@@ -8,9 +8,14 @@
%p= render 'stats', cached: true
.col
%p
- if current_member.plantings.active.any?
= link_to member_path(current_member), class: 'btn btn-dark' do
= planting_icon
Track my plantings
%p
= link_to member_gardens_path(current_member), class: 'btn btn-dark' do
= image_icon 'gardens'
= garden_icon
Show me my garden
- else
.hidden-xs
@@ -27,16 +32,21 @@
%h2= t('.recently_added')
%p.card-body
!= CropSearchService.recent(30).map { |c| link_to(c['name'], crop_path(slug: c['slug'])) }.join(", ")
.col-xl-3.col
.col-xl-4.col
%section.plantings
= cute_icon
=render 'plantings'
%p.text-right= link_to "#{t('home.plantings.view_all')} »", plantings_path, class: 'btn btn-block'
.col-xl-3.col
.col-xl-4.col
%section.harvests
= cute_icon
= render 'harvests'
%p.text-right= link_to "#{t('home.harvests.view_all')} »", harvests_path, class: 'btn btn-block'
.col-xl-4.col
%section.activities
= cute_icon
= render 'activities'
%p.text-right= link_to "#{t('home.activities.view_all')} »", activities_path, class: 'btn btn-block'
.col-12.col-md-6
%section.seeds
= cute_icon

View File

@@ -6,6 +6,6 @@
%span.site-name Growstuff
.nav= render 'crops/search_bar'
.nav
%button.navbar-toggler{ "aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-target" => "#navbarSupportedContent", "data-toggle" => "collapse", type: "button" }
%button.navbar-toggler{ "aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-bs-target" => "#navbarSupportedContent", "data-bs-toggle" => "collapse", type: "button" }
%i.fas.fa-ellipsis-v.navbar-toggler-icon
= render 'layouts/menu'

View File

@@ -8,7 +8,7 @@
= link_to member_gardens_path(current_member), class: 'nav-link text-white', title: "My gardens" do
= image_icon 'gardens'
%li.nav-item.dropdown
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#", role: "button"}
= image_tag "icons/gardener.svg", class: 'img img-icon', alt: t('.record'), aria: { hidden: "true" }
= t('.record')
.dropdown-menu
@@ -18,6 +18,9 @@
= link_to new_harvest_path, class: 'dropdown-item' do
= image_icon('harvest-add')
= t('buttons.new_harvest')
= link_to new_activity_path, class: 'dropdown-item' do
= image_icon('activity-add')
= t('buttons.new_activity')
= link_to new_seed_path, class: 'dropdown-item' do
= image_icon('seed-add')
= t('buttons.new_seeds')
@@ -27,7 +30,7 @@
- cache("everyone-menu", expires_in: 1.week) do
%li.nav-item.dropdown
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}= t('.crops')
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#", role: "button"}= t('.crops')
.dropdown-menu
= link_to crops_path, class: 'dropdown-item' do
= t('.browse_crops')
@@ -41,7 +44,7 @@
= harvest_icon
= t('.harvests')
%li.nav-item.dropdown
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}= t('.community')
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#", role: "button"}= t('.community')
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
= link_to t('.community_map'), places_path, class: 'dropdown-item'
= link_to t('.browse_members'), members_path, class: 'dropdown-item'
@@ -51,7 +54,7 @@
- if member_signed_in?
- if current_member.role?(:crop_wrangler) || current_member.role?(:admin)
%li.nav-item.dropdown
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}= t('.admin')
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#", role: "button"}= t('.admin')
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
- if current_member.role?(:crop_wrangler)
= link_to t('.crop_wrangling'), wrangle_crops_path, class: 'dropdown-item'
@@ -59,7 +62,7 @@
= link_to t('.admin'), admin_path, class: 'dropdown-item'
%li.nav-item.dropdown
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#", role: "button"}
= image_tag(avatar_uri(current_member, 50), alt: 'Avatar of current member', height: 25, width: 25, aria: { hidden: "true" })
= current_member.login_name
- if current_member.unread_count.positive?
@@ -67,6 +70,8 @@
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
= link_to member_path(current_member), class: 'dropdown-item' do
= t('.profile')
= link_to member_activities_path(current_member), class: 'dropdown-item' do
= t('.activities')
= link_to member_gardens_path(current_member), class: 'dropdown-item' do
= t('.gardens')
= link_to member_plantings_path(current_member), class: 'dropdown-item' do

View File

@@ -2,7 +2,7 @@
.modal-dialog
.modal-content
.modal-header
%button.close{"data-dismiss" => "modal", type: "button"}
%button.close{"data-bs-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} &#215;
%span.sr-only Close
%h4#mainModalLabel.modal-title

View File

@@ -5,13 +5,6 @@
- @harvesting.each do |planting|
= render 'plantings/thumbnail', planting: planting
- if @harvests.any?
%section.havests
%h2 Recent Harvests
.index-cards
- @harvests.each do |harvest|
= render 'harvests/thumbnail', harvest: harvest
- if @others.size.positive?
%section.planting-progress
%h2 Progress report
@@ -44,4 +37,10 @@
= link_to planting.crop_name, planting_url(slug: planting.slug)
planted on #{planting.planted_at.to_date}
- if @harvests.any?
%section.havests
%h2 Recent Harvests
.index-cards
- @harvests.each do |harvest|
= render 'harvests/thumbnail', harvest: harvest

View File

@@ -1,6 +1,6 @@
- if member.location.present?
= link_to place_path(member.location) do
%span.badge.badge-location
%span.badge.badge-location{ title: member.location }
= icon 'fas', 'map-marker'
= truncate(member.location, length: 15, separator: ' ', omission: '... ')
- else

View File

@@ -26,6 +26,11 @@
= link_to localize_plural(member.posts, Post), member_posts_path(member)
- else
0 posts
%li.list-group-item
- if member.activities.present?
= link_to localize_plural(member.plantings, Activity), member_activities_path(member)
- else
0 activities
%li.list-group-item
- if member.followed.present?

View File

@@ -25,9 +25,9 @@
- @member.roles.each do |role|
%span.badge.badge-info= role.name.titleize
- if @member.location.present?
%p.badge.badge-location
%p.badge.badge-location{ title: @member.location }
= icon 'fas', 'map-marker'
= truncate(@member.location, length: 25, separator: ' ', omission: '... ')
= truncate(@member.location, length: 15, separator: ' ', omission: '... ')
%p
%strong Member since
= @member.created_at.to_fs(:date)

View File

@@ -1,6 +1,6 @@
- if can?(:edit, @photo) && can?(:destroy, @photo)
.dropdown.float-right.photo-actions
%a#harvest-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
%a#harvest-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "harvest-actions-button"}
= edit_button(edit_photo_path(@photo), classes: 'dropdown-item')
.dropdown-divider

View File

@@ -1,10 +1,11 @@
- if can?(:edit, planting)
.dropdown.planting-actions
%a#planting-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
%a#planting-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"}
= planting_edit_button(planting, classes: 'dropdown-item')
= add_photo_button(planting, classes: 'dropdown-item')
- if planting.active
= planting_plan_something_button(planting, classes: 'dropdown-item')
= planting_finish_button(planting, classes: 'dropdown-item')
= planting_harvest_button(planting, classes: 'dropdown-item')
= planting_save_seeds_button(planting, classes: 'dropdown-item')

View File

@@ -10,8 +10,8 @@
// Harvest times
- unless planting.super_late?
- if planting.harvest_time?
%span.badge.badge-info.badge-harvest{'data-toggle': "tooltip", 'data-placement': "top", title: 'Planting is ready for harvesting now'}
%span.badge.badge-info.badge-harvest{'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: 'Planting is ready for harvesting now'}
= t('label.harvesting_now')
- elsif planting.before_harvest_time?
%span.badge.badge-info{'data-toggle': "tooltip", 'data-placement': "top", title: 'Predicted weeks until harvest'}
%span.badge.badge-info{'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: 'Predicted weeks until harvest'}
= t('label.weeks_until_harvest', number: in_weeks(days_from_now_to_first_harvest(planting)))

View File

@@ -7,7 +7,7 @@
= link_to planting_path(slug: planting.slug) do
.planting-quick-actions
.dropdown
%a.planting-menu.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'}
%a.planting-menu.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'}
.dropdown-menu{"aria-labelledby" => "planting-menu"}
= link_to edit_planting_path(slug: planting.slug), class: 'dropdown-item' do

View File

@@ -1,6 +1,6 @@
%h2 Seeds saved
%a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", role: "button"}
%a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", role: "button"}
= seed_icon
= t('buttons.save_seeds')
.dropdown-menu.dropdown-secondary

View File

@@ -21,8 +21,11 @@
- if planting.finish_is_predicatable?
.card.fact-card
%h3 Progress
%strong #{planting.age_in_days}/#{planting.expected_lifespan}
%span days
- if planting.age_in_days < 0
%strong Planned
- else
%strong #{planting.age_in_days}/#{planting.expected_lifespan}
%span days
.card.fact-card{class: planting.quantity.present? ? '' : 'text-muted'}
%h3
@@ -42,6 +45,9 @@
%h3 Growing
%strong= seedling_icon
%span
- if planting.age_in_days < 0
Planting planned
- else
Planting is still growing today
.card.fact-card{class: planting.planted_from.present? ? '' : 'text-muted'}

View File

@@ -36,6 +36,8 @@
= f.text_field :planted_at,
value: @planting.planted_at ? @planting.planted_at.to_fs(:ymd) : '',
class: 'add-datepicker', label: 'When?'
%span.help-inline
Tip: Plan our your future plantings by forward dating, and subscribe to your iCalendar feed for reminders to plant
.row
.col-md-4

View File

@@ -4,7 +4,8 @@
class: 'image-responsive'),
planting,
rel: "popover",
'data-trigger': 'hover',
'data-title': planting.crop.name,
'data-content': render('plantings/popover', planting: planting),
'data-html': true
'data-bs-toggle': 'popover',
'data-bs-trigger': 'hover',
'data-bs-title': planting.crop.name,
'data-bs-content': render('plantings/popover', planting: planting),
'data-bs-html': true

View File

@@ -3,7 +3,7 @@
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%button.close{"aria-label" => "Close", "data-bs-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} &#215;
.modal-body
%p Which garden is the planting in?
@@ -23,6 +23,6 @@
= link_to 'add new garden', new_garden_path
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
%a.btn{"data-bs-target" => "#modelPlantingForm", "data-bs-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Add to my garden

View File

@@ -1,5 +1,5 @@
- if can?(:edit, planting)
%a#planting-actions-menu.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#"}
%a#planting-actions-menu.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", href: "#"}
/=icon('fas', 'ellipsis-v')
%ul.dropdown-menu.dropdown-menu-left{"aria-labelledby" => "planting-actions-menu"}
%li= link_to t('view'), planting, class: 'dropdown-item'

View File

@@ -15,7 +15,7 @@
.progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}
%ul.list-unstyled.d-flex.justify-content-between
- in_weeks(planting.expected_lifespan).times do |week_number|
%li{class: planting.planted_at + week_number.weeks > Time.zone.today ? 'text-muted progress-fade' : '', 'data-toggle': "tooltip", 'data-placement': "top", title: I18n.l(planting.planted_at + week_number.weeks)}
%li{class: planting.planted_at + week_number.weeks > Time.zone.today ? 'text-muted progress-fade' : '', 'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: I18n.l(planting.planted_at + week_number.weeks)}
= render 'timeline_icon',
planting: planting,
week_number: week_number,

View File

@@ -18,7 +18,6 @@ csv.headers :id,
:license
@plantings.each do |p|
puts p.inspect
csv.row p do |csv, planting|
csv.cell :id

View File

@@ -37,6 +37,16 @@ cal.description = "Plantings by #{@owner.login_name}"
todo.summary = "Harvest #{planting['crop_name']}"
cal.add_todo(todo)
# To work around google calendar not supporting VTODO, mirror the above as a specific event
event = Icalendar::Event.new
event.dtstart = predicted_date || finish_date || Date.today
event.dtend = finish_date
event.summary = "Harvest #{planting['crop_name']}"
event.ip_class = "PUBLIC"
event.url = planting_url(slug: planting['slug'])
cal.add_event(event)
end
end
cal.publish

View File

@@ -37,7 +37,10 @@
- elsif @planting.percentage_grown.present?
#{@planting.percentage_grown.to_i}%
- if @planting.finish_is_predicatable?
%strong #{@planting.age_in_days}/#{@planting.expected_lifespan} days
- if @planting.age_in_days < 0
%strong Planned
- else
%strong #{@planting.age_in_days}/#{@planting.expected_lifespan} days
= render 'timeline', planting: @planting
@@ -64,6 +67,17 @@
%a{name: 'seeds'}
= render 'plantings/descendants', planting: @planting
%section
%h2 Current activities for planting
.index-cards
- if @current_activities&.size&.positive?
- @current_activities.each do |activity|
= render "activities/card", activity: activity
- else
.col-md-12
%p Nothing is currently planned here.
.col-md-4.col-xs-12
= render 'plantings/actions', planting: @planting
%hr/

View File

@@ -1,6 +1,6 @@
- if can? :edit, post
.dropdown.float-right
%button#post-edit-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"} Actions
%button#post-edit-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", :type => "button"} Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "post-edit-button"}
- if can? :edit, post
= link_to edit_post_path(post), class: 'dropdown-item' do

View File

@@ -1,6 +1,6 @@
- if can?(:edit, seed)
.dropdown.seed-actions
%a#seed-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'}
%a#seed-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'}
Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "seed-actions-button"}
- if can?(:create, Planting) && can?(:update, seed) && seed.active

View File

@@ -10,9 +10,9 @@
= seed.owner_login_name
.card-body
- if seed.owner_location
%h6.small.badge.badge-pill.badge-location
%h6.small.badge.badge-pill.badge-location{ title: seed.owner_location }
= icon 'fas', 'map-marker'
= truncate(seed.owner_location, length: 40, separator: ' ', omission: '... ')
= truncate(seed.owner_location, length: 15, separator: ' ', omission: '... ')
%p
- if seed.quantity
.badge.badge-info #{seed.quantity} seeds

View File

@@ -5,7 +5,7 @@
%h4.modal-title.w-100.font-weight-bold
= seed_icon
Save #{seed.crop.name} seeds
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%button.close{"aria-label" => "Close", "data-bs-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} &#215;
.modal-body
@@ -30,6 +30,6 @@
Save #{seed.crop_name} seeds.
%a.btn{"data-target" => "#modelSeedForm", "data-toggle" => "modal", href: ""}
%a.btn{"data-bs-target" => "#modelSeedForm", "data-bs-toggle" => "modal", href: ""}
= seed_icon
Save seeds

View File

@@ -1,6 +1,6 @@
- flash.each do |type, content|
%div{ class: build_alert_classes(type), role: "alert" }
%button.close{ type: "button", "data-dismiss" => "alert" }
%button.close{ type: "button", "data-bs-dismiss" => "alert" }
%span{ "aria-hidden" => true } &times;
%span.sr-only Close
= content

View File

@@ -84,6 +84,7 @@ en:
new_planting: New planting
new_post: Write new post
new_harvest: New harvest
new_activity: Plan activity
plant: Plant
plant_crop: Plant %{crop_name}
plant_something_here: Plant something here
@@ -137,6 +138,8 @@ en:
perks: Join now for your free garden journal, harvest predictions, forums, and more.
sign_in_linktext: sign in
sign_up: Sign up
activities:
view_all: View all activities
crops:
our_crops: Some of our crops
recently_added: Recently added crops
@@ -213,6 +216,7 @@ en:
data: 'The data on this page is available in the following formats:'
layouts:
header:
activities: Activities
account: Account
admin: Admin
browse_crops: Browse Crops
@@ -233,7 +237,7 @@ en:
inbox_unread: Inbox (%{unread_count})
plantings: Plantings
posts: Posts
profile: Profile
profile: Profile/Timeline
seeds: Seeds
skip: Skip navigation menu
support_growstuff: Support Growstuff
@@ -276,6 +280,16 @@ en:
not_enough_data: Not enough data
perennial: Perennial
unknown: Unknown
activities:
plan_something: Plan something
index:
title:
default: Everyone's activities
owner_activities: "%{owner}'s activities"
form:
finish_helper: >
An activity is finished when you've completed it, or it's otherwise
no longer possible.
plantings:
badges:
days_until_finished: days until finished

View File

@@ -103,12 +103,14 @@ Rails.application.routes.draw do
resources :plantings
resources :harvests
resources :posts
resources :activities
resources :follows
get 'followers' => 'follows#followers'
end
resources :messages
resources :activities, param: :slug
resources :conversations do
collection do
delete 'destroy_multiple'

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
class AddActivities < ActiveRecord::Migration[7.1]
def change
create_table :activities do |t|
t.string :category
t.string :name
t.string :description
t.date :due_date
t.boolean :finished
t.references :owner
t.references :garden
t.references :planting
t.timestamps
end
add_column :members, :activities_count, :integer
Activity.reindex
end
end

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddSlugToActivity < ActiveRecord::Migration[7.1]
def change
add_column :activities, :slug, :string
add_index :activities, :slug, unique: true
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_01_14_045751) do
ActiveRecord::Schema[7.1].define(version: 2024_02_18_053122) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -42,6 +42,24 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_14_045751) do
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end
create_table "activities", force: :cascade do |t|
t.string "category"
t.string "name"
t.string "description"
t.date "due_date"
t.boolean "finished"
t.bigint "owner_id"
t.bigint "garden_id"
t.bigint "planting_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "slug"
t.index ["garden_id"], name: "index_activities_on_garden_id"
t.index ["owner_id"], name: "index_activities_on_owner_id"
t.index ["planting_id"], name: "index_activities_on_planting_id"
t.index ["slug"], name: "index_activities_on_slug", unique: true
end
create_table "alternate_names", id: :serial, force: :cascade do |t|
t.string "name", null: false
t.integer "crop_id", null: false
@@ -415,6 +433,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_14_045751) do
t.datetime "discarded_at", precision: nil
t.integer "photos_count"
t.integer "forums_count"
t.integer "activities_count"
t.index ["confirmation_token"], name: "index_members_on_confirmation_token", unique: true
t.index ["discarded_at"], name: "index_members_on_discarded_at"
t.index ["email"], name: "index_members_on_email", unique: true

View File

@@ -88,6 +88,16 @@ def load_test_users
sunniness: select_random_item(Planting::SUNNINESS_VALUES),
planted_from: select_random_item(Planting::PLANTED_FROM_VALUES)
)
# Create an activity by the member
Activity.create(
owner_id: @user.id,
garden_id: @user.gardens.first.id,
due_date: Time.zone.today,
name: "Remove all weeds",
category: "Weeding",
description: "Get rid of the invasive grass, again"
)
end
puts "Finished loading test users"

10
lib/tasks/gardens.rake Normal file
View File

@@ -0,0 +1,10 @@
# frozen_string_literal: true
namespace :gardens do
desc "Mark old gardens inactive"
task archive: :environment do
Planting.archive!
Garden.archive!
end
end

View File

@@ -7,5 +7,6 @@ namespace :search do
Planting.reindex
Harvest.reindex
Seed.reindex
Activity.reindex
end
end

View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
# Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :activity do
name { "Admire" }
description { "Spend 10 minutes admiring your hard work" }
category { "General" }
owner
trait :garden do
category { "Soil Cultivation" }
description { "Apply compost from winter" }
due_date { 3.months.from_now }
garden
end
trait :planting do
category { "Pruning" }
description { "Stake tomato" }
planting
end
end
end

View File

@@ -25,6 +25,7 @@ describe "forums", :js do
expect(page).to have_current_path new_forum_path, ignore_query: true
fill_in 'Name', with: 'Discussion'
fill_in 'Description', with: "this is a new forum"
select member.login_name, from: "Owner"
click_button 'Save'
end

View File

@@ -26,7 +26,7 @@ describe "Conversations", :js do
describe 'deleting' do
before do
check 'conversation_ids[]'
click_button 'Delete Selected'
click_button 'Delete'
end
describe 'view trash' do
@@ -59,7 +59,7 @@ describe "Conversations", :js do
click_link 'Inbox'
all('input[type=checkbox]').each(&:click)
click_button 'Delete Selected'
click_button 'Delete'
expect(page).not_to have_content 'this is a message'
expect(page).not_to have_content 'this is another message'
@@ -77,7 +77,7 @@ describe "Conversations", :js do
find('.sent').click
all('input[type=checkbox]').each(&:click)
click_button 'Delete Selected'
click_button 'Delete'
expect(page).to have_selector('.sent')
find('.sent').click

View File

@@ -14,10 +14,6 @@ describe "browse crops", :search do
visit crops_path
end
it "has a form for sorting by" do
expect(page).to have_css "select#sort"
end
it "shows a list of crops" do
expect(page).to have_content tomato.name
end

View File

@@ -79,8 +79,7 @@ context "signed in non-wrangler" do
end
it "can't see wrangling page with js" do
visit root_path
click_link member.login_name
visit member_path(member)
expect(page).not_to have_link "Crop Wrangling"
end
end

View File

@@ -123,6 +123,18 @@ describe "member profile", :js do
it { expect(page).not_to have_link href: planting_path(no_planted_at_planting) }
end
context 'member has activities' do
let!(:activity) { FactoryBot.create(:activity, owner: member, due_date: 3.days.ago) }
let!(:activity2) { FactoryBot.create(:activity, :planting, owner: member) }
let!(:activity3) { FactoryBot.create(:activity, :garden, owner: member) }
before { visit member_path(member) }
it { expect(page).to have_link href: activity_path(activity) }
it { expect(page).to have_link href: activity_path(activity2) }
it { expect(page).to have_link href: activity_path(activity3) }
end
context 'member has seeds' do
let!(:seed) { FactoryBot.create(:seed, owner: member) }

View File

@@ -65,6 +65,10 @@ shared_examples "crop suggest" do |resource|
it "Submitting a crop that doesn't exist in the database produces a meaningful error" do
within "form#new_#{resource}" do
fill_autocomplete "crop", with: "Ryan Gosling"
# Some forms require additional selections before submission.
if resource == "harvest"
choose plant_part.name
end
click_button "Save"
end

View File

@@ -33,7 +33,7 @@ describe "Plantings" do
calendar = Icalendar::Parser.new(response.body, true).parse.first
expect(calendar.description[0].to_s).to eq "Plantings by #{@member.login_name}"
events = calendar.events
expect(events.length).to eq 6 # There are 7, but finished plantings aren't included
expect(events.length).to eq 7 # There are 8, but finished plantings aren't included
# TODO: Better date comparison
# Predicted finish should be used
@@ -45,7 +45,7 @@ describe "Plantings" do
# expect(events[4].dtend.to_date).to be_within(1.second).of @finised_planting.finished_at
# Otherwise, tomorrow should be used
expect(events[2].dtend.to_date).to eq 1.day.from_now.to_date
expect(events[3].dtend.to_date).to eq 1.day.from_now.to_date
# TBA: Perennial and annual crops predictions of 'next' harvest date don't really fit

View File

@@ -52,6 +52,7 @@ RSpec.configure do |config|
Photo.reindex
Planting.reindex
Seed.reindex
Activity.reindex
end
config.before(:suite) do