subcomponent 0.1.0

A components orchestrator
# Subcomponent

[![Build Status](https://travis-ci.org/subcomponent/subcomponent.svg?branch=master)](https://travis-ci.org/subcomponent/subcomponent)

Subcomponent is a *components orchestrator*. You define components as being
opaque projects that can be retrieved using various methods (git, svn,
download, ...).  Components can express dependencies between each other. This
allows to run user-defined commands in a specific order.

This is expressed in the subcomponent description language:

```subcomponent
subcomponents {
    my-lib-component {
        path: "where/the/lib/will/be/downloaded";
        name: "My Lib";

        fetch {
            git {
                url: "git://example.com/repo.git",
                     "https://example.com/repo.git",
                     "https://example-backup.com/repo.git";
                branch: "dev";
                shallow: true;
            }
        }
    }

    xen {
       name: "Xen";
       path: "xen-4.8.0";

       fetch {
          artifact {
             url: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz";
             compression: "tar", "gz";
             pgp-signature: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz.sig";
             pgp-pubkey: "83FE14C957E82BD9";
          }
       }
    }
}
```



## TODO List

- [ ] Dependencies between components
- [ ] status command
- [ ] Definition of command hooks
- [ ] gzip unpacker
- [ ] xz unpacker
- [ ] Booleans should be handled by the lexer, not by the parser


## Documentation

[Sphinx](http://www.sphinx-doc.org/en/stable/) is used to generate the
documentation, so you first need to have it installed:

```bash
pip install sphinx
```

Then, to generate the HTML documentation, you can just run the following:

```bash
make -C doc html man
```

The HTML documentation will be available in `docs/_build/html/`.
The manual page of subcomponent will be in `docs/_build/man`.


## Tests

Subcomponent prefers to develop system tests instead of unit tests. You can run
unit tests via `cargo`:

```bash
cargo test
```

System tests rely on [robotframework](http://robotframework.org/), so you
first need to make sure that this python module is installed:

```bash
pip install robotframework
```

The following commands are available

```bash
make -C tests unit-tests        # Run unit tests in release
make -C tests system-tests      # Run system tests in release
make -C tests                   # Run all the tests in release
```

Please report failing tests!

## Continuous Integration

We use [travis](https://travis-ci.org/subcomponent/subcomponent) to check that
upstream code pass the implemented tests.

## License

Subcomponent is MIT-licensed. See the `LICENSE` file for more details.