bump crate to 0.6.0
This commit is contained in:
parent
e619b2cffc
commit
68099c74fb
4 changed files with 12 additions and 30 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -89,7 +89,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-router"
|
name = "actix-router"
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytestring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytestring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -204,7 +204,7 @@ dependencies = [
|
||||||
"actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-router 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-service 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-service 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -382,7 +382,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bunbun"
|
name = "bunbun"
|
||||||
version = "0.5.0"
|
version = "0.6.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -475,7 +475,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "colored"
|
name = "colored"
|
||||||
version = "1.9.0"
|
version = "1.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1401,7 +1401,7 @@ version = "1.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"colored 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1736,7 +1736,7 @@ dependencies = [
|
||||||
"checksum actix-connect 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2b61480a8d30c94d5c883d79ef026b02ad6809931b0a4bb703f9545cd8c986"
|
"checksum actix-connect 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2b61480a8d30c94d5c883d79ef026b02ad6809931b0a4bb703f9545cd8c986"
|
||||||
"checksum actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019"
|
"checksum actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019"
|
||||||
"checksum actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6"
|
"checksum actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6"
|
||||||
"checksum actix-router 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad01d9350616bbf91c7a651b40b9205a58076a069c7b8094d15e2fcf17c2edc"
|
"checksum actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d7a10ca4d94e8c8e7a87c5173aba1b97ba9a6563ca02b0e1cd23531093d3ec8"
|
||||||
"checksum actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d"
|
"checksum actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d"
|
||||||
"checksum actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51d3455eaac03ca3e49d7b822eb35c884b861f715627254ccbe4309d08f1841a"
|
"checksum actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51d3455eaac03ca3e49d7b822eb35c884b861f715627254ccbe4309d08f1841a"
|
||||||
"checksum actix-service 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5ecef49693fcfe2c13a34c7218eb5b7898ff3fbe334db8445759f871fec2df"
|
"checksum actix-service 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5ecef49693fcfe2c13a34c7218eb5b7898ff3fbe334db8445759f871fec2df"
|
||||||
|
@ -1772,7 +1772,7 @@ dependencies = [
|
||||||
"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
|
"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
|
||||||
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||||
"checksum colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "433e7ac7d511768127ed85b0c4947f47a254131e37864b2dc13f52aa32cd37e5"
|
"checksum colored 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f930f8b286023ed451756fe2527d73484d667adf9e905e9932e81d52996a343a"
|
||||||
"checksum copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127"
|
"checksum copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127"
|
||||||
"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
|
"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
|
||||||
"checksum derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8"
|
"checksum derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "bunbun"
|
name = "bunbun"
|
||||||
version = "0.5.0"
|
version = "0.6.0"
|
||||||
authors = ["Edward Shen <code@eddie.sh>"]
|
authors = ["Edward Shen <code@eddie.sh>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Re-implementation of bunny1 in Rust"
|
description = "Re-implementation of bunny1 in Rust"
|
||||||
|
@ -21,7 +21,6 @@ itertools = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
simple_logger = "1.3"
|
simple_logger = "1.3"
|
||||||
clap = { version = "2.33", features = ["yaml", "wrap_help"] }
|
clap = { version = "2.33", features = ["yaml", "wrap_help"] }
|
||||||
# rlua = "0.17"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3.1"
|
tempfile = "3.1"
|
||||||
|
|
|
@ -22,18 +22,6 @@ pub struct RouteGroup {
|
||||||
pub routes: HashMap<String, Route>,
|
pub routes: HashMap<String, Route>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO implement rlua:
|
|
||||||
// # use rlua::{Lua, Result};
|
|
||||||
// # fn main() -> Result<()> {
|
|
||||||
// let lua = Lua::new();
|
|
||||||
// lua.context(|lua_context| {
|
|
||||||
// lua_context.load(r#"
|
|
||||||
// print("hello world!")
|
|
||||||
// "#).exec()
|
|
||||||
// })?;
|
|
||||||
// # Ok(())
|
|
||||||
// # }
|
|
||||||
|
|
||||||
/// Attempts to read the config file. If it doesn't exist, generate one a
|
/// Attempts to read the config file. If it doesn't exist, generate one a
|
||||||
/// default config file before attempting to parse it.
|
/// default config file before attempting to parse it.
|
||||||
pub fn read_config(config_file_path: &str) -> Result<Config, BunBunError> {
|
pub fn read_config(config_file_path: &str) -> Result<Config, BunBunError> {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
use crate::template_args;
|
use crate::{template_args, BunBunError, State};
|
||||||
use crate::State;
|
|
||||||
use actix_web::get;
|
|
||||||
use actix_web::http::header;
|
|
||||||
use actix_web::web::{Data, Query};
|
use actix_web::web::{Data, Query};
|
||||||
|
use actix_web::{get, http::header};
|
||||||
use actix_web::{HttpRequest, HttpResponse, Responder};
|
use actix_web::{HttpRequest, HttpResponse, Responder};
|
||||||
use handlebars::Handlebars;
|
use handlebars::Handlebars;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
@ -227,10 +225,7 @@ pub async fn index(data: StateData, req: HttpRequest) -> impl Responder {
|
||||||
/// so long as the executable was successfully executed. Returns an Error if the
|
/// so long as the executable was successfully executed. Returns an Error if the
|
||||||
/// file doesn't exist or bunbun did not have permission to read and execute the
|
/// file doesn't exist or bunbun did not have permission to read and execute the
|
||||||
/// file.
|
/// file.
|
||||||
fn resolve_path(
|
fn resolve_path(path: PathBuf, args: &str) -> Result<Vec<u8>, BunBunError> {
|
||||||
path: PathBuf,
|
|
||||||
args: &str,
|
|
||||||
) -> Result<Vec<u8>, crate::BunBunError> {
|
|
||||||
let output = Command::new(path.canonicalize()?).arg(args).output()?;
|
let output = Command::new(path.canonicalize()?).arg(args).output()?;
|
||||||
|
|
||||||
if output.status.success() {
|
if output.status.success() {
|
||||||
|
@ -241,7 +236,7 @@ fn resolve_path(
|
||||||
path.display(),
|
path.display(),
|
||||||
);
|
);
|
||||||
let error = String::from_utf8_lossy(&output.stderr);
|
let error = String::from_utf8_lossy(&output.stderr);
|
||||||
Err(crate::BunBunError::CustomProgramError(error.to_string()))
|
Err(BunBunError::CustomProgramError(error.to_string()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue