Sha256: b8a99c526d0985daa9ac65a90c3b74fa481ba5ad32b7a4788b2859c4b6765f52

Contents?: true

Size: 767 Bytes

Versions: 18

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Neetob
  class CLI
    module Cloudflare
      class MinTlsVersion < Base
        attr_accessor :domain

        def initialize(domain)
          super()
          @domain = domain
        end

        def run
          zone_id = ZONE_IDS[domain.to_sym]
          raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil?

          url = create_url(zone_id, "settings/min_tls_version")
          response = get(url)
          tls_version = response[:result][:value] == "1.2" ?
            print_success(response[:result][:value]) :
            print_failure(response[:result][:value])
          ui.info("Minimum TLS version is set to #{tls_version}")
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
neetob-0.5.16 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.15 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.14 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.13 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.12 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.11 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.10 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.9 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.8 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.7 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.6 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.5 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.4 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.3 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.2 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.1 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.5.0 lib/neetob/cli/cloudflare/min_tls_version.rb
neetob-0.4.37 lib/neetob/cli/cloudflare/min_tls_version.rb