Sha256: b82ec5a607143b007325d73b0784a149eea601f5d046563152060c185f810e86
Contents?: true
Size: 775 Bytes
Versions: 18
Compression:
Stored size: 775 Bytes
Contents
# frozen_string_literal: true require_relative "base" module Neetob class CLI module Cloudflare class AlwaysUseHttps < 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/always_use_https") response = get(url) always_use_https = response[:result][:value] == "on" ? print_success(response[:result][:value]) : print_failure(response[:result][:value]) ui.info("Always use HTTPS is turned #{always_use_https}") end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems