From 4e2e58678317f9074b7099a43f997745a7857db4 Mon Sep 17 00:00:00 2001 From: Russell Mackenzie Date: Wed, 24 Jan 2018 00:06:30 +0000 Subject: [PATCH] pg-to-git: retrieve tags from git for releases page. pg-to-git: add project-manager tool. Fix sql drop not null. Update all crates. Gotham replaces sparkles. Add cache. Removed tools. Update gotham to 0.2.0. Re-introduce maintenance bin. Re-introduce project-manager bin. Prepare for multiple projects. Update clap. Include title images. --- .gitignore | 2 + Cargo.lock | 1454 ++++++++++------- Cargo.toml | 90 +- build.rs | 21 - .../down.sql | 2 +- .../down.sql | 2 + .../up.sql | 2 + public/{ => images}/tile-wide.png | Bin public/{ => images}/tile.png | Bin src/authors.rs | 177 -- src/bin/maintenance.rs | 12 +- src/bin/new-release.rs | 86 - src/bin/opt-out.rs | 53 - src/bin/populate.rs | 211 --- src/bin/project-manager.rs | 118 ++ src/bin/the-big-red-button.rs | 121 -- src/bin/update-commit-db.rs | 110 -- src/bin/visible.rs | 54 - src/commits.rs | 21 - src/lib.rs | 77 +- src/mailmap.rs | 20 +- src/main.rs | 578 ++++++- src/models.rs | 8 +- src/projects.rs | 48 +- src/releases.rs | 343 ++-- src/schema.rs | 54 +- 26 files changed, 1872 insertions(+), 1792 deletions(-) delete mode 100644 build.rs create mode 100644 migrations/20180315213800_add_dir_path_to_projects/down.sql create mode 100644 migrations/20180315213800_add_dir_path_to_projects/up.sql rename public/{ => images}/tile-wide.png (100%) rename public/{ => images}/tile.png (100%) delete mode 100644 src/authors.rs delete mode 100644 src/bin/new-release.rs delete mode 100644 src/bin/opt-out.rs delete mode 100644 src/bin/populate.rs create mode 100644 src/bin/project-manager.rs delete mode 100644 src/bin/the-big-red-button.rs delete mode 100644 src/bin/update-commit-db.rs delete mode 100644 src/bin/visible.rs delete mode 100644 src/commits.rs diff --git a/.gitignore b/.gitignore index c5dd462..6dd2458 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ target .env +.*.swp + diff --git a/Cargo.lock b/Cargo.lock index 6562ee7..af67b71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,150 +1,175 @@ -[root] -name = "thanks" -version = "0.1.0" -dependencies = [ - "caseless 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_codegen 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "handlebars 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.0-a.0 (git+https://github.com/hyperium/hyper)", - "lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-term 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sparkles 0.1.0 (git+https://github.com/steveklabnik/sparkles)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "advapi32-sys" -version = "0.2.0" +[[package]] +name = "adler32" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "aho-corasick" -version = "0.5.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "aho-corasick" -version = "0.6.3" +name = "ansi_term" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "ansi_term" -version = "0.9.0" +name = "atty" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "antidote" -version = "1.0.0" +name = "backtrace" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "atty" -version = "0.2.2" +name = "backtrace-sys" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.4.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bincode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "0.7.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "0.8.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "byteorder" +name = "borrow-bag" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "build_const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytecount" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "byteorder" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.1" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cargo_metadata" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "caseless" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cc" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.2.25" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" -version = "2.21.1" +version = "2.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cmake" -version = "0.1.22" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -153,7 +178,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -161,238 +186,281 @@ name = "core-foundation-sys" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "crossbeam" -version = "0.2.10" +name = "crc" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "crypt32-sys" -version = "0.2.0" +name = "crossbeam" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "curl-sys" -version = "0.3.10" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "diesel" -version = "0.12.0" +name = "derive-error-chain" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pq-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "diesel_codegen" -version = "0.12.0" +name = "diesel" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "diesel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_infer_schema 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "dotenv 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel_derives 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pq-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "diesel_infer_schema" -version = "0.12.0" +name = "diesel_derives" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "diesel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dotenv" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", + "derive-error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "dotenv" -version = "0.9.0" +name = "dtoa" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "encoding_rs" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "dtoa" -version = "0.4.1" +name = "error-chain" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "foreign-types" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "futures" -version = "0.1.11" +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "futures-cpupool" -version = "0.1.4" +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "gcc" -version = "0.3.45" +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "gdi32-sys" -version = "0.2.0" +name = "futures-cpupool" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "git2" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "glob" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "gotham" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "borrow-bag 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gotham_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "handlebars" -version = "0.25.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_derive 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" -version = "1.2.1" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.10.5" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hyper" -version = "0.11.0-a.0" -source = "git+https://github.com/hyperium/hyper#8554904dc941a376b25fbcea85e828ea00c13402" -dependencies = [ - "base64 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "hyper-native-tls" -version = "0.2.2" +name = "hyper-tls" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "idna" -version = "0.1.0" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "iovec" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "isatty" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -411,102 +479,139 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "0.2.4" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.21" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libflate" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libgit2-sys" -version = "0.6.7" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libssh2-sys" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libz-sys" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "matches" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "0.1.11" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "memchr" -version = "1.0.1" +name = "mime" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "mime" -version = "0.2.3" +name = "mime_guess" +version = "2.0.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.5" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -517,108 +622,167 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "native-tls" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "openssl 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "net2" -version = "0.2.27" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num" -version = "0.1.37" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.33" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.33" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.37" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.3.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl" -version = "0.9.9" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-probe" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.9" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pest" -version = "0.3.3" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pest_derive" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_codegen" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_generator" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "pkg-config" @@ -627,12 +791,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pq-sys" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pulldown-cmark" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "quick-error" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -640,136 +823,170 @@ name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" -version = "0.3.15" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.16" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "regex" -version = "0.1.80" +name = "redox_termios" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.3.9" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "regex-syntax" -version = "0.4.0" +name = "relay" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "reqwest" -version = "0.4.0" +name = "remove_dir_all" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rustc-serialize" -version = "0.3.23" +name = "reqwest" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "rustc_version" -version = "0.1.7" +name = "safemem" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "schannel" -version = "0.1.4" +name = "same-file" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crypt32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "secur32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "scoped-tls" -version = "0.1.0" +name = "schannel" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "secur32-sys" -version = "0.2.0" +name = "scoped-tls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "security-framework" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "semver" -version = "0.1.20" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "semver" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -782,47 +999,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "0.9.11" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "serde_codegen_internals" -version = "0.14.1" +name = "serde_derive" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "serde_derive" -version = "0.9.11" +name = "serde_derive_internals" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_codegen_internals 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "0.9.9" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_urlencoded" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "siphasher" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "skeptic" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytecount 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -831,39 +1069,35 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "slog" -version = "1.5.2" +name = "slab" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "slog-extra" -version = "0.1.2" +name = "slog" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "slog-stream" -version = "1.2.0" +name = "slog-async" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-extra 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "take_mut 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "slog-term" -version = "1.5.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", - "isatty 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-stream 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "isatty 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -871,30 +1105,14 @@ name = "smallvec" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "sparkles" -version = "0.1.0" -source = "git+https://github.com/steveklabnik/sparkles#1eebd5c57d78298665a2e9fcd298bd45e6c3060b" -dependencies = [ - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "handlebars 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.0-a.0 (git+https://github.com/hyperium/hyper)", - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-term 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "strsim" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -902,6 +1120,16 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.12.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synom" version = "0.11.3" @@ -915,93 +1143,119 @@ name = "take" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "take_mut" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "tempdir" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "term_size" -version = "0.2.3" +name = "term" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "thread-id" -version = "2.0.0" +name = "termion" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "thread-id" -version = "3.0.0" +name = "textwrap" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "thanks" +version = "0.1.0" dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "caseless 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dotenv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "git2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gotham 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gotham_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "handlebars 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-async 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-term 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" -version = "0.1.36" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-core" -version = "0.1.6" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1009,15 +1263,15 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1026,43 +1280,55 @@ name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "traitobject" -version = "0.1.0" +name = "tokio-tls" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "typeable" -version = "0.1.2" +name = "toml" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "unicase" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "unicode-bidi" -version = "0.2.5" +name = "unicase" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "unicode-normalization" -version = "0.1.4" +name = "unicode-bidi" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "unicode-segmentation" -version = "1.1.0" +name = "unicode-normalization" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1075,9 +1341,14 @@ name = "unicode-xid" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unreachable" -version = "0.1.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1085,35 +1356,48 @@ dependencies = [ [[package]] name = "url" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "user32-sys" -version = "0.2.0" +name = "utf8-ranges" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "uuid" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "utf8-ranges" -version = "0.1.3" +name = "uuid" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "utf8-ranges" -version = "1.0.0" +name = "vcpkg" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vec_map" -version = "0.7.0" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1121,16 +1405,45 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -1141,137 +1454,172 @@ dependencies = [ ] [metadata] -"checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" -"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" -"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" -"checksum base64 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "065a0ce220ab84d0b6d5ae3e7bb77232209519c366f51f946fe28c19e84989d0" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e1ab483fc81a8143faa7203c4a3c02888ebd1a782e37e41fa34753ba9a162" -"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8" -"checksum bytes 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "46112a0060ae15e3a3f9a445428a53e082b91215b744fa27a1948842f4a64b96" -"checksum caseless 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8950b075cff75cdabadee97148a8b5816c7cf62e5948a6005b5255d564b42fe7" -"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" -"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00" -"checksum clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "74a80f603221c9cd9aa27a28f52af452850051598537bb6b359c38a7d61e5cda" -"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac" +"checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45" +"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859" +"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" +"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" +"checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" +"checksum bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0" +"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" +"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" +"checksum borrow-bag 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8cf5fa928e26316f52e1ce2afbcb7a0f8e28caa9e59e1a7e63d8d78d85ba56f" +"checksum build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9" +"checksum bytecount 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af27422163679dea46a1a7239dffff64d3dcdc3ba5fe9c49c789fbfe0eb949de" +"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" +"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" +"checksum cargo_metadata 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1f56ec3e469bca7c276f2eea015aa05c5e381356febdbb0683c2580189604537" +"checksum caseless 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3261638034d9db4f94a666ebb16494846341ae5a8456c05c1616d66980cf39a" +"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0" +"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" +"checksum clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc18f6f4005132120d9711636b32c46a233fad94df6217fa1d81c5e97a9f200" +"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" "checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" -"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" -"checksum crypt32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e34988f7e069e0b2f3bfc064295161e489b2d4e04a2e4248fb94360cdf00b4ec" -"checksum curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d909dc402ae80b6f7b0118c039203436061b9d9a3ca5d2c2546d93e0a61aaa" -"checksum diesel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18af4b9d51ba507c688c3e75a14c38d21410f2c41e9423ae829db7c77ccee136" -"checksum diesel_codegen 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e186258111a273698f926afae6f943a5b7bd2830bab3b60ecf14b02bd0a77714" -"checksum diesel_infer_schema 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "906d61691e013e00efdbff5269804b01e8f6547442ff5b841b8e37af94627374" -"checksum dotenv 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eea1395d2df3b5344dc577809296d9578303296e8d105c408aa80ed67d598ef1" -"checksum dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "400b347fe65ccfbd8f545c9d9a75d04b0caf23fec49aaa838a9a05398f94c019" -"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" -"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" -"checksum futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8e51e7f9c150ba7fd4cee9df8bf6ea3dea5b63b68955ddad19ccd35b71dcfb4d" -"checksum futures-cpupool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "257b356f43df6266091b58eadffbe881f053a8646c4a8ba9edce98d63814caab" -"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae" -"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" -"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2" -"checksum handlebars 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b2249f6f0dc5a3bb2b3b1a8f797dfccbc4b053344d773d654ad565e51427d335" -"checksum httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a6e7a63e511f9edffbab707141fbb8707d1a3098615fb2adbd5769cdfcc9b17d" -"checksum hyper 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)" = "43a15e3273b2133aaac0150478ab443fb89f15c3de41d8d93d8f3bb14bf560f6" -"checksum hyper 0.11.0-a.0 (git+https://github.com/hyperium/hyper)" = "" -"checksum hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afe68f772f0497a7205e751626bb8e1718568b58534b6108c73a74ef80483409" -"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" -"checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be" -"checksum isatty 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fa500db770a99afe2a0f2229be2a3d09c7ed9d7e4e8440bf71253141994e240f" -"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" +"checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7" +"checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" +"checksum curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f46e49c7125131f5afaded06944d6888b55cbdf8eba05dae73c954019b907961" +"checksum derive-error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92183014af72c63aea490e66526c712bf1066ac50f66c9f34824f02483ec1d98" +"checksum diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925325c57038f2f14c0413bdf6a92ca72acff644959d0a1a9ebf8d19be7e9c01" +"checksum diesel_derives 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28e2b2605ac6a3b9a586383f5f8b2b5f1108f07a421ade965b266289d2805e79" +"checksum dotenv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a70de3c590ce18df70743cace1cf12565637a0b26fd8b04ef10c7d33fdc66cdc" +"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" +"checksum encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98fd0f24d1fb71a4a6b9330c8ca04cbd4e7cc5d846b54ca74ff376bc7c9f798d" +"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum git2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4813cd7ad02e53275e6e51aaaf21c30f9ef500b579ad7a54a92f6091a7ac296" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum gotham 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b03128abbca7352079769c0ffcaebfc1563ef690622613abb759f795f587be9" +"checksum gotham_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d310018ef4eb6536b4972b1dc72aec0a33e5bff494e18038389ec64394fa692d" +"checksum handlebars 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07af2ff31f66f39a5c8b8b8a5dc02734a453110146763e3a2323f4931a915a76" +"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" +"checksum hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)" = "c4f9b276c87e3fc1902a8bdfcce264c3f7c8a1c35e5e0c946062739f55026664" +"checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985" +"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum isatty 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f2a233726c7bb76995cec749d59582e5664823b7245d4970354408f1d79a7a2" +"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7291b1dd97d331f752620b02dfdbc231df7fc01bf282a00769e1cdb963c460dc" -"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" -"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" -"checksum libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d951fd5eccae07c74e8c2c1075b05ea1e43be7f8952245af8c2840d1480b1d95" -"checksum libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "91e135645c2e198a39552c8c7686bb5b83b1b99f64831c040a6c2798a1195934" -"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum mio 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aa30e3753079b08ce3d75cf3b44783e36fe0e1f64065f65c1d894d1688fb2580" +"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" +"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" +"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121" +"checksum libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1a429b86418868c7ea91ee50e9170683f47fd9d94f5375438ec86ec3adb74e8e" +"checksum libgit2-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34aa558a4fc5e7f89cdb8e7e2b719126c44c31f0dd3945102d42b03490924cfe" +"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" +"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" +"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" +"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" +"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" +"checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" +"checksum mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130ea3c9c1b65dba905ab5a4d9ac59234a9585c24d135f264e187fe7336febbd" +"checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b805ee0e8fa268f67a4e5c7f4f80adb8af1fc4428ea0ce5b0ecab1430ef17ec0" -"checksum net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "18b9642ad6222faf5ce46f6966f59b71b9775ad5758c9e09fcf0a6c8061972b4" -"checksum num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40" -"checksum num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5" -"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e" -"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99" -"checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2" -"checksum openssl 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d59714233ccf23bc962f5eddc5d5c551c5848400e5ab01c64dded1743f3e3784" -"checksum openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919" -"checksum openssl-sys 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "376c5c6084e5ea95eea9c3280801e46d0dcf51251d4f01b747e044fb64d1fb31" -"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" +"checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" +"checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" +"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" +"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" +"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +"checksum num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7de20f146db9d920c45ee8ed8f71681fd9ade71909b48c3acbd766aa504cf10" +"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum openssl-sys 0.9.25 (registry+https://github.com/rust-lang/crates.io-index)" = "93b3cbfaccf11969aea8c2041bfafc43c81666c1ce673476e19395c92cc77bf4" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum pest 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1117ca38a751edc66a4cd9ca1b35644b7d00305971306e07e0d3befbc61e906" +"checksum pest_derive 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1debf85717cb8fa6bf2aad21fbbe888fda5797aae22d332cefec9ba79b6c7a33" +"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" +"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" +"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" +"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum pq-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f386bd842d8571f4df788f49e764bab85d30b3320b2ca98a2a24cfa8f65b903" -"checksum quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0aad603e8d7fb67da22dbdf1f4b826ce8829e406124109e73cf1b2454b93a71c" +"checksum pq-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4dfb5e575ef93a1b7b2a381d47ba7c5d4e4f73bff37cee932195de769aad9a54" +"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" +"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" +"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" -"checksum redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd35cc9a8bdec562c757e3d43c1526b5c6d2653e23e2315065bc25556550753" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457" -"checksum reqwest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bef9ed8fdfcc30947d6b774938dc0c3f369a474efe440df2c7f278180b2d2e6" -"checksum rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "684ce48436d6465300c9ea783b6b14c4361d6b8dcbb1375b486a69cc19e2dfb0" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum schannel 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b291854e37196c2b67249e09d6bdeff410b19e1acf05558168e9c4413b4e95" +"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" +"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" +"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" +"checksum regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b" +"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" +"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" +"checksum reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "241faa9a8ca28a03cbbb9815a5d085f271d4c0168a19181f106aa93240c22ddb" +"checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" +"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" +"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +"checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016" "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" -"checksum secur32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f412dfa83308d893101dd59c10d6fda8283465976c28c287c5c855bf8d216bc" -"checksum security-framework 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbc5b9d01e63664f602cf854effab7c185156211cff63ab84e0f6a1cb0c8022" -"checksum security-framework-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cb581c7dde4b6b03ff6d404cf912869b3360cacac8d821cb632f16de139efec0" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +"checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" +"checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" +"checksum semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee2bc909ab2d8d60dab26e8cad85b25d795b14603a0dcb627b78b9d30b6454b" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a702319c807c016e51f672e5c77d6f0b46afddd744b5e437d6b8436b888b458f" -"checksum serde_codegen_internals 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d52006899f910528a10631e5b727973fe668f3228109d1707ccf5bad5490b6e" -"checksum serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f15ea24bd037b2d64646b4d934fa99c649be66e3f7b29fb595a5543b212b1452" -"checksum serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "dbc45439552eb8fb86907a2c41c1fd0ef97458efb87ff7f878db466eb581824e" -"checksum serde_urlencoded 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4cde9c1d41c4852426d097c53b9151c53e314e9c6ec8a7765e083137d45c76" +"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" +"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" +"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" +"checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb" +"checksum serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce0fd303af908732989354c6f02e05e2e6d597152870f2c6990efb0577137480" +"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" +"checksum skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8431f8fca168e2db4be547bd8329eac70d095dff1444fee4b0fa0fabc7df75a" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" -"checksum slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bab9d589681f7d6b9ca4ed5cc861779a392bca7beaae2f69f2341617415a78dc" -"checksum slog-extra 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "511581f4dd1dc90e4eca99b60be8a692d9c975e8757558aa774f16007d27492a" -"checksum slog-stream 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f0fee00b80a7a44f82c5cf44ba03b6dc2712f9c14469a62ad90ea0911635c5" -"checksum slog-term 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb53c0bae0745898fd5a7b75b1c389507333470ac4c645ae431890c0f828b6ca" +"checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" +"checksum slog 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6b13b17f4225771f7f15cece704a4e68d3a5f31278ed26367f497133398a18" +"checksum slog-async 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e319a30c08b004618d5f7ca2f2b1dad7b4623ba7fcb1a12846fc3b01e9eaa10" +"checksum slog-term 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bb5d9360b2b279b326824b3b4ca2402ead8a8138f0e5ec1900605c861bb6671" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum sparkles 0.1.0 (git+https://github.com/steveklabnik/sparkles)" = "" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)" = "480c834701caba3548aa991e54677281be3a5414a9d09ddbdf4ed74a569a9d19" +"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +"checksum syn 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)" = "517f6da31bc53bf080b9a77b29fbd0ff8da2f5a2ebd24c73c2238274a94ac7cb" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" -"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7" -"checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade" -"checksum tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "99e958104a67877907c1454386d5482fe8e965a55d60be834a15a44328e7dc76" -"checksum tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6a278fde45f1be68e44995227d426aaa4841e0980bb0a21b981092f28c3c8473" +"checksum take_mut 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50b910a1174df4aeb5738e8a0e7253883cf7801de40d094175a5a557e487f4c5" +"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" +"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" +"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" +"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" +"checksum tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "52b4e32d8edbf29501aabb3570f027c6ceb00ccef6538f4bddba0200503e74e8" +"checksum tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9532748772222bf70297ec0e2ad0f17213b4a7dd0e6afb68e0a0768f69f4e4f" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" +"checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" +"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +"checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897" +"checksum uuid 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc7e3b898aa6f6c08e5295b6c89258d1331e9ac578cc992fb818759951bdc22" +"checksum uuid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "990fb49481275abe3c8e2a91339c009cd6146d9f38fc3413e4163d892cbaffbb" +"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" +"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/Cargo.toml b/Cargo.toml index 7be4dd6..c5c269a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Steve Klabnik "] -build = "build.rs" +#build = "build.rs" name = "thanks" version = "0.1.0" @@ -8,31 +8,6 @@ version = "0.1.0" doc = false name = "thanks" -[[bin]] -doc = false -name = "populate" -path = "src/bin/populate.rs" - -[[bin]] -doc = false -name = "update-commit-db" -path = "src/bin/update-commit-db.rs" - -[[bin]] -doc = false -name = "new-release" -path = "src/bin/new-release.rs" - -[[bin]] -doc = false -name = "the-big-red-button" -path = "src/bin/the-big-red-button.rs" - -[[bin]] -doc = false -name = "opt-out" -path = "src/bin/opt-out.rs" - [[bin]] doc = false name = "maintenance" @@ -40,42 +15,37 @@ path = "src/bin/maintenance.rs" [[bin]] doc = false -name = "visible" -path = "src/bin/visible.rs" +name = "project-manager" +path = "src/bin/project-manager.rs" + [build-dependencies] -diesel = "0.12.0" -dotenv = "0.9.0" +diesel = { version = "1.1.1", features = ["postgres"] } +dotenv = "0.11.0" [dependencies] -caseless = "0.1.2" -clap = "2.19.0" -diesel = "0.12.0" -dotenv = "0.9.0" -futures = "0.1.7" -regex = "0.2.1" -reqwest = "0.4.0" -semver = "0.6.0" -serde = "0.9.0" -serde_derive = "0.9.0" -serde_json = "0.9.0" -slog = "1.4.1" -slog-term = "1.3.5" -unicode-normalization = "0.1.0" -git2 = "0.6" -lazy_static = "0.2" - -[dependencies.diesel_codegen] -features = ["postgres"] -version = "0.12.0" - -[dependencies.handlebars] -features = ["serde_type"] -version = "0.25.0" - -[dependencies.hyper] -branch = "master" -git = "https://github.com/hyperium/hyper" +caseless = "0.2.0" +clap = "2.31.1" +diesel = { version = "1.1.1", features = ["postgres"] } +dotenv = "0.11.0" +futures = "0.1.18" +git2 = "0.7.0" +gotham = "0.2.0" +gotham_derive = "0.2.0" +handlebars = "0.32.0" +hyper = "0.11.18" +lazy_static = "1.0.0" +mime = "0.3.5" +regex = "0.2.6" +reqwest = "0.8.5" +semver = "0.9.0" +serde = "1.0.27" +serde_derive = "1.0.27" +serde_json = "1.0.9" +slog = "2.1.1" +slog-term = "2.3.0" +slog-async = "2.2.0" +unicode-normalization = "0.1.5" +time = "0.1.39" +toml = "0.4.5" -[dependencies.sparkles] -git = "https://github.com/steveklabnik/sparkles" diff --git a/build.rs b/build.rs deleted file mode 100644 index 9e019d9..0000000 --- a/build.rs +++ /dev/null @@ -1,21 +0,0 @@ -extern crate diesel; -extern crate dotenv; - -use diesel::prelude::*; -use diesel::pg::PgConnection; - -use dotenv::dotenv; - -use std::env; - -fn main() { - dotenv().ok(); - - let database_url = env::var("DATABASE_URL") - .expect("DATABASE_URL must be set"); - let connection = PgConnection::establish(&database_url) - .expect(&format!("Error connecting to {}", database_url)); - - diesel::migrations::run_pending_migrations(&connection) - .expect("oh no migrations couldn't be run"); -} diff --git a/migrations/20170323224310_set_releases_link_not_null/down.sql b/migrations/20170323224310_set_releases_link_not_null/down.sql index 1ac24bc..aa950a4 100644 --- a/migrations/20170323224310_set_releases_link_not_null/down.sql +++ b/migrations/20170323224310_set_releases_link_not_null/down.sql @@ -1,2 +1,2 @@ ALTER TABLE releases -ALTER COLUMN link SET NULL +ALTER COLUMN link DROP NOT NULL diff --git a/migrations/20180315213800_add_dir_path_to_projects/down.sql b/migrations/20180315213800_add_dir_path_to_projects/down.sql new file mode 100644 index 0000000..8787279 --- /dev/null +++ b/migrations/20180315213800_add_dir_path_to_projects/down.sql @@ -0,0 +1,2 @@ +ALTER TABLE releases +DROP COLUMN dir_path diff --git a/migrations/20180315213800_add_dir_path_to_projects/up.sql b/migrations/20180315213800_add_dir_path_to_projects/up.sql new file mode 100644 index 0000000..4f07540 --- /dev/null +++ b/migrations/20180315213800_add_dir_path_to_projects/up.sql @@ -0,0 +1,2 @@ +ALTER TABLE projects +ADD COLUMN dir_path VARCHAR NOT NULL diff --git a/public/tile-wide.png b/public/images/tile-wide.png similarity index 100% rename from public/tile-wide.png rename to public/images/tile-wide.png diff --git a/public/tile.png b/public/images/tile.png similarity index 100% rename from public/tile.png rename to public/images/tile.png diff --git a/src/authors.rs b/src/authors.rs deleted file mode 100644 index db6e708..0000000 --- a/src/authors.rs +++ /dev/null @@ -1,177 +0,0 @@ -use models::{Author, NewAuthor}; -use mailmap::Mailmap; - -use diesel::*; -use diesel::pg::PgConnection; -use std::collections::HashMap; -use std::fs::File; -use std::io::prelude::*; -use std::io::BufReader; -use git2::Repository; -use std::path::Path; - -use releases; - -// Postgresql won't execute the query if this is much higher -const ITEMS_PER_CHUNK: usize = 30_000; - -pub struct AuthorStore<'a> { - cache: HashMap<(String, String), Author>, - conn: &'a PgConnection, - mailmap: Mailmap -} - -impl<'a> AuthorStore<'a> { - pub fn new(conn: &'a PgConnection, mailmap: Mailmap) -> AuthorStore<'a> { - AuthorStore { - cache: HashMap::new(), - conn: conn, - mailmap: mailmap - } - } - - pub fn from_file(conn: &'a PgConnection, path: &str) -> AuthorStore<'a> { - - let file_path = Path::new(path).join(".mailmap"); - - let contents = { - if file_path.is_file() { - let file = File::open(file_path).unwrap(); - - let mut buf_reader = BufReader::new(file); - let mut contents = String::new(); - buf_reader.read_to_string(&mut contents).unwrap(); - contents - - } else { - "".to_string() - } - }; - - - AuthorStore { - cache: HashMap::new(), - conn: conn, - mailmap: Mailmap::new(contents.as_str()) - } - - } - - pub fn get(&mut self, author_name: &str, author_email: &str) -> Author { - - let new_author = NewAuthor { - name: author_name, - email: author_email - }; - - let entry = (author_name.to_string(), author_email.to_string()); - - if !self.cache.contains_key(&entry) { - let author = self.find_or_create(&new_author).expect("Could not find or create author").clone(); - self.cache.insert(entry.clone(), author); - } - self.cache.get(&entry).unwrap().clone() - } - - pub fn find_or_create_all<'b>(&mut self, new_authors: Vec>) -> Vec { - use schema::authors::dsl::*; - use diesel::expression::dsl::any; - use diesel::pg::upsert::*; - - let mut found = Vec::new(); - let mut missing = Vec::new(); - let mut missing_names = Vec::new(); - let mut missing_emails = Vec::new(); - - // This is more efficient than querying the DB for each author individually - for author in new_authors.into_iter() { - let (m_name, m_email) = self.mailmap.map(author.name, author.email); - - match self.cache.get(&(m_name.clone(), m_email.clone())) { - Some(a) => found.push(a.clone()), - None => { - missing.push(author); - missing_names.push(m_name); - missing_emails.push(m_email); - } - }; - }; - - if !missing.is_empty() { - missing.chunks(ITEMS_PER_CHUNK).enumerate().map(|(i, chunk)| { - - let start = i * ITEMS_PER_CHUNK; - let end = start + chunk.len(); - - let the_names = &missing_names[start..end]; - let the_emails = &missing_emails[start..end]; - - insert(&chunk.on_conflict_do_nothing()). - into(authors). - execute(self.conn). - unwrap(); - - let db_authors: Vec = authors.filter(name.eq(any(the_names.clone()))) - .filter(email.eq(any(the_emails.clone()))) - .load(self.conn) - .unwrap(); - - for new_author in db_authors.into_iter() { - found.push(new_author.clone()); - - self.cache.insert((new_author.name.clone(), new_author.email.clone()), new_author.clone()); - } - }).last(); - } - - found - } - - - pub fn warm_cache(&mut self, repo: &Repository) { - let commits = releases::get_first_commits(repo, "master"); - - let authors: Vec<_> = commits.into_iter().map(|id| { - let c = repo.find_commit(id).unwrap(); - let name: String = c.author().to_owned().name().unwrap().to_owned(); - let email: String = c.author().to_owned().email().unwrap().to_owned(); - (name, email) - }).collect(); - - let new_authors: Vec<_> = authors.iter().map(|&(ref name, ref email)| { - NewAuthor { - name: name.as_str(), - email: email.as_str() - } - }).collect(); - - self.find_or_create_all(new_authors); - } - - pub fn map_author<'b>(&self, author: NewAuthor<'b>) -> (String, String) { - self.mailmap.map(author.name, author.email) - } - - pub fn get_mailmap(&self) -> &Mailmap { - &self.mailmap - } - - fn find_or_create(&self, new_author: &NewAuthor) -> QueryResult { - use schema::authors::dsl::*; - use diesel::pg::upsert::*; - - let maybe_inserted = insert(&new_author.on_conflict_do_nothing()) - .into(authors) - .get_result(self.conn) - .optional()?; - - if let Some(author) = maybe_inserted { - return Ok(author); - } - - authors.filter(name.eq(new_author.name)) - .filter(email.eq(new_author.email)) - .first(self.conn) - } -} - diff --git a/src/bin/maintenance.rs b/src/bin/maintenance.rs index 7a06a62..20207bf 100644 --- a/src/bin/maintenance.rs +++ b/src/bin/maintenance.rs @@ -7,15 +7,17 @@ extern crate diesel; #[macro_use] extern crate slog; extern crate slog_term; +extern crate slog_async; use clap::{App, Arg}; -use slog::DrainExt; +use slog::Drain; use diesel::prelude::*; use thanks::models::Maintenance; fn main() { + // Parse commandline. let matches = App::new("maintenance") .about("let people know the db is re-building") .arg(Arg::with_name("on") @@ -28,8 +30,14 @@ fn main() { .conflicts_with("on")) .get_matches(); - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); + // Setup logging. + let decorator = slog_term::TermDecorator::new().build(); + let drain = slog_term::CompactFormat::new(decorator).build().fuse(); + let drain = slog_async::Async::new(drain).build().fuse(); + let log = slog::Logger::root(drain, o!("version" => env!("CARGO_PKG_VERSION"))); + + // Invert value in database. let connection = thanks::establish_connection(); use thanks::schema::maintenances::dsl::*; diff --git a/src/bin/new-release.rs b/src/bin/new-release.rs deleted file mode 100644 index 7ff3178..0000000 --- a/src/bin/new-release.rs +++ /dev/null @@ -1,86 +0,0 @@ -extern crate thanks; - -extern crate diesel; -extern crate clap; - -#[macro_use] -extern crate slog; -extern crate slog_term; -extern crate git2; - -use diesel::prelude::*; -use clap::{App, Arg}; -use slog::DrainExt; -use git2::Repository; - -fn main() { - let matches = App::new("new-release") - .about("create a new release") - .arg(Arg::with_name("filepath") - .short("p") - .long("path") - .help("filepath of the rust source code") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("project_name") - .short("n") - .long("name") - .help("name of the project") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("version") - .short("v") - .long("version") - .help("new version number") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("changelog_link") - .short("l") - .long("link") - .help("link to release notes") - .takes_value(true) - .required(true)) - .get_matches(); - - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - // get name - let project_name = matches.value_of("project_name").unwrap(); - info!(&log, "Project name: {}", project_name); - // get version - let new_release_name = matches.value_of("version").unwrap(); - info!(&log, "New version: {}", project_name); - // get path - let path = matches.value_of("filepath").unwrap(); - info!(&log, "Path to {} repo: {}", project_name, path); - // get changelog link - let changelog_link = matches.value_of("changelog_link").unwrap(); - info!(&log, "Changelog link: {}", changelog_link); - - let repo = Repository::open(path).unwrap(); - - use thanks::schema::releases::dsl::*; - use thanks::models::Release; - use thanks::schema::projects::dsl::{projects, name}; - use thanks::models::Project; - use thanks::authors::AuthorStore; - - let connection = thanks::establish_connection(); - - let project = projects.filter(name.eq(project_name)).first::(&connection).expect("Unknown project!"); - let release = Release::belonging_to(&project).order(id.desc()).first::(&connection).unwrap(); - - info!(log, "Previous release: {}", release.version); - info!(log, "Creating new release: {}", new_release_name); - - if Release::belonging_to(&project).filter(version.eq(&new_release_name)).first::(&connection).is_ok() { - panic!("Release {} already exists! Something must be wrong.", new_release_name); - } - - let new_release = thanks::releases::create(&connection, &new_release_name, project.id, true, &changelog_link); - info!(log, "Created release {}", new_release.version); - - info!(log, "Assigning commits for {}", new_release.version); - let mut cache = AuthorStore::from_file(&connection, path); - thanks::releases::assign_commits(&log, &repo, &mut cache, &new_release.version, thanks::releases::get_commits(&repo, &new_release.version, &release.version), project.id); -} diff --git a/src/bin/opt-out.rs b/src/bin/opt-out.rs deleted file mode 100644 index e9f003d..0000000 --- a/src/bin/opt-out.rs +++ /dev/null @@ -1,53 +0,0 @@ -extern crate thanks; - -extern crate clap; - -extern crate diesel; - -#[macro_use] -extern crate slog; -extern crate slog_term; - -use clap::{App, Arg}; -use slog::DrainExt; - -use diesel::prelude::*; - -fn main() { - let matches = App::new("opt-out") - .about("mark an author as opted-out") - .arg(Arg::with_name("email") - .short("e") - .long("email") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("opt-in") - .long("opt-in") - .help("Use this to mark author as opted-in again")) - .get_matches(); - - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - let visible = matches.is_present("opt-in"); - - match matches.value_of("email") { - Some(email) => opt_out(&log, email, visible), - None => error!(log, "No email specified") - }; -} - -fn opt_out(log: &slog::Logger, author_email: &str, new_visible: bool) { - use thanks::schema::authors::dsl::*; - use thanks::models::Author; - let connection = thanks::establish_connection(); - - diesel::update(authors.filter(email.eq(author_email))) - .set(visible.eq(new_visible)) - .get_result::(&connection) - .expect(&format!("Unable to find author with email {}", author_email)); - - match new_visible { - true => info!(log, "Opted-in author with email: {}", author_email), - false => info!(log, "Opted-out author with email: {}", author_email), - } -} diff --git a/src/bin/populate.rs b/src/bin/populate.rs deleted file mode 100644 index 0a2797c..0000000 --- a/src/bin/populate.rs +++ /dev/null @@ -1,211 +0,0 @@ -extern crate thanks; - -extern crate diesel; - -extern crate dotenv; - -extern crate futures; - -extern crate handlebars; - -extern crate reqwest; - -extern crate serde; -extern crate serde_json; - -#[macro_use] -extern crate slog; -extern crate slog_term; - -extern crate clap; -extern crate git2; - -use diesel::prelude::*; -use clap::{App, Arg}; -use slog::DrainExt; - -use git2::Repository; - -fn main() { - let matches = App::new("populate") - .about("initialize the database") - .arg(Arg::with_name("filepath") - .short("p") - .long("path") - .help("filepath of the source code") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("url_path") - .short("u") - .long("url") - .help("url path for this project") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("name") - .short("n") - .long("name") - .help("name of the project") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("github_name") - .short("g") - .long("github") - .help("GitHub link of the project") - .takes_value(true) - .required(true)) - .get_matches(); - - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - let connection = thanks::establish_connection(); - - // get name - let project_name = matches.value_of("name").unwrap(); - info!(log, "Project name: {}", project_name); - - // check that we have no releases for given project - { - use thanks::models::Release; - use thanks::schema::projects::dsl::*; - use thanks::models::Project; - - if let Ok(project) = projects.filter(name.eq(project_name)).load::(&connection) { - if let Ok(count) = Release::belonging_to(&project).count().first::(&connection) { - if count > 0 { - panic!("you have releases in here already"); - } - } - } - } - - // check that we have no commits - // if there are no releases then there should be no commits as well - // so we may skip this check - // I consider changing release_id to NOT NULL since we assign commit - // to the first release on creation - - // get path to git repo - let path = matches.value_of("filepath").unwrap(); - info!(log, "Path to project's repo: {}", path); - - // get url path - let url_path = matches.value_of("url_path").unwrap(); - info!(log, "URL path: {}", url_path); - - // get github name - let github_name = matches.value_of("github_name").unwrap(); - info!(log, "GitHub name: {}", github_name); - - // create project - let project = thanks::projects::create(&connection, project_name, url_path, github_name); - - // Create releases - let releases = [ - // version, previous version, link - ("0.2", "0.1", changelog_link("0.2")), - ("0.3", "0.2", changelog_link("0.3")), - ("0.4", "0.3", changelog_link("0.4")), - ("0.5", "0.4", changelog_link("0.5")), - ("0.6", "0.5", changelog_link("0.6")), - ("0.7", "0.6", changelog_link("0.7")), - ("0.8", "0.7", changelog_link("0.8")), - ("0.9", "0.8", changelog_link("0.9")), - ("0.10", "0.9", changelog_link("0.10")), - ("0.11.0", "0.10", changelog_link("0.11.0")), - ("0.12.0", "0.11.0", changelog_link("0.12.0")), - ("1.0.0-alpha", "0.12.0", changelog_link("1.0.0-alpha")), - ("1.0.0-alpha.2", "1.0.0-alpha", changelog_link("1.0.0-alpha.2")), - ("1.0.0-beta", "1.0.0-alpha.2", changelog_link("1.0.0-beta")), - ("1.0.0", "1.0.0-beta", changelog_link("1.0.0")), - ("1.1.0", "1.0.0", changelog_link("1.1.0")), - ("1.2.0", "1.1.0", changelog_link("1.2.0")), - ("1.3.0", "1.2.0", changelog_link("1.3.0")), - ("1.4.0", "1.3.0", changelog_link("1.4.0")), - ("1.5.0", "1.4.0", changelog_link("1.5.0")), - ("1.6.0", "1.5.0", changelog_link("1.6.0")), - ("1.7.0", "1.6.0", changelog_link("1.7.0")), - ("1.8.0", "1.7.0", changelog_link("1.8.0")), - ("1.9.0", "1.8.0", changelog_link("1.9.0")), - ("1.10.0", "1.9.0", changelog_link("1.10.0")), - ("1.11.0", "1.10.0", changelog_link("1.11.0")), - ("1.12.0", "1.11.0", changelog_link("1.12.0")), - ("1.12.1", "1.12.0", changelog_link("1.12.1")), - ("1.13.0", "1.12.0", changelog_link("1.13.0")), - ("1.14.0", "1.13.0", changelog_link("1.14.0")), - ("1.15.0", "1.14.0", changelog_link("1.15.0")), - ("1.15.1", "1.15.0", changelog_link("1.15.1")), - ("1.16.0", "1.15.0", changelog_link("1.16.0")), - ]; - - // create 0.1, which isn't in the loop because it will have everything assigned - // to it by default - thanks::releases::create(&connection, "0.1", project.id, true, changelog_link("0.1")); - - for &(release, _, link) in releases.iter() { - thanks::releases::create(&connection, release, project.id, true, link); - } - - // And create the release for all commits that are not released yet - thanks::releases::create(&connection, "master", project.id, true, changelog_link("master")); - - let repo = Repository::open(path).unwrap(); - - let mut lookup = thanks::authors::AuthorStore::from_file(&connection, path); - lookup.warm_cache(&repo); - - // assign first release - thanks::releases::assign_commits(&log, &repo, &mut lookup, "0.1", thanks::releases::get_first_commits(&repo, "0.1"), project.id); - - // assign commits to their release - for &(release, previous, _) in releases.iter() { - thanks::releases::assign_commits(&log, &repo, &mut lookup, release, thanks::releases::get_commits(&repo, release, previous), project.id); - } - - // assign master - let last = releases.last().unwrap().0; - thanks::releases::assign_commits(&log, &repo, &mut lookup, "master", thanks::releases::get_commits(&repo, "master", last), project.id); - - info!(log, "Done!"); -} - -fn changelog_link(version: &str) -> &str { - match version { - "master" => "https://github.com/rust-lang/rust/commits/master", - "0.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-01--2012-01-20", - "0.2" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-02--2012-03-29", - "0.3" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-03--2012-07-12", - "0.4" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-04-2012-10-15", - "0.5" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-05-2012-12-21", - "0.6" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-06-2013-04-03", - "0.7" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-07-2013-07-03", - "0.8" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-08-2013-09-26", - "0.9" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-09-2014-01-09", - "0.10" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-010-2014-04-03", - "0.11.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-0110-2014-07-02", - "0.12.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-0120-2014-10-09", - "1.0.0-alpha" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-alpha-2015-01-09", - "1.0.0-alpha.2" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-alpha2-2015-02-20", - "1.0.0-beta" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#", - "1.0.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-2015-05-15", - "1.1.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-110-2015-06-25", - "1.2.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-120-2015-08-07", - "1.3.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-130-2015-09-17", - "1.4.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-140-2015-10-29", - "1.5.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-150-2015-12-10", - "1.6.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-160-2016-01-21", - "1.7.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-170-2016-03-03", - "1.8.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-180-2016-04-14", - "1.9.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-190-2016-05-26", - "1.10.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1100-2016-07-07", - "1.11.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1110-2016-08-18", - "1.12.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1120-2016-09-29", - "1.12.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1121-2016-10-20", - "1.13.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1130-2016-11-10", - "1.14.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1140-2016-12-22", - "1.15.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1150-2017-02-02", - "1.15.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1151-2017-02-09", - "1.16.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1160-2017-03-16", - _ => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#", - } -} - diff --git a/src/bin/project-manager.rs b/src/bin/project-manager.rs new file mode 100644 index 0000000..e757dda --- /dev/null +++ b/src/bin/project-manager.rs @@ -0,0 +1,118 @@ +extern crate thanks; + +extern crate diesel; + +extern crate dotenv; + +extern crate futures; + +extern crate handlebars; + +extern crate reqwest; + +extern crate serde; +extern crate serde_json; + +#[macro_use] +extern crate slog; +extern crate slog_term; +extern crate slog_async; + +extern crate clap; +extern crate git2; + +use diesel::pg::PgConnection; +use clap::{App, Arg, ArgMatches, SubCommand}; +use slog::{Drain, Logger}; + +fn main() { + let matches = App::new("projects manager") + .about("add and remove projects") + .subcommand(SubCommand::with_name("add") + .about("adds a project to the database") + .arg(Arg::with_name("name") + .short("n") + .long("name") + .help("name of the project") + .takes_value(true) + .required(true)) + .arg(Arg::with_name("url_path") + .short("u") + .long("url") + .help("url path for this project repository") + .takes_value(true) + .required(true)) + .arg(Arg::with_name("github_name") + .short("g") + .long("github") + .help("GitHub name of the project") + .takes_value(true) + .required(true)) + .arg(Arg::with_name("dir_path") + .short("d") + .long("dir") + .help("Directory path of the repository") + .takes_value(true) + .required(true)) + ) + .subcommand(SubCommand::with_name("remove") + .about("remove a project from the database") + .arg(Arg::with_name("name") + .short("n") + .long("name") + .help("name of the project") + .takes_value(true) + .required(true) + ) + ) + .get_matches(); + + // Setup logging. + let decorator = slog_term::TermDecorator::new().build(); + let drain = slog_term::CompactFormat::new(decorator).build().fuse(); + let drain = slog_async::Async::new(drain).build().fuse(); + + let log = slog::Logger::root(drain, o!("version" => env!("CARGO_PKG_VERSION"))); + + // Setup db connection. + let connection = thanks::establish_connection(); + + // Handle clap subcommands. + match matches.subcommand() { + ("add", Some(sub_m)) => add_project(&log, &connection, sub_m), + ("remove", Some(sub_m)) => remove_project(&log, &connection, sub_m), + _ => println!("unrecognized command"), + }; + + info!(log, "Done!"); +} + +fn add_project(log: &Logger, connection: &PgConnection, matches: &ArgMatches) { + // Get name. + let project_name = matches.value_of("name").unwrap(); + info!(log, "Project name: {}", project_name); + + // Get url path. + let url_path = matches.value_of("url_path").unwrap(); + info!(log, "URL path: {}", url_path); + + // Get github name. + let github_name = matches.value_of("github_name").unwrap(); + info!(log, "GitHub name: {}", github_name); + + // Get repo directory path. + let dir_path = matches.value_of("dir_path").unwrap(); + info!(log, "Directory path: {}", dir_path); + + // Create project. + thanks::projects::create(connection, project_name, url_path, github_name, dir_path); +} + +fn remove_project(log: &Logger, connection: &PgConnection, matches: &ArgMatches) { + // Get name. + let project_name = matches.value_of("name").unwrap(); + info!(log, "Project name: {}", project_name); + + // Remove project. + thanks::projects::delete(connection, project_name); +} diff --git a/src/bin/the-big-red-button.rs b/src/bin/the-big-red-button.rs deleted file mode 100644 index 8dd5e86..0000000 --- a/src/bin/the-big-red-button.rs +++ /dev/null @@ -1,121 +0,0 @@ -extern crate thanks; - -extern crate clap; - -extern crate diesel; - -#[macro_use] -extern crate slog; -extern crate slog_term; - -use clap::{App, Arg, ArgGroup}; -use slog::DrainExt; - -use diesel::prelude::*; -use diesel::pg::PgConnection; - -fn main() { - let matches = App::new("the-big-red-button") - .about("annihilate") - .arg(Arg::with_name("all") - .long("all") - .help("remove everything from the database") - .conflicts_with("project_name")) - .arg(Arg::with_name("project_name") - .short("n") - .long("name") - .help("name of the project to delete") - .conflicts_with("all") - .takes_value(true)) - .group(ArgGroup::with_name("opts") - .args(&["all", "project_name"]) - .required(true)) - .get_matches(); - - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - let connection = thanks::establish_connection(); - - match matches.is_present("all") { - true => delete_whole_db(&log, &connection), - false => { - match matches.value_of("project_name") { - Some(project_name) => delete_projects_db(&log, &connection, project_name), - None => println!("No project specified"), - }; - } - } -} - -fn delete_projects_db(log: &slog::Logger, connection: &PgConnection, project_name: &str) { - use thanks::schema::releases::dsl::{releases, id as _release_id}; - use thanks::models::Release; - use thanks::schema::projects::dsl::{projects, name}; - use thanks::models::Project; - use thanks::schema::commits::dsl::{commits, release_id}; - use thanks::schema::authors::dsl::{authors, id as _author_id}; - use diesel::expression::dsl::any; - use diesel::expression::dsl::sql; - use diesel::types::Bool; - - let project = projects.filter(name.eq(project_name)).first::(connection).expect("Unknown project!"); - let releases_to_delete = Release::belonging_to(&project).load::(connection).unwrap(); - let release_names: Vec<&str> = releases_to_delete.iter().map(|ref release| release.version.as_str()).collect(); - let release_ids: Vec = releases_to_delete.iter().map(|ref release| release.id).collect(); - info!(log, "Deleting project {} with release names: {:?}", project_name, release_names); - - info!(log, "Deleting commits"); - diesel::delete(commits.filter(release_id.eq(any(&release_ids)))) - .execute(connection) - .expect("Error deleting commits"); - - info!(log, "Deleting authors"); - // we can rewrite the raw sql to a query builder - // when diesel fixes this https://github.com/diesel-rs/diesel/issues/621 - let author_ids_to_delete = authors.left_outer_join(commits) - .filter(sql::("commits.id IS NULL")).select(_author_id); - diesel::delete(authors.filter(_author_id.eq(any(author_ids_to_delete)))) - .execute(connection) - .expect("Error deleting authorsreleases"); - - info!(log, "Deleting releases"); - diesel::delete(releases.filter(_release_id.eq(any(&release_ids)))) - .execute(connection) - .expect("Error deleting releases"); - - info!(log, "Deleting project"); - diesel::delete(projects.filter(name.eq(project_name))) - .execute(connection) - .expect("Error deleting project"); - - info!(log, "Done."); -} - -fn delete_whole_db(log: &slog::Logger, connection: &PgConnection) { - use thanks::schema::releases::dsl::*; - use thanks::schema::commits::dsl::*; - use thanks::schema::projects::dsl::*; - use thanks::schema::authors::dsl::*; - - info!(log, "Deleting commits"); - diesel::delete(commits) - .execute(connection) - .expect("Error deleting commits"); - - info!(log, "Deleting authors"); - diesel::delete(authors) - .execute(connection) - .expect("Error deleting authors"); - - info!(log, "Deleting releases"); - diesel::delete(releases) - .execute(connection) - .expect("Error deleting releases"); - - info!(log, "Deleting projects"); - diesel::delete(projects) - .execute(connection) - .expect("Error deleting projects"); - - info!(log, "Done."); -} diff --git a/src/bin/update-commit-db.rs b/src/bin/update-commit-db.rs deleted file mode 100644 index 76997ca..0000000 --- a/src/bin/update-commit-db.rs +++ /dev/null @@ -1,110 +0,0 @@ -extern crate thanks; - -extern crate diesel; - -extern crate dotenv; - -extern crate futures; - -extern crate handlebars; - -extern crate reqwest; - -extern crate serde; -#[macro_use] -extern crate serde_derive; -extern crate serde_json; - -use diesel::pg::PgConnection; -use diesel::prelude::*; -use reqwest::Url; - -#[macro_use] -extern crate slog; -extern crate slog_term; - -use slog::DrainExt; - -use thanks::models::Project; -use thanks::mailmap::Mailmap; -use thanks::authors::AuthorStore; - -#[derive(Debug,Deserialize)] -struct GitHubResponse(Vec); - -#[derive(Debug,Deserialize)] -struct Object { - sha: String, - commit: Commit, -} - -#[derive(Debug,Deserialize)] -struct Commit { - author: Author, -} - -#[derive(Debug,Deserialize)] -struct Author { - name: String, - email: String, -} - -fn update_commit_db(log: &slog::Logger, project: &Project, lookup: &mut AuthorStore, connection: &PgConnection) { - use thanks::schema::releases::dsl::*; - use thanks::models::Release; - use thanks::schema::commits::dsl::*; - use thanks::models::Commit; - use diesel::expression::dsl::any; - - let api_link = Url::parse(format!("https://api.github.com/repos/{}/commits", project.github_name).as_str()).unwrap(); - let mut resp = reqwest::get(api_link).unwrap(); - - let response: GitHubResponse = resp.json().unwrap(); - - // find the master release so we can assign commits to it - let master_release = releases - .filter(project_id.eq(project.id)) - .filter(version.eq("master")) - .first::(connection) - .expect("could not find release"); - - let release_ids: Vec = Release::belonging_to(project).load::(connection).unwrap() - .iter().map(|ref release| release.id).collect(); - - for object in response.0 { - info!(log, "Found commit with sha {}", object.sha); - - match commits - .filter(release_id.eq(any(&release_ids))) - .filter(sha.eq(&object.sha)) - .first::(connection) { - Ok(commit) => { - info!(log, "Commit {} already in db, skipping", commit.sha); - continue; - }, - Err(_) => { - info!(log, "Creating commit {} for release {}", object.sha, master_release.version); - { - let author = lookup.get(&object.commit.author.name, &object.commit.author.email); - // this commit will be part of master - drop(thanks::commits::create(connection, &object.sha, &author, &master_release)); - } - }, - }; - } -} - -fn main() { - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - use thanks::schema::projects::dsl::*; - - let connection = thanks::establish_connection(); - let mut lookup = AuthorStore::new(&connection, Mailmap::new("")); - - let projects_to_update: Vec = projects.load(&connection).expect("No projects found"); - for project in projects_to_update { - info!(log, "Updating {}", project.name); - update_commit_db(&log, &project, &mut lookup, &connection) - } -} diff --git a/src/bin/visible.rs b/src/bin/visible.rs deleted file mode 100644 index 5c6e84a..0000000 --- a/src/bin/visible.rs +++ /dev/null @@ -1,54 +0,0 @@ -extern crate thanks; - -extern crate clap; - -extern crate diesel; - -#[macro_use] -extern crate slog; -extern crate slog_term; - -use clap::{App, Arg}; -use slog::DrainExt; - -use diesel::prelude::*; - -fn main() { - let matches = App::new("visible") - .about("mark a release as visible") - .arg(Arg::with_name("version") - .short("v") - .long("version") - .takes_value(true) - .required(true)) - .arg(Arg::with_name("hide") - .long("hide") - .help("Use this to mark the release as hidden")) - .get_matches(); - - let log = slog::Logger::root(slog_term::streamer().full().build().fuse(), o!("version" => env!("CARGO_PKG_VERSION"))); - - let visible = ! matches.is_present("hide"); - - match matches.value_of("version") { - Some(version) => set_visibility(&log, version, visible), - None => error!(log, "No version specified"), - } -} - -fn set_visibility(log: &slog::Logger, release_version: &str, new_visible: bool) { - use thanks::schema::releases::dsl::*; - use thanks::models::Release; - let connection = thanks::establish_connection(); - - diesel::update(releases.filter(version.eq(release_version))) - .set(visible.eq(new_visible)) - .get_result::(&connection) - .expect(&format!("Unable to find release with version {}", release_version)); - - match new_visible { - true => info!(log, "Set version {} to show.", release_version), - false => info!(log, "Set version {} to hide.", release_version), - } -} - diff --git a/src/commits.rs b/src/commits.rs deleted file mode 100644 index e775234..0000000 --- a/src/commits.rs +++ /dev/null @@ -1,21 +0,0 @@ -use models::{Commit, NewCommit}; -use models::Author; -use models::Release; - -use diesel; -use diesel::pg::PgConnection; -use diesel::prelude::*; - -pub fn create<'a>(conn: &PgConnection, sha: &'a str, author: &Author, release: &Release) -> Commit { - use schema::commits; - - let new_commit = NewCommit { - sha: sha, - release_id: release.id, - author_id: author.id, - }; - - diesel::insert(&new_commit).into(commits::table) - .get_result(conn) - .expect("Error saving new commit") -} diff --git a/src/lib.rs b/src/lib.rs index e47b4ff..7528089 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,5 @@ #[macro_use] extern crate diesel; -#[macro_use] -extern crate diesel_codegen; #[macro_use] extern crate lazy_static; @@ -20,23 +18,25 @@ extern crate caseless; extern crate unicode_normalization; extern crate git2; +use git2::Repository; + use std::env; +use std::collections::HashMap; + extern crate serde_json; use serde_json::Map; -#[macro_use] extern crate slog; extern crate slog_term; +extern crate slog_async; pub mod schema; pub mod models; pub mod projects; pub mod releases; -pub mod commits; -pub mod authors; pub mod mailmap; use serde_json::value::Value; @@ -50,21 +50,56 @@ pub fn establish_connection() -> PgConnection { .expect(&format!("Error connecting to {}", database_url)) } -pub fn scores() -> Vec { - use schema::commits::dsl::*; - use schema::authors::dsl::*; - use diesel::expression::dsl::sql; - use diesel::types::BigInt; - - let connection = establish_connection(); - - let scores: Vec<_> = commits.inner_join(authors) - .filter(visible.eq(true)) - .select((name, sql::("COUNT(author_id) AS author_count"))) - .group_by((author_id, name)) - .order(sql::("author_count").desc()) - .load(&connection) - .unwrap(); +pub fn scores(repo_path: &str) -> Vec { + let repo = match Repository::open(repo_path) { + Ok(v) => v, + Err(e) => panic!("failed to open: {}", e), + }; + + let mut walk = match repo.revwalk() { + Ok(v) => v, + Err(e) => panic!("failed getting revwalk: {}", e), + }; + + match walk.push_head() { + Ok(()) => (), + Err(e) => panic!("failed pushing head onto revwalk: {}", e), + }; + + // Walk the commit graph and collect the authors. + let mut auth_count: HashMap = HashMap::new(); + for res in walk { + let oid = match res { + Ok(v) => v, + Err(e) => panic!("failed getting object walked on: {}", e), + }; + + let commit = match repo.find_commit(oid) { + Ok(v) => v, + Err(e) => panic!("walked commit oid is missing or not a commit: {}", e), + }; + + let author = commit.author().to_owned(); + + let mut author_name = match author.name() { + Some(v) => v.to_owned(), + None => panic!("failed getting author name"), + }; + + let counter = auth_count.entry(author_name).or_insert(0); + *counter += 1; + } + + // Convert the dictionary to a vec of tuples: String, u64. + let mut scores: Vec<(String, u64)> = vec!(); + + for (k, v) in &auth_count { + scores.push((k.to_owned(), v.to_owned())); + } + + scores.sort_by(|&(_, ref b), &(_, ref d)| d.cmp(b)); + + // End of walk // these variables are used to calculate the ranking let mut rank = 0; // incremented every time @@ -96,7 +131,7 @@ pub fn scores() -> Vec { }).collect() } -/// are we in maintenance mode? +/// `in_maintenace` checks the db to see if we are in maintenance mode. pub fn in_maintenance() -> bool { use models::Maintenance; use schema::maintenances::dsl::*; diff --git a/src/mailmap.rs b/src/mailmap.rs index aa57de0..8a8f90e 100644 --- a/src/mailmap.rs +++ b/src/mailmap.rs @@ -1,9 +1,9 @@ use std::collections::HashMap; use regex::Regex; -const WHITESPACE: &'static str = r#"\s*"#; -const MATCH_NAME: &'static str = "([^<>]+)"; -const MATCH_EMAIL: &'static str = "<([^<>]+)>"; +const WHITESPACE: &str = r#"\s*"#; +const MATCH_NAME: &str = "([^<>]+)"; +const MATCH_EMAIL: &str = "<([^<>]+)>"; // 'PNAME' = Proper Name // 'PEMAIL = Proper Email @@ -13,7 +13,7 @@ lazy_static! { static ref PNAME_CEMAIL: Regex = Regex::new(format!(r#"^{}{} {}\s*(#.*)?$"#, WHITESPACE, MATCH_NAME, MATCH_EMAIL).as_str()).unwrap(); static ref PEMAIL_CEMAIL: Regex = Regex::new(format!(r#"^{}{} {}\s*(#.*)?$"#, WHITESPACE, MATCH_EMAIL, MATCH_EMAIL).as_str()).unwrap(); static ref PNAME_PEMAIL_CEMAIL: Regex = Regex::new(format!(r#"^{}{} {} {}\s*(#.*)?$"#, WHITESPACE, MATCH_NAME, MATCH_EMAIL, MATCH_EMAIL).as_str()).unwrap(); - static ref PNAME_PEMAIL_CNAME_CMAIL: Regex = Regex::new(format!(r#"^{}{} {} {} {}\s*(#.*)?"#, WHITESPACE, MATCH_NAME, MATCH_EMAIL, MATCH_NAME, MATCH_EMAIL).as_str()).unwrap(); + static ref PNAME_PEMAIL_CNAME_CMAIL: Regex = Regex::new(format!(r#"^{}{} {} {} {}\s*(#.*)?"#, WHITESPACE, MATCH_NAME, MATCH_EMAIL, MATCH_NAME, MATCH_EMAIL).as_str()).unwrap(); } #[derive(Debug)] @@ -67,8 +67,8 @@ impl Mailmap { } } - for line in data.split("\n") { - if line.starts_with("#") { + for line in data.split('\n') { + if line.starts_with('#') { continue; } if let Some(cap) = PNAME_CEMAIL.captures(line) { @@ -91,7 +91,8 @@ impl Mailmap { //println!("Lookup: ({}, {}) -> {:?}", name, email, self.email_map.get(email)); let (lower_name, lower_email) = (name.to_lowercase(), email.to_lowercase()) ; if let Some(r) = self.email_map.get(&lower_email) { - return (r.name.as_ref().map(|s| s.clone()).unwrap_or(name.to_owned()).clone(), r.email.as_ref().map(|s| s.clone()).unwrap_or(email.to_owned()).clone()) + return (r.name.as_ref().cloned().unwrap_or_else(|| name.to_owned()).clone(), + r.email.as_ref().cloned().unwrap_or_else(|| email.to_owned()).clone()) } if let Some(&(ref r_name, ref r_email)) = self.name_email_map.get(&(lower_name.clone(), lower_email.clone())) { @@ -109,7 +110,10 @@ fn test_mailmap() { ($map:expr, $name:expr, $email:expr, $expected_name:expr, $expected_email:expr) => { { let result: (String, String) = $map.map($name, $email); - assert_eq!(($expected_name.to_owned(), $expected_email.to_owned()), result, "Expected to map '{},{}' to '{},{}', but instead mapped to '{},{}'", $name, $email, $expected_name, $expected_email, result.0, result.1); + assert_eq!(($expected_name.to_owned(), $expected_email.to_owned()), + result, + "Expected to map '{},{}' to '{},{}', but instead mapped to '{},{}'", + $name, $email, $expected_name, $expected_email, result.0, result.1); } } } diff --git a/src/main.rs b/src/main.rs index dd684a5..85cc85e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,131 +1,563 @@ extern crate thanks; extern crate dotenv; - extern crate futures; - +extern crate gotham; +#[macro_use] +extern crate gotham_derive; extern crate handlebars; - extern crate hyper; +extern crate mime; +extern crate serde_json; +#[macro_use] +extern crate serde_derive; -extern crate regex; +#[macro_use] +extern crate slog; +extern crate slog_term; +extern crate slog_async; -extern crate serde_json; +extern crate toml; + +#[macro_use] +extern crate lazy_static; -extern crate sparkles; +use gotham::http::response::create_response; +use gotham::router::Router; +use gotham::router::builder::{build_simple_router, DefineSingleRoute, DrawRoutes}; +use gotham::state::{FromState, State, client_addr}; -use sparkles::Request; -use sparkles::Response; -use sparkles::Error; -use sparkles::ResponseBuilder; -use sparkles::Status; +use handlebars::Handlebars; -use futures::BoxFuture; +use hyper::server::Response; +use hyper::StatusCode; -use regex::Captures; +//use futures::BoxFuture; +use std::collections; +use std::collections::HashMap; use std::env; +use std::fs; +use std::fs::File; +use std::io::prelude::*; +use std::sync::Mutex; + +use slog::Drain; use serde_json::value::Value; +lazy_static! { + /// CACHE is an in-memory store of the repo data, + /// so that we don't have to walk the git repos + /// for every request. + pub static ref CACHE: Mutex> = Mutex::new({ + HashMap::new() + }); + + // A list of (project name, repo path) tuples. + pub static ref PROJECTS: Mutex> = Mutex::new({ + vec!() + }); + + // TEMPLATES stores the HTML templates. + // TODO(rm): pass relevant template to handler when building router. + pub static ref TEMPLATES: Mutex = Mutex::new({ + Handlebars::new() + }); +} + +/// Project is an in-memory store of the releases, commits and authors for a project. +pub struct Project { + // TODO(rm): review usage of this struct. + name: String, + tags: Vec, + releases: Vec, + all_time: Vec, +} + +/// Release is a tag name and the authors of commits for that tag. +pub struct Release { + name: String, + authors: Vec, +} + fn main() { dotenv::dotenv().ok(); - let addr = format!("0.0.0.0:{}", - env::args().nth(1).unwrap_or(String::from("1337"))) + // Setup logging. + let decorator = slog_term::TermDecorator::new().build(); + let drain = slog_term::CompactFormat::new(decorator).build().fuse(); + let drain = slog_async::Async::new(drain).build().fuse(); + + let log = slog::Logger::root(drain, o!("version" => env!("CARGO_PKG_VERSION"))); + + let addr: String = + format!("0.0.0.0:{}", + env::args().nth(1).unwrap_or_else(|| String::from("1337"))) .parse() .unwrap(); - let mut server = sparkles::Server::new("templates".to_string()); + // TODO(rm): include multiple repos in stats. + + // Setup db connection. + let conn = thanks::establish_connection(); + let projects = thanks::projects::all(&conn); + + // Load data into memory. + info!(log, "Warming cache"); + let new_cache = warm_cache(projects); + *CACHE.lock().unwrap() = new_cache; + info!(log, "Finished warming cache"); + + load_templates(); - server.add_route("/", root); + // Gotham server: + println!("Listening for requests at http://{}", addr); + gotham::start(addr, router()) +} + +/// `load_templates` reads all of the handlebars template files into memory. +fn load_templates() { + let template_root = "templates"; + + let mut handlebars = TEMPLATES.lock().unwrap(); - server.add_route("/about", about); + for entry in fs::read_dir(&template_root).unwrap() { + let entry = entry.unwrap(); - server.add_route("/rust/all-time", all_time); + // Skip entries which are not templates. + if let Ok(file_type) = entry.file_type() { + if !file_type.is_file() { + continue; + } + } else { + continue; + } - server.add_regex_route("/([^/]+)/(.+)", release); + if let Ok(file_name) = entry.file_name().into_string() { + if file_name.starts_with('.') { + continue; + } + } else { + continue; + } - server.run(&addr); + if let Ok(file_name) = entry.file_name().into_string() { + if ! file_name.ends_with(".hbs") { + continue; + } + } else { + continue; + } + + let path = entry.path(); + let name = path.file_stem().unwrap().to_str().unwrap(); + + handlebars + .register_template_file(name, &path) + .ok() + .unwrap(); + } +} + +/// `router` creates a Gotham router. +fn router() -> Router { + build_simple_router(|route| { + route.get("/:project").with_path_extractor::().to(root); + route.get("/about").to(about); + route.get("/:project/all-time").with_path_extractor::().to(cached_all_time); + route.get("/:project/:version").with_path_extractor::().to(cached_release); + route.get("/styles/:name").with_path_extractor::().to(public_styles); + route.get("/fonts/:name").with_path_extractor::().to(public_fonts); + route.get("/scripts/:name").with_path_extractor::().to(public_scripts); + route.get("/images/:name").with_path_extractor::().to(public_images); + route.get("/reload").to(reload); + }) +} + +#[derive(Deserialize, StateData, StaticResponseExtender)] +struct RootPath { + project: String, +} + +#[derive(Deserialize, StateData, StaticResponseExtender)] +struct AllTimePath { + project: String, } -fn root(_: Request) -> BoxFuture { - let mut res = ResponseBuilder::new(); - res.with_template("index".to_string()); +#[derive(Deserialize, StateData, StaticResponseExtender)] +struct ReleasePath { + project: String, + version: String, +} + +#[derive(Deserialize, StateData, StaticResponseExtender)] +struct ResourcePath { + name: String, +} + +fn public_styles(state: State) -> (State, Response) { + public_resources(state, "styles", mime::TEXT_CSS) +} + +fn public_fonts(state: State) -> (State, Response) { + // TODO(rm): serve fonts. + let m: mime::Mime = "application/x-font-ttf".parse().unwrap(); + let (state, res) = public_resources(state, "fonts", m); + (state, res) +} + +fn public_images(state: State) -> (State, Response) { + public_resources(state, "images", mime::IMAGE_PNG) +} + +fn public_scripts(state: State) -> (State, Response) { + public_resources(state, "scripts", mime::TEXT_JAVASCRIPT) +} + +fn public_resources(state: State, sub_dir: &str, mime_type: mime::Mime) -> (State, Response) { + let res = { + let resource = ResourcePath::borrow_from(&state); + + let file_path = format!("public/{}/{}", sub_dir, resource.name); + + match File::open(file_path) { + Ok(mut file) => { + let mut contents: Vec = vec!(); + match file.read_to_end(&mut contents) { + Ok(_num_bytes_read) => { + create_response( + &state, + StatusCode::Ok, + Some( + (contents, mime_type) + ), + ) + }, + Err(e) => { + create_response( + &state, + StatusCode::NotFound, + Some( + (format!("no resource found: {}", e).as_bytes().to_vec(), + mime::TEXT_PLAIN) + ), + ) + }, + } + }, + Err(e) => { + create_response( + &state, + StatusCode::NotFound, + Some( + (format!("no resource found: {}", e).as_bytes().to_vec(), + mime::TEXT_PLAIN) + ), + ) + }, + } + + }; + + (state, res) +} - res.data.insert("maintenance".to_string(), - Value::Bool(thanks::in_maintenance())); +/// `warm_cache` loads the git repo data into a `HashMap`. +fn warm_cache(repos: Vec) -> HashMap { + let mut tmp_cache: HashMap = HashMap::new(); + + for project in repos { + // Get all_time. + let all_time_scores: Vec = thanks::scores(&project.dir_path); + + // Get all_release_tags. + let tags: Vec = thanks::releases::all(&project.dir_path); + + // Get all_releases_authors. + let mut all_releases: Vec = vec!(); + for i in &tags { + println!("{}", i); + match thanks::releases::contributors(&tags, &project.dir_path, i.as_str().unwrap()) { + Some(names) => all_releases.push( + Release { + name: i.as_str().unwrap().to_string(), + authors: names, + } + ), + None => panic!("failed warming cache with release: {}", i.to_string()), + }; + } - res.data.insert("releases".to_string(), - Value::Array(thanks::releases::all())); + let project = Project{ + name: project.name.clone(), + tags: tags, + releases: all_releases, + all_time: all_time_scores, + }; - res.with_status(Status::Ok); + let project_name = project.name.to_owned(); + tmp_cache.insert(project_name, project); + } - res.to_response().into_future() + tmp_cache } -fn about(_: Request) -> BoxFuture { - let mut res = ResponseBuilder::new(); - res.with_template("about".to_string()); +/// `reload` is an endpoint which reloads the cache from the Git repositories. +fn reload(state: State) -> (State, Response) { + // Only allow reloads from localhost. + let is_admin = match client_addr(&state) { + Some(v) => v.ip().is_loopback() , + None => false, + }; + + if !is_admin { + let res = create_response( + &state, + StatusCode::NoContent, + Some(("No content.".to_string().into_bytes(), mime::TEXT_HTML)), + ); + + return (state, res) + } - res.data.insert("maintenance".to_string(), - Value::Bool(thanks::in_maintenance())); + let repos = PROJECTS.lock().unwrap(); + let new_cache = warm_cache(repos.to_vec()); + + // Swap out the old cache for the new cache. + *CACHE.lock().unwrap() = new_cache; - res.with_status(Status::Ok); + let res = create_response( + &state, + StatusCode::Ok, + Some(("Reloaded.".to_string().into_bytes(), mime::TEXT_HTML)), + ); - res.to_response().into_future() + (state, res) } -fn all_time(_: Request) -> BoxFuture { - let mut res = ResponseBuilder::new(); - res.with_template("all-time".to_string()); +fn root(state: State) -> (State, Response) { + let mut data: collections::BTreeMap = collections::BTreeMap::new(); + + data.insert("maintenance".to_string(), Value::Bool(thanks::in_maintenance())); + + // Get the releases for the specified project. + let mut project_name = RootPath::borrow_from(&state).project.to_string(); + if project_name.is_empty() { + project_name = "rust".to_string(); + } + + let conn = thanks::establish_connection(); + let repo_path = match thanks::projects::by_name(&conn, &project_name) { + Ok(v) => { + match v.get(0) { + Some(s) => s.clone(), + None => { + let res = create_response( + &state, + StatusCode::NotFound, + Some( + (b"repo path not found".to_vec(), + mime::TEXT_PLAIN) + ), + ); + + return (state, res) + }, + } + }, + Err(e) => { + let res = create_response( + &state, + StatusCode::NotFound, + Some( + (format!("error looking for repo path: {}", e).as_bytes().to_vec(), + mime::TEXT_PLAIN) + ), + ); + + return (state, res) + }, + }; + - res.data.insert("maintenance".to_string(), - Value::Bool(thanks::in_maintenance())); + data.insert( + "releases".to_string(), + Value::Array(thanks::releases::all(&repo_path))); + + let handlebars = TEMPLATES.lock().unwrap(); + + let res = create_response( + &state, + StatusCode::Ok, + Some((handlebars.render("index", &data).unwrap().into_bytes(), mime::TEXT_HTML)), + ); + + (state, res) +} - let scores = thanks::scores(); +fn about(state: State) -> (State, Response) { + let mut data: collections::BTreeMap = collections::BTreeMap::new(); - res.data.insert("release".to_string(), - Value::String(String::from("all-time"))); - res.data.insert("count".to_string(), Value::Number((scores.len() as u64).into())); - res.data.insert("scores".to_string(), Value::Array(scores)); + data.insert("maintenance".to_string(), Value::Bool(thanks::in_maintenance())); - res.with_status(Status::Ok); + let handlebars = TEMPLATES.lock().unwrap(); - res.to_response().into_future() + let res = create_response( + &state, + StatusCode::Ok, + Some((handlebars.render("about", &data).unwrap().into_bytes(), mime::TEXT_HTML)), + ); + + (state, res) } -fn release(_: &Request, cap: Captures) -> BoxFuture { - let mut res = ResponseBuilder::new(); - res.with_template("release".to_string()); +fn cached_all_time(state: State) -> (State, Response) { + let res = { + let all_time_path = AllTimePath::borrow_from(&state); - res.data.insert("maintenance".to_string(), - Value::Bool(thanks::in_maintenance())); + let cache = CACHE.lock().unwrap(); + let proj = cache.get(all_time_path.project.as_str()).unwrap(); - let project = cap.get(1).unwrap(); - let project = project.as_str(); + let mut data: collections::BTreeMap = collections::BTreeMap::new(); - let release_name = cap.get(2).unwrap(); - let release_name = release_name.as_str(); + data.insert("maintenance".to_string(), Value::Bool(thanks::in_maintenance())); - res.data.insert("release".to_string(), Value::String(release_name.to_string())); - match thanks::releases::by_version(release_name) { - Some(v) => res.data.insert("link".to_string(), Value::String(v.link)), - None => None, + let scores = &proj.all_time; + + data.insert("release".to_string(), Value::String(String::from("all-time"))); + data.insert("count".to_string(), Value::Number((scores.len() as u64).into())); + data.insert("scores".to_string(), Value::Array(scores.to_vec())); + + let handlebars = TEMPLATES.lock().unwrap(); + + create_response( + &state, + StatusCode::Ok, + Some((handlebars.render("all-time", &data).unwrap().into_bytes(), mime::TEXT_HTML)), + ) }; - let names = thanks::releases::contributors(project, release_name); + (state, res) +} - match names { - Some(names) => { - res.data.insert("count".to_string(), Value::Number((names.len() as u64).into())); - res.data.insert("names".to_string(), Value::Array(names)); - res.with_status(Status::Ok); - } - None => { - res.with_status(Status::NotFound); +fn cached_release(state: State) -> (State, Response) { + let res = { + let release = ReleasePath::borrow_from(&state); + + let cache = CACHE.lock().unwrap(); + let proj = cache.get(release.project.as_str()).unwrap(); + + let mut data: collections::BTreeMap = collections::BTreeMap::new(); + + data.insert("maintenance".to_string(), Value::Bool(thanks::in_maintenance())); + + let release_name = release.version.as_str(); + + data.insert("release".to_string(), Value::String(release_name.to_string())); + data.insert("link".to_string(), Value::String(release_name.to_string())); + + let mut names: Vec = vec!(); + for i in &proj.releases { + if i.name == release_name { + names = i.authors.to_owned(); + break; + } } - } - res.to_response().into_future() + data.insert("count".to_string(), Value::Number((names.len() as u64).into())); + data.insert("names".to_string(), Value::Array(names)); + data.insert("link".to_string(), + Value::String(changelog_link(release_name).to_string())); + + let handlebars = TEMPLATES.lock().unwrap(); + + create_response( + &state, + StatusCode::Ok, + Some((handlebars.render("release", &data).unwrap().into_bytes(), mime::TEXT_HTML)), + ) + }; + + (state, res) +} + +/// `load_projects` reads a list of project repository paths from a toml file. +pub fn load_projects(path: &str) -> Vec { + let mut file = match File::open(&path) { + Ok(file) => file, + Err(e) => panic!("error opening projects file: {}", e), + }; + + let mut projects_toml = String::new(); + + match file.read_to_string(&mut projects_toml) { + Ok(size) => size, + Err(e) => panic!("failed reading projects file: {}", e), + }; + + let hashmap: HashMap> = + match toml::from_str(&projects_toml) { + Ok(hashmap) => hashmap, + Err(e) => panic!("failed deserializing projects list: {}", e), + }; + + let list: Vec = match hashmap.get("projects") { + Some(v) => v.to_owned(), + None => panic!("projects list not found in file"), + }; + + list +} + +// TODO(rm): move to db. +fn changelog_link(version: &str) -> &str { + match version { + "master" => "https://github.com/rust-lang/rust/commits/master", + "0.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-01--2012-01-20", + "0.2" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-02--2012-03-29", + "0.3" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-03--2012-07-12", + "0.4" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-04-2012-10-15", + "0.5" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-05-2012-12-21", + "0.6" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-06-2013-04-03", + "0.7" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-07-2013-07-03", + "0.8" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-08-2013-09-26", + "0.9" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-09-2014-01-09", + "0.10" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-010-2014-04-03", + "0.11.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-0110-2014-07-02", + "0.12.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-0120-2014-10-09", + "1.0.0-alpha" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-alpha-2015-01-09", + "1.0.0-alpha.2" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-alpha2-2015-02-20", + "1.0.0-beta" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#", + "1.0.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-2015-05-15", + "1.1.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-110-2015-06-25", + "1.2.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-120-2015-08-07", + "1.3.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-130-2015-09-17", + "1.4.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-140-2015-10-29", + "1.5.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-150-2015-12-10", + "1.6.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-160-2016-01-21", + "1.7.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-170-2016-03-03", + "1.8.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-180-2016-04-14", + "1.9.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-190-2016-05-26", + "1.10.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1100-2016-07-07", + "1.11.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1110-2016-08-18", + "1.12.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1120-2016-09-29", + "1.12.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1121-2016-10-20", + "1.13.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1130-2016-11-10", + "1.14.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1140-2016-12-22", + "1.15.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1150-2017-02-02", + "1.15.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1151-2017-02-09", + "1.16.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1160-2017-03-16", + "1.17.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27", + "1.18.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1180-2017-06-08", + "1.19.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1190-2017-07-20", + "1.20.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1200-2017-08-31", + "1.21.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1210-2017-10-12", + "1.22.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1220-2017-11-22", + "1.22.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1221-2017-11-22", + "1.23.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1230-2018-01-04", + "1.24.0" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1240-2018-02-15", + "1.24.1" => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1241-2018-03-02", + _ => "https://github.com/rust-lang/rust/blob/master/RELEASES.md#", + } } diff --git a/src/models.rs b/src/models.rs index 722ea80..975d811 100644 --- a/src/models.rs +++ b/src/models.rs @@ -1,10 +1,10 @@ -#[derive(Debug,Identifiable,Queryable,Associations)] -#[has_many(releases)] +#[derive(Debug,Identifiable,Queryable,Associations,Clone)] pub struct Project { pub id: i32, pub name: String, pub url_path: String, pub github_name: String, + pub dir_path: String, } #[derive(Debug,Identifiable,Queryable,Associations)] @@ -18,8 +18,6 @@ pub struct Commit { } #[derive(Debug,Identifiable,Queryable,Associations)] -#[has_many(commits)] -#[belongs_to(Project)] pub struct Release { pub id: i32, pub version: String, @@ -29,7 +27,6 @@ pub struct Release { } #[derive(Debug,Identifiable,Queryable,Associations, Clone)] -#[has_many(commits)] pub struct Author { pub id: i32, pub name: String, @@ -45,6 +42,7 @@ pub struct NewProject<'a> { pub name: &'a str, pub url_path: &'a str, pub github_name: &'a str, + pub dir_path: &'a str, } use super::schema::commits; diff --git a/src/projects.rs b/src/projects.rs index 3a4fd1b..2cd3555 100644 --- a/src/projects.rs +++ b/src/projects.rs @@ -1,20 +1,58 @@ use models::{NewProject, Project}; use diesel; +use diesel::result::Error; use diesel::pg::PgConnection; use diesel::prelude::*; -pub fn create(conn: &PgConnection, name: &str, url_path: &str, github_name: &str) -> Project { +pub fn create(conn: &PgConnection, + name: &str, + url_path: &str, + github_name: &str, + dir_path: &str) -> Project { use schema::projects; let new_project = NewProject { - name: name, - url_path: url_path, - github_name: github_name + name, + url_path, + github_name, + dir_path }; - diesel::insert(&new_project).into(projects::table) + diesel::insert_into(projects::table) + .values(&new_project) .get_result(conn) .expect("Error saving new project") } +pub fn delete(conn: &PgConnection, project_name: &str) { + use schema::projects::dsl::{projects, name}; + + diesel::delete(projects.filter(name.eq(project_name))) + .execute(conn) + .expect("Error deleting project"); +} + +pub fn all(conn: &PgConnection) -> Vec { + use schema::projects::dsl::*; + + projects.load(conn) + .expect("Error selecting all projects") +} + +pub fn by_name(conn: &PgConnection, project_name: &str) -> Result, Error> { + use schema::projects::dsl::*; + + projects.filter(name.eq(project_name)) + .select(dir_path) + .load(conn) +} + +pub fn init(conn: &PgConnection) { + create(conn, + "rust", + "https://github.com/rust-lang/rust", + "rust", + "/repos/github.com/rust-lang/rust"); +} + diff --git a/src/releases.rs b/src/releases.rs index 95e0978..ff78929 100644 --- a/src/releases.rs +++ b/src/releases.rs @@ -1,121 +1,47 @@ extern crate git2; -use models::*; -use schema::*; +extern crate time; use caseless; -use diesel::*; -use diesel::pg::PgConnection; - -use authors::AuthorStore; - use serde_json::value::Value; use semver::Version; use std::cmp::Ordering; -use std::collections::HashMap; -use std::error::Error; -use std::io::stderr; use std::str; -use slog::Logger; - use unicode_normalization::UnicodeNormalization; + use releases::git2::Repository; use releases::git2::Oid; // needed for case-insensitivity -use diesel::types::VarChar; -sql_function!(lower, lower_t, (x: VarChar) -> VarChar); - -impl Release { - /// provide a semver-compatible version - /// - /// rust's older versions were missing a minor version and so are not semver-compatible - fn semver_version(&self) -> Version { - Version::parse(&self.version).unwrap_or_else(|_| { - let v = format!("{}.0", self.version); - Version::parse(&v).unwrap() - }) - } -} - -use std::io::prelude::*; - -pub fn assign_commits(log: &Logger, repo: &Repository, cache: &mut AuthorStore, release_name: &str, commits: Vec, release_project_id: i32) { - use diesel::pg::upsert::*; - - // Could take the connection as a parameter, as problably - // it's already established somewhere... - let connection = ::establish_connection(); +//use diesel::types::VarChar; +//sql_function!(lower, lower_t, (x: VarChar) -> VarChar); - info!(log, "Assigning commits to release {}", release_name); - - - let the_release = releases::table - .filter(releases::version.eq(&release_name)) - .filter(releases::project_id.eq(release_project_id)) - .first::(&connection) - .expect("could not find release"); - - let temp_commits = commits.into_iter().map(|id| { - let commit = repo.find_commit(id).unwrap(); - let author = commit.author().to_owned(); - (commit, author) - }).collect::>(); - let mut parsed_commits = Vec::new(); - - for &(ref commit, ref author) in temp_commits.iter() { - let (mapped_name, mapped_email) = cache.get_mailmap().map(author.name().unwrap(), author.email().unwrap()); - parsed_commits.push((format!("{}", commit.id()), mapped_name, mapped_email)); - } - - if parsed_commits.is_empty() { - writeln!( - stderr(), - "Could not find commits for {} (maybe the tag is \ - missing?) Skipping.", - release_name - ).unwrap(); - // https://github.com/diesel-rs/diesel/issues/797 - return; - } - - connection.transaction::<_, Box, _>(|| { - let by_sha = authors_by_sha(cache, parsed_commits); - let commits: Vec<_> = { - by_sha - .iter() - .map(|&(ref sha, author_id)| { - NewCommit { - sha: sha.as_str(), - release_id: the_release.id, - author_id: author_id, - } - }).collect() - }; - - - // Set the release id of any commits that already existed - let inserted = insert(&commits.on_conflict(commits::sha, do_update().set(commits::release_id.eq(the_release.id)))) - .into(commits::table) - .execute(&connection)?; - - if inserted == commits.len() { - Ok(()) - } else { - Err(format!("Expected to create or update {} commits, \ - but only {} were", commits.len(), inserted).into()) - } - }).expect("Error saving commits and authors"); +/// provide a semver-compatible version +/// +/// rust's older versions were missing a minor version and so are not semver-compatible +fn semver_version(version: &str) -> Version { + Version::parse(version).unwrap_or_else(|_| { + let v = format!("{}.0", version); + Version::parse(&v).unwrap() + }) } -pub fn get_first_commits(repo: &Repository, release_name: &str) -> Vec { - let mut walk = repo.revwalk().unwrap(); +/// `get_first_commits` +pub fn get_first_commits(repo: &Repository, release_name: &str) -> Option> { + let mut walk = match repo.revwalk() { + Ok(v) => v, + Err(e) => { + println!("no rev walk: {}", e); + return None; + }, + }; + walk.push(repo.revparse(release_name).unwrap().from().unwrap().id()).unwrap(); - walk.into_iter().map(|id| id.unwrap()).collect() + Some(walk.into_iter().map(|id| id.unwrap()).collect()) } @@ -131,86 +57,96 @@ pub fn get_commits(repo: &Repository, release_name: &str, previous_release: &str walk_1.into_iter().map(|id| id.unwrap()).chain(walk_2.into_iter().map(|id| id.unwrap())).collect() } -type AuthorId = i32; - -/// Finds or creates all authors from a git log, and returns the given shas -/// zipped with the id of the author in the database. -fn authors_by_sha<'a>(cache: &mut AuthorStore<'a>, git_log: Vec<(String, String, String)>) - -> Vec<(String, AuthorId)> -{ - let new_authors = git_log.iter().map(|&(_, ref name, ref email)| { - NewAuthor { email: email.as_str(), name: name.as_str() } - }).collect(); - let author_ids = cache.find_or_create_all(new_authors) - .into_iter() - .map(|author| ((author.name, author.email), author.id)) - .collect::>(); - git_log.iter() - .map(|&(ref sha, ref name, ref email)| { - (sha.clone(), author_ids[&(name.clone(), email.clone())]) - }) - .collect() + +pub fn contributors(tags: &[Value], repo_path: &str, release_name: &str) -> Option> { + let names = walk_release(tags, repo_path, release_name); + + Some(names.into_iter().map(Value::String).collect()) } -pub fn create(conn: &PgConnection, version: &str, project_id: i32, visible: bool, link: &str) -> Release { - use schema::releases; +/// `walk_release` walks a tag, collecting author names. +fn walk_release(tags: &[Value], repo_path: &str, release_name: &str) -> Vec{ + let repo = match Repository::open(repo_path) { + Ok(v) => v, + Err(e) => panic!("failed to open: {}", e), + }; - let new_release = NewRelease { - version: version, - project_id: project_id, - visible: visible, - link: link, + let mut walk = match repo.revwalk() { + Ok(v) => v, + Err(e) => panic!("failed getting revwalk: {}", e), }; - insert(&new_release).into(releases::table) - .get_result(conn) - .expect("Error saving new release") -} + // Set the range of commits to walk by setting the bounding tag refs. + // First set the tag we're interested in, at which we start walking. + let refs_tags_prefix = "refs/tags/"; -pub fn contributors(project: &str, release_name: &str) -> Option> { - use schema::releases::dsl::*; - use schema::commits::dsl::*; - use models::Release; + let tag_ref = match release_name { + "master" => "refs/heads/master".to_string(), + _ => [refs_tags_prefix, release_name].concat(), + }; - let connection = ::establish_connection(); + match walk.push_ref(&tag_ref) { + Ok(()) => (), + Err(e) => panic!("failed pushing ref onto revwalk: {}", e), + }; - let project = { - use schema::projects::dsl::*; + // Set the tag at which we want to stop walking. + if let Some(prev_tag) = find_previous_tag_ref(tags, release_name) { + let prev_tag_ref = [refs_tags_prefix, prev_tag.as_str().unwrap()].concat().to_string(); + match walk.hide_ref(&prev_tag_ref) { + Ok(()) => (), + Err(e) => panic!("failed hiding ref in revwalk: {}", e), + }; + } - match projects.filter(lower(name).eq(lower(project))) - .first::(&connection) { - Ok(p) => p, - Err(_) => { - return None; - } - } - }; + // Walk the commit graph and collect the authors. + let mut authors: Vec = vec!(); + for res in walk { + let oid = match res { + Ok(v) => v, + Err(e) => panic!("failed getting object walked on: {}", e), + }; - let release: Release = match releases - .filter(version.eq(release_name)) - .filter(project_id.eq(project.id)) - .first(&connection) { - Ok(release) => release, - Err(_) => { - return None; - }, + let commit = match repo.find_commit(oid) { + Ok(v) => v, + Err(e) => panic!("walked commit oid is missing or not a commit: {}", e), }; - // it'd be better to do this in the db - // but Postgres doesn't do Unicode collation correctly on OSX - // http://postgresql.nabble.com/Collate-order-on-Mac-OS-X-text-with-diacritics-in-UTF-8-td1912473.html - use schema::authors; - let mut names: Vec = authors::table.inner_join(commits).filter(release_id.eq(release.id)) - .filter(authors::visible.eq(true)).select(authors::name).distinct().load(&connection).unwrap(); + let author = commit.author().to_owned(); + + let author_name = match author.name() { + Some(v) => v.to_owned(), + None => panic!("failed getting author name"), + }; + + authors.push(author_name); + } + + authors.sort_by(|a, b| str_cmp(a, b)); + authors.dedup(); + authors +} - inaccurate_sort(&mut names); +/// `find_previous_tag_ref` finds the tag preceding the specified tag. +/// This is used to find a range of commits for a tag. +fn find_previous_tag_ref(tags: &[Value], tag_ref: &str) -> Option { + let mut found_tag = false; - Some(names.into_iter().map(Value::String).collect()) + for t in tags { + if found_tag { + return Some(t.clone()); + } + if t == tag_ref { + found_tag = true; + } + } + + None } // TODO: switch this out for an implementation of the Unicode Collation Algorithm pub fn inaccurate_sort(strings: &mut Vec) { - strings.sort_by(|a, b| str_cmp(&a, &b)); + strings.sort_by(|a, b| str_cmp(a, b)); } fn str_cmp(a_raw: &str, b_raw: &str) -> Ordering { @@ -240,7 +176,7 @@ fn char_cmp(a_char: char, b_char: char) -> Ordering { let first_char = a.chars().nth(0).unwrap_or('{'); - let order = if a == b && a.len() == 1 && 'a' <= first_char && first_char <= 'z' { + if a == b && a.len() == 1 && 'a' <= first_char && first_char <= 'z' { if a_char > b_char { Ordering::Less } else if a_char < b_char { @@ -250,65 +186,54 @@ fn char_cmp(a_char: char, b_char: char) -> Ordering { } } else { a.cmp(&b) - }; - - order + } } -/// returns all releases -/// -/// sorted in semver order -pub fn all() -> Vec { - use schema::releases::dsl::*; - use models::Release; - use models::Project; - - let connection = ::establish_connection(); - - let project = { - use schema::projects::dsl::*; - projects.filter(name.eq("Rust")) - .first::(&connection) - .expect("Error finding the Rust project") +/// `all` returns all the tags found in the git repository, +/// sorted in semver order. +pub fn all(repo_path: &str) -> Vec { + let repo = match Repository::open(repo_path) { + Ok(v) => v, + Err(e) => panic!("failed opening git repository: {}", e), }; - let mut results = releases.filter(project_id.eq(project.id)) - .filter(visible.eq(true)) - .load::(&connection) - .expect("Error loading releases"); - - // sort the versions - // - // first we need to remove master as it is not a valid semver version, and - // master should be at the top anyway - let master = match results.iter().position(|r| r.version == "master") { - Some(i) => results.remove(i), - None => panic!("master release not found"), + let tag_names_array = match repo.tag_names(None) { + Ok(v) => v, + Err(e) => panic!("failed retrieving tag names from git: {}", e), }; - // next up, sort by semver version - results.sort_by(|a, b| { - a.semver_version().cmp(&b.semver_version()) + // Extract tag names from Options. + let tag_names: Vec<&str> = tag_names_array.into_iter().filter_map(|o| o).collect(); + + // Split tag names into versions and "release-*"s - + // the latter are not valid semvers, which hinders sorting. + // Get those without "release-". + let mut version_names: Vec<&str> = tag_names.clone() + .into_iter() + .filter(|t| ! t.starts_with("release-")).collect(); + + // Get those starting with "release-". + let release_names: Vec<&str> = tag_names.clone() + .into_iter() + .filter(|t| t.starts_with("release-")).collect(); + + // This sorts a Vec<&str> of semvers. + version_names.sort_by(|a, b| { + semver_version(a).cmp(&semver_version(b)) }); + + // This sets whether the early "release-*" tags are included. + let include_early_releases = true; - // finally, push master/all-time back at the top - results.push(master); + let all_tags = if include_early_releases { + [&release_names[..], &version_names[..], &["master"]].concat() + } else { + version_names.clone() + }; - results.into_iter() + all_tags.into_iter() .rev() - .map(|r| Value::String(r.version)) + .map(|r| Value::String(r.to_string())) .collect() } -pub fn by_version(release_version: &str) -> Option { - use schema::releases::dsl::*; - use models::Release; - - let connection = ::establish_connection(); - - let mut results = releases.filter(version.eq(release_version)) - .load::(&connection) - .expect("Error loading release"); - - results.pop() -} diff --git a/src/schema.rs b/src/schema.rs index 236bbc9..3333165 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -1 +1,53 @@ -infer_schema!("dotenv:DATABASE_URL"); +table! { + authors (id) { + id -> Int4, + name -> Varchar, + email -> Varchar, + visible -> Bool, + } +} + +table! { + commits (sha) { + sha -> Varchar, + release_id -> Int4, + author_id -> Int4, + } +} + +table! { + maintenances (id) { + id -> Int4, + enabled -> Bool, + } +} + +table! { + projects (id) { + id -> Int4, + name -> Varchar, + url_path -> Varchar, + github_name -> Varchar, + dir_path -> Varchar, + } +} + +table! { + releases (id) { + id -> Int4, + version -> Varchar, + project_id -> Int4, + visible -> Bool, + link -> Varchar, + } +} + +joinable!(commits -> authors (author_id)); + +allow_tables_to_appear_in_same_query!( + authors, + commits, + maintenances, + projects, + releases, +);