Support falling back to ruby version of checkers
Rename the ruby scripts to have -ruby
suffix and add a symlink for both to ./gitlab-shell
. The executable name will be used to determine how args will be parsed.
For now, we only parse the arguments for gitlab-shell commands. If the executable is gitlab-shell-authorized-keys-check
or gitlab-shell-authorized-principals-check
, it'll always fallback to the ruby version.
Ruby specs test the ruby script, the fallback from go to ruby and go implementation of both (still pending).
This also includes adding support to different CommandArgs
types. For now, we only have commandargs.Shell
(we'll have commandargs.AuthorizedKeys
and commandargs.AuthorizedPrincipals
later on). This is needed as different executables (gitlab-shell
, gitlab-shell-authorized-keys-check
, gitlab-shell-authorized-principals-check
) expect different formats of arguments.