libedgegrid 0.0.1

This library implements an Authentication handler for the Akamai OPEN EdgeGrid Authentication scheme in Rust
include!(concat!(env!("OUT_DIR"), "/version.rs"));

#[cfg(unix)]
fn verbose_ver() -> String {
    format!("\x1b[32;1mlibedgegrid {}\x1b[0m ({} {}) (built {})\n\
             commit-hash: {}\ncommit-date: {}\n\
             build-date: {}\nhost: {}\nrelease: {}",
            semver(), short_sha(), commit_date(), short_now(),
            sha(), commit_date(), short_now(), target(), semver())
}

#[cfg(windows)]
fn verbose_ver() -> String {
    format!("libedgegrid {} ({} {}) (built {})\n\
             commit-hash: {}\ncommit-date: {}\n\
             build-date: {}\nhost: {}\nrelease: {}",
            semver(), short_sha(), commit_date(), short_now(),
            sha(), commit_date(), short_now(), target(), semver())
}

#[cfg(unix)]
fn ver() -> String {
    format!("\x1b[32;1mlibedgegrid {}\x1b[0m ({} {}) (built {})",
            semver(), short_sha(), commit_date(), short_now())
}

#[cfg(windows)]
fn ver() -> String {
    format!("libedgegrid {}[0m ({} {}) (built {})",
            semver(), short_sha(), commit_date(), short_now())
}

pub fn version(verbose: bool) -> String {
    match verbose {
        true  => verbose_ver(),
        false => ver(),
    }
}