Sha256: 65341b9a45acf2bb0e2e66127fe686f0b968636d43b1705a1bf6aacc17f1b7b1
Contents?: true
Size: 689 Bytes
Versions: 3
Compression:
Stored size: 689 Bytes
Contents
require "vmc/cli/route/base" module VMC::Route class Map < Base def precondition; 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 :url, :desc => "URL to map", :argument => :optional def map app = input[:app] url = input[:url] with_progress("Updating #{c(app.name, :name)}") do app.urls << url app.update! end end private def ask_app ask("Which application?", :choices => client.apps, :display => proc(&:name)) end def ask_url ask("Enter URL?") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
af-0.5.0.beta.5 | lib/vmc/cli/route/map.rb |
af-0.5.0.beta.4 | lib/vmc/cli/route/map.rb |
af-0.5.0.beta.3 | lib/vmc/cli/route/map.rb |