Class: Neetob::CLI::Cloudflare::EnsureCdn
- Defined in:
- lib/neetob/cli/cloudflare/ensure_cdn.rb
Constant Summary
Constants inherited from Base
Base::NEETO_DEPLOY_DOCS, Base::ZONE_IDS
Constants inherited from Base
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app) ⇒ EnsureCdn
constructor
A new instance of EnsureCdn.
- #run ⇒ Object
Methods inherited from Base
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(app) ⇒ EnsureCdn
Returns a new instance of EnsureCdn.
11 12 13 14 |
# File 'lib/neetob/cli/cloudflare/ensure_cdn.rb', line 11 def initialize(app) super() @app = app end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
9 10 11 |
# File 'lib/neetob/cli/cloudflare/ensure_cdn.rb', line 9 def app @app end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/neetob/cli/cloudflare/ensure_cdn.rb', line 16 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 |