Sha256: 2e935cb65bb815d8c0014bc060c2fbd3b1d9a239a5926d638c1028ff4b4d8995
Contents?: true
Size: 918 Bytes
Versions: 28
Compression:
Stored size: 918 Bytes
Contents
require 'shellwords' module Aptible module CLI module Subcommands module Domains def self.included(thor) thor.class_eval do include Helpers::Operation include Helpers::App desc 'domains', "Print an app's current virtual domains" app_options option :verbose, aliases: '-v' def domains app = ensure_app(options) print_vhosts(app) do |vhost| if options[:verbose] "#{vhost.virtual_domain} -> #{vhost.external_host}" else vhost.virtual_domain end end end private def print_vhosts(app) (app.vhosts || []).each do |vhost| say yield(vhost) end end end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems