Merge branch 'main' into mobile-app/scoped-stylesheets

* main:
  Remove semver-major-days from Dependabot on GH actions
  Allow chromium unstable endpoint
  Bump Rails to current ast-immediate-variants-process-locally branch
  Rails seeded parallel tests (#2037)
  Add blank slate to the main menu
  Fixing Lexxy prompt menu spacing
  Make SMTP config conditional on SMTP_ADDRESS
  default to smtp
  configurable actionmailer settings (ENV)
This commit is contained in:
Adrien Maston
2025-12-10 12:57:50 +01:00
12 changed files with 41 additions and 22 deletions
-1
View File
@@ -30,4 +30,3 @@ updates:
open-pull-requests-limit: 10
cooldown:
default-days: 7
semver-major-days: 14
+1 -1
View File
@@ -13,7 +13,7 @@ GIT
GIT
remote: https://github.com/rails/rails.git
revision: bf81d40a91880c059ce9d0447219385a2c8e4a15
revision: 0636a79d1bf268db6cdbbc6327106d08c3ff3751
branch: ast-immediate-variants-process-locally
specs:
actioncable (8.2.0.alpha)
+1 -1
View File
@@ -82,7 +82,7 @@ GIT
GIT
remote: https://github.com/rails/rails.git
revision: bf81d40a91880c059ce9d0447219385a2c8e4a15
revision: 0636a79d1bf268db6cdbbc6327106d08c3ff3751
branch: ast-immediate-variants-process-locally
specs:
actioncable (8.2.0.alpha)
+3 -5
View File
@@ -14,7 +14,7 @@ This repo contains a starter deployment file that you can modify for your own sp
The steps to configure your very own Fizzy are:
1. Fork the repo
2. Edit few things in config/deploy.yml, .kamal/secrets, and config/environments/production.rb
2. Edit few things in config/deploy.yml and .kamal/secrets
3. Run `kamal setup` to do your first deploy.
We'll go through each of these in turn.
@@ -37,6 +37,7 @@ We've added comments to that file to highlight what each setting needs to be, bu
- `ssh/user`: If you access your server a `root` you can leave this alone; if you use a different user, set it here.
- `proxy/ssl` and `proxy/host`: Kamal can set up SSL certificates for you automatically. To enable that, set the hostname again as `host`. If you don't want SSL for some reason, you can set `ssl: false` to turn it off.
- `env/clear/MAILER_FROM_ADDRESS`: This is the email address that Fizzy will send emails from. It should usually be an address from the same domain where you're running Fizzy.
- `env/clear/SMTP_ADDRESS`: The address of an SMTP server that you can send email through. You can use a 3rd-party service for this, like Sendgrid or Postmark, in which case their documentation will tell you what to use for this.
Fizzy also requires a few environment variables to be set up, some of which contain secrets.
The simplest way to do this is to put them in a file called `.kamal/secrets`.
@@ -58,6 +59,7 @@ SMTP_PASSWORD=email-provider-password
The values you enter here will be specific to you, and you can get or create them as follows:
- `SECRET_KEY_BASE` should be a long, random secret. You can run `bin/rails secret` to create a suitable value for this.
- `SMTP_USERNAME` & `SMTP_PASSWORD` should be valid credentials for your SMTP server. If you're using a 3rd-party service here, consult their documentation for what to use.
- `VAPID_PUBLIC_KEY` & `VAPID_PRIVATE_KEY` are a pair of credentials that are used for sending notifications. You can create your own keys by starting a development console with:
```sh
@@ -73,10 +75,6 @@ The values you enter here will be specific to you, and you can get or create the
puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}"
```
- `SMTP_USERNAME`/`SMTP_PASSWORD` are credentials you should get from your email provider.
Lastly, you'll need to set up the rest of your email configuration in `config/environments/production.rb`. There is an example configuration in comments at the top of that file. The actual settings you use here will depend on your email provider, but in most cases will look similar to that section, so you can uncomment it and edit to suit. Note that it will use the `SMTP_USERNAME` and `SMTP_PASSWORD` values you entered in your secrets.
Once you've made all those changes, commit them to your fork so they're saved.
### Deploy Fizzy!
+4
View File
@@ -295,6 +295,10 @@
max-height: 200px;
overflow: scroll;
&:is(.lexxy-prompt-menu--visible) {
padding: var(--lexxy-prompt-padding);
}
}
.lexxy-prompt-menu--visible {
+9
View File
@@ -219,6 +219,15 @@
}
}
.nav__blank-slate {
font-size: var(--text-small);
margin: 1rem auto;
.nav:has(.popup__item:not([hidden])) & {
display: none;
}
}
.nav__footer {
background-color: var(--color-canvas);
border-block-start: 1px solid var(--color-ink-lighter);
+1
View File
@@ -1,5 +1,6 @@
class Push::Subscription < ApplicationRecord
PERMITTED_ENDPOINT_HOSTS = %w[
jmt17.google.com
fcm.googleapis.com
updates.push.services.mozilla.com
web.push.apple.com
+4
View File
@@ -25,4 +25,8 @@
</div>
<%= yield %>
<div class="nav__blank-slate blank-slate blank-slate--empty">
Nothing matches that filter
</div>
</div>
+2 -1
View File
@@ -28,7 +28,8 @@ env:
- SMTP_USERNAME
- SMTP_PASSWORD
clear:
MAILER_FROM_ADDRESS: support@example.com # The email address that Fizzy sends email from
MAILER_FROM_ADDRESS: support@example.com # The email "from" address that Fizzy sends email from
SMTP_ADDRESS: mail.example.com # The SMTP server you'll use to send email
SOLID_QUEUE_IN_PUMA: true # Run background jobs in the app container
+14 -12
View File
@@ -5,18 +5,20 @@ Rails.application.configure do
# Email provider Settings
#
# Configure these according to whichever email provider you use. An example setup
# using SMTP looks like the following:
#
# config.action_mailer.smtp_settings = {
# address: 'smtp.example.com', # The address of your email provider's SMTP server
# port: 2525,
# domain: 'example.com', # Your domain, which Fizzy will send email from
# user_name: ENV["SMTP_USERNAME"],
# password: ENV["SMTP_PASSWORD"],
# authentication: :plain,
# enable_starttls_auto: true
# }
# SMTP setting can be configured via environment variables.
# For other configuration options, consult the Action Mailer documentation.
if smtp_address = ENV["SMTP_ADDRESS"].presence
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: smtp_address,
port: ENV.fetch("SMTP_PORT", "587").to_i,
domain: ENV.fetch("SMTP_DOMAIN", nil),
user_name: ENV.fetch("SMTP_USERNAME", nil),
password: ENV.fetch("SMTP_PASSWORD", nil),
authentication: ENV.fetch("SMTP_AUTHENTICATION", "plain"),
enable_starttls_auto: ENV.fetch("SMTP_ENABLE_STARTTLS_AUTO", "true") == "true"
}
end
# Code is not reloaded between requests.
config.enable_reloading = false
+1
View File
@@ -98,6 +98,7 @@ class Push::SubscriptionTest < ActiveSupport::TestCase
test "accepts all permitted push service domains" do
permitted_endpoints = [
"https://fcm.googleapis.com/fcm/send/token123",
"https://jmt17.google.com/fcm/send/token123",
"https://updates.push.services.mozilla.com/wpush/v2/token123",
"https://web.push.apple.com/QaBC123",
"https://wns2-db5p.notify.windows.com/w/?token=abc123"
+1 -1
View File
@@ -38,7 +38,7 @@ end
module ActiveSupport
class TestCase
parallelize(workers: :number_of_processors)
parallelize workers: :number_of_processors, work_stealing: ENV["WORK_STEALING"] != "false"
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all