Skip to content

Commit 164d560

Browse files
chore(deps): bump actions/checkout from 4 to 5 (#8)
* chore(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: update Active Record encryption configuration for test environment Added default test keys for Active Record encryption in the test environment to prevent ENV.fetch errors. Updated comments for clarity. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fralps <francois@kinoba.fr>
1 parent d65b42e commit 164d560

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
ports: ["5432:5432"]
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
- name: 🔧 Set up Ruby
2929
uses: ruby/setup-ruby@v1
3030
with:
@@ -77,7 +77,7 @@ jobs:
7777
runs-on: ubuntu-latest
7878

7979
steps:
80-
- uses: actions/checkout@v4
80+
- uses: actions/checkout@v5
8181
- name: 🔧 Set up Ruby
8282
uses: ruby/setup-ruby@v1
8383
with:
@@ -97,7 +97,7 @@ jobs:
9797
runs-on: ubuntu-latest
9898

9999
steps:
100-
- uses: actions/checkout@v4
100+
- uses: actions/checkout@v5
101101
- name: 🔧 Set up Ruby
102102
uses: ruby/setup-ruby@v1
103103
with:

config/application.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Application < Rails::Application
2424

2525
# Settings in config/environments/* take precedence over those specified here.
2626
# Application configuration can go into files in config/initializers
27-
# -- all .rb files in that directory are automatically loaded after loading
27+
# -- all .rb files in directory are automatically loaded after loading
2828
# the framework and any gems in your application.
2929

3030
# Only loads a smaller set of middleware suitable for API only apps.
@@ -34,9 +34,16 @@ class Application < Rails::Application
3434

3535
# Encrypt some database fields
3636
# See: https://guides.rubyonrails.org/active_record_encryption.html
37-
config.active_record.encryption.primary_key = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY')
38-
config.active_record.encryption.deterministic_key = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY')
39-
config.active_record.encryption.key_derivation_salt = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT')
37+
# Use default test keys for test environment to avoid ENV.fetch errors
38+
if Rails.env.test?
39+
config.active_record.encryption.primary_key = 'test_primary_key_for_testing_only'
40+
config.active_record.encryption.deterministic_key = 'test_deterministic_key_for_testing_only'
41+
config.active_record.encryption.key_derivation_salt = 'test_salt_for_testing_only'
42+
else
43+
config.active_record.encryption.primary_key = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY')
44+
config.active_record.encryption.deterministic_key = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY')
45+
config.active_record.encryption.key_derivation_salt = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT')
46+
end
4047

4148
# Use cookies storage
4249
config.middleware.use ActionDispatch::Cookies

0 commit comments

Comments
 (0)