feat(make): cli depends on API, generically

This allows us to build efficiently. CLI programs can now have their
own cmn.rs implementation, which we can test standalone with
`cargo test`.

The primary makefile currently just explicitly pulls in the type-*.yaml,
one day we could possibly put it into a loop.

Fixes #11
This commit is contained in:
Sebastian Thiel
2015-03-24 12:55:24 +01:00
parent caaf62e51d
commit cefd606b53
37 changed files with 3014 additions and 2483 deletions

1
src/rust/api/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod cmn;

0
src/rust/cli/cmn.rs Normal file
View File

1
src/rust/cli/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod cmn;

View File

@@ -9,13 +9,14 @@ extern crate "yup-oauth2" as oauth2;
extern crate serde;
// just pull it in the check if it compiles
mod cmn;
mod api;
mod cli;
/// This module is for testing only, its code is used in mako templates
#[cfg(test)]
mod tests {
mod test_api {
extern crate "yup-hyper-mock" as hyper_mock;
use super::cmn::*;
use super::api::cmn::*;
use self::hyper_mock::*;
use std::io::Read;
use std::default::Default;