Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled

Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 23:01:48 +02:00
co-authored by Cursor
commit c4e5f289cf
258 changed files with 11293 additions and 0 deletions
@@ -0,0 +1,25 @@
# Chiavi derivate da SECRET_KEY_BASE così le password SMTP restano cifrate
# anche senza rails credentials:edit (Docker / deploy).
#
# In Rails 8 il getter di ActiveRecord::Encryption.config.primary_key solleva
# se la chiave manca: non usare ||= su quell'oggetto.
require "digest"
secret = Rails.application.secret_key_base.to_s
keys = {
primary_key: Digest::SHA256.hexdigest("#{secret}/ar-enc-primary"),
deterministic_key: Digest::SHA256.hexdigest("#{secret}/ar-enc-deterministic"),
key_derivation_salt: Digest::SHA256.hexdigest("#{secret}/ar-enc-salt")
}
cfg = Rails.application.config.active_record.encryption
keys.each { |name, value| cfg[name] = value }
cfg.support_unencrypted_data = true
Rails.application.config.after_initialize do
enc = ActiveRecord::Encryption.config
enc.primary_key = keys[:primary_key]
enc.deterministic_key = keys[:deterministic_key]
enc.key_derivation_salt = keys[:key_derivation_salt]
enc.support_unencrypted_data = true
end