Skip to content

Commit

Permalink
Update to ruby 3.3.5 and fix emails (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
baldarn authored Sep 10, 2024
1 parent 3c98bde commit 24cbc12
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
bundler-cache: true
- name: Security audit dependencies
run: bundle exec bundler-audit --update
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
bundler-cache: true
- name: Set up Docker Buildx
id: buildx
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
bundler-cache: true
- uses: webfactory/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kamal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
ruby-version: 3.3.5
- name: Run KAMAL command
run: ${{ github.event.inputs.command }}
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
3.3.5
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.3.4
ruby 3.3.5
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.4
ARG RUBY_VERSION=3.3.5
ARG APP_VERSION=undefined
FROM ruby:$RUBY_VERSION-slim AS base

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.4
ARG RUBY_VERSION=3.3.5
FROM ruby:$RUBY_VERSION-slim as base

# Rails app lives here
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ DEPENDENCIES
yabeda-rails

RUBY VERSION
ruby 3.3.4p94
ruby 3.3.5p100

BUNDLED WITH
2.5.6
2.5.18
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The software is still a work in progress. Expect huge variations.
## Develop

I suggest you to use [asdf](https://asdf-vm.com/)
Install ruby 3.3.4
Install ruby 3.3.5

Start the needed services with docker compose:

Expand Down
2 changes: 1 addition & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class ApplicationMailer < ActionMailer::Base
default from: '[email protected]'
default from: '[email protected]'
layout 'mailer'
end
3 changes: 3 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
require 'active_support/core_ext/integer/time'

Rails.application.configure do
# Prepare the ingress controller used to receive mail
# config.action_mailbox.ingress = :relay

# Settings specified here will take precedence over those in config/application.rb.

# Code is not reloaded between requests.
Expand Down
2 changes: 1 addition & 1 deletion test/mailers/medical_certificate_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MedicalCertificateMailerTest < ActionMailer::TestCase
email.deliver_now
end

assert_equal ['[email protected]'], email.from
assert_equal ['[email protected]'], email.from
assert_equal [member.email], email.to
end
end
13 changes: 13 additions & 0 deletions test/mailers/previews/receipt_mailer_preview.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

# Preview all emails at http://localhost:3000/rails/mailers/receipt_mailer
class ReceiptMailerPreview < ActionMailer::Preview
def collaborator_receipt_email
expense = Expense.joins(:user).distinct.first
ReceiptMailer.with(expense:).collaborator_receipt_email
end

def member_receipt_email
ReceiptMailer.with(payment: Payment.first).member_receipt_email
end
end

0 comments on commit 24cbc12

Please sign in to comment.