Sha256: 5924caf51932e4a21756027e8ce626663e4839d0cd4e5e1980cfa17bf7a7a7d8

Contents?: true

Size: 626 Bytes

Versions: 2

Compression:

Stored size: 626 Bytes

Contents

if defined?(Rails)
  module Dotenv
    module S3
      class Railtie < Rails::Railtie
        config.before_configuration { load_from_tempfile }

        def self.load_from_tempfile
          if ENV["ENABLE_S3_ENVFILE"]
            Dotenv::S3.load(
              bucket:         ENV["ENVFILE_BUCKET_NAME"],
              filename:       ENV["ENVFILE_FILE_NAME"],
              base64_encoded: ENV["ENVFILE_BASE64ENCODE"].present?,
              kms_key_id:     ENV["ENVFILE_KMS_KEY_ID"]
            ) do |tempfile|
              Dotenv.load(tempfile.path)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dotenv-s3-0.2.2 lib/dotenv/s3/rails.rb
dotenv-s3-0.2.1 lib/dotenv/s3/rails.rb