Sha256: 0151a0f32de79f15cfc0304d06305bceeb2ca4b41504a3549af85b6c4f803cfe

Contents?: true

Size: 1.84 KB

Versions: 2

Compression:

Stored size: 1.84 KB

Contents

# frozen_string_literal: true

require "thor"
require_relative "ssl_mode"
require_relative "min_tls_version"
require_relative "always_use_https"
require_relative "dns_proxy_status"
require_relative "ensure_cloudflare_cdn"

module Neetob
  class CLI
    module Cloudflare
      class Commands < Thor
        desc "ssl_mode", "Check the value of SSL Mode for your domain in Cloudflare"
        option :domain, type: :string, aliases: "-d", required: true, description: "Domain name"
        def ssl_mode
          SSLMode.new(options[:domain]).process
        end

        desc "min_tls_version", "Check the value of the minimum TLS version for your domain in Cloudflare"
        option :domain, type: :string, aliases: "-d", required: true, description: "Domain name"
        def min_tls_version
          MinTlsVersion.new(options[:domain]).process
        end

        desc "always_use_https", "Check if always use HTTPS setting is turned on for your domain in Cloudflare"
        option :domain, type: :string, aliases: "-d", required: true, description: "Domain name"
        def always_use_https
          AlwaysUseHttps.new(options[:domain]).process
        end

        desc "dns_proxy_status", "Check if DNS proxy status is enabled for all DNS records of your domain in Cloudflare"
        option :domain, type: :string, aliases: "-d", required: true, description: "Domain name"
        def dns_proxy_status
          DnsProxyStatus.new(options[:domain]).process
        end

        desc "ensure_cloudflare_cdn", "Check if an app is using Cloudflare CDN. App name is the app name in NeetoDeploy (Example: neeto-replay-web-production)"
        option :app, type: :string, aliases: "-a", required: true, description: "App name (neeto-replay-web)"
        def ensure_cloudflare_cdn
          EnsureCloudflareCdn.new(options[:app]).process
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
neetob-0.4.33 lib/neetob/cli/cloudflare/commands.rb
neetob-0.4.32 lib/neetob/cli/cloudflare/commands.rb