Sha256: b672501ad50ec24f69675878fa59578acf1a6ea2e079a016b3a2ddaf884cf093

Contents?: true

Size: 635 Bytes

Versions: 4

Compression:

Stored size: 635 Bytes

Contents

require "thor"

module Lita
  # The command line interface for Lita.
  class CLI < Thor
    include Thor::Actions

    def self.source_root
      File.expand_path("../../..", __FILE__)
    end

    default_task :start

    class_option :config,
      aliases: "-c",
      banner: "PATH",
      default: "lita_config.rb",
      desc: "Path to the configuration file to use"

    desc "start", "Starts Lita"
    def start
      Bundler.require
      Lita.run(options[:config])
    end

    desc "new NAME", "Generates a new Lita project (default name: lita)"
    def new(name = "lita")
      directory "skeleton", name
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lita-2.1.2 lib/lita/cli.rb
lita-2.1.1 lib/lita/cli.rb
lita-2.1.0 lib/lita/cli.rb
lita-2.0.0 lib/lita/cli.rb