Skip to content

Refactor

Sam Galson requested to merge yld/pubsweet-cli:refactor/db-manager into master

The changes are too many and small at the implementation level, but the main effects are as follows:

  • Tests divided into two 1) those in 'integration.js', which run pubsweet commands. These are much faster than before but still quite slow. 2) the rest, which test the same code but mock out slow functions. We maybe need to discuss if this is the best approach
  • Commands must be run in an app directory (except new) and do not take path argument
  • Pubsweet secret is added to config/local.json as we are supposed to be relocating secrets to there going forward (the changes also fix pubsweet#22 (closed)). It is now accessed under 'pubsweet-server'.secret.
  • Forever watches config by default
  • e2e tests have been removed with the expectation they'll go into the app
  • dbPath is now required in config (no default other than what you get in the config with the skeleton app)
  • run has been renamed start
  • set the environment with NODE_ENV, not the --dev flag
Edited by Sam Galson

Merge request reports