Switch to tera 0.5

This commit is contained in:
Vincent Prouillet 2016-12-09 20:24:05 +09:00
parent 5ce6d41509
commit 4ae84e468b
4 changed files with 7 additions and 17 deletions

16
Cargo.lock generated
View file

@ -8,7 +8,7 @@ dependencies = [
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
"tera 0.4.0 (git+https://github.com/Keats/tera.git)",
"tera 0.4.1 (git+https://github.com/Keats/tera.git?branch=v0.5)",
"toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -214,11 +214,6 @@ dependencies = [
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quick-error"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "quine-mc_cluskey"
version = "0.2.4"
@ -290,14 +285,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "tera"
version = "0.4.0"
source = "git+https://github.com/Keats/tera.git#186ddc1a57f733421dd5de67badb29cf30c14d56"
version = "0.4.1"
source = "git+https://github.com/Keats/tera.git?branch=v0.5#85b6fb3723469cb9ec06e63aa80f48348d4ece73"
dependencies = [
"error-chain 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"humansize 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"pest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -443,7 +438,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a16a42856a256b39c6d3484f097f6713e14feacd9bfb02290917904fae46c81c"
"checksum pest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f6666c81a6359af7a9dbc48f596d6f318a9dbaefdec248581ab836dc0c1f082"
"checksum pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1058d7bb927ca067656537eec4e02c2b4b70eaaa129664c5b90c111e20326f41"
"checksum quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0aad603e8d7fb67da22dbdf1f4b826ce8829e406124109e73cf1b2454b93a71c"
"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45"
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
@ -454,7 +448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum serde_json 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1cb6b19e74d9f65b9d03343730b643d729a446b29376785cd65efdff4675e2fc"
"checksum slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f5ff4b43cb07b86c5f9236c92714a22cdf9e5a27a7d85e398e2c9403328cb8"
"checksum strsim 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "67f84c44fbb2f91db7fef94554e6b2ac05909c9c0b0bc23bb98d3a1aebfe7f7c"
"checksum tera 0.4.0 (git+https://github.com/Keats/tera.git)" = "<none>"
"checksum tera 0.4.1 (git+https://github.com/Keats/tera.git?branch=v0.5)" = "<none>"
"checksum term_size 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f7f5f3f71b0040cecc71af239414c23fd3c73570f5ff54cf50e03cef637f2a0"
"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5"

View file

@ -16,7 +16,7 @@ walkdir = "1"
pulldown-cmark = "0"
regex = "0.1"
lazy_static = "0.2"
tera = { git = "https://github.com/Keats/tera.git" }
tera = { git = "https://github.com/Keats/tera.git", branch = "v0.5" }
clippy = {version = "~0.0.103", optional = true}
[dependencies.toml]

View file

@ -16,7 +16,7 @@ pub fn create_new_project<P: AsRef<Path>>(name: P) -> Result<()> {
let path = name.as_ref();
// Better error message than the rust default
if path.exists() && path.is_dir() {
return Err(ErrorKind::FolderExists(path.to_string_lossy().to_string()).into());
bail!("Folder `{}` already exists", path.to_string_lossy().to_string());
}
// main folder

View file

@ -13,9 +13,5 @@ error_chain! {
description("invalid config")
display("The config.toml is invalid or is using the wrong type for an argument")
}
FolderExists(name: String) {
description("folder already exists")
display("Folder '{}' already exists.", name)
}
}
}