Guld app, filling in the gaps with our gapp.
There are two types of tests, attended and unattended. The latter is normal, automatable unit testing. The prior involves very long tasks and password entry, especially for key generation.
npm run test-attended
# or
npm run test
This library uses es6, and requires babel to be run before node, or mocha can import it. The test scripts in package.json
do this automatically.
npm run build
const gapp = require('gapp')
var perspective = new gapp.perspective.Perspective()
Initialization is a complex process, behind the scenes.
- initialize new git repo at
~/blocktree/
- make
~/blocktree/life/${name}/gap.json
- import or generate PGP key
- export PGP public key to
~/blocktree/keys/pgp/${name}.asc
- log user into github once, to generate re-usable OAUTH token
- Encrypt token and store in
~/blocktree/config.json
- add
~/blocktree/.gitignore
withconfig.json*
- Commit all of the above.
- Push to your github
From code, initialization is quite easy, at least in theory.
const gapp = require('gapp')
gapp.perspective.Perspective.init(
github_username,
github_password,
email,
fingerprint
)
An encrypted config file is managed by the program, kept in ~/blocktree/config.json
. By default, this file is ignored by git. This file can be used for keeping secrets needed at runtime, such as authentication tokens for github and other services.