Docker is a well known application which ease the creation of Linux containers.
Fig is a docker orchestration tool which helps you (a lot) in the management of containers.
Now let's say you're using Sublime Text as IDE and you're writing tests using the RubyTest Sublime Text plugin (so for Ruby but should work the same for other languages) and you would like to use Docker in order to containerise your application.
To do so you've updated the RubyTest configuration in order to use
fig run web ... .
You will have the issue that Sublime Text is not able to show you the output from the container accessed using Fig, in the console window, as Fig is streaming the output in a way that Sublime Text can't handle.
I have written this small Ruby script which will catch the stream from Fig and print it to the stdout in a way that makes Sublime Text to work as expected.
Create a file named
fig-to-sublimein a folder included in your
$PATHand copy/past the following:
Make it executable:
chmod +x /path/to/fig-to-sublime
RubyTest.sublime-settingsfile as the following:
Run your tests :)