borkweb / products-test-automation

Other
3 stars 0 forks source link

feat(tric) add using path support #49

Closed lucatume closed 4 years ago

lucatume commented 4 years ago

Screencap

This PR adds support for the tric using <path> query command.

This is just sugar around using tric using to visually match the current working directory.

In plain English it's the equivalent of "Am I using this directory currently?"

tric using $(pwd)

I've also fixed the help messages that would report the full path to the tric binary in messages creating a lot of visual noise.

In the context of this fix I've also created a volume to store function-mocker cache across test runs of the codeception service and cut a good 10s from each test run. The caching can take something like 20s from a cold start and it will drop to 3-5 seconds from a warmed-up volume.

borkweb commented 4 years ago

I'm unsure of whether or not tric using [path] will be super useful. It requires more typing than just doing tric using which tells the plugin and the full path to said plugin. I wonder if a better approach would be to add some extra output to tric using that indicates if your current pwd is (or a child or immediate parent of) the path being used.

borkweb commented 4 years ago

The function-mocker cache and the $cli_name change is wonderful!

lucatume commented 4 years ago

I'm unsure of whether or not tric using [path] will be super useful. It requires more typing than just doing tric using which tells the plugin and the full path to said plugin. I wonder if a better approach would be to add some extra output to tric using that indicates if your current pwd is (or a child of) the path being used.

This is a good point. I guess I move from my comfortable usage of tric using $(pwd), but that might not be everyone's custom. I'm, in general, in favour of anything that requires less typing, so I will move forward with more output in the tric using message and push.