Repositories

grarr

(mirrored on github)

Wim <wim@nemo157.com>GitHub <noreply@github.com>
2a5eaa Merge pull request #1 from Nemo157/update
Wim authored at 2017-05-15 20:56:46GitHub committed at 2017-05-15 20:56:46

Update all dependencies

Modified .travis.yml

@@ -1,12 +1,12 @@
language: rust
rust:
- nightly
sudo: false
cache: cargo
rust:
- nightly-2017-01-26
script:
- cargo test --verbose
- cargo build --release --verbose
- cargo rustc --release -- -D warnings
- cargo test
- cargo rustc -- -D warnings
addons:
apt:

Modified Cargo.lock

@@ -2,85 +2,116 @@
name = "grarr"
version = "0.0.3"
dependencies = [
"chrono 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"clippy 0.0.67 (registry+https://github.com/rust-lang/crates.io-index)",
"git-appraise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gravatar 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.0.3 (git+https://github.com/Nemo157/logger?rev=personal_release)",
"lru_time_cache 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"maud 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"maud-pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"maud_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"router 0.1.1 (git+https://github.com/Nemo157/router?rev=reverse_priority)",
"rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"ammonia 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"git-appraise 0.3.0 (git+https://github.com/Nemo157/git-appraise-rs?rev=update)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"gravatar 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lru_time_cache 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"maud 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
"maud_macros 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"router 0.5.1 (git+https://github.com/Nemo157/router?rev=reverse_priority)",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "aster"
version = "0.16.0"
name = "advapi32-sys"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.32.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 = "bitflags"
version = "0.1.1"
name = "ammonia"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"html5ever 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever-atoms 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"maplit 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bitflags"
version = "0.3.3"
name = "antidote"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "backtrace"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-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)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace-sys"
version = "0.1.10"
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)",
]
[[package]]
name = "bitflags"
version = "0.4.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "0.5.0"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.2.22"
name = "byteorder"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "clippy"
version = "0.0.67"
name = "cfg-if"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quine-mc_cluskey 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"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)",
]
[[package]]
name = "cmake"
version = "0.1.17"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -88,40 +119,178 @@ name = "conduit-mime-types"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cookie"
version = "0.2.4"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "core-foundation"
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)",
]
[[package]]
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)",
]
[[package]]
name = "crypt32-sys"
version = "0.2.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 = "curl-sys"
version = "0.3.10"
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.11 (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)",
]
[[package]]
name = "dbghelp-sys"
version = "0.2.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 = "debug_unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dtoa"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "encoding"
version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding-index-japanese"
version = "1.20141219.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"openssl 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding-index-korean"
version = "1.20141219.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding-index-simpchinese"
version = "1.20141219.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding-index-singlebyte"
version = "1.20141219.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding-index-tradchinese"
version = "1.20141219.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding_index_tests"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "error"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"traitobject 0.0.3 (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)",
]
[[package]]
name = "error-chain"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "foreign-types"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "futf"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.28"
version = "0.3.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "gdi32-sys"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.6 (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]]
@@ -131,103 +300,139 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "git-appraise"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
version = "0.3.0"
source = "git+https://github.com/Nemo157/git-appraise-rs?rev=update#fb1615338ece408fc18535b7b2ec317fa953ee31"
dependencies = [
"git2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_codegen 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "git2"
version = "0.4.3"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"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.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 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)",
]
[[package]]
name = "gravatar"
version = "0.1.4"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "hpack"
version = "0.2.0"
name = "html5ever"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever-atoms 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)",
"mac 0.1.1 (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)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "html5ever-atoms"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"string_cache 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "httparse"
version = "1.1.2"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "hyper"
version = "0.8.1"
version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cookie 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.2.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.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"traitobject 0.0.1 (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.24 (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 0.5.9 (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-native-tls"
version = "0.2.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.9 (registry+https://github.com/rust-lang/crates.io-index)",
"native-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "idna"
version = "0.1.0"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"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)",
]
[[package]]
name = "if_chain"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "iron"
version = "0.3.0"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"conduit-mime-types 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"error 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itoa"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.6 (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)",
]
@@ -238,121 +443,117 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.1.12"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.11"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
version = "0.4.3"
name = "libflate"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libressl-pnacl-sys"
version = "2.1.6"
name = "libgit2-sys"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"pnacl-build-helper 1.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
"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.11 (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.1.37"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"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.11 (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.3"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (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)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.3.6"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "logger"
version = "0.0.3"
source = "git+https://github.com/Nemo157/logger?rev=personal_release#44fe1678bdbb76d82a61ce171c31ca5896d5e6bb"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "lru_time_cache"
version = "0.3.1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "matches"
version = "0.1.2"
name = "mac"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "maud"
version = "0.8.1"
name = "maplit"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "maud-pulldown-cmark"
version = "0.1.0"
name = "matches"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "maud"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"maud 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "maud_macros"
version = "0.8.1"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"maud 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"maud 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mime"
version = "0.2.0"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -361,189 +562,210 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "nom"
version = "1.2.2"
name = "native-tls"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"openssl 0.9.11 (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.14 (registry+https://github.com/rust-lang/crates.io-index)",
"security-framework-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num"
version = "0.1.32"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.34 (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)",
]
[[package]]
name = "num-integer"
version = "0.1.32"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-iter"
version = "0.1.32"
version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-traits"
version = "0.1.32"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
version = "0.2.11"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "openssl"
version = "0.7.10"
version = "0.9.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys-extras 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.8.2 (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.8 (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.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "openssl-probe"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "openssl-sys"
version = "0.7.10"
version = "0.9.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"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)",
"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)",
]
[[package]]
name = "openssl-sys-extras"
version = "0.7.10"
name = "phf"
version = "0.7.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.7.10 (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 = "pkg-config"
version = "0.3.8"
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 = "plugin"
version = "0.2.6"
name = "phf_generator"
version = "0.7.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pnacl-build-helper"
version = "1.4.10"
name = "phf_shared"
version = "0.7.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pulldown-cmark"
version = "0.0.5"
name = "pkg-config"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "plugin"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pulldown-cmark"
version = "0.0.8"
version = "0.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quasi"
version = "0.10.0"
name = "quote"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quasi_codegen"
version = "0.10.0"
name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aster 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quine-mc_cluskey"
version = "0.2.2"
name = "redox_syscall"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rand"
version = "0.3.14"
name = "reqwest"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libflate 0.1.5 (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.14 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.9.10 (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)",
]
[[package]]
name = "regex-syntax"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "route-recognizer"
version = "0.1.11"
source = "git+https://github.com/Nemo157/route-recognizer.rs?rev=reverse_priority#9c7422a8daa3ffbc25d23c8ce806d637d7cfa1cd"
[[package]]
name = "router"
version = "0.1.1"
source = "git+https://github.com/Nemo157/router?rev=reverse_priority#4265eb0e79517d4c9aea8cefe9b48d9105f6edd7"
version = "0.5.1"
source = "git+https://github.com/Nemo157/router?rev=reverse_priority#98e891564a67d512d010edb3959c29013f5fd8e6"
dependencies = [
"iron 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"route-recognizer 0.1.11 (git+https://github.com/Nemo157/route-recognizer.rs?rev=reverse_priority)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rust-crypto"
version = "0.2.35"
version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (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)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-demangle"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rustc-serialize"
version = "0.3.19"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -555,117 +777,215 @@ dependencies = [
]
[[package]]
name = "same-file"
version = "0.1.3"
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)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "schannel"
version = "0.1.4"
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.8 (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 = "secur32-sys"
version = "0.2.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.14"
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.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "security-framework-sys"
version = "0.1.14"
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)",
]
[[package]]
name = "semver"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "semver"
version = "0.2.3"
name = "serde"
version = "0.9.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"nom 1.2.2 (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.15.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"
version = "0.7.4"
name = "serde_derive_internals"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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_codegen"
version = "0.7.4"
name = "serde_json"
version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aster 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi_codegen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"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.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
version = "0.7.0"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"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 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solicit"
version = "0.4.4"
name = "serde_urlencoded"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"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.14 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syntex"
version = "0.32.0"
name = "siphasher"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "string_cache"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syntex_syntax"
version = "0.32.0"
name = "string_cache_codegen"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "string_cache_shared"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syn"
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)",
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "synom"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tempdir"
version = "0.3.4"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term"
version = "0.2.14"
name = "tendril"
version = "0.2.3"
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)",
"winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"utf-8 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "time"
version = "0.1.35"
version = "0.1.36"
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.11 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.6 (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.17 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "toml"
version = "0.1.28"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "traitobject"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "traitobject"
version = "0.0.3"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -691,80 +1011,82 @@ dependencies = [
[[package]]
name = "unicode-bidi"
version = "0.2.3"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-normalization"
version = "0.1.2"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicode-xid"
version = "0.0.3"
version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unsafe-any"
version = "0.4.1"
name = "unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"traitobject 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "url"
version = "0.5.9"
name = "unsafe-any"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "url"
version = "1.1.0"
version = "1.4.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.2 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "user32-sys"
version = "0.1.2"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.6 (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 = "uuid"
version = "0.2.2"
name = "utf-8"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "walkdir"
version = "0.1.5"
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)",
"winapi 0.2.6 (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.6"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -772,3 +1094,133 @@ name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a"
"checksum ammonia 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "86ffda992a57eda95a13dbd583904b3c74356e497545817bb0cb26a9fdb7ff1e"
"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5"
"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80"
"checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "158b0bd7d75cbb6bf9c25967a48a2e9f77da95876b858eadfabaa99cd069de6e"
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
"checksum conduit-mime-types 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca30253581af809925ef68c2641cc140d6183f43e12e0af4992d53768bd7b8"
"checksum cookie 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "691d39889a369dd2c7db5ed6fbd8315a8517f69dfda7a515dcc5d5b1b7d3e2d4"
"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 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 dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
"checksum error 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "a6e606f14042bb87cc02ef6a14db6c90ab92ed6f62d87e69377bc759fd7987cc"
"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3"
"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 getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
"checksum git-appraise 0.3.0 (git+https://github.com/Nemo157/git-appraise-rs?rev=update)" = "<none>"
"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
"checksum gravatar 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1db2a0cee40395384856d54ada583ca7db8470f9ae216932c5b0cb8bfbc7089c"
"checksum html5ever 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d60508177ec4e5774a112efcf4d4d5f123cb00a43476fa5940b7da568371a165"
"checksum html5ever-atoms 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c626dc6733babf7110d3a5078b1529e9d0eaaacf6c488ef6a7437b7d515844bb"
"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21"
"checksum hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "94da93321c171e26481afeebe8288757b0501901b7c5492648163d8ec4942ec5"
"checksum hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afe68f772f0497a7205e751626bb8e1718568b58534b6108c73a74ef80483409"
"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375"
"checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8"
"checksum iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2440ae846e7a8c7f9b401db8f6e31b4ea5e7d3688b91761337da7e054520c75b"
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
"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.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
"checksum libflate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7aa60ce680c15f96b74bd6208256f112049ab20fd6da510f27f82cb78323a77"
"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 logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92ff59f9a797ff30f711fe6b8489ad424953cee17c206de77d3c5957a9182ba7"
"checksum lru_time_cache 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf17862cdf1a87c7cc0cccc498552f3e564d2ae61069f83d2279a932af4a00c"
"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
"checksum maplit 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "be384c560e0c3ad868b590ffb88d2c0a1effde6f59885234e4ea811c1202bfea"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
"checksum maud 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4df5416f2a86c31a08cccd348921f2394450cf59c3474ae23b5490fc60f82f57"
"checksum maud_macros 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "354834707aa8c1d9db2a17a3572cd6e57eb581df844af6f1b4033cb0b33d743c"
"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e"
"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58"
"checksum native-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e94a2fc65a44729fe969cc973da87c1052ae3f000b2cb33029f14aeb85550d5"
"checksum num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40"
"checksum num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1a4bf6f9174aa5783a9b4cc892cacd11aebad6c69ad027a0b65c6ca5f8aa37"
"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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "241bcf67b1bb8d19da97360a925730bdf5b6176d434ab8ded55b4ca632346e3a"
"checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf"
"checksum openssl-sys 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e5e0fd64cb2fa018ed2e7b2c8d9649114fe5da957c9a67432957f01e5dcc82e9"
"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 plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0"
"checksum pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab1e588ef8efd702c7ed9d2bd774db5e6f4d878bb5a1a9f371828fbdff6973"
"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.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b"
"checksum reqwest 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5113a267e410c17d186189940711e49da445987299763f63503cfed4dbbcccc0"
"checksum route-recognizer 0.1.11 (git+https://github.com/Nemo157/route-recognizer.rs?rev=reverse_priority)" = "<none>"
"checksum router 0.5.1 (git+https://github.com/Nemo157/router?rev=reverse_priority)" = "<none>"
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
"checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
"checksum schannel 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b291854e37196c2b67249e09d6bdeff410b19e1acf05558168e9c4413b4e95"
"checksum secur32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f412dfa83308d893101dd59c10d6fda8283465976c28c287c5c855bf8d216bc"
"checksum security-framework 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "42ddf098d78d0b64564b23ee6345d07573e7d10e52ad86875d89ddf5f8378a02"
"checksum security-framework-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "5bacdada57ea62022500c457c8571c17dfb5e6240b7c8eac5916ffa8c7138a55"
"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
"checksum serde 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c9a40d556f8431394def53446db659f796dc87a53ef67b7541f21057fbdd91"
"checksum serde 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "369633cfe0f0bde1dfc037fb6c5a329d46586a31f981bed14d87487a3439ae37"
"checksum serde_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6a61ecb8511aaff381424f98b49a059017420ec60e15e8d63b645701af7fa9b8"
"checksum serde_derive_internals 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "021c338d22c7e30f957a6ab7e388cb6098499dda9fd4ba1661ee074ca7a180d1"
"checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1"
"checksum serde_json 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e9b1ec939469a124b27e208106550c38358ed4334d2b1b5b3825bc1ee37d946a"
"checksum serde_urlencoded 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4cde9c1d41c4852426d097c53b9151c53e314e9c6ec8a7765e083137d45c76"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum string_cache 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c19dbe4d2552673a8c4ec0e91523670ee2b73ba3560d935703ce5d64a40f864c"
"checksum string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c9dfe1a7c8bba1ecb90730d269fdc08afe93d23c28dd6c4aa5cabd79a05a05e"
"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
"checksum tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cebf864c2d90394a1b66d6fe45963f9a177f2af81a0edea5060f77627f9c4587"
"checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade"
"checksum toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3063405db158de3dce8efad5fc89cf1baffb9501a3647dc9505ba109694ce31f"
"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 typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6"
"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-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 unsafe-any 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b351086021ebc264aea3ab4f94d61d889d98e5e9ec2d985d993f50133537fd3a"
"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 utf-8 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9aee9ba280438b56d1ebc5329f2094f0ff457f811eeeff0b278d75aa99db400"
"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-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

Modified Cargo.toml

@@ -1,41 +1,45 @@
[package]
name = "grarr"
version = "0.0.3"
authors = ["Wim Looman <wim@nemo157.com>"]
build = "build.rs"
[features]
# "maybe_cache" enables "cache" when building in release profile
default = ["clippy", "maybe_cache"]
cache = ["maybe_cache"]
maybe_cache = []
name = "grarr"
version = "0.0.3"
[dependencies]
ammonia = "0.3.0"
chrono = "0.3"
cookie = "0.7.5"
error-chain = "0.10.0"
git2 = "0.6"
gravatar = "0.1"
iron = "0.5"
logger = "0.3.0"
lru_time_cache = "0.6"
maud_macros = "=0.16.2"
mime = "0.2"
pulldown-cmark = "0.0.14"
reqwest = "0.5.1"
rust-crypto = "0.2"
rustc-serialize = "0.3"
serde = "1.0.0"
serde_derive = "1.0.0"
toml = "0.4"
typemap = "0.3"
unicase = "1.4"
walkdir = "1.0"
git-appraise = "*"
git2 = "*"
hyper = "0.8.1"
iron = "*"
router = { git = "https://github.com/Nemo157/router", rev = "reverse_priority" }
logger = { git = "https://github.com/Nemo157/logger", rev = "personal_release" }
typemap = "*"
mime = "*"
lru_time_cache = "*"
time = "*"
walkdir = "*"
# params = "*"
[dependencies.git-appraise]
git = "https://github.com/Nemo157/git-appraise-rs"
rev = "update"
chrono = "*"
pulldown-cmark = "*"
maud-pulldown-cmark = "*"
gravatar = "*"
[dependencies.maud]
features = ["iron"]
version = "0.16"
maud = "*"
maud_macros = "*"
[dependencies.router]
git = "https://github.com/Nemo157/router"
rev = "reverse_priority"
clippy = { version = "*", optional = true }
rust-crypto = "*"
unicase = "*"
toml = "*"
rustc-serialize = "*"
[features]
cache = ["maybe_cache"]
default = ["maybe_cache"]
maybe_cache = []

Modified src/config.rs

@@ -1,54 +1,50 @@
use std::{ env, ffi, io, fmt };
use std::borrow::ToOwned;
use std::{ env, ffi, io };
use std::fs::File;
use std::io::Read;
use std::path::{ Path, PathBuf };
use toml;
use rustc_serialize::{ Decoder, Decodable, Encoder, Encodable };
#[derive(Debug, RustcDecodable, RustcEncodable)]
#[derive(Debug, Serialize, Deserialize)]
pub struct Config {
pub repos: Repos,
pub avatars: Avatars,
}
#[derive(Debug)]
// Cannot derive decode/encode as PathBuf by default uses a [u8/u16] for storage...
#[derive(Debug, Serialize, Deserialize)]
pub struct Repos {
pub root: PathBuf,
}
#[derive(Debug, RustcDecodable, RustcEncodable)]
#[derive(Debug, Serialize, Deserialize)]
pub struct Avatars {
pub cache: Cache,
pub gravatar: Gravatar,
}
#[derive(Debug, RustcDecodable, RustcEncodable)]
#[derive(Debug, Serialize, Deserialize)]
pub struct Cache {
pub enable: bool,
pub capacity: usize,
pub ttl_seconds: u64,
}
#[derive(Debug, RustcDecodable, RustcEncodable)]
#[derive(Debug, Serialize, Deserialize)]
pub struct Gravatar {
pub enable: bool,
}
#[derive(Debug)]
pub enum Error {
IO(io::Error),
Parse(Vec<toml::ParserError>),
Decode(toml::DecodeError),
Str(String),
error_chain! {
foreign_links {
Io(io::Error);
Toml(toml::de::Error);
}
}
pub fn load<S: AsRef<ffi::OsStr> + ?Sized>(from: Option<&S>) -> Result<Config, Error> {
pub fn load<S: AsRef<ffi::OsStr> + ?Sized>(from: Option<&S>) -> Result<Config> {
let path = if let Some(path) = from.map(Path::new) {
try!(path.canonicalize())
path.canonicalize()?
} else {
try!(try!(env::current_dir()).canonicalize())
env::current_dir()?.canonicalize()?
};
if path.is_dir() {
@@ -68,78 +64,10 @@ pub fn load<S: AsRef<ffi::OsStr> + ?Sized>(from: Option<&S>) -> Result<Config, E
},
})
} else {
load_file(&path).and_then(|mut config| { config.repos.root = try!(config.repos.root.canonicalize()); Ok(config) })
}
}
fn load_file(path: &Path) -> Result<Config, Error> {
let text = try!(read_file(path));
let value = try!(text.parse::<toml::Value>());
Config::decode(&mut toml::Decoder::new(value)).map_err(From::from)
}
fn read_file(path: &Path) -> io::Result<String> {
let mut text = String::new();
let mut file = try!(File::open(path));
try!(file.read_to_string(&mut text));
Ok(text)
}
impl<'a> From<&'a str> for Error {
fn from(s: &'a str) -> Error {
Error::Str(s.to_owned())
}
}
impl From<Vec<toml::ParserError>> for Error {
fn from(v: Vec<toml::ParserError>) -> Error {
Error::Parse(v)
}
}
impl From<toml::DecodeError> for Error {
fn from(error: toml::DecodeError) -> Error {
Error::Decode(error)
}
}
impl From<io::Error> for Error {
fn from(error: io::Error) -> Error {
Error::IO(error)
}
}
impl fmt::Display for Error {
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
match *self {
Error::IO(ref error) => write!(w, "IO Error:\n{}", error),
Error::Parse(ref errors) => {
try!(write!(w, "Parse Error:\n"));
for error in errors {
try!(write!(w, "{}", error));
}
Ok(())
},
Error::Decode(ref error) => write!(w, "Decode Error:\n{}", error),
Error::Str(ref s) => write!(w, "Misc Error:\n{}", s),
}
}
}
impl Decodable for Repos {
fn decode<D: Decoder>(d: &mut D) -> Result<Repos, D::Error> {
d.read_struct("repos", 1, |d| {
Ok(Repos {
root: try!(d.read_struct_field("root", 0, |d| d.read_str().map(From::from))),
})
})
}
}
impl Encodable for Repos {
fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error> {
e.emit_struct("repos", 1, |e| {
e.emit_struct_field("root", 0, |e| e.emit_str(&self.root.to_string_lossy()))
})
let mut text = String::new();
File::open(path)?.read_to_string(&mut text)?;
let mut config: Config = toml::from_str(text.as_str())?;
config.repos.root = config.repos.root.canonicalize()?;
Ok(config)
}
}

