#!/usr/bin/env ruby require "pave.rb" program :name, "Pave" program :version, Pave::VERSION program :description, "Provides a set of command line tools for Concrete5." program :help, "Authors", "Jamon Holmgren , Ryan Linton " default_command :help command :new do |c| c.syntax = "pave new APP_PATH [options]" c.description = "Create a new Concrete5 project." c.action do |args, options| Pave::Concrete.create(args.first, options) end end command :update do |c| c.syntax = "pave update" c.description = "Update pave to the latest version." c.action do Pave.update end end command :"virtualhost:create" do |c| c.syntax = "pave virtualhost:create VHOST" c.description = "Setup virtual host for Concrete5 project." c.action do |args| Pave::VirtualHost.new(args.first).create_vhost end end alias_command :"vh:create", :"virtualhost:create" command :"virtualhost:remove" do |c| c.syntax = "pave virtualhost:remove VHOST" c.description = "Delete virtual host." c.action do |args| Pave::VirtualHost.new(args.first).remove_vhost end end alias_command :"vh:remove", :"virtualhost:remove" alias_command :"virtualhost:delete", :"virtualhost:remove" alias_command :"vh:delete", :"virtualhost:remove" command :"virtualhost:backup" do |c| c.syntax = "pave virtualhost:backup VHOST" c.description = "Back up virtual hosts file. Restore with `pave virtualhost:restore`." c.action do |args| Pave::VirtualHost.new(args.first).backup_vhost end end alias_command :"vh:backup", :"virtualhost:backup" command :"virtualhost:restore" do |c| c.syntax = "pave virtualhost:restore VHOST" c.description = "Restore previously backed up virtual hosts file." c.action do |args| Pave::VirtualHost.new(args.first).restore_vhost end end alias_command :"vh:restore", :"virtualhost:restore" command :"virtualhost:restart" do |c| c.syntax = "pave virtualhost:restart VHOST" c.description = "Restarts apache." c.action do |args| Pave::VirtualHost.new.restart_apache end end command :"db:create" do |c| c.syntax = "pave db:create" c.description = "Create the Concrete5 project's database." c.action do |args| say "`db:create` command not implemented yet." end end command :"db:dump" do |c| c.syntax = "pave db:dump" c.description = "Create SQL dump of the Concrete5 project's database." c.action do |args| say "`db:dump` command not implemented yet." end end command :"db:download" do |c| c.syntax = "pave db:download" c.description = "Download the Concrete5 project's live database and replace local database." c.action do |args| say "`db:download` command not implemented yet." end end command :"db:upload" do |c| c.syntax = "pave db:upload" c.description = "Upload the Concrete5 project's local database and replace the live database." c.action do |args| say "`db:upload` command not implemented yet." end end