We have a notion of what we want the CLI script behavior for bd to be; it's basically this:
Usage: bd [options]
-r, --repo REPO Repository passed to 'git clone' command on deployment host [REQUIRED]
-b, --branch BRANCH Branch name to deploy [REQUIRED]
--host HOSTNAME Target host for remote deployment [REQUIRED, or --local]
-l, --local Deploy to the local host (default: false) [REQUIRED, or --host]
-p, --path PATH Deployment path on target host [REQUIRED]
-d, --diff Return diff output for proposed changes, do not deploy (default: true)
-c, --confirm Confirm deployment -- actually update files (default: false)
-s, --ssh-options OPTIONS Flags passed to the 'ssh' command for remote deployment (default: "")
-t, --temp-path Base path for tempdir creation on deployment host (default: OS default)
-v, --verbose Run verbosely
Here we start from this, as documented in the README, to develop the CLI option semantics via README driven development and BDD
the work
[x] specify a candidate CLI interface
[x] update the README to document this
[x] bring in optparse
[x] build optparse handler to capture and enforce required options
[x] further tweak rubocop
[x] it wouldn't hurt to get guard in here
[x] add pre-commit hook (part of script/bootstrap) to run rubocop before committing
[x] continue red-green-refactor cycle on enforcing CLI options
We have a notion of what we want the CLI script behavior for
bd
to be; it's basically this:Here we start from this, as documented in the README, to develop the CLI option semantics via README driven development and BDD
the work
guard
in here