Sha256: 01a1fd548001668e1bf1fcec9b94f837a42ce1dc11263348651679616be91783

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

module Troo
  module CLI
    class Main < ThorFixes
      desc 'status',
           'Get troo status.'
      def status
        say 'Status:'
        say Commands::Status::Board.dispatch
        say Commands::Status::List.dispatch
        say Commands::Status::Card.dispatch
      end

      desc 'cleanup',
           'Removes all local data.'
      def cleanup
        if yes?('This will remove all local data, are you sure?')
          Ohm.redis.flushdb
          say 'All local data has been removed.'
        end
      end

      desc 'version',
           'Print the version.'
      def version
        say "troo #{Troo::VERSION}"
      end

      desc 'show [board|list|card|comments] <id>',
           'Show the board, list, card with <id>. Also, show all ' \
           'comments for card with <id>.'
      subcommand :show, CLI::Show

      desc 'add [board|list|card|comment] <id>',
           'Add board, list, card or comment.'
      subcommand :add, CLI::Add

      desc 'default [board|list|card] <id>',
           'Set board, list or card to be default.'
      subcommand :default, CLI::Default

      desc 'refresh [board|list|card] <id>',
           'Refresh board, list or card with <id>.'
      subcommand :refresh, CLI::Refresh
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
troo-0.0.8 lib/troo/cli/main.rb