lib/troo/cli/add_cli.rb in troo-0.0.4 vs lib/troo/cli/add_cli.rb in troo-0.0.5
- old
+ new
@@ -8,12 +8,12 @@
def board(name = nil, description = nil)
if name.nil?
name = ask("Please enter a name for this board:")
end
- if result = Troo::CreateBoard.with(name, description)
- say "New board '#{result.name}' created."
+ if result = CreateBoard.with(name, description)
+ say "New board '#{result.decorator.name}' created."
else
say "Board could not be created."
end
rescue Troo::InvalidAccessToken
say "Your Trello access credentials have expired, please renew and try again."
@@ -24,13 +24,13 @@
def card(list_id, name = nil, description = nil)
if name.nil?
name = ask("Please enter a name for this card:")
end
- if list = Troo::ListRetrieval.retrieve(list_id)
- if result = Troo::CreateCard.for(list, name, description)
- say "New card '#{result.name}' created."
+ if list = ListRetrieval.retrieve(list_id)
+ if result = CreateCard.for(list, name, description)
+ say "New card '#{result.decorator.name}' created."
else
say "Card could not be created."
end
else
say "Card could not be created, as list was not found."
@@ -44,12 +44,12 @@
def comment(card_id, comment = nil)
if comment.nil?
comment = ask("Please enter a comment:")
end
- if card = Troo::CardRetrieval.retrieve(card_id)
- if Troo::CreateComment.for(card, comment)
+ if card = CardRetrieval.retrieve(card_id)
+ if CreateComment.for(card, comment)
say "New comment created."
else
say "Comment could not be created."
end
else
@@ -64,12 +64,12 @@
def list(board_id, name = nil)
if name.nil?
name = ask("Please enter a name for this list:")
end
- if board = Troo::BoardRetrieval.retrieve(board_id)
- if result = Troo::CreateList.for(board, name)
- say "New list '#{result.name}' created."
+ if board = BoardRetrieval.retrieve(board_id)
+ if result = CreateList.for(board, name)
+ say "New list '#{result.decorator.name}' created."
else
say "List could not be created."
end
else
say "List could not be created, as board was not found."