Skip to content

Latest commit

 

History

History
89 lines (57 loc) · 3.14 KB

binstubs.md

File metadata and controls

89 lines (57 loc) · 3.14 KB

Binstubs Overview

The primary objective of these binstubs is to standardize core development commands, such as setup, testing, or linting. Most binstubs come with a --help option that outputs the manual for that binstub.

Run bin/setup before running other binstubs

for more information about running vets-api: Running with Binstubs

Setup

bin/setup 
  • Replaces the existing manual setup setups by combining most of them into one command with minimal prompts (Currently only supports Mac OSX)
  • Some setup steps must be done manually such as Postgres & PostGIS for native
  • bin/setup for native, docker, and hybrid developer setup
  • Setups include native,docker,hybrid, or base

for more information about setup: Setup with Binstubs

Test

bin/test 
  • Replace existing testing command(s)
  • Options include --ci, --parallel, --coverage, --log
  • Input folders/files can be include like with rspec

Note: pry is not supported. Consider pry alternative: debugger

Note: parallel can produce false failures. This issue is being investigated

Lint

bin/lint 
  • Combines linting, security checks, and CODEOWNERS check found in the CI
  • Uses rubocop, brakeman, and bundle-audit
  • Options include --dry,--only-rubocop,--only-brakeman
  • Inputs can include files and folder
  • Autocorrecting in rubocop is on by default, but --dry will override autocorrect option

Docker

bin/docker
  • Provides common Docker-related commands for managing Docker containers and images
  • Commands include but not limited to:
    • clean: Prunes unused Docker objects and rebuilds the images.
    • rebuild: Stops running containers and builds the images without cache.
    • build: Stops running containers and builds the images with cache.
    • db: Prepares the database for development and test environments.

Others

  • bin/help - Display vets-api related binstub manual
  • bin/info - Display version related information
  • bin/dev - Starts the server (or containers)

The output from bin/info may be use for support requests

FAQ

Setup Preference

Your setup preference is stored in the root file .developer-setup. Test, lint, and dev binstubs rely on the stored preference to determine how to run the tests. If you plan on testing and linting with vets-api, native is strongly recommended.

Switch Setups

Let's say you want to switch from native setup to docker setup. All you need to do is run the setup binstub with the desired option, in this case: bin/setup --docker.

Running old commands

If you need to run a docker command like docker system prune or you want to run rubocop -A, you are still able to use any other command you would have used before.

Reporting Issues

Please contact support with any issues that can't be resolved using: