#!/usr/bin/env ruby require 'boson/runner' $:.unshift File.expand_path("../../lib", __FILE__) require 'babot' FileUtils.mkdir_p Babot.root class BabotRunner < Boson::Runner desc "Update bot [name]" def update(name) Babot.update(name) end desc "Update crontab" def schedule Babot.schedule end desc "Run bot [name]" def run(name) Babot.run name end desc "Add bot [name] from [repository]" def add(name, repository) Babot.add name, repository Babot.configure name end desc "Delete bot [name]" def delete(name) Babot.delete name end desc "Configure bot [name]" def configure(name) Babot.configure name end desc "List bots" def list puts Babot.list end desc "Dump bots and configuration in tar file" def dump Babot.dump end desc "Install from tar file [path]" def install(path) Babot.install path end desc "Push to remote server [remote]" def push(remote) Babot.push remote end end BabotRunner.start