| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch renames the options for the config set command:
--numlock ==> --num-lock
--capslock ==> --caps-lock
--scrolllock ==> --scroll-lock
--no-numlock ==> --no-num-lock
--no-capslock ==> --no-caps-lock
--no-scrolllock ==> --no-scroll-lock
The original naming was based on a typo in nitrokey-rs (scrollock vs.
scrolllock). Also, the typical spelling for the keys is Num Lock, Caps
Lock and Scroll Lock, so using a hyphen is a more natural.
|
|
|
|
|
|
|
|
| |
In the future we would like to provide more ways for tests to create a
Nitrocli instance. In order to prevent explosion of with_XXX methods for
each possible combination of arguments, this change allows for an easier
configuration of an existing object with builder-pattern-inspired
modifier methods.
|
|
|
|
|
|
|
|
| |
With this change we switch to using a REUSE compliant way of specifying
the copyright & license of the program. To be fully in conformance we
also add additional license specifications for the remaining files in
the project. Lastly, a new CI pipeline rule takes care of verifying
compliance on an ongoing basis.
|
|
|
|
|
| |
This change adjusts the copyright header in all files to no longer
mention individuals but refer to The Nitrocli Developers in general.
|
|
|
|
|
|
|
| |
In the past we were using an application global custom Result type
definition. This makes less sense now that we switched over to using
anyhow's Error and Result types. We kept that for the time being, but
with this change we remove the type and use anyhow::Result instead.
|
|
|
|
|
|
|
|
|
|
| |
With upcoming changes we intend to move towards a model where we do not
distinguish the individual error variants the program deals with in a
global enum.
In preparation of such a change, this patch marks a first step in
removing the UnwrapError test trait, which relies on the existence of
exactly such typed errors. In particular, we remove the unwrap_str_err
method from it, basically falling back to just working with strings.
|
|
|
|
|
|
|
|
|
|
| |
The -o/--otp-pin and -O/--no-otp-pin options to the config set command
are supposed to be mutually exclusive, with wrong usage detected by
structopt.
That is not the case currently, however, because the argument to
structopt's conflicts_with attribute is supposed to be the resulting
option and not the name of the variable capturing the result.
This change fixes the problem by changing the string accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the argument handling code to use structopt instead
of argparse using the data structures we introduced in the last patch.
As part of that transition we replace the old Error::ArgparseError
variant with ClapError that stores a structopt::clap::Error.
Because of that replacement, the format of the help messages changed,
breaking some of the tests. Hence, this change adapts them accordingly.
Also clap currently prints the version output to stdout, so we ignore
the version_option test case for now.
|
|
Now that all vendored dependencies have been removed, this change moves
the program's source code from the nitrocli/ directory into the root of
the repository.
|