Sha256: b6225c284e3d5d52b24523a9708a2202ee162132234dd462934d6398d6286ec4

Contents?: true

Size: 907 Bytes

Versions: 1

Compression:

Stored size: 907 Bytes

Contents

#!/usr/bin/env ruby

require 'boson/runner'

$:.unshift File.expand_path("../../lib", __FILE__)
require 'babot'

FileUtils.mkdir_p [Babot.root.join("config"),
                   Babot.root.join("bots")]

class BabotRunner < Boson::Runner
  desc "Update bot [name]"
  def update(name)
    Babot.update(name)
  end

  desc "Update crontab"
  def schedule
    Babot.schedule
  end

  desc "Call bot [name]"
  def call(name)
    Babot.call name
  end

  desc "Call bot [name] without update"
  def dry(name)
    puts Babot.dry(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
end

BabotRunner.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
babot-0.2.1 bin/babot