diff --git a/.github/workflows/brakeman-analysis.yml b/.github/workflows/brakeman-analysis.yml index e824801f2f..fb4cc3f295 100644 --- a/.github/workflows/brakeman-analysis.yml +++ b/.github/workflows/brakeman-analysis.yml @@ -15,7 +15,7 @@ on: jobs: brakeman-scan: name: Brakeman Scan - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: # Checkout the repository to the GitHub Actions runner - name: Checkout diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 568a24abbb..732385c55b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,7 @@ on: [pull_request] jobs: Standard: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v3 @@ -16,7 +16,7 @@ jobs: - name: Lint Ruby files run: bundle exec standardrb Prettier: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index acdc5bff94..1821afb177 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,7 +6,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/stale@v5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22c5dc7df2..f7a676c008 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: RSpec: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -104,9 +104,11 @@ jobs: if: failure() with: name: Screenshots - path: spec/dummy/tmp/screenshots + path: | + spec/dummy/tmp/capybara + spec/dummy/tmp/screenshots Jest: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: NODE_ENV: test steps: diff --git a/app/models/concerns/alchemy/picture_thumbnails.rb b/app/models/concerns/alchemy/picture_thumbnails.rb index ef3a234e81..aa4e907233 100644 --- a/app/models/concerns/alchemy/picture_thumbnails.rb +++ b/app/models/concerns/alchemy/picture_thumbnails.rb @@ -102,11 +102,10 @@ def image_cropper_settings # Show image cropping link for ingredient def allow_image_cropping? - settings[:crop] && picture && - picture.can_be_cropped_to?( - settings[:size], - settings[:upsample] - ) && !!picture.image_file + settings[:crop] && picture&.can_be_cropped_to?( + settings[:size], + settings[:upsample] + ) && !!picture.image_file end private