lib/percy/redis_client.rb in percy-common-3.1.2.rc.1 vs lib/percy/redis_client.rb in percy-common-3.1.2

- old
+ new

@@ -9,11 +9,11 @@ attr_reader :client attr_reader :options def initialize(given_options = {}) @provided_options = given_options - @options = ssl_params.merge(given_options) + @options = ssl_options.merge(given_options) @client = ::Redis.new(options) end private def ssl_enabled? provided_url.to_s.start_with?('rediss://') @@ -72,23 +72,18 @@ File.read(fetch_key('REDIS_SSL_PRIVATE_KEY_PATH')) end private def certificate_authority provided_certificate_authority || - certificate_authority_from_env || certificate_authority_from_path end private def provided_certificate_authority @provided_options&.dig(:ssl_params, :ca_file) end - private def certificate_authority_from_env - ENV['REDIS_SSL_CERTIFICATE_AUTHORITY'] - end - private def certificate_authority_from_path - File.read(fetch_key('REDIS_SSL_CERTIFICATE_AUTHORITY_PATH')) + fetch_key('REDIS_SSL_CERTIFICATE_AUTHORITY_PATH') end private def fetch_key(key) ENV.fetch(key) { missing_key(key) } end