lib/troo/cli/main.rb in troo-0.0.9 vs lib/troo/cli/main.rb in troo-0.0.10

- old
+ new

@@ -1,21 +1,8 @@ module Troo module CLI class Main < ThorFixes - desc 'init', - 'Prepare to use Troo.' - def init - if File.exist?(destination) - say 'A configuration file already exists in your home ' \ - 'directory.' - else - say 'A configuration file does not exist in your home ' \ - 'directory, creating one...' - FileUtils.cp(source, destination) - end - end - desc 'status', 'Get troo status.' def status say heading('Status:') say Commands::Status.dispatch(Troo::Board) @@ -66,29 +53,21 @@ 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>.' + desc 'refresh [all|board|list|card] (<id>)', + 'Refresh all local data or board, list or card with <id>.' subcommand :refresh, CLI::Refresh desc 'move <card_id> <list_id> (<board_id>)', 'Move card with <card_id> to list with <list_id> ' \ 'optionally to another board with <board_id>.' def move(card_id, list_id, board_id = nil) say Commands::Move::Card.dispatch(card_id, list_id, board_id) end private - - def source - File.dirname(__FILE__) + '/../.trooconf.example' - end - - def destination - Dir.home + '/.trooconf' - end def heading(text = '') [Esc.yellow, Esc.underline, text, Esc.reset].join end end