Sha256: ddaa844911635fff31e73ff4e5fd778d569b45d01221505d0b7252c09b57ea76

Contents?: true

Size: 912 Bytes

Versions: 8

Compression:

Stored size: 912 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,
        "Production" => production_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.production_expiration_date # :nodoc:
      Date.civil(2012, 1, 8)
    end

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
braintree-2.2.0 lib/braintree/ssl_expiration_check.rb
braintree-2.1.0 lib/braintree/ssl_expiration_check.rb
braintree-2.0.0 lib/braintree/ssl_expiration_check.rb
braintree-1.2.1 lib/braintree/ssl_expiration_check.rb
braintree-1.2.0 lib/braintree/ssl_expiration_check.rb
braintree-1.1.3 lib/braintree/ssl_expiration_check.rb
braintree-1.1.2 lib/braintree/ssl_expiration_check.rb
braintree-1.1.1 lib/braintree/ssl_expiration_check.rb