Sha256: 64abf6854770f5485934cc8ef8abb4c19e1dc8945bf1e615b327f349a836f7b9

Contents?: true

Size: 655 Bytes

Versions: 32

Compression:

Stored size: 655 Bytes

Contents

# 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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
neetob-0.5.10 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.9 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.8 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.7 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.6 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.5 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.4 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.3 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.2 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.1 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.0 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.4.37 lib/neetob/cli/cloudflare/ensure_cdn.rb