Cruftman

TODO: Introduction is coming soon…

Installing Cruftman

Use composer to install the cruftman project.

1
composer create-project "cruftman/cruftman:dev-master"

Note

We have not released Cruftman yet, so it’s only installable from github.

Developer Guide

This guide is intended for Korowai Framework contributors.

Cruftman developer’s notes

Must-have software

These are required to do initialize stuff

These are highly recommended for behavioral testing, generating docs, etc.

Initial preparations

If you’ve just cloned the project, then

1
2
3
composer install --dev                 # installs required PHP packages
php docker/initialize                  # initializes docker settings in docker/.env
cp homestead/Homestead.yaml{.example,} # and edit homestead/Homestead.yaml to adjust its settins to your needs

More information:

Running unit tests

1
php vendor/bin/phpunit

Starting interactive PHP shell

1
php vendor/bin/psysh

Running integration tests

1
docker/compose run --rm test vendor/bin/behat

Testing examples in documentation

1
docker/compose run --rm test vendor/bin/behat -c docs/behat.yml

Running CodeClimate

1
docker/codeclimate run --rm codeclimate analyze

Generating user documentation

1
docker/docs run --rm sphinx build

The generated API docs go to docs/build/html/.

Generating API documentation

1
docker/docs run --rm sami build

The generated API docs go to docs/build/html/api/.

Generating and serving documentation continuously

1
docker/docs up

The generated docs go to docs/build/html and get exposed at

  • http://localhost:8002 -> sphinx docs (user manual, etc),
  • http://localhost:8001 -> sami docs (PHP API)

Generating user documentation continuously

1
docker/docs up sphinx

The generated docs go to docs/build/html and get exposed at

  • http://localhost:8002.

Generating API documentation continuously and serving via HTTP

1
docker/docs up sami

The generated API docs go to docs/build/html/api/ and get exposed at

  • https://localhost:8001.

Indices and tables