Modified src/handler/about.rs

@@ -6,7 +6,7 @@ pub struct About;
impl Handler for About {
fn handle(&self, req: &mut Request) -> IronResult<Response> {
Html {
render: &render::About,
render: render::About(),
etag: None,
req: req,
}.into()

Modified src/handler/avatar.rs

@@ -1,8 +1,6 @@
use std::borrow::Cow;
use std::time::Duration;
use gravatar::{ self, Gravatar };
use hyper;
use hyper::client::Client;
use iron::IronResult;
use iron::headers::{ EntityTag, ContentType };
use iron::middleware::Handler;
@@ -15,6 +13,7 @@ use iron::method::Method;
use lru_time_cache::LruCache;
use std::sync::Mutex;
use super::utils::{ self, sha1, File, CacheMatches };
use reqwest;
pub struct Avatars {
enable_gravatar: bool,
@@ -75,12 +74,11 @@ impl Avatars {
let mut gravatar = Gravatar::new(user);
gravatar.size = Some(30);
gravatar.default = Some(gravatar::Default::Identicon);
let client = Client::new();
let mut res = client.get(&gravatar.image_url()).send().unwrap();
if res.status == hyper::Ok {
let mut res = reqwest::get(&gravatar.image_url()).unwrap();
if res.status().is_success() {
let mut buf = Vec::new();
res.read_to_end(&mut buf).unwrap();
let mime = res.headers.get::<ContentType>().unwrap().0.clone();
let mime = res.headers().get::<ContentType>().unwrap().0.clone();
let entity_tag = EntityTag::strong(sha1(&buf));
return Some(File(mime, entity_tag, buf.into()));
}

Modified src/handler/blob.rs

@@ -17,7 +17,7 @@ impl Handler for Blob {
match entry.entry.kind() {
Some(git2::ObjectType::Blob) => {
Html {
render: RepositoryWrapper(&context, &render::Blob(entry.entry.as_blob().unwrap(), &entry)),
render: RepositoryWrapper(&context, render::Blob(entry.entry.as_blob().unwrap(), &entry), Some(render::Tab::Files)),
etag: Some(EntityTag::weak(versioned_sha1!(&id))),
req: req,
}.into()

Modified src/handler/commit.rs

@@ -8,7 +8,7 @@ impl Handler for Commit {
let context = itry!(req.extensions.get::<RepositoryContext>().ok_or(Error::MissingExtension), status::InternalServerError);
let commit = itry!(context.commit(), status::NotFound);
Html {
render: RepositoryWrapper(&context, &render::Commit(&context, &commit)),
render: RepositoryWrapper(&context, render::Commit(&context, &commit), Some(render::Tab::Commits)),
etag: Some(EntityTag::weak(versioned_sha1!())),
req: req,
}.into()

Modified src/handler/commits.rs

@@ -7,11 +7,12 @@ use commit_tree::CommitTree;
pub struct Commits;
impl Handler for Commits {
#[allow(deprecated)]
fn handle(&self, req: &mut Request) -> IronResult<Response> {
let context = itry!(req.extensions.get::<RepositoryContext>().ok_or(Error::MissingExtension), status::InternalServerError);
let start_commit = req.url.clone().into_generic_url()
.query_pairs()
.unwrap_or_default()
// .unwrap_or_default()
.into_iter()
.find(|&(ref key, _)| key == "start")
.map(|(_, ref id)| Oid::from_str(id)
@@ -24,7 +25,7 @@ impl Handler for Commits {
};
let commits = itry!(CommitTree::new(&context.repository, &initial_commit, 50), status::InternalServerError);
Html {
render: RepositoryWrapper(&context, render::Commits(&context, &referenced_commit, commits)),
render: RepositoryWrapper(&context, render::Commits(&context, &referenced_commit, commits), Some(render::Tab::Commits)),
etag: Some(EntityTag::weak(versioned_sha1!(referenced_commit.commit.id().as_bytes()))),
req: req,
}.into()

Modified src/handler/compare.rs

@@ -38,13 +38,13 @@ impl Handler for Compare {
status::InternalServerError);
Html {
render: RepositoryWrapper(&context, &render::Compare {
render: RepositoryWrapper(&context, render::Compare {
context: &context,
new: new_commit,
old: old_commit,
base: base,
commits: commits,
}),
}, None),
etag: Some(EntityTag::weak(versioned_sha1!())),
req: req,
}.into()

Modified src/handler/error.rs

@@ -9,7 +9,7 @@ macro_rules! error_handler {
fn catch(&self, req: &mut Request, err: IronError) -> IronResult<Response> {
if err.response.status == Some(status::$name) {
Ok(Response::with((status::$name, Html {
render: &render::error::$name(&*err.error),
render: render::error::$name(&*err.error),
etag: None,
req: req,
})))

Modified src/handler/html.rs

@@ -4,30 +4,30 @@ use iron::modifier::Modifier;
use iron::request::Request;
use iron::response::Response;
use iron::{ status, IronResult };
use maud::RenderOnce;
use maud::Render;
use super::utils::{ self, CacheMatches };
use render::Wrapper;
use settings::Settings;
pub struct Html<'a, 'b: 'a, 'c: 'b, R: RenderOnce> {
pub struct Html<'a, 'b: 'a, 'c: 'b, R: Render> {
pub req: &'a Request<'b, 'c>,
pub render: R,
pub etag: Option<EntityTag>,
}
impl<'a, 'b, 'c, R: RenderOnce> Into<Response> for Html<'a, 'b, 'c, R> {
impl<'a, 'b, 'c, R: Render> Into<Response> for Html<'a, 'b, 'c, R> {
fn into(self) -> Response {
Response::with((status::Ok, self))
}
}
impl<'a, 'b, 'c, R: RenderOnce> Into<IronResult<Response>> for Html<'a, 'b, 'c, R> {
impl<'a, 'b, 'c, R: Render> Into<IronResult<Response>> for Html<'a, 'b, 'c, R> {
fn into(self) -> IronResult<Response> {
Ok(Response::with((status::Ok, self)))
}
}
impl<'a, 'b, 'c, R: RenderOnce> Modifier<Response> for Html<'a, 'b, 'c, R> {
impl<'a, 'b, 'c, R: Render> Modifier<Response> for Html<'a, 'b, 'c, R> {
fn modify(self, response: &mut Response) {
if let Some(ref etag) = self.etag {
let cache_headers = utils::cache_headers_for(&etag, Duration::from_secs(0));
@@ -38,7 +38,7 @@ impl<'a, 'b, 'c, R: RenderOnce> Modifier<Response> for Html<'a, 'b, 'c, R> {
}
}
let settings = self.req.extensions.get::<Settings>().cloned().unwrap_or_default();
let buffer = to_string!(^Wrapper(self.render, settings));
let buffer = Wrapper(self.render, settings).render();
let mime = mime!(Text/Html; Charset=Utf8);
(mime, buffer).modify(response)
}

Modified src/handler/register.rs

@@ -9,8 +9,8 @@ pub trait Register {
impl<'a> Register for &'a mut Router {
fn register<H: Route + Handler + Clone>(self, handler: H) -> &'a mut Router{
for route in <H as Route>::routes() {
self.route(<H as Route>::method(), route, handler.clone());
for route in H::routes() {
self.route(H::method(), route.clone(), handler.clone(), route);
}
self
}

Modified src/handler/repository.rs

@@ -10,7 +10,7 @@ impl Handler for Repository {
let resolved_head = itry!(head_ref.resolve(), status::InternalServerError);
let head_id = itry!(resolved_head.target().ok_or(Error::from("Couldn't resolve head")), status::InternalServerError);
Html {
render: RepositoryWrapper(&context, &render::Repository(&context.repository, &head_id)),
render: RepositoryWrapper(&context, render::Repository(&context.repository, &head_id), Some(render::Tab::Overview)),
etag: Some(EntityTag::weak(versioned_sha1!(head_id.as_bytes()))),
req: req,
}.into()

Modified src/handler/review.rs

@@ -15,7 +15,7 @@ impl Handler for Review {
let review = itry!(context.repository.review_for(id), status::NotFound);
let root = format!("/{}", context.path);
Html {
render: RepositoryWrapper(&context, &render::Review(&root, &review)),
render: RepositoryWrapper(&context, render::Review(&root, &review), Some(render::Tab::Reviews)),
etag: None,
req: req,
}.into()

Modified src/handler/reviews.rs

@@ -12,7 +12,7 @@ impl Handler for Reviews {
reviews.reverse();
let root = format!("/{}", context.path);
Html {
render: RepositoryWrapper(&context, &render::Reviews(&root, &reviews)),
render: RepositoryWrapper(&context, render::Reviews(&root, &reviews), Some(render::Tab::Reviews)),
etag: None,
req: req,
}.into()

Modified src/handler/route.rs

@@ -1,11 +1,13 @@
use std::borrow::Cow;
use hyper::method::Method;
use iron::method::Method;
pub trait Route {
fn method() -> Method;
fn route() -> Cow<'static, str> {
"".into()
}
fn routes() -> Vec<Cow<'static, str>> {
vec![Self::route()]
}

Modified src/handler/settings.rs

@@ -1,6 +1,5 @@
use super::base::*;
use settings;
use iron::Plugin;
// use params::{ Map, Params, Value };
#[derive(Clone)]
@@ -12,7 +11,7 @@ impl Handler for Settings {
fn handle(&self, req: &mut Request) -> IronResult<Response> {
let settings = itry!(req.extensions.get::<settings::Settings>().ok_or(Error::MissingExtension), status::InternalServerError);
Html {
render: &render::Settings(settings),
render: render::Settings(settings),
etag: None,
req: req,
}.into()

Modified src/handler/tree.rs

@@ -14,7 +14,7 @@ impl Handler for Tree {
match entry.entry.kind() {
Some(git2::ObjectType::Tree) => {
Html {
render: RepositoryWrapper(&context, &render::Tree(entry.entry.as_tree().unwrap(), &entry)),
render: RepositoryWrapper(&context, render::Tree(entry.entry.as_tree().unwrap(), &entry), Some(render::Tab::Files)),
etag: Some(EntityTag::weak(versioned_sha1!(&entry.commit.commit.id()))),
req: req,
}.into()

Modified src/main.rs

@@ -1,12 +1,14 @@
#![feature(plugin)]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![plugin(maud_macros)]
#![warn(trivial_numeric_casts)]
#![warn(unsafe_code)]
#![warn(unused_extern_crates)]
#![warn(unused_qualifications)]
#![warn(variant_size_differences)]
#![allow(unknown_lints)]
extern crate ammonia;
extern crate cookie;
extern crate maud;
#[macro_use]
extern crate iron;
@@ -16,20 +18,21 @@ extern crate git2;
extern crate git_appraise;
extern crate typemap;
extern crate chrono;
extern crate maud_pulldown_cmark;
extern crate gravatar;
extern crate hyper;
extern crate reqwest;
#[macro_use]
extern crate mime;
extern crate lru_time_cache;
extern crate time;
extern crate pulldown_cmark;
extern crate crypto;
extern crate unicase;
extern crate walkdir;
// extern crate params;
extern crate toml;
extern crate rustc_serialize;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate error_chain;
#[macro_use]
mod macros;
@@ -71,7 +74,7 @@ fn main() {
println!("Running with config");
println!("===================");
println!("{}", toml::encode_str(&config));
println!("{}", toml::to_string(&config).unwrap());
println!("===================");
let mut router = Router::new();

Modified src/render/about.rs

@@ -1,12 +1,12 @@
use { REVISION, DATE };
use maud_pulldown_cmark::Markdown;
use super::utils::Markdown;
renderers! {
About {
pub fn About() -> ::maud::Markup {
html! {
div.block {
div.block-header h3 "About"
div.block-details {
^Markdown::from_string(include_str!("../../README.md"))
(Markdown(include_str!("../../README.md")))
}
}
div.block {
@@ -15,11 +15,11 @@ renderers! {
"Website generated using "
a href="https://git.nemo157.com/grarr" "grarr"
" version "
^(env!("CARGO_PKG_VERSION"))
(env!("CARGO_PKG_VERSION"))
@match (REVISION, DATE) {
(Some(rev), None) => " (" a href={ "https://git.nemo157.com/grarr/commits/" ^rev } ^rev ")",
(None, Some(date)) => " (" ^date ")",
(Some(rev), Some(date)) => " (" a href={ "https://git.nemo157.com/grarr/commits/" ^rev } ^rev " " ^date ")",
(Some(rev), None) => " (" a href={ "https://git.nemo157.com/grarr/commits/" (rev) } (rev) ")",
(None, Some(date)) => " (" (date) ")",
(Some(rev), Some(date)) => " (" a href={ "https://git.nemo157.com/grarr/commits/" (rev) } (rev) " " (date) ")",
(None, None) => {},
}
}

Modified src/render/analysis.rs

@@ -1,18 +1,18 @@
use git_appraise;
use chrono::naive::datetime::NaiveDateTime;
renderers! {
Analysis(analysis: &'a git_appraise::Analysis) {
pub fn Analysis(analysis: &git_appraise::Analysis) -> ::maud::Markup {
html! {
@if let Some(url) = analysis.url() {
div.block.analysis {
div.block-header {
small {
a href={ ^url } {
a href=(url) {
"External analysis"
@if let Some(timestamp) = analysis.timestamp() {
" submitted at "
span.timestamp {
^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
(NaiveDateTime::from_timestamp(timestamp.seconds(), 0))
}
}
}

Modified src/render/avatar.rs

@@ -1,11 +1,11 @@
renderers! {
Avatar(email: &'a str, name: &'a Option<&'a str>) {
pub fn Avatar(email: &str, name: &Option<&str>) -> ::maud::Markup {
html! {
img.avatar
width=30
height=30
alt={ @if let Some(name) = *name { ^name " " } "<" ^email ">" }
title={ @if let Some(name) = *name { ^name " " } "<" ^email ">" }
src={ "/-/avatars/" ^email }
width="30"
height="30"
alt={ @if let Some(name) = *name { (name) " " } "<" (email) ">" }
title={ @if let Some(name) = *name { (name) " " } "<" (email) ">" }
src={ "/-/avatars/" (email) }
{}
}
}

Modified src/render/ci_status.rs

@@ -1,27 +1,29 @@
use git_appraise::{ self, Status };
use chrono::naive::datetime::NaiveDateTime;
renderers! {
CIStatus(ci_status: &'a git_appraise::CIStatus) {
pub fn CIStatus(ci_status: &git_appraise::CIStatus) -> ::maud::Markup {
html! {
div.block.ci-status {
div.block-header {
small {
@match ci_status.url() {
Some(url) => {
a href={ ^url } {
^CIStatusText(ci_status)
a href=(url) {
(CIStatusText(ci_status))
}
},
None => ^CIStatusText(ci_status)
None => (CIStatusText(ci_status))
}
}
}
}
}
}
CIStatusText(ci_status: &'a git_appraise::CIStatus) {
pub fn CIStatusText(ci_status: &git_appraise::CIStatus) -> ::maud::Markup {
html! {
span.agent {
^ci_status.agent().unwrap_or("<Unknown agent>")
(ci_status.agent().unwrap_or("<Unknown agent>"))
}
" reported status "
span class={
@@ -40,7 +42,7 @@ renderers! {
}
@if let Some(timestamp) = ci_status.timestamp() {
" at "
span.timestamp ^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
span.timestamp (NaiveDateTime::from_timestamp(timestamp.seconds(), 0))
}
}
}

Modified src/render/comment.rs

@@ -1,20 +1,20 @@
use git_appraise;
use maud_pulldown_cmark::Markdown;
use super::utils::Markdown;
use chrono::naive::datetime::NaiveDateTime;
renderers! {
CommentHeader(comment: &'a git_appraise::Comment) {
pub fn CommentHeader(comment: &git_appraise::Comment) -> ::maud::Markup {
html! {
div.block-header.row.center {
^super::Avatar(comment.author().unwrap_or("unknown@example.org"), &None)
(super::Avatar(comment.author().unwrap_or("unknown@example.org"), &None))
div.column {
div {
span.user
^comment.author().unwrap_or("<unknown author>")
(comment.author().unwrap_or("<unknown author>"))
" commented "
@if let Some(timestamp) = comment.timestamp() {
"on "
span.timestamp
^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
(NaiveDateTime::from_timestamp(timestamp.seconds(), 0))
" "
}
"with status "
@@ -36,24 +36,28 @@ renderers! {
}
}
}
}
CommentDetails(comment: &'a git_appraise::Comment) {
pub fn CommentDetails(comment: &git_appraise::Comment) -> ::maud::Markup {
html! {
@if let Some(location) = comment.location() {
div.block-details.comment-details {
pre { code { ^(format!("{:?}", location)) } }
pre { code { ((format!("{:?}", location))) } }
}
}
@if let Some(description) = comment.description() {
div.block-details.comment-details {
^Markdown::from_string(description)
(Markdown(description))
}
}
}
}
Comment(comment: &'a git_appraise::Comment) {
pub fn Comment(comment: &git_appraise::Comment) -> ::maud::Markup {
html! {
div.block.comment {
^CommentHeader(comment)
^CommentDetails(comment)
(CommentHeader(comment))
(CommentDetails(comment))
}
}
}

Modified src/render/commit.rs

@@ -1,7 +1,6 @@
use std::fmt;
use git2;
use maud::{ RenderOnce, PreEscaped };
use maud_pulldown_cmark::Markdown;
use maud::PreEscaped;
use super::utils::Markdown;
use commit_tree;
use chrono::naive::datetime::NaiveDateTime;
use referenced_commit::ReferencedCommit;
@@ -18,92 +17,100 @@ fn non_summary<'a>(commit: &'a git2::Commit<'a>) -> Option<&'a str> {
.and_then(|message| message.splitn(2, '\n').map(|l| if l.starts_with('\r') { &l[1..] } else { l }).nth(1))
}
renderers! {
CommitStub(context: &'a RepositoryContext, commit: &'a git2::Commit<'a>) {
pub fn CommitStub(context: &RepositoryContext, commit: &git2::Commit) -> ::maud::Markup {
html! {
div.block {
^CommitHeader(context, commit)
(CommitHeader(context, commit))
}
}
}
CommitHeader(context: &'a RepositoryContext, commit: &'a git2::Commit<'a>) {
pub fn CommitHeader(context: &RepositoryContext, commit: &git2::Commit) -> ::maud::Markup {
html! {
div.block-header {
div.row {
@if commit.author().email() == commit.committer().email() {
@if let Some(email) = commit.author().email() {
^super::Avatar(email, &commit.author().name())
(super::Avatar(email, &commit.author().name()))
}
} @else {
div.column.fixed {
@if let Some(email) = commit.author().email() {
^super::Avatar(email, &commit.author().name())
(super::Avatar(email, &commit.author().name()))
}
@if let Some(email) = commit.committer().email() {
^super::Avatar(email, &commit.committer().name())
(super::Avatar(email, &commit.committer().name()))
}
}
}
div.column {
div {
a href={ "/" ^context.path "/commit/" ^commit.id() } {
^(super::reference::Commit(commit))
a href={ "/" (context.path) "/commit/" (commit.id()) } {
(super::reference::Commit(commit))
" "
@match summary(commit) {
Some(summary) => ^summary,
Some(summary) => (summary),
None => "<No summary provided>",
}
}
}
@if (commit.author().name(), commit.author().email()) == (commit.committer().name(), commit.committer().email()) {
small {
^super::Signature(&commit.author(), &false)
"committed at" ^PreEscaped("&nbsp;")
span.timestamp { ^NaiveDateTime::from_timestamp(commit.time().seconds(), 0) }
(super::Signature(commit.author(), false))
"committed at" (PreEscaped("&nbsp;"))
span.timestamp { (NaiveDateTime::from_timestamp(commit.time().seconds(), 0)) }
}
} @else {
small {
^super::Signature(&commit.author(), &false)
"authored at" ^PreEscaped("&nbsp;")
span.timestamp { ^NaiveDateTime::from_timestamp(commit.time().seconds(), 0) }
(super::Signature(commit.author(), false))
"authored at" (PreEscaped("&nbsp;"))
span.timestamp { (NaiveDateTime::from_timestamp(commit.time().seconds(), 0)) }
}
small {
^super::Signature(&commit.committer(), &false)
"committed at" ^PreEscaped("&nbsp;")
span.timestamp { ^NaiveDateTime::from_timestamp(commit.author().when().seconds(), 0) }
(super::Signature(commit.committer(), false))
"committed at" (PreEscaped("&nbsp;"))
span.timestamp { (NaiveDateTime::from_timestamp(commit.author().when().seconds(), 0)) }
}
}
}
}
}
}
}
CommitDetails(context: &'a RepositoryContext, commit: &'a git2::Commit<'a>) {
pub fn CommitDetails(context: &RepositoryContext, commit: &git2::Commit) -> ::maud::Markup {
html! {
div.commit.block {
^CommitHeader(context, commit)
(CommitHeader(context, commit))
@if let Some(non_summary) = non_summary(commit) {
@if !non_summary.is_empty() {
div.block-details.message {
^Markdown::from_string(non_summary)
(Markdown(non_summary))
}
}
}
}
}
}
Commit(context: &'a RepositoryContext, commit: &'a git2::Commit<'a>) {
^CommitDetails(context, commit)
^super::DiffCommit(context, commit)
pub fn Commit(context: &RepositoryContext, commit: &git2::Commit) -> ::maud::Markup {
html! {
(CommitDetails(context, commit))
(super::DiffCommit(context, commit))
}
}
NextPage(context: &'a RepositoryContext, commit: &'a ReferencedCommit<'a>, next: &'a Option<&'a git2::Commit<'a>>) {
pub fn NextPage(context: &RepositoryContext, commit: &ReferencedCommit, next: &Option<&git2::Commit>) -> ::maud::Markup {
html! {
div.block div.block-header.row {
div.column.fixed {
a href={
"/"
^context.path
(context.path)
"/commits/"
^commit.shorthand_or_id()
(commit.shorthand_or_id())
} {
"Back to beginning (" ^reference::Commit(&commit.commit) ")"
"Back to beginning (" (reference::Commit(&commit.commit)) ")"
}
}
div.column {}
@@ -111,12 +118,12 @@ renderers! {
div.column.fixed {
a.float-right href={
"/"
^context.path
(context.path)
"/commits/"
^commit.shorthand_or_id()
"?start=" ^next.id()
(commit.shorthand_or_id())
"?start=" (next.id())
} {
"Next page (" ^reference::Commit(next) ")"
"Next page (" (reference::Commit(next)) ")"
}
}
}
@@ -124,65 +131,57 @@ renderers! {
}
}
pub struct Commits<'repo, 'a>(pub &'a RepositoryContext, pub &'a ReferencedCommit<'a>, pub commit_tree::CommitTree<'repo>);
impl<'repo, 'a> RenderOnce for Commits<'repo, 'a> {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
let Commits(context, commit, mut commits) = self;
let first = commits.next();
let mut id = 0;
html!(w, {
@if let Some((first, mut sub)) = first {
div.block {
div.block-header {
h3 {
"Commits for ref " ^super::Reference(commit)
@if first.id() != commit.commit.id() {
small { " (showing from " ^reference::Commit(&first) ")" }
}
pub fn Commits(context: &RepositoryContext, commit: &ReferencedCommit, mut commits: commit_tree::CommitTree) -> ::maud::Markup {
let first = commits.next();
let mut id = 0;
html!({
@if let Some((first, mut sub)) = first {
div.block {
div.block-header {
h3 {
"Commits for ref " (super::Reference(commit))
@if first.id() != commit.commit.id() {
small { " (showing from " (reference::Commit(&first)) ")" }
}
}
}
^CommitStub(context, &first)
@if !sub.is_empty() {
div.subtree {
input.expander disabled?=(sub.len() == 1) id={ "commits-expander-" ^id } type="checkbox" checked? { }
label for={ "commits-expander-" ^id } { i.fa.fa-fw.chevron {} }
^CommitTree(context, &mut sub, &mut id)
}
}
(CommitStub(context, &first))
@if !sub.is_empty() {
div.subtree {
input.expander disabled?[sub.len() == 1] id={ "commits-expander-" (id) } type="checkbox" checked? { }
label for={ "commits-expander-" (id) } { i.fa.fa-fw.chevron {} }
(CommitTree(context, &mut sub, &mut id))
}
^CommitTree(context, &mut commits, &mut id)
^NextPage(context, commit, &commits.next_after())
}
})
}
(CommitTree(context, &mut commits, &mut id))
(NextPage(context, commit, &commits.next_after()))
}
})
}
pub struct CommitTree<'a, 'repo: 'a>(pub &'a RepositoryContext, pub &'a mut commit_tree::CommitTree<'repo>, pub &'a mut u32);
impl<'repo, 'a> RenderOnce for CommitTree<'repo, 'a> {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
let CommitTree(context, commits, id) = self;
*id = *id + 1;
html!(w, {
div.commits {
@for (commit, mut sub) in commits {
^CommitStub(context, &commit)
@if !sub.is_empty() {
div.subtree {
input.expander disabled?=(sub.len() == 1) id={ "commits-expander-" ^id } type="checkbox" checked? { }
label for={ "commits-expander-" ^id } { i.fa.fa-fw.chevron {} }
^CommitTree(context, &mut sub, id)
}
pub fn CommitTree(context: &RepositoryContext, commits: &mut commit_tree::CommitTree, id: &mut u32) -> ::maud::Markup {
*id = *id + 1;
html!({
div.commits {
@for (commit, mut sub) in commits {
(CommitStub(context, &commit))
@if !sub.is_empty() {
div.subtree {
input.expander disabled?[sub.len() == 1] id={ "commits-expander-" (id) } type="checkbox" checked? { }
label for={ "commits-expander-" (id) } { i.fa.fa-fw.chevron {} }
(CommitTree(context, &mut sub, id))
}
}
}
})
}
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Commit<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Commits) }
}
})
}
impl<'a, 'b> super::repository_wrapper::RepositoryTab for Commits<'a, 'b> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Commits) }
}
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Commit<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Commits) }
// }
//
// impl<'a, 'b> super::repository_wrapper::RepositoryTab for Commits<'a, 'b> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Commits) }
// }

Modified src/render/compare.rs

@@ -1,5 +1,4 @@
use std::fmt;
use maud::Render;
use maud::{ Render, Markup };
use git2;
use repository_context::RepositoryContext;
use referenced_commit::ReferencedCommit;
@@ -13,27 +12,23 @@ pub struct Compare<'r> {
}
impl<'r> Render for Compare<'r> {
fn render(&self, mut w: &mut fmt::Write) -> fmt::Result {
html!(w, {
div.block div.block-header h2 { "Comparing base " ^super::Reference(&self.old) " to " ^super::Reference(&self.new) }
fn render(&self) -> Markup {
html!({
div.block div.block-header h2 { "Comparing base " (super::Reference(&self.old)) " to " (super::Reference(&self.new)) }
div.block {
div.block-header h3 { "Commits" }
div.block-details {
@for commit in &self.commits {
^super::CommitStub(&self.context, commit)
(super::CommitStub(&self.context, commit))
}
}
}
div.block {
div.block-header h3 { "File changes" }
div.block-details {
^super::DiffCommits(&self.context, &Some(&self.base), &self.new.commit)
(super::DiffCommits(&self.context, &Some(&self.base), &self.new.commit))
}
}
})
}
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Compare<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { None }
}

Modified src/render/diff.rs

@@ -3,120 +3,127 @@ use std::mem;
use std::path::PathBuf;
use std::cell::RefCell;
use git2;
use maud::{ RenderOnce };
use repository_context::RepositoryContext;
renderers! {
DiffCommits(context: &'a RepositoryContext, old_commit: &'a Option<&'a git2::Commit<'a>>, new_commit: &'a git2::Commit<'a>) {
pub fn DiffCommits(context: &RepositoryContext, old_commit: &Option<&git2::Commit>, new_commit: &git2::Commit) -> ::maud::Markup {
html! {
@match context.repository.diff_tree_to_tree(old_commit.map(|commit| commit.tree().unwrap()).as_ref(), Some(&new_commit.tree().unwrap()), None) {
Ok(ref diff) => ^Diff(context, new_commit, diff),
Err(ref error) => ^super::Error(error),
Ok(ref diff) => (Diff(context, new_commit, diff)),
Err(ref error) => (super::Error(error)),
}
}
}
DiffCommit(context: &'a RepositoryContext, commit: &'a git2::Commit<'a>) {
^DiffCommits(context, &commit.parents().nth(0).as_ref(), commit)
pub fn DiffCommit(context: &RepositoryContext, commit: &git2::Commit) -> ::maud::Markup {
html! {
(DiffCommits(context, &commit.parents().nth(0).as_ref(), commit))
}
}
DiffHeader(context: &'a RepositoryContext, new_commit: &'a git2::Commit<'a>, delta: &'a DiffDelta) {
pub fn DiffHeader(context: &RepositoryContext, new_commit: &git2::Commit, delta: &DiffDelta) -> ::maud::Markup {
html! {
div.block-header.row {
div.column {
@match (delta.status.0, delta.new_file.as_ref(), delta.old_file.as_ref()) {
(git2::Delta::Added, Some(ref new_file), _) => {
h3 { span { "Added " span.path ^new_file.to_string_lossy() } }
h3 { span { "Added " span.path (new_file.to_string_lossy()) } }
},
(git2::Delta::Deleted, _, Some(ref old_file)) => {
h3 { span { "Deleted " span.path ^old_file.to_string_lossy() } }
h3 { span { "Deleted " span.path (old_file.to_string_lossy()) } }
},
(git2::Delta::Modified, Some(ref new_file), Some(ref old_file)) if old_file == new_file => {
h3 { span { "Modified " span.path ^new_file.to_string_lossy() } }
h3 { span { "Modified " span.path (new_file.to_string_lossy()) } }
},
(git2::Delta::Modified, Some(ref new_file), Some(ref old_file)) if old_file != new_file => {
h3 { span { "Modified " span.path ^new_file.to_string_lossy() "(Previously " span.path ^old_file.to_string_lossy() ")" } }
h3 { span { "Modified " span.path (new_file.to_string_lossy()) "(Previously " span.path (old_file.to_string_lossy()) ")" } }
},
(git2::Delta::Renamed, Some(ref new_file), Some(ref old_file)) => {
h3 { span { "Renamed " span.path ^old_file.to_string_lossy() " to " span.path ^new_file.to_string_lossy() } }
h3 { span { "Renamed " span.path (old_file.to_string_lossy()) " to " span.path (new_file.to_string_lossy()) } }
},
(git2::Delta::Copied, Some(ref new_file), Some(ref old_file)) => {
h3 { span { "Copied " span.path ^old_file.to_string_lossy() " to " span.path ^new_file.to_string_lossy() } }
h3 { span { "Copied " span.path (old_file.to_string_lossy()) " to " span.path (new_file.to_string_lossy()) } }
},
(status, ref new_file, ref old_file) => ^(format!("{:?} ({:?} -> {:?}) (should not happen)", status, old_file, new_file))
(status, ref new_file, ref old_file) => (format!("{:?} ({:?} -> {:?}) (should not happen)", status, old_file, new_file))
}
}
@if let Some(new_file) = delta.new_file.as_ref() {
div.column.fixed {
a href={ "/" ^context.path "/blob/" ^new_commit.id() "/" ^new_file.to_string_lossy() } { "View" }
a href={ "/" (context.path) "/blob/" (new_commit.id()) "/" (new_file.to_string_lossy()) } { "View" }
}
}
}
}
}
DiffLineNums(id: &'a str, old_lineno: &'a Option<u32>, new_lineno: &'a Option<u32>) {
pub fn DiffLineNums(id: &str, old_lineno: &Option<u32>, new_lineno: &Option<u32>) -> ::maud::Markup {
html! {
@if let Some(num) = *old_lineno {
a.line-num
id={ ^id "L" ^num }
href={ "#" ^id "L" ^num }
data-line-num={ ^(format!("{: >4}", num)) }
id={ (id) "L" (num) }
href={ "#" (id) "L" (num) }
data-line-num=(format!("{: >4}", num))
{ }
} @else {
span.line-num { }
}
@if let Some(num) = *new_lineno {
a.line-num
id={ ^id "R" ^num }
href={ "#" ^id "R" ^num }
data-line-num={ ^(format!("{: >4}", num)) }
id={ (id) "R" (num) }
href={ "#" (id) "R" (num) }
data-line-num=(format!("{: >4}", num))
{ " " }
} @else {
span.line-num { " " }
}
}
}
DiffDetails(id: String, extension: Option<String>, hunks: Vec<(DiffHunk, Vec<DiffLine>)>) {
pre.block-details code class={ "hljs lang-" ^extension.unwrap_or("".to_owned()) } {
pub fn DiffDetails(id: String, extension: Option<String>, hunks: Vec<(DiffHunk, Vec<DiffLine>)>) -> ::maud::Markup {
html! {
pre.block-details code class={ "hljs lang-" (extension.unwrap_or("".to_owned())) } {
@if hunks.is_empty() {
div.line.hunk-header span.text "No content"
}
@for (hunk, lines) in hunks {
div.line.hunk-header {
^DiffLineNums(&*id, &None, &None)
span.text ^hunk.header.unwrap()
(DiffLineNums(&*id, &None, &None))
span.text (hunk.header.unwrap())
}
@for line in lines {
@match (line.origin, line.content) {
(Origin::LineContext, Some(ref content)) => {
div.line.context {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
span.text ^content
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text (content)
}
},
(Origin::LineAddition, Some(ref content)) => {
div.line.addition {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
span.text ^content
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text (content)
}
},
(Origin::LineDeletion, Some(ref content)) => {
div.line.deletion {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
span.text ^content
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text (content)
}
},
(Origin::AddEOF, _) => {
div.line.add-eof {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text "Added EOF"
}
},
(Origin::RemoveEOF, _) => {
div.line.remove-eof {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text "Removed EOF"
}
},
(Origin::LineBinary, _) => {
div.line.binary {
^DiffLineNums(&*id, &line.old_lineno, &line.new_lineno)
(DiffLineNums(&*id, &line.old_lineno, &line.new_lineno))
span.text "Binary file changed"
}
},
@@ -130,15 +137,17 @@ renderers! {
}
}
}
}
Diff(context: &'a RepositoryContext, new_commit: &'a git2::Commit<'a>, diff: &'a git2::Diff<'a>) {
pub fn Diff(context: &RepositoryContext, new_commit: &git2::Commit, diff: &git2::Diff) -> ::maud::Markup {
html! {
@for (delta, hunks) in group(diff).unwrap() {
div.diff.block id=^delta.id() {
^DiffHeader(context, new_commit, &delta)
^DiffDetails(delta.id(), delta.new_file.or(delta.old_file).and_then(|path| path.extension().map(|s| s.to_string_lossy().into_owned())), hunks)
div.diff.block id=(delta.id()) {
(DiffHeader(context, new_commit, &delta))
(DiffDetails(delta.id(), delta.new_file.or(delta.old_file).and_then(|path| path.extension().map(|s| s.to_string_lossy().into_owned())), hunks))
}
}
^super::HighlightJS
(super::HighlightJS())
}
}
@@ -249,7 +258,7 @@ impl<'a> From<git2::DiffLine<'a>> for DiffLine {
}
}
#[cfg_attr(feature = "clippy", allow(type_complexity))] // This is temporary till I figure out a nicer way to do this without all the allocation
#[allow(type_complexity)] // This is temporary till I figure out a nicer way to do this without all the allocation
fn group(diff: &git2::Diff) -> Result<Vec<(DiffDelta, Vec<(DiffHunk, Vec<DiffLine>)>)>, git2::Error> {
let mut deltas = Vec::new();
let hunks = RefCell::new(Vec::new());
@@ -296,7 +305,7 @@ fn group(diff: &git2::Diff) -> Result<Vec<(DiffDelta, Vec<(DiffHunk, Vec<DiffLin
impl Eq for Delta { }
impl PartialEq<Delta> for Delta {
#[cfg_attr(feature = "clippy", allow(match_same_arms))]
#[allow(match_same_arms)]
fn eq(&self, other: &Delta) -> bool {
match (self.0, other.0) {
(git2::Delta::Unmodified, git2::Delta::Unmodified) => true,

Modified src/render/error.rs

@@ -1,34 +1,40 @@
use iron;
renderers! {
Error(error: &'a iron::Error) {
pre.block-details code ^error
pub fn Error(error: &iron::Error) -> ::maud::Markup {
html! {
pre.block-details code (error)
}
}
BadRequest(error: &'a iron::Error) {
pub fn BadRequest(error: &iron::Error) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h2 "Bad Request"
}
^Error(error)
(Error(error))
}
}
}
NotFound(error: &'a iron::Error) {
pub fn NotFound(error: &iron::Error) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h2 "Not Found"
}
^Error(error)
(Error(error))
}
}
}
InternalServerError(error: &'a iron::Error) {
pub fn InternalServerError(error: &iron::Error) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h2 "Internal Server Error"
}
^Error(error)
(Error(error))
}
}
}

Modified src/render/event.rs

@@ -1,24 +1,26 @@
use git_appraise;
renderers! {
Events(root: String, events: git_appraise::Events) {
pub fn Events(root: String, events: git_appraise::Events) -> ::maud::Markup {
html! {
@for event in events {
^Event(root.clone(), event)
(Event(root.clone(), event))
}
}
}
Event(root: String, event: Box<git_appraise::Event>) {
pub fn Event(root: String, event: Box<git_appraise::Event>) -> ::maud::Markup {
html! {
@if let Some(request) = event.as_request() {
^super::Request(&root, request)
(super::Request(&root, request))
}
@if let Some(comment) = event.as_comment() {
^super::Comment(comment)
(super::Comment(comment))
}
@if let Some(analysis) = event.as_analysis() {
^super::Analysis(analysis)
(super::Analysis(analysis))
}
@if let Some(ci_status) = event.as_ci_status() {
^super::CIStatus(ci_status)
(super::CIStatus(ci_status))
}
}
}

Modified src/render/fa.rs

@@ -1,9 +1,9 @@
use std::fmt;
use maud::RenderOnce;
use maud::{ Render, Markup };
macro_rules! fa {
($($e:ident => $v:expr,)*) => {
#[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum FA { $($e,)* }
impl FA {
fn class(self) -> &'static str {
@@ -30,6 +30,7 @@ fa! {
}
#[allow(dead_code)]
#[derive(Clone, Copy)]
pub enum FAM {
FixedWidth(FA),
Lg(FA),
@@ -48,14 +49,14 @@ impl FAM {
}
}
impl RenderOnce for FA {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
html!(w, { i class=^self.class() { } })
impl Render for FA {
fn render(&self) -> Markup {
html!({ i class=(self.class()) { } })
}
}
impl RenderOnce for FAM {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
html!(w, { i class=^self.class() { } })
impl Render for FAM {
fn render(&self) -> Markup {
html!({ i class=(self.class()) { } })
}
}

Modified src/render/highlight.rs

@@ -1,5 +1,5 @@
renderers! {
HighlightJS {
pub fn HighlightJS() -> ::maud::Markup {
html! {
link rel="stylesheet" href="/-/static/css/highlight-solarized-light.css" {}
script src="/-/static/js/highlight.js" {}
script { "hljs.initHighlightingOnLoad()" }

Modified src/render/macros.rs

@@ -1,52 +1,6 @@
#[macro_export]
macro_rules! to_string {
($($x:tt)*) => {{
let mut s = String::new();
html!(s, $($x)*).unwrap();
s
html!($($x)*).into_string();
}}
}
#[macro_export]
macro_rules! renderers {
() => ();
($name:ident { $($html:tt)* } $($rest:tt)*) => (
pub struct $name;
impl ::maud::Render for $name {
fn render(&self, mut w: &mut ::std::fmt::Write) -> ::std::fmt::Result {
html!(w, $($html)*)
}
}
renderers!($($rest)*);
);
($name:ident ($($var:ident : &'a $var_type:ty),+) { $($html:tt)* } $($rest:tt)*) => (
pub struct $name<'a>($(pub &'a $var_type),+);
impl<'a> ::maud::Render for $name<'a> {
fn render(&self, mut w: &mut ::std::fmt::Write) -> ::std::fmt::Result {
let &$name($($var),+) = self;
html!(w, $($html)*)
}
}
renderers!($($rest)*);
);
($name:ident ($($var:ident : &'a mut $var_type:ty),+) { $($html:tt)* } $($rest:tt)*) => (
pub struct $name<'a>($(pub &'a $var_type),+);
impl<'a> ::maud::Render for $name<'a> {
fn render(&self, mut w: &mut ::std::fmt::Write) -> ::std::fmt::Result {
let &$name($($var),+) = self;
html!(w, $($html)*)
}
}
renderers!($($rest)*);
);
($name:ident ($($var:ident : $var_type:ty),+) { $($html:tt)* } $($rest:tt)*) => (
pub struct $name($(pub $var_type),+);
impl ::maud::RenderOnce for $name {
fn render_once(self, mut w: &mut ::std::fmt::Write) -> ::std::fmt::Result {
let $name($($var),+) = self;
html!(w, $($html)*)
}
}
renderers!($($rest)*);
);
}

Modified src/render/mod.rs

@@ -1,3 +1,5 @@
#![allow(non_snake_case)]
#[macro_use]
mod macros;
@@ -35,7 +37,7 @@ pub use self::analysis::{ Analysis };
pub use self::avatar::{ Avatar };
pub use self::commit::{ Commit, CommitStub, Commits };
pub use self::repository::{ Repository, Repositories, RepositoryHeader };
pub use self::repository_wrapper::{ RepositoryWrapper };
pub use self::repository_wrapper::{ RepositoryWrapper, Tab };
pub use self::error::{ Error };
pub use self::tree::{ TreeEntry, Tree, Blob };
pub use self::wrapper::Wrapper;

Modified src/render/reference.rs

@@ -6,15 +6,17 @@ fn short(oid: git2::Oid) -> String {
oid.as_bytes().iter().take(3).flat_map(|b| vec![HEX[((b >> 4) & 0xFu8) as usize] as char, HEX[(b & 0xFu8) as usize] as char]).collect()
}
renderers! {
Commit(commit: &'a git2::Commit<'a>) {
span.id title=^commit.id() { ^short(commit.id()) }
pub fn Commit(commit: &git2::Commit) -> ::maud::Markup {
html! {
span.id title=(commit.id()) { (short(commit.id())) }
}
}
Reference(commit: &'a ReferencedCommit<'a>) {
pub fn Reference(commit: &ReferencedCommit) -> ::maud::Markup {
html! {
@match commit.reference.as_ref().and_then(|r| r.shorthand()) {
Some(ref reff) => span.ref title=^commit.commit.id() { ^reff },
None => ^Commit(&commit.commit),
Some(ref reff) => span.ref title=(commit.commit.id()) { (reff) },
None => (Commit(&commit.commit)),
}
}
}

Modified src/render/repository.rs

@@ -1,8 +1,9 @@
use std::str;
use ammonia;
use git2::{ self, Oid };
use pulldown_cmark::{ Parser, html, Event, Tag };
use maud::{ PreEscaped };
use maud_pulldown_cmark::Markdown;
use super::utils::Markdown;
use super::fa::{ FA, FAM };
use { RepositoryExtension };
@@ -15,14 +16,14 @@ fn find_readme(head_id: Oid, repo: &git2::Repository) -> Option<String> {
str::from_utf8(blob.content()).ok().map(|s| s.to_owned())
}
fn description(repo: &git2::Repository) -> Option<String> {
fn description(repo: &git2::Repository) -> Option<PreEscaped<String>> {
let head_id = expect!(try_expect!(try_expect!(repo.head()).resolve()).target());
// Render the readme and grab the first <p> element from it.
find_readme(head_id, repo)
.map(|readme| {
let mut s = String::new();
let mut unsafe_html = String::new();
html::push_html(
&mut s,
&mut unsafe_html,
Parser::new(&*readme)
.skip_while(|ev| match *ev {
Event::Start(Tag::Paragraph) => false,
@@ -32,42 +33,47 @@ fn description(repo: &git2::Repository) -> Option<String> {
Event::End(Tag::Paragraph) => false,
_ => true,
}));
s
let safe_html = ammonia::clean(&unsafe_html);
PreEscaped(safe_html)
})
}
renderers! {
Repository(repo: &'a git2::Repository, head_id: &'a Oid) {
pub fn Repository(repo: &git2::Repository, head_id: &Oid) -> ::maud::Markup {
html! {
@if let Some(readme) = find_readme(*head_id, repo) {
div.block {
div.block-details {
^Markdown::from_string(&*readme).with_header_ids()
(Markdown(&*readme))
}
}
}
}
}
RepositoryIcon(mul: &'a u8, repo: &'a git2::Repository) {
pub fn RepositoryIcon(mul: &u8, repo: &git2::Repository) -> ::maud::Markup {
html! {
@match repo.origin_url() {
Some(_) => ^FAM::X(*mul, FA::CodeFork),
None => ^FAM::X(*mul, FA::Home),
Some(_) => (FAM::X(*mul, FA::CodeFork)),
None => (FAM::X(*mul, FA::Home)),
}
}
}
RepositoryHeader(path: &'a str, repo: &'a git2::Repository) {
pub fn RepositoryHeader(path: &str, repo: &git2::Repository) -> ::maud::Markup {
html! {
div.block-header {
div.row.center {
^RepositoryIcon(&3, repo)
(RepositoryIcon(&3, repo))
div.column {
h1 { a href={ "/" ^path } { ^path } }
h1 { a href={ "/" (path) } { (path) } }
@if let Some(origin) = repo.origin_url() {
h4 { "(fork of " ^super::MaybeLink(&origin, &origin) ")" }
h4 { "(fork of " (super::MaybeLink(&origin, &origin)) ")" }
}
@if let Some(mirrors) = repo.mirrors() {
h4 {
"(mirrored on"
@for (name, url) in mirrors {
" " a href=^url { ^name }
" " a href=(url) { (name) }
}
")"
}
@@ -76,8 +82,8 @@ renderers! {
@if repo.find_branch("gh-pages", git2::BranchType::Local).is_ok() {
div.column.fixed {
h3 {
a href={ "/" ^path "/pages/" } {
^FAM::Lg(FA::Book)
a href={ "/" (path) "/pages/" } {
(FAM::Lg(FA::Book))
" Pages"
}
}
@@ -86,35 +92,39 @@ renderers! {
}
}
}
}
RepositoryStub(path: &'a str, repo: &'a git2::Repository) {
pub fn RepositoryStub(path: &str, repo: &git2::Repository) -> ::maud::Markup {
html! {
div.block {
div.block-header {
div.row.center {
^RepositoryIcon(&2, repo)
(RepositoryIcon(&2, repo))
div.column {
h3 { a href={ "/" ^path } { ^path } }
h3 { a href={ "/" (path) } { (path) } }
@if let Some(origin) = repo.origin_url() {
h6 { "(fork of " ^super::MaybeLink(&origin, &origin) ")" }
h6 { "(fork of " (super::MaybeLink(&origin, &origin)) ")" }
}
}
}
}
@if let Some(description) = description(repo) {
div.block-details {
^PreEscaped(description)
(description)
}
}
}
}
}
Repositories(repos: Vec<(String, git2::Repository)>) {
pub fn Repositories(repos: Vec<(String, git2::Repository)>) -> ::maud::Markup {
html! {
@for (path, repo) in repos {
^RepositoryStub(&path, &repo)
(RepositoryStub(&path, &repo))
}
}
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Repository<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Overview) }
}
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Repository<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Overview) }
// }

Modified src/render/repository_wrapper.rs

@@ -1,5 +1,4 @@
use std::fmt;
use maud::RenderOnce;
use maud::{ Render, Markup };
use { RepositoryContext };
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
@@ -10,33 +9,28 @@ pub enum Tab {
Reviews,
}
pub trait RepositoryTab {
fn tab() -> Option<Tab>;
}
pub struct RepositoryWrapper<'a, R: RepositoryTab>(pub &'a RepositoryContext, pub R);
pub struct RepositoryWrapper<'a, R: Render>(pub &'a RepositoryContext, pub R, pub Option<Tab>);
impl<'a, R: RenderOnce + RepositoryTab> RenderOnce for RepositoryWrapper<'a, R> {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
let tab = R::tab();
let RepositoryWrapper(context, content) = self;
html!(w, {
impl<'a, R: Render> Render for RepositoryWrapper<'a, R> {
fn render(&self) -> Markup {
let &RepositoryWrapper(ref context, ref content, ref tab) = self;
html!({
div.block {
^super::RepositoryHeader(&context.path, &context.repository)
^RepositoryWrapperTabs(&tab, &context.path, context.repository.head().unwrap().shorthand().unwrap())
(super::RepositoryHeader(&context.path, &context.repository))
(RepositoryWrapperTabs(&tab, &context.path, context.repository.head().unwrap().shorthand().unwrap()))
}
^content
(content)
})
}
}
renderers! {
RepositoryWrapperTabs(tab: &'a Option<Tab>, path: &'a str, head: &'a str) {
pub fn RepositoryWrapperTabs(tab: &Option<Tab>, path: &str, head: &str) -> ::maud::Markup {
html! {
div.tabs {
div class={ "overview" @if *tab == Some(Tab::Overview) { " selected" } } { a href={ "/" ^path } { "Overview" } }
div class={ "files" @if *tab == Some(Tab::Files) { " selected" } } { a href={ "/" ^path "/tree/" ^head } { "Files" } }
div class={ "commits" @if *tab == Some(Tab::Commits) { " selected" } } { a href={ "/" ^path "/commits/" ^head } { "Commits" } }
div class={ "reviews" @if *tab == Some(Tab::Reviews) { " selected" } } { a href={ "/" ^path "/reviews" } { "Reviews" } }
div class={ "overview" @if *tab == Some(Tab::Overview) { " selected" } } { a href={ "/" (path) } { "Overview" } }
div class={ "files" @if *tab == Some(Tab::Files) { " selected" } } { a href={ "/" (path) "/tree/" (head) } { "Files" } }
div class={ "commits" @if *tab == Some(Tab::Commits) { " selected" } } { a href={ "/" (path) "/commits/" (head) } { "Commits" } }
div class={ "reviews" @if *tab == Some(Tab::Reviews) { " selected" } } { a href={ "/" (path) "/reviews" } { "Reviews" } }
}
}
}

Modified src/render/request.rs

@@ -1,6 +1,6 @@
use git_appraise;
use git2::Oid;
use maud_pulldown_cmark::Markdown;
use super::utils::Markdown;
use chrono::naive::datetime::NaiveDateTime;
fn summary(request: &git_appraise::Request) -> Option<&str> {
@@ -13,60 +13,66 @@ fn short(oid: Oid) -> String {
oid.as_bytes().iter().take(3).flat_map(|b| vec![HEX[((b >> 4) & 0xFu8) as usize] as char, HEX[(b & 0xFu8) as usize] as char]).collect()
}
renderers! {
Request(root: &'a str, request: &'a git_appraise::Request) {
pub fn Request(root: &str, request: &git_appraise::Request) -> ::maud::Markup {
html! {
div.block.request {
^RequestHeader(root, request)
^RequestDetails(request)
(RequestHeader(root, request))
(RequestDetails(request))
}
}
}
RequestStub(root: &'a str, request: &'a git_appraise::Request) {
pub fn RequestStub(root: &str, request: &git_appraise::Request) -> ::maud::Markup {
html! {
div.block.request {
^RequestHeader(root, request)
(RequestHeader(root, request))
}
}
}
RequestHeader(root: &'a str, request: &'a git_appraise::Request) {
pub fn RequestHeader(root: &str, request: &git_appraise::Request) -> ::maud::Markup {
html! {
div.block-header {
div.row {
^super::Avatar(request.requester().unwrap_or("unknown@example.org"), &None)
(super::Avatar(request.requester().unwrap_or("unknown@example.org"), &None))
div.column {
div {
a href={ ^root "/review/" ^request.commit_id() } {
span.id ^short(request.commit_id())
a href={ (root) "/review/" (request.commit_id()) } {
span.id (short(request.commit_id()))
" "
@match summary(request) {
Some(summary) => ^summary,
Some(summary) => (summary),
None => "<No summary provided>",
}
}
}
small {
span.user
^request.requester().unwrap_or("<unknown requester>")
(request.requester().unwrap_or("<unknown requester>"))
" wants to merge "
span.ref
^request.review_ref().unwrap_or("<unknown ref>")
(request.review_ref().unwrap_or("<unknown ref>"))
" into "
span.ref
^request.target_ref().unwrap_or("<unknown ref>")
(request.target_ref().unwrap_or("<unknown ref>"))
}
}
div.column.fixed {
@if let Some(timestamp) = request.timestamp() {
small.timestamp
^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
(NaiveDateTime::from_timestamp(timestamp.seconds(), 0))
}
}
}
}
}
}
RequestDetails(request: &'a git_appraise::Request) {
pub fn RequestDetails(request: &git_appraise::Request) -> ::maud::Markup {
html! {
div.block-details.request-details {
@match request.description() {
Some(description) => ^Markdown::from_string(description),
Some(description) => (Markdown(description)),
None => i "No description provided",
}
}

Modified src/render/review.rs

@@ -1,27 +1,31 @@
use git_appraise;
renderers! {
Reviews(root: &'a str, reviews: &'a Vec<git_appraise::Review<'a>>) {
pub fn Reviews(root: &str, reviews: &Vec<git_appraise::Review>) -> ::maud::Markup {
html! {
@for review in reviews {
^ReviewStub(root, review)
(ReviewStub(root, review))
}
}
}
ReviewStub(root: &'a str, review: &'a git_appraise::Review<'a>) {
^super::RequestStub(root, review.request())
pub fn ReviewStub(root: &str, review: &git_appraise::Review) -> ::maud::Markup {
html! {
(super::RequestStub(root, review.request()))
}
}
Review(root: &'a str, review: &'a git_appraise::Review<'a>) {
pub fn Review(root: &str, review: &git_appraise::Review) -> ::maud::Markup {
html! {
div.review {
^super::Events(root.to_owned(), review.events())
(super::Events(root.to_owned(), review.events()))
}
}
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Review<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Reviews) }
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Reviews<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Reviews) }
}
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Review<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Reviews) }
// }
//
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Reviews<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Reviews) }
// }

Modified src/render/settings.rs

@@ -1,7 +1,7 @@
use settings::{ self, Theme };
renderers! {
Settings(settings: &'a settings::Settings) {
pub fn Settings(settings: &settings::Settings) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h3 { "Settings" }
@@ -10,8 +10,8 @@ renderers! {
form method="POST" {
label for="theme" { "Theme" }
select id="theme" name="theme" required? {
option value=^Theme::SolarizedDark selected?=(settings.theme == Theme::SolarizedDark) { "Solarized Dark" }
option value=^Theme::SolarizedLight selected?=(settings.theme == Theme::SolarizedLight) { "Solarized Light" }
option value=(Theme::SolarizedDark) selected?[settings.theme == Theme::SolarizedDark] { "Solarized Dark" }
option value=(Theme::SolarizedLight) selected?[settings.theme == Theme::SolarizedLight] { "Solarized Light" }
}
button type="submit" {
"Submit"

Modified src/render/signature.rs

@@ -1,20 +1,20 @@
use git2;
use maud::PreEscaped;
renderers! {
Signature(signature: &'a git2::Signature<'a>, include_avatar: &'a bool) {
@if *include_avatar {
pub fn Signature(signature: git2::Signature, include_avatar: bool) -> ::maud::Markup {
html! {
@if include_avatar {
@if let Some(email) = signature.email() {
^super::Avatar(email, &signature.name())
(super::Avatar(email, &signature.name()))
}
}
@if let Some(name) = signature.name() {
@if let Some(email) = signature.email() {
a.user href={ "mailto:" ^email } title={ "<" ^email ">" } ^name
a.user href={ "mailto:" (email) } title={ "<" (email) ">" } (name)
} @else {
span.user ^name
span.user (name)
}
^PreEscaped("&nbsp;")
(PreEscaped("&nbsp;"))
}
}
}

Modified src/render/style.rs

@@ -1,9 +1,9 @@
use settings::Settings;
renderers! {
Style(settings: &'a Settings) {
pub fn Style(settings: &Settings) -> ::maud::Markup {
html! {
link rel="stylesheet" href="/-/static/css/font-awesome.min.css" { }
link rel="stylesheet" href="/-/static/css/layout.css" { }
link rel="stylesheet" href=^(format!("/-/static/css/theme-{}.css", settings.theme)) { }
link rel="stylesheet" href=(format!("/-/static/css/theme-{}.css", settings.theme)) { }
}
}

Modified src/render/tree.rs

@@ -1,37 +1,39 @@
use std::str;
use std::cmp::{ Ord, PartialOrd, Ordering };
use std::fmt;
use super::fa::{ FA, FAM };
use git2::{ self, ObjectType };
use tree_entry::TreeEntryContext;
use maud::{ Render };
renderers! {
TreeEntryStub(parent: &'a TreeEntryContext<'a>, entry: &'a git2::TreeEntry<'a>) {
pub fn TreeEntryStub(parent: &TreeEntryContext, entry: &git2::TreeEntry) -> ::maud::Markup {
html! {
@if let Some(name) = entry.name() {
li {
@match entry.kind() {
Some(ObjectType::Tree) => {
^FAM::Li(FA::Sitemap)
a href={ "/" ^parent.repo_path "/tree/" ^parent.reff ^parent.entry_path.trim_right_matches('/') "/" ^name } { ^name }
(FAM::Li(FA::Sitemap))
a href={ "/" (parent.repo_path) "/tree/" (parent.reff) (parent.entry_path.trim_right_matches('/')) "/" (name) } { (name) }
},
Some(ObjectType::Blob) => {
^FAM::Li(FA::File)
a href={ "/" ^parent.repo_path "/blob/" ^parent.reff ^parent.entry_path.trim_right_matches('/') "/" ^name } { ^name }
(FAM::Li(FA::File))
a href={ "/" (parent.repo_path) "/blob/" (parent.reff) (parent.entry_path.trim_right_matches('/')) "/" (name) } { (name) }
},
_ => {
^FAM::Li(FA::Question)
^name
(FAM::Li(FA::Question))
(name)
},
}
}
}
}
}
TreeEntry(context: &'a TreeEntryContext<'a>) {
pub fn TreeEntry(context: &TreeEntryContext) -> ::maud::Markup {
html! {
div {
@match context.entry.kind() {
Some(ObjectType::Tree) => ^Tree(context.entry.as_tree().unwrap(), context),
Some(ObjectType::Blob) => ^Blob(context.entry.as_blob().unwrap(), context),
Some(ObjectType::Tree) => (Tree(context.entry.as_tree().unwrap(), context)),
Some(ObjectType::Blob) => (Blob(context.entry.as_blob().unwrap(), context)),
Some(ObjectType::Tag) => "Can't render ObjectType::Tag yet",
Some(ObjectType::Commit) => "Can't render ObjectType::Commit yet",
Some(ObjectType::Any) => "Can't render ObjectType::Any yet",
@@ -39,80 +41,83 @@ renderers! {
}
}
}
}
Tree(tree: &'a git2::Tree<'a>, context: &'a TreeEntryContext<'a>) {
pub fn Tree(tree: &git2::Tree, context: &TreeEntryContext) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h2 {
^FAM::FixedWidth(FA::File) " "
span.path ^Components(context)
(FAM::FixedWidth(FA::File)) " "
span.path (Components(context))
" at "
^super::Reference(&context.commit)
(super::Reference(&context.commit))
}
}
div.block-details {
ul.fa-ul {
@if let Some(parent) = context.parent() {
li { ^FAM::Li(FA::LevelUp) a href={ "/" ^context.repo_path "/tree/" ^context.reff ^parent } { ".." } }
li { (FAM::Li(FA::LevelUp)) a href={ "/" (context.repo_path) "/tree/" (context.reff) (parent) } { ".." } }
}
@for entry in tree.iter().collect::<Vec<_>>().tap(|v| v.sort_by_key(|e| Sorter(e.kind()))) {
^TreeEntryStub(context, &entry)
(TreeEntryStub(context, &entry))
}
}
}
}
}
}
Blob(blob: &'a git2::Blob<'a>, context: &'a TreeEntryContext<'a>) {
pub fn Blob(blob: &git2::Blob, context: &TreeEntryContext) -> ::maud::Markup {
html! {
div.block {
div.block-header {
h2 {
^FAM::FixedWidth(FA::File) " "
span.path ^Components(context)
(FAM::FixedWidth(FA::File)) " "
span.path (Components(context))
" at "
^super::Reference(&context.commit)
(super::Reference(&context.commit))
}
}
pre.block-details {
@match blob.is_binary() {
true => code { "Binary file" },
false => code class={ "hljs lang-" ^context.extension().unwrap_or("") } {
false => code class={ "hljs lang-" (context.extension().unwrap_or("")) } {
@for (i, line) in str::from_utf8(blob.content()).unwrap().lines().enumerate() {
div.line {
a.line-num id={ "L" ^(i + 1) } href={ "#L" ^(i + 1) } data-line-num=^(format!("{: >4}", i + 1)) { " " }
span.text ^line
a.line-num id={ "L" (i + 1) } href={ "#L" (i + 1) } data-line-num=(format!("{: >4}", i + 1)) { " " }
span.text (line)
}
}
},
}
}
^super::HighlightJS
(super::HighlightJS())
}
}
}
pub struct Components<'a>(pub &'a TreeEntryContext<'a>);
impl<'a> ::maud::RenderOnce for Components<'a> {
#[cfg_attr(feature = "clippy", allow(cyclomatic_complexity))]
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
impl<'a> Render for Components<'a> {
#[allow(cyclomatic_complexity)]
fn render_to(&self, buffer: &mut String) {
let context = self.0;
let is_blob = context.entry.kind() == Some(ObjectType::Blob);
try!(html!(w, { a.path-component href={ "/" ^context.repo_path "/tree/" ^context.reff } ^context.repo_path }));
buffer.push_str(&html!({ a.path-component href={ "/" (context.repo_path) "/tree/" (context.reff) } (context.repo_path) }).into_string());
let mut parent = "/".to_owned();
let components: Vec<_> = context.entry_path.split_terminator('/').collect();
for (i, component) in components.iter().enumerate() {
if *component == "" {
continue;
} else if is_blob && i == components.len() - 1 {
try!(html!(w, { "/" a.path-component href={ "/" ^context.repo_path "/blob/" ^context.reff ^parent ^component } ^component }));
buffer.push_str(&html!({ "/" a.path-component href={ "/" (context.repo_path) "/blob/" (context.reff) (parent) (component) } (component) }).into_string());
} else {
try!(html!(w, { "/" a.path-component href={ "/" ^context.repo_path "/tree/" ^context.reff ^parent ^component } ^component }));
buffer.push_str(&html!({ "/" a.path-component href={ "/" (context.repo_path) "/tree/" (context.reff) (parent) (component) } (component) }).into_string());
parent.push_str(component);
parent.push('/');
}
}
Ok(())
}
}
@@ -156,14 +161,14 @@ impl PartialOrd for Sorter {
}
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a TreeEntry<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Tree<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
}
impl<'a> super::repository_wrapper::RepositoryTab for &'a Blob<'a> {
fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
}
// impl<'a> super::repository_wrapper::RepositoryTab for &'a TreeEntry<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
// }
//
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Tree<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
// }
//
// impl<'a> super::repository_wrapper::RepositoryTab for &'a Blob<'a> {
// fn tab() -> Option<super::repository_wrapper::Tab> { Some(super::repository_wrapper::Tab::Files) }
// }

Modified src/render/utils.rs

@@ -1,9 +1,24 @@
renderers! {
MaybeLink(href: &'a str, text: &'a str) {
use ammonia;
use maud::Render;
use pulldown_cmark::{ Parser, html };
pub fn MaybeLink(href: &str, text: &str) -> ::maud::Markup {
html! {
@if href.starts_with("http") {
a href=^href { ^text }
a href=(href) { (text) }
} @else {
^text
(text)
}
}
}
pub struct Markdown<T: AsRef<str>>(pub T);
impl<T: AsRef<str>> Render for Markdown<T> {
fn render_to(&self, buffer: &mut String) {
let mut unsafe_html = String::new();
let parser = Parser::new(self.0.as_ref());
html::push_html(&mut unsafe_html, parser);
buffer.push_str(&ammonia::clean(&unsafe_html));
}
}

Modified src/render/wrapper.rs

@@ -1,19 +1,18 @@
use std::fmt;
use maud::{ Render, RenderOnce };
use maud::{ Render, Markup };
use super::Style;
use super::fa::FA;
use settings::Settings;
renderers! {
Header {
pub fn Header() -> ::maud::Markup {
html! {
div.block {
div.block-header {
h1 {
a href="/" { "Repositories" }
small.float-right {
a href="/-/settings" { ^FA::Cog }
a href="/-/settings" { (FA::Cog) }
" "
a href="/-/about" { ^FA::Info }
a href="/-/about" { (FA::Info) }
}
}
}
@@ -24,34 +23,17 @@ renderers! {
pub struct Wrapper<T>(pub T, pub Settings);
impl<T: Render> Render for Wrapper<T> {
fn render(&self, mut w: &mut fmt::Write) -> fmt::Result {
html!(w, {
fn render(&self) -> Markup {
html!({
html {
head {
meta name="viewport" content="width=device-width, initial-scale=1" {}
meta name="referrer" content="none-when-downgrade" {}
^Style(&self.1)
(Style(&self.1))
}
body {
^Header
^self.0
}
}
})
}
}
impl<T: RenderOnce> RenderOnce for Wrapper<T> {
fn render_once(self, mut w: &mut fmt::Write) -> fmt::Result {
html!(w, {
html {
head {
meta name="viewport" content="width=device-width, initial-scale=1" {}
^Style(&self.1)
}
body {
^Header
^self.0
(Header())
(self.0)
}
}
})

Modified src/repository_context.rs

@@ -10,10 +10,10 @@ use iron::response::Response;
use iron::middleware::{ Handler };
use iron::{ status, Url };
use iron::modifiers::Redirect;
use hyper::method::Method;
use handler::route::Route;
use error::Error;
use referenced_commit::ReferencedCommit;
use iron::method::Method;
pub struct RepositoryContext {
pub path: String,

Modified src/settings.rs

@@ -1,7 +1,8 @@
use std::fmt;
use std::str::FromStr;
use iron::IronResult;
use iron::headers::{ Cookie, CookiePair, SetCookie };
use iron::headers::{ Cookie, SetCookie };
use cookie::Cookie as CookiePair;
use iron::middleware::BeforeMiddleware;
use iron::request::Request;
use iron::response::Response;
@@ -10,7 +11,7 @@ use iron::modifier::Modifier;
use typemap::Key;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "clippy", allow(enum_variant_names))] // Co-inkidink
#[allow(enum_variant_names)] // Co-inkidink
pub enum Theme {
SolarizedDark,
SolarizedLight,
@@ -73,9 +74,8 @@ impl Settings {
impl<'a> Modifier<Response> for &'a Settings {
fn modify(self, response: &mut Response) {
let mut theme = CookiePair::new("theme".to_owned(), self.theme.to_string());
theme.path = Some("/".to_owned());
Header(SetCookie(vec![theme])).modify(response);
let theme = CookiePair::build("theme", self.theme.to_string()).path("/").finish();
Header(SetCookie(vec![theme.to_string()])).modify(response);
}
}
@@ -83,7 +83,10 @@ impl BeforeMiddleware for Settings {
fn before(&self, req: &mut Request) -> IronResult<()> {
let settings = match req.headers.get() {
Some(&Cookie(ref cookies)) =>
self.with(cookies.iter().map(|pair| (&*pair.name, &*pair.value))),
self.with(cookies.iter().map(|c| {
let pair = CookiePair::parse(c.as_ref()).unwrap();
(pair.name_raw().unwrap(), pair.value_raw().unwrap())
})),
None =>
self.clone(),
};