Sha256: 76ddc6e90421b97dc93c09645f683e2a93abfa810879661626ba5e19fe4e0809
Contents?: true
Size: 449 Bytes
Versions: 1
Compression:
Stored size: 449 Bytes
Contents
# frozen_string_literal: true require "rails" require_relative "creds_env/version" module CredsEnv class Error < StandardError; end def self.load(rails_application = nil) application = rails_application || Rails.application # turn credentials that are IN_CAPS to be ENV["IN_CAPS"] env var config = application.credentials.config config.keys.grep(/[A-Z]/).each do |var| ENV[var.to_s] = config[var].to_s end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
creds_env-0.1.0 | lib/creds_env.rb |