Add date argument to log command#86
Conversation
|
Huh, just realised this doesn't actually work correctly. I had been testing with 'yesterday', but that was just a fluke because the Line 127 in cea2bbe Assuming I need to get |
Adds an optional date argument to the `log` command that can be specified just before the task alias. Some examples from @skoppelmanCC: hcl log yesterday @documentation +2 Ran spellcheck hcl log 3 days ago @wireframes +3.5 hcl log last friday @admin +1 filed timesheets Commands#log: Copy over the contents of `Commands#start` and replace `task.start` with `task.add`. This allows us to log the time without actually starting a timer (and thus having to subsequently stop that timer). command_test.rb(#test_start): Update expected method call arguments with `spent_at`. Now that we're passing in `spent_at`, the expected arguments should include it. command_test.rb(#test_log_failure): Delete this test because I've rewritten the `Commands#log` method to no longer use timers. utility_test.rb: Add tests for `#get_date` Fixes zenhob#83.
5045d9a to
873325e
Compare
|
Came up with a new mechanism for doing logging and handling past dates. This duplicates the work of With this latest change, I've duplicated most of the contents of |
Adds an optional date argument to the
logcommand that can bespecified just before the task alias.
Some examples from @skoppelmanCC:
command_test.rb(#test_start):
Update expected method call arguments with
spent_at. Now that we'repassing in
spent_at, the expected arguments should include it.utility_test.rb: Add tests for
#get_dateFixes #83.