lib/totrello.rb in totrello-0.1.8 vs lib/totrello.rb in totrello-0.1.9
- old
+ new
@@ -31,14 +31,16 @@
todo = ToDoFind.new
todos = todo.search(@directory)
puts "Woot! We've got'em"
puts 'Generating your board'
+ board_name = todos[:directory].nil? ? todos[:directory] : dir.split('/').last
+ puts "Creating the board: #{board_name}"
begin
- board = @trello.find_board(todos[:directory])
+ board = @trello.find_board(board_name)
rescue
- board = @trello.create_board(todos[:directory], 'Auto Generated by ToTrello Gem')
+ board = @trello.create_board(board_name, 'Auto Generated by ToTrello Gem')
end
puts "Created or found a board: #{board.name}"
@@ -50,9 +52,10 @@
@trello.create_card(board,td, gen_description(tdl[:file],td),'To Do') unless td == ''
end
end
puts "And you're ready to go!"
end
+
def test_find_todo_items
todo = ToDoFind.new
todos = todo.search(@directory)