* FEATURE: add --tags and --skip-tags options
Allow config manifests to be tagged, so a pups run can apply a subset of run commands.
Update to ruby 3.2.
Lots of linting. Added rubocop lint exception for Eval.
Fixing test imports, update MiniTest::Test -> Minitest::Test.
The --gen-docker-env-args argument makes pups process any template
environment variables and generate the command line arguments suitable
for the docker run command. The intention is to expand support for
configuring container runtime into pups such that configuration
templates can be more generally useful.
Bash special characters are safely escaped. This prevents issues where
variables contain special characters that are parsed by the calling shell.
A script which uses the pups output may have unexpected side effects
without escaping the special characters.
Note that only `env`, `label`, and `volume` config variables are escaped
as these are the most likely to contain special chacters. No attempt is
made to validate config variables against the allowed characters by
docker itself.
Other changes:
- Change some exit calls to return to prevent the tests prematurely
exiting.
There are use cases where we may want pups to ignore particular
configuration elements at runtime. For example, we may want to skip over
hooks in certain circumstances or define environment variables via the
process at runtime that are already defined in a template.
The follow example demonstrates the usage (note the last log line):
```
$ cat /tmp/test.yml
env:
MY_VAR: a_word
run:
- exec: 'echo repeating $MY_VAR'
$ bin/pups --ignore env /tmp/test.yml
I, [2021-06-09T12:03:46.864770 #30369] INFO -- : Reading from /tmp/test.yml
I, [2021-06-09T12:03:46.865009 #30369] INFO -- : > echo repeating $MY_VAR
I, [2021-06-09T12:03:46.865824 #30369] INFO -- : repeating
$ bin/pups /tmp/test.yml
I, [2021-06-09T12:03:50.694739 #30380] INFO -- : Reading from /tmp/test.yml
I, [2021-06-09T12:03:50.694980 #30380] INFO -- : > echo repeating $MY_VAR
I, [2021-06-09T12:03:50.695730 #30380] INFO -- : repeating a_word
```
This will become more useful once the docker run argument generation
functionality is implemented. For example, options like `expose` may
want to be ignored if pups is being used to generate runtime arguments
for more the one container on the same machine (as published port numbers
cannot overlap between containers). Without the `--ignore` lever, all
runtime arguments will be produced all the time which limits use cases.
Change to proper argument handling in preparation of adding
new command-line arguments to the pups CLI.
Tests added arguments parsing and also for when a file is
specified (not stdin).