#!/usr/bin/env ruby # -*- mode: ruby -*- require 'rda' class RdaCommand < Thor desc 'rvm ACTION', 'Set up RVM. Available actions: setup, discard.' def rvm(action) Rda::Rvm.new.send(action.to_sym) end desc 'nginx ACTION', 'Manage settings of nginx. Available actions: setup, discard.' method_option :environment, aliases: "-e", desc: "Set the environment of the application" method_option :hostname, aliases: "-h", desc: "Set the hostname of the application" def nginx(action) Rda::Nginx.new.send(action.to_sym, options) end desc 'app ACTION', 'Manage the lifecycle of the application. Available actions: restart, release.' def app(action) Rda::App.new.send(action.to_sym) end end RdaCommand.start