Remove Colsole and Exec modules #46
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a few breaking changes.
Quick fix
In order to still have the deprecated commands included, add this to the top of your Runfile.
and you are done. Note that this file will be removed in future versions, so for a more permanent fix, read on.
The Colsole gem is no longer bundled with Runfile
If you are using any of the Colsole commands (such as
say,resay,word_wrap,terminal_width) in your current Runfiles, you shouldrequireandincludeColsole in your Runfile:All command execution helpers were removed
If you were using any of the
run,run_bgor similar in your Runfile, these commands are removed.If you wish to still use them, feel free to copy them from here.
Why is this a good thing?
Both of these modules introduced some global functions, some with common names (such as
colorsin Colsole, orrunin the Exec module). These functions contaminated downstream code. While for the most part, it was unnoticeable, it reduces the productivity and simplicity of Runfile.Additional developer notes
saycalls inside the runfile library were replaced with a plain ol'putsword_wrapmethod from Colsole is still needed by runfile, so it was added as a string refinement.terminal_width(and a couple of other) methods from Colsole are still needed by runfile, so they were added to a new static helper class:Terminal