Sha256: 64abf6854770f5485934cc8ef8abb4c19e1dc8945bf1e615b327f349a836f7b9

Contents?: true

Size: 655 Bytes

Versions: 31

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

31 entries across 31 versions & 1 rubygems

Version Path
neetob-0.5.29 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.28 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.27 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.26 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.25 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.24 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.23 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.22 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.21 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.20 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.19 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.18 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.17 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.16 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.15 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.14 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.13 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.12 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.11 lib/neetob/cli/cloudflare/ensure_cdn.rb
neetob-0.5.10 lib/neetob/cli/cloudflare/ensure_cdn.rb