module ApplicationSecrets
helper module for loading secret values from environment/credentials.
Public Class Methods
Source
# File lib/application_secrets.rb, line 13 def github_key = production? ? CREDENTIALS['github_key'] : ENV.fetch('GITHUB_KEY', nil) def github_secret = production? ? CREDENTIALS['github_secret'] : ENV.fetch('GITHUB_SECRET', nil) private def production? = ENV['RACK_ENV'] == 'production' end
Source
# File lib/application_secrets.rb, line 15 def github_secret = production? ? CREDENTIALS['github_secret'] : ENV.fetch('GITHUB_SECRET', nil) private def production? = ENV['RACK_ENV'] == 'production' end end
Source
# File lib/application_secrets.rb, line 19 def production? = ENV['RACK_ENV'] == 'production' end
Source
# File lib/application_secrets.rb, line 9 def session_secret production? ? CREDENTIALS['session_secret'] : ENV.fetch('SESSION_SECRET') { SecureRandom.hex(64) } end