# frozen_string_literal: true require_relative "base" module Neetob class CLI module Cloudflare class EnsureCdn < Base attr_accessor :app def initialize(app) super() @app = app end def run command = <<-CMD neetob neetodeploy config_vars list --apps #{app} | grep 'ASSET_HOST' | awk -F '|' '{print $3}' | xargs CMD asset_host = `#{command}` raise(StandardError, "ASSET_HOST env is not set for #{app}") if asset_host.empty? ui.success("ASSET_HOST for #{app} is #{asset_host}") end end end end end