calendar-assistant
calendar-assistant copied to clipboard
refactor the user interactions in "setup" and "authorize"
Currently "setup" interaction code is embedded in cli.rb
And "authorize" interaction code is embedded in authorizer.rb
They're both probably wrong:
- Authorizer doesn't have access to CLI Helpers like
Out#puts
and#prompt
- CLI shouldn't have such complex code in it. Ideally it has one branch and calls out to methods for everything
I think this probably means introducing a new class of some kind to do this work. Or maybe just jam more methods into CLIHelpers.
Would be you happy with an approach where a lot of the code in commands.rb end up in individual classes that get called? (ex. commands/setup.rb)