Sha256: 734c4a4f4e003d208557acf34cc64bc42460a854aed1d13ea89b9c8b5a2d786d
Contents?: true
Size: 693 Bytes
Versions: 13
Compression:
Stored size: 693 Bytes
Contents
require "vmc/cli/route/base" module VMC::Route class Map < Base def precondition fail_on_v2 end desc "Add a URL mapping" group :apps, :info input :app, :desc => "Application to add the URL to", :argument => :optional, :from_given => by_name(:app) input :domain, :desc => "Domain to add the route to", :argument => true def map app = input[:app] domain = input[:domain] with_progress("Updating #{c(app.name, :name)}") do app.urls << domain app.update! end end private def ask_app ask("Which application?", :choices => client.apps, :display => proc(&:name)) end end end
Version data entries
13 entries across 13 versions & 1 rubygems