initial commit

This commit is contained in:
2026-10-25 23:19:29 -06:00
commit 5a3e877217
43 changed files with 2780 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# frozen_string_literal: true
module FO::Environment
def self.fetch(k)
ENV.fetch(k)
end
def self.is_prod?
env == 'prod' ||
env == 'production'
end
def self.session_secret
s = ENV['SECRET']
if self.is_prod? && s.nil?
raise ArgumentError, "Environment variable SECRET missing in production environment"
end
s || ('x' * 64)
end
def self.env
ENV.fetch('ENVIRONMENT', 'prod')
end
end