lib/trello_flow/main.rb in trello_flow-1.1.0 vs lib/trello_flow/main.rb in trello_flow-1.2.0
- old
+ new
@@ -12,16 +12,16 @@
card = find_or_create_card(name)
end
checklist = card.find_or_create_checklist
item = checklist.select_or_create_item(name)
- item.assign(username)
+ item.assign(current_user)
Branch.from_item(item).checkout
end
def open
- Branch.current.open_trello(username)
+ Branch.current.open_trello(current_user)
end
def finish
branch = Branch.current
branch.push
@@ -48,13 +48,13 @@
list = Table.pick(board.lists)
list.cards.create name: Cli.ask("Input card title [#{name}]:").presence || name
end
def pick_existing_card
- Table.pick Api::Card.for(username)
+ Table.pick Api::Card.for(current_user)
end
- def username
- @_username ||= Api::Member.current.username
+ def current_user
+ @_current_user ||= Api::Member.current
end
end
end