Krikri::PluginHelpers::GemCommand
GemCommand - pure logic for building gem install/gem uninstall
command lines. No I/O here - the plugin itself runs the resulting
commands. Verified against real community.general gem.py's CmdRunner
arg_formats/args_order (flag order included), and against the argv a
logging shim observed real ansible-playbook feed gem (the joined
argv is what a run_command failure reports as its cmd - krikri
shells these through bash, so the strings here must both work as
shell and READ like ansible's space-joined argv, hence the unquoted
--version/name pattern: gem versions and names carry no shell
metacharacters).
Class methods
Real community.general gem.py's get_installed_versions parser for
gem list / gem list --remote output: each line matching
/\S+\s+((?:default: )?(.+))/, versions split on ", ", and only
the first token of each kept (strips platform suffixes like
"x86_64-linux"). The module's idempotency check is an exact-string
membership test of the version param against this list.