-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ConsoleFormatter's context configurable #130
Comments
Thanks for the suggestion! I'm interested in this idea. What do you think the configuration syntax for this would look like? Is it something the user will put in their |
Actually, I guess the answer is "neither" since this is intended for users who are not using Capistrano. In that case could you provide an example of what this configuration would look like with plain SSHKit or something like runbook? |
Right. So this is how Runbook currently initializes Airbrussh through SSHKit: If Airbrussh took a I believe the configuration could analogously be applied to the https://github.com/mattbrictson/airbrussh#configuration The syntax in the Airbrussh::Formatter initializer case would be:
And in the Capistrano case would be:
I'd be happy to throw together a PR |
Makes sense. Thanks for the writeup.
Yes please! 🙏 |
Fixed via #131 |
Right now Airbrussh, provides an
Airbrussh::Rake::Context
. This Context is used in theConsoleFormatter
and provides the following interface:current_task_name
,register_new_command
, andposition
. In the context of Capistrano, this context is enabled. When a new task is started, the current task changes and the history is reset. Outside the context of Capistrano, when using SSHKit directly,current_task_name
always returnsnil
andposition
becomes an incrementing number for the entirety of execution.It would be useful if
Airbrussh::Rake::Context
was abstracted so that a context could be set using configuration. This way SSHKit executors that do not use Capistrano/Rake (e.x. https://github.com/braintree/runbook) could define their own implementations ofcurrent_task_name
,register_new_command
, andposition
.The text was updated successfully, but these errors were encountered: