Sha256: 9edfe42199563507e84a4d56172197ad1fc4d24d278a25e90e5116d5d8cad8ab

Contents?: true

Size: 769 Bytes

Versions: 2

Compression:

Stored size: 769 Bytes

Contents

module Braintree
  module SSLExpirationCheck # :nodoc:
    class << self
      attr_reader :ssl_expiration_dates_checked
    end

    def self.check_dates # :nodoc:
      {
        "QA" => qa_expiration_date,
        "Sandbox" => sandbox_expiration_date
      }.each do |host, expiration_date|
        if Date.today + (3 * 30) > expiration_date
          Configuration.logger.warn "[Braintree] The SSL Certificate for the #{host} environment will expire on #{expiration_date}. Please check for an updated client library."
        end
      end
      @ssl_expiration_dates_checked = true
    end


    def self.sandbox_expiration_date # :nodoc:
      Date.new(2010, 12, 1)
    end

    def self.qa_expiration_date # :nodoc:
      Date.new(2010, 12, 1)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
braintree-1.0.1 lib/braintree/ssl_expiration_check.rb
braintree-1.0.0 lib/braintree/ssl_expiration_check.rb