Compare commits

..
Author SHA1 Message Date
Daniel O'Connor beee01fba6 Update oauth gem from 0.5.8 to 0.5.9 2026-08-14 19:36:02 +09:30
Daniel O'Connor d902c74e96 Merge pull request #4744 from Growstuff/CloCkWeRX-patch-2
Bump oauth gem version to 0.5.8
2026-08-14 19:34:04 +09:30
Daniel O'Connor de08dd70ac Bump oauth gem version to 0.5.8
Updated oauth gem version from 0.5.7 to 0.5.8.
2026-08-14 19:24:03 +09:30
Daniel O'Connor 2df0f4dd39 Merge pull request #4743 from Growstuff/dependabot/bundler/selenium-webdriver-4.47.0
Bump selenium-webdriver from 4.46.0 to 4.47.0
2026-08-14 19:17:14 +09:30
dependabot[bot] aaf1bf4b08 Bump selenium-webdriver from 4.46.0 to 4.47.0
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.46.0 to 4.47.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.46.0...selenium-4.47.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:36:48 +00:00
Daniel O'Connor f28804f53e Merge pull request #4742 from Growstuff/dependabot/bundler/oj-3.17.6
Bump oj from 3.17.5 to 3.17.6
2026-08-14 19:04:27 +09:30
dependabot[bot] 02e83f1791 Bump oj from 3.17.5 to 3.17.6
Bumps [oj](https://github.com/ohler55/oj) from 3.17.5 to 3.17.6.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.17.5...v3.17.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 07:03:53 +00:00
Daniel O'Connor 76bba007f0 Merge pull request #4741 from Growstuff/CloCkWeRX-patch-2
Bump oauth gem version to 0.5.7
2026-08-13 19:42:31 +09:30
Daniel O'Connor 90b64b5c39 Bump oauth gem version to 0.5.7
Updated oauth gem version from 0.5.6 to 0.5.7.
2026-08-11 20:40:27 +09:30
Daniel O'Connor ea5bae7e2f Merge pull request #4734 from Growstuff/dependabot/bundler/haml-7.3.0
Bump haml from 7.2.2 to 7.3.0
2026-08-11 19:44:36 +09:30
dependabot[bot] 41f480b942 Bump haml from 7.2.2 to 7.3.0
Bumps [haml](https://github.com/haml/haml) from 7.2.2 to 7.3.0.
- [Release notes](https://github.com/haml/haml/releases)
- [Changelog](https://github.com/haml/haml/blob/main/CHANGELOG.md)
- [Commits](https://github.com/haml/haml/compare/v7.2.2...v7.3.0)

---
updated-dependencies:
- dependency-name: haml
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 09:13:57 +00:00
Daniel O'Connor 8f57bd16ff Merge pull request #4740 from Growstuff/dependabot/bundler/haml_lint-0.77.0
Bump haml_lint from 0.76.0 to 0.77.0
2026-08-11 18:41:34 +09:30
dependabot[bot] c222af08cb Bump haml_lint from 0.76.0 to 0.77.0
Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.76.0 to 0.77.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.76.0...v0.77.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 07:06:11 +00:00
Daniel O'Connor b9c1d44201 Merge pull request #4736 from Growstuff/dependabot/bundler/rubocop-1.89.0
Bump rubocop from 1.88.2 to 1.89.0
2026-08-10 20:49:14 +09:30
dependabot[bot] f6f1a2b347 Bump rubocop from 1.88.2 to 1.89.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.88.2 to 1.89.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.88.2...v1.89.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 10:46:46 +00:00
Daniel O'Connor 5af7b0bcf9 Merge pull request #4735 from Growstuff/dependabot/bundler/csv-3.3.6
Bump csv from 3.3.5 to 3.3.6
2026-08-10 20:12:05 +09:30
Daniel O'Connoranddependabot[bot] 38fb41aa04 Bump aws-sdk-s3 from 1.228.2 to 1.229.0 (#4738)
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.228.2 to 1.229.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-version: 1.229.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 20:10:16 +09:30
2f43175324 Fallback to crop specific photos in PhotoCapable thumbnail_url (#4739)
* Implement crop photo fallback in PhotoCapable thumbnail_url

Currently, plantings, seeds, and harvests display "no photo available" placeholders when they do not have specific photos attached. This change enables the PhotoCapable#thumbnail_url method to automatically fall back to the associated crop's thumbnail_url when no item-specific photo is present.

Additionally, this commit:
- Fixes validation in PhotoAssociation to handle crop photos that do not have a polymorphic photographable owner.
- Disables cache store during testing to prevent stale/cached default photos from leaking across specs.
- Adds comprehensive unit tests for the fallback logic.

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

* Keep only core crop photo fallback and unit tests, removing excess changes

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

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-08-10 20:09:18 +09:30
dependabot[bot] b7f4667681 Bump aws-sdk-s3 from 1.228.2 to 1.229.0
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.228.2 to 1.229.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-version: 1.229.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 09:36:46 +00:00
dependabot[bot] 876f4f9fce Bump csv from 3.3.5 to 3.3.6
Bumps [csv](https://github.com/ruby/csv) from 3.3.5 to 3.3.6.
- [Release notes](https://github.com/ruby/csv/releases)
- [Changelog](https://github.com/ruby/csv/blob/main/NEWS.md)
- [Commits](https://github.com/ruby/csv/compare/v3.3.5...v3.3.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 09:36:43 +00:00
dependabot[bot] 186be79a86 Bump rails from 8.1.3 to 8.1.3.1 (#4737)
Bumps [rails](https://github.com/rails/rails) from 8.1.3 to 8.1.3.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v8.1.3...v8.1.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 19:04:39 +09:30
dependabot[bot] afae82f8cc Bump activestorage from 8.1.3 to 8.1.3.1 (#4732)
Bumps [activestorage](https://github.com/rails/rails) from 8.1.3 to 8.1.3.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.1.3.1/activestorage/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v8.1.3...v8.1.3.1)

---
updated-dependencies:
- dependency-name: activestorage
  dependency-version: 8.1.3.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 19:04:11 +09:30
4563df45d0 Upgrade to Rails 8.1 (#4685)
* Upgrade application to Rails 8.1

- Update rails gem to ~> 8.1.0
- Set config.load_defaults 8.1 in application.rb
- Add gem 'csv' for Ruby 3.4+ compatibility
- Replace deprecated 'render text:' with 'render plain:' in PagesController
- Add compatibility patch for jsonapi-resources routing in Rails 8.1
- Add compatibility patch for Faraday 2.x error constants
- Add Searchkick test stubs for environments without Elasticsearch
- Include required Active Storage update migrations

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

* Remove disabled searchkick

* Apply suggestion from @CloCkWeRX

* Delete config/initializers/faraday_patch.rb

* Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

* Remove modifications for tests without elasticsearch

* Remove psych gem and its dependencies

Removed psych gem version 5.4.0 and its dependencies.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-08-09 22:53:15 +09:30
Daniel O'Connor b4d156e708 Merge branch 'mainline' into dev 2026-08-09 22:34:27 +09:30
c32fae3cbe release88 (#4688)
* Bump actions/cache from 5 to 6

Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump axe-core-rspec from 4.11.3 to 4.12.0

Bumps [axe-core-rspec](https://github.com/dequelabs/axe-core-gems) from 4.11.3 to 4.12.0.
- [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.11.3...v4.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Merge pull request #4683 from Growstuff/refactor-harvests-remove-elasticsearch-14630838429921835504

Refactor harvests to remove Elasticsearch

* Refactor Seeds to remove Elasticsearch dependency (#4684)

* Refactor Seeds to remove Elasticsearch dependency

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

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

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

* Remove Seed.reindex

* Remove trait

* Fix tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

* Refactor Plantings to remove Elasticsearch dependency (#4686)

* Refactor Plantings to remove Elasticsearch dependency

This commit refactors the Plantings controller, model, and views to use
ActiveRecord instead of Searchkick/Elasticsearch.

Key changes:
- Refactored `PlantingsController#index` to use an ActiveRecord-based
  `plantings` method.
- Moved `homepage_records` logic from `SearchPlantings` concern to the
  `Planting` model using ActiveRecord scopes.
- Removed `SearchPlantings` concern and deleted the file.
- Updated `home/_plantings.html.haml` and `plantings/index.rss.haml` to
  use dot notation for `Planting` object attributes.
- Updated specs to remove Searchkick-related setup and assertions.

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

* Fix Planting.reindex

* Fix test

* Mark test pending

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

* Fix plantings ICS feed regression and enable request spec (#4687)

* Fix plantings ICS feed regression and enable request spec

- Update `app/views/plantings/index.ics.erb` to use ActiveRecord method calls instead of hash bracket access.
- Enable `spec/requests/plantings_spec.rb` and update it to account for mirrored harvest events.
- Add `config/initializers/faraday_patch.rb` to fix Searchkick/Faraday 2.x compatibility issues.

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

* Delete config/initializers/faraday_patch.rb

* Apply suggestion from @CloCkWeRX

* Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

* Apply suggestion from @CloCkWeRX

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

* Block Semrush crawler in Rack Attack initializer

Added a blocklist entry for the Semrush crawler to prevent abusive requests.

* Bump sitemap_generator from 6.3.0 to 7.0.2

Bumps [sitemap_generator](https://github.com/kjvarga/sitemap_generator) from 6.3.0 to 7.0.2.
- [Changelog](https://github.com/kjvarga/sitemap_generator/blob/master/CHANGES.md)
- [Commits](https://github.com/kjvarga/sitemap_generator/compare/v6.3.0...v7.0.2)

---
updated-dependencies:
- dependency-name: sitemap_generator
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump carrierwave from 3.0.7 to 3.1.3

Bumps [carrierwave](https://github.com/carrierwaveuploader/carrierwave) from 3.0.7 to 3.1.3.
- [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.7...v3.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rubocop from 1.88.0 to 1.88.1 (#4691)

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.88.0 to 1.88.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.88.0...v1.88.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sitemap_generator from 7.0.2 to 7.0.3 (#4692)

Bumps [sitemap_generator](https://github.com/kjvarga/sitemap_generator) from 7.0.2 to 7.0.3.
- [Changelog](https://github.com/kjvarga/sitemap_generator/blob/master/CHANGES.md)
- [Commits](https://github.com/kjvarga/sitemap_generator/compare/v7.0.2...v7.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sitemap_generator from 7.0.3 to 7.1.0

Bumps [sitemap_generator](https://github.com/kjvarga/sitemap_generator) from 7.0.3 to 7.1.0.
- [Changelog](https://github.com/kjvarga/sitemap_generator/blob/master/CHANGES.md)
- [Commits](https://github.com/kjvarga/sitemap_generator/compare/v7.0.3...v7.1.0)

---
updated-dependencies:
- dependency-name: sitemap_generator
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump haml_lint from 0.74.0 to 0.75.0 (#4694)

Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.74.0 to 0.75.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.74.0...v0.75.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rubocop from 1.88.1 to 1.88.2

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.88.1 to 1.88.2.
- [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.88.1...v1.88.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cesy <cesy.avon@gmail.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-07-10 19:25:08 +09:30
8 changed files with 156 additions and 78 deletions

No files matched your search

+3 -1
View File
@@ -5,7 +5,9 @@ source 'https://rubygems.org'
# Match ruby version in .ruby-version
ruby File.read('.ruby-version')
gem 'rails', '~> 8.0.0'
gem 'rails', '~> 8.1.0'
gem 'csv'
# Keeping old sprockets
# https://github.com/rails/sprockets-rails/issues/444#issuecomment-637817050
+77 -73
View File
@@ -33,29 +33,31 @@ GEM
GEM
remote: https://rubygems.org/
specs:
actioncable (8.0.5.1)
actionpack (= 8.0.5.1)
activesupport (= 8.0.5.1)
action_text-trix (2.1.19)
railties
actioncable (8.1.3.1)
actionpack (= 8.1.3.1)
activesupport (= 8.1.3.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (8.0.5.1)
actionpack (= 8.0.5.1)
activejob (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
actionmailbox (8.1.3.1)
actionpack (= 8.1.3.1)
activejob (= 8.1.3.1)
activerecord (= 8.1.3.1)
activestorage (= 8.1.3.1)
activesupport (= 8.1.3.1)
mail (>= 2.8.0)
actionmailer (8.0.5.1)
actionpack (= 8.0.5.1)
actionview (= 8.0.5.1)
activejob (= 8.0.5.1)
activesupport (= 8.0.5.1)
actionmailer (8.1.3.1)
actionpack (= 8.1.3.1)
actionview (= 8.1.3.1)
activejob (= 8.1.3.1)
activesupport (= 8.1.3.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (8.0.5.1)
actionview (= 8.0.5.1)
activesupport (= 8.0.5.1)
actionpack (8.1.3.1)
actionview (= 8.1.3.1)
activesupport (= 8.1.3.1)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
@@ -63,15 +65,16 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (8.0.5.1)
actionpack (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
actiontext (8.1.3.1)
action_text-trix (~> 2.1.15)
actionpack (= 8.1.3.1)
activerecord (= 8.1.3.1)
activestorage (= 8.1.3.1)
activesupport (= 8.1.3.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (8.0.5.1)
activesupport (= 8.0.5.1)
actionview (8.1.3.1)
activesupport (= 8.1.3.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
@@ -86,29 +89,29 @@ GEM
active_utils (3.6.0)
activesupport (>= 4.2)
i18n
activejob (8.0.5.1)
activesupport (= 8.0.5.1)
activejob (8.1.3.1)
activesupport (= 8.1.3.1)
globalid (>= 0.3.6)
activemodel (8.0.5.1)
activesupport (= 8.0.5.1)
activerecord (8.0.5.1)
activemodel (= 8.0.5.1)
activesupport (= 8.0.5.1)
activemodel (8.1.3.1)
activesupport (= 8.1.3.1)
activerecord (8.1.3.1)
activemodel (= 8.1.3.1)
activesupport (= 8.1.3.1)
timeout (>= 0.4.0)
activestorage (8.0.5.1)
actionpack (= 8.0.5.1)
activejob (= 8.0.5.1)
activerecord (= 8.0.5.1)
activesupport (= 8.0.5.1)
activestorage (8.1.3.1)
actionpack (= 8.1.3.1)
activejob (= 8.1.3.1)
activerecord (= 8.1.3.1)
activesupport (= 8.1.3.1)
marcel (~> 1.0)
activesupport (8.0.5.1)
activesupport (8.1.3.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
@@ -120,8 +123,8 @@ GEM
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
aws-eventstream (1.4.0)
aws-partitions (1.1277.0)
aws-sdk-core (3.254.0)
aws-partitions (1.1279.0)
aws-sdk-core (3.254.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
@@ -132,8 +135,8 @@ GEM
aws-sdk-kms (1.130.0)
aws-sdk-core (~> 3, >= 3.254.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.228.2)
aws-sdk-core (~> 3, >= 3.254.0)
aws-sdk-s3 (1.229.0)
aws-sdk-core (~> 3, >= 3.254.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
@@ -146,7 +149,6 @@ GEM
axe-core-api (= 4.12.0)
base64 (0.3.0)
bcrypt (3.1.22)
benchmark (0.5.0)
better_errors (2.10.1)
erubi (>= 1.0.0)
rack (>= 0.9.0)
@@ -217,7 +219,7 @@ GEM
gli (>= 2.7.0)
i18n (>= 0.6.4)
rubyzip (>= 1.0.0)
csv (3.3.5)
csv (3.3.6)
csv_shaper (1.4.0)
activesupport (>= 3.0.0)
csv
@@ -259,7 +261,7 @@ GEM
elasticsearch-transport (7.0.0)
faraday
multi_json
erb (6.0.6)
erb (6.0.7)
erubi (1.13.1)
execjs (2.10.1)
factory_bot (6.5.5)
@@ -296,7 +298,8 @@ GEM
gravatar-ultimate (2.0.0)
activesupport (>= 2.3.14)
rack
haml (7.2.2)
haml (7.3.0)
prism (>= 1.1.0)
temple (>= 0.8.2)
thor
tilt
@@ -305,7 +308,7 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.76.0)
haml_lint (0.77.0)
haml (>= 5.0)
parallel (>= 1.10)
rainbow
@@ -347,7 +350,7 @@ GEM
image_processing (1.14.0)
mini_magick (>= 4.9.5, < 6)
ruby-vips (>= 2.0.17, < 3)
io-console (0.8.2)
io-console (0.9.1)
irb (1.18.0)
pp (>= 0.6.0)
prism (>= 1.3.0)
@@ -443,8 +446,8 @@ GEM
racc (~> 1.4)
nokogiri (1.19.4-x86_64-linux-gnu)
racc (~> 1.4)
oauth (0.5.6)
oj (3.17.5)
oauth (0.5.9)
oj (3.17.6)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (1.9.2)
@@ -499,20 +502,20 @@ GEM
rackup (1.0.1)
rack (< 3)
webrick
rails (8.0.5.1)
actioncable (= 8.0.5.1)
actionmailbox (= 8.0.5.1)
actionmailer (= 8.0.5.1)
actionpack (= 8.0.5.1)
actiontext (= 8.0.5.1)
actionview (= 8.0.5.1)
activejob (= 8.0.5.1)
activemodel (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
rails (8.1.3.1)
actioncable (= 8.1.3.1)
actionmailbox (= 8.1.3.1)
actionmailer (= 8.1.3.1)
actionpack (= 8.1.3.1)
actiontext (= 8.1.3.1)
actionview (= 8.1.3.1)
activejob (= 8.1.3.1)
activemodel (= 8.1.3.1)
activerecord (= 8.1.3.1)
activestorage (= 8.1.3.1)
activesupport (= 8.1.3.1)
bundler (>= 1.15.0)
railties (= 8.0.5.1)
railties (= 8.1.3.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -532,9 +535,9 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (8.0.5.1)
actionpack (= 8.0.5.1)
activesupport (= 8.0.5.1)
railties (8.1.3.1)
actionpack (= 8.1.3.1)
activesupport (= 8.1.3.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -547,7 +550,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rbs (4.1.0)
rbs (4.1.2)
logger
prism (>= 1.6.0)
tsort
@@ -560,7 +563,7 @@ GEM
redis-client (0.26.2)
connection_pool
regexp_parser (2.12.0)
reline (0.6.3)
reline (0.7.0)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
@@ -616,7 +619,7 @@ GEM
rswag-ui (2.17.0)
actionpack (>= 5.2, < 8.2)
railties (>= 5.2, < 8.2)
rubocop (1.88.2)
rubocop (1.89.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
@@ -678,7 +681,7 @@ GEM
activemodel (>= 6.1)
hashie
securerandom (0.4.1)
selenium-webdriver (4.46.0)
selenium-webdriver (4.47.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
@@ -703,7 +706,7 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.5.0)
sysexits (1.2.0)
temple (0.10.4)
temple (0.10.6)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
terser (1.2.8)
@@ -748,7 +751,7 @@ GEM
webrick
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.8.2)
zeitwerk (2.8.3)
PLATFORMS
ruby
@@ -779,6 +782,7 @@ DEPENDENCIES
comfortable_mexican_sofa!
connection_pool (< 3)
crowdin-cli
csv
csv_shaper
dalli
database_cleaner
@@ -828,7 +832,7 @@ DEPENDENCIES
rack-attack
rack-cors
rack-protection (>= 2.0.1)
rails (~> 8.0.0)
rails (~> 8.1.0)
rails-assets-leaflet.markercluster!
rails-controller-testing
rails_12factor
+5 -3
View File
@@ -18,9 +18,11 @@ module PhotoCapable
def thumbnail_url
df = default_photo
return unless df
df.source == 'flickr' ? df.fullsize_url : df.thumbnail_url
if df
df.source == 'flickr' ? df.fullsize_url : df.thumbnail_url
elsif respond_to?(:crop) && crop.present?
crop.thumbnail_url
end
end
def most_liked_photo
+1
View File
@@ -28,6 +28,7 @@ class PhotoAssociation < ApplicationRecord
def photo_and_item_have_same_owner
return if photographable_type == 'Crop'
return if photographable.blank?
errors.add(:photo, :photo_owner_mismatch) unless photographable.owner_id == photo.owner_id
end
+1 -1
View File
@@ -14,7 +14,7 @@ Bundler.require(*Rails.groups)
module Growstuff
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 8.0
config.load_defaults 8.1
# Rails 7.1+ requires a coder for `serialize`.
# We set YAML as the default for compatibility with gems like Mexican Sofa.
@@ -0,0 +1,48 @@
# frozen_string_literal: true
# JSONAPI::Resources (0.10.7) is currently incompatible with Rails 8.1
# because ActionDispatch::Routing::Mapper::Resources::Resource.initialize now expects keyword arguments for only/except.
# This patch ensures that it passes keyword arguments correctly.
# Remove when https://github.com/JSONAPI-Resources/jsonapi-resources/issues/1488 is fixed
if defined?(JSONAPI)
module ActionDispatch
module Routing
class Mapper
module Resources
class Resource
alias_method :original_initialize, :initialize
def initialize(entities, api_only, shallow, options = {})
# In Rails 8.1, initialize(entities, api_only, shallow, only: nil, except: nil, **options)
# and jsonapi-resources passes them in the options hash.
if options.is_a?(Hash)
only = options.delete(:only)
except = options.delete(:except)
original_initialize(entities, api_only, shallow, only: only, except: except, **options)
else
original_initialize(entities, api_only, shallow, options)
end
end
end
end
end
end
end
module JSONAPI
module RoutingExt
module Mapper
def jsonapi_resource_scope(resource, resource_type)
# The original implementation uses Resource.new which we patched above.
# We need to make sure we don't break Rails 5/6/7/8 logic if it were to run there.
@scope = @scope.new(scope_level_resource: resource, jsonapi_resource: resource_type)
controller(resource.resource_scope) { yield }
ensure
@scope = @scope.parent
end
end
end
end
end
+19
View File
@@ -421,6 +421,25 @@ describe Planting do
planting.photos << @photo2
expect(planting.default_photo).to eq @photo2
end
describe '#thumbnail_url' do
let(:crop_photo) { create(:photo) }
it 'returns its own default photo if present' do
expect(planting.thumbnail_url).to eq photo.fullsize_url
end
it 'falls back to crop default photo if no planting photo is present' do
planting_without_photo = create(:planting, crop:)
PhotoAssociation.create!(photo: crop_photo, photographable: crop)
expect(planting_without_photo.thumbnail_url).to eq crop_photo.fullsize_url
end
it 'returns nil if neither planting nor crop has a photo' do
planting_without_photo = create(:planting, crop:)
expect(planting_without_photo.thumbnail_url).to be_nil
end
end
end
context 'interesting plantings' do
+2
View File
@@ -58,7 +58,9 @@ RSpec.configure do |config|
config.around(:each, :search) do |example|
Searchkick.callbacks(true) do
index_everything
example.run
index_everything
end
end