Skip to content
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

Allow ConsoleFormatter context to be configurable #131

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

pblesi
Copy link
Contributor

@pblesi pblesi commented Oct 8, 2019

This allows for custom definitions of how context is defined for
executing commands. A passed in context class should implement the following interface:

  • current_task_name: The currently executing task
  • register_new_command: A new command within the current task
  • position: The numerical position of the current command

See #130 for more context.

This allows for custom definitions of how context is defined for
executing commands. A passed in context class should implement the following interface:

* `current_task_name`: The currently executing task
* `register_new_command`: A new command within the current task
* `position`: The numerical position of the current command
@mattbrictson mattbrictson added the ✨ Feature Adds a new feature label Oct 10, 2019
@mattbrictson mattbrictson changed the title Let ConsoleFormatter context be configurable Allow ConsoleFormatter context to be configurable Oct 10, 2019
Copy link
Owner

@mattbrictson mattbrictson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect PR, thanks! And congrats on your first contribution to the project! ✨

@@ -65,6 +65,7 @@ Here are the options you can use, and their effects (note that the defaults may
|`banner`|`nil`|Provide a string (e.g. "Capistrano started!") that will be printed when Capistrano starts up.|
|`color`|`:auto`|Use `true` or `false` to enable or disable ansi color. If set to `:auto`, Airbrussh automatically uses color based on whether the output is a TTY, or if the SSHKIT_COLOR environment variable is set.|
|`command_output`|`true`|Set to `:stdout`, `:stderr`, or `true` to display the SSH output received via stdout, stderr, or both, respectively. Set to `false` to not show any SSH output, for a minimal look.|
|`context`|`Airbrussh::Rake::Context`|Defines the execution context. Targeted towards uses of Airbrussh outside of Rake/Capistrano. Alternate implementations should provide the definition for `current_task_name`, `register_new_command`, and `position`.|
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great documentation, thanks! 😍

@mattbrictson mattbrictson merged commit a05b3f1 into mattbrictson:master Oct 10, 2019
@mattbrictson
Copy link
Owner

I will probably release this sometime next week, as part of 1.4.0.

@pblesi
Copy link
Contributor Author

pblesi commented Oct 10, 2019

Yay, Thanks!

@mattbrictson
Copy link
Owner

Released! 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants