Skip to content

Commit ee9374e

Browse files
Floppyoneiros
authored andcommitted
Read FASP configuration from environment variables
1 parent c9fc34d commit ee9374e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

config/initializers/fasp_base.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FaspBase.tap do |f|
22
# Replace with actual fasp name
3-
f.fasp_name = Rails.application.name
3+
f.fasp_name = ENV.fetch("FASP_NAME", Rails.application.name)
44

55
# Domain of the fasp, used to generate URLs outside of a requests context
66
f.domain = ENV["DOMAIN"] || ActionController::Base.default_url_options[:host] || "localhost:3000"
@@ -14,10 +14,10 @@
1414
]
1515

1616
# Additional metadata
17-
# f.privacy_policy_url = ENV["PRIVACY_POLICY_URL"]
18-
# f.privacy_policy_language = ENV["PRIVACY_POLICY_LANGUAGE"]
19-
# f.contact_email = ENV["CONTACT_EMAIL"]
20-
# f.fediverse_account = ENV["FEDIVERSE_ACCOUNT"]
17+
f.privacy_policy_url = ENV.fetch("PRIVACY_POLICY_URL", nil)
18+
f.privacy_policy_language = ENV.fetch("PRIVACY_POLICY_LANGUAGE", nil)
19+
f.contact_email = ENV.fetch("CONTACT_EMAIL", nil)
20+
f.fediverse_account = ENV.fetch("FEDIVERSE_ACCOUNT", nil)
2121
end
2222

2323
# If you plan to patch classes from the `fasp_base` engine

0 commit comments

Comments
 (0)