From 23df4c5b9e5b7fc6b1116dd74a6168419a54d658 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 5 Aug 2021 11:51:00 +0200 Subject: Remove the askama_iron integration This web framework seems not to have been updated for quite a while, and its current version appears to depend on vulnerable crates. Remove it for now. If someone wants to fix up Iron upstream and reinstate this, I'd be happy to review your PR. --- askama_iron/Cargo.toml | 18 ------------------ askama_iron/LICENSE-APACHE | 1 - askama_iron/LICENSE-MIT | 1 - askama_iron/README.md | 9 --------- askama_iron/src/lib.rs | 5 ----- askama_iron/templates/hello.html | 1 - askama_iron/templates/hello.txt | 1 - askama_iron/tests/basic.rs | 36 ------------------------------------ 8 files changed, 72 deletions(-) delete mode 100644 askama_iron/Cargo.toml delete mode 120000 askama_iron/LICENSE-APACHE delete mode 120000 askama_iron/LICENSE-MIT delete mode 100644 askama_iron/README.md delete mode 100644 askama_iron/src/lib.rs delete mode 100644 askama_iron/templates/hello.html delete mode 100644 askama_iron/templates/hello.txt delete mode 100644 askama_iron/tests/basic.rs (limited to 'askama_iron') diff --git a/askama_iron/Cargo.toml b/askama_iron/Cargo.toml deleted file mode 100644 index 8fd124b..0000000 --- a/askama_iron/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "askama_iron" -version = "0.10.0" -authors = ["Dirkjan Ochtman "] -description = "Iron integration for Askama templates" -documentation = "https://docs.rs/askama" -keywords = ["markup", "template", "jinja2", "html"] -categories = ["template-engine"] -homepage = "https://github.com/djc/askama" -repository = "https://github.com/djc/askama" -license = "MIT OR Apache-2.0" -workspace = ".." -readme = "README.md" -edition = "2018" - -[dependencies] -askama = { version = "0.10", path = "../askama", default-features = false, features = ["with-iron"] } -iron = { version = ">= 0.5, < 0.7" } diff --git a/askama_iron/LICENSE-APACHE b/askama_iron/LICENSE-APACHE deleted file mode 120000 index 965b606..0000000 --- a/askama_iron/LICENSE-APACHE +++ /dev/null @@ -1 +0,0 @@ -../LICENSE-APACHE \ No newline at end of file diff --git a/askama_iron/LICENSE-MIT b/askama_iron/LICENSE-MIT deleted file mode 120000 index 76219eb..0000000 --- a/askama_iron/LICENSE-MIT +++ /dev/null @@ -1 +0,0 @@ -../LICENSE-MIT \ No newline at end of file diff --git a/askama_iron/README.md b/askama_iron/README.md deleted file mode 100644 index 39406cd..0000000 --- a/askama_iron/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# askama_iron: Askama integration with Iron - -[![Documentation](https://docs.rs/askama_iron/badge.svg)](https://docs.rs/askama_iron/) -[![Latest version](https://img.shields.io/crates/v/askama_iron.svg)](https://crates.io/crates/askama_iron) -[![Build Status](https://github.com/djc/askama/workflows/CI/badge.svg)](https://github.com/djc/askama/actions?query=workflow%3ACI) -[![Chat](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/djc/askama) - -Integration of the [Askama](https://github.com/djc/askama) templating engine in -code building on the Iron web framework. diff --git a/askama_iron/src/lib.rs b/askama_iron/src/lib.rs deleted file mode 100644 index 07b96bd..0000000 --- a/askama_iron/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![deny(elided_lifetimes_in_paths)] - -pub use askama::*; - -pub use iron::{headers::ContentType, modifier::Modifier, Response}; diff --git a/askama_iron/templates/hello.html b/askama_iron/templates/hello.html deleted file mode 100644 index 8149be7..0000000 --- a/askama_iron/templates/hello.html +++ /dev/null @@ -1 +0,0 @@ -Hello, {{ name }}! diff --git a/askama_iron/templates/hello.txt b/askama_iron/templates/hello.txt deleted file mode 100644 index 8149be7..0000000 --- a/askama_iron/templates/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hello, {{ name }}! diff --git a/askama_iron/tests/basic.rs b/askama_iron/tests/basic.rs deleted file mode 100644 index 32ca839..0000000 --- a/askama_iron/tests/basic.rs +++ /dev/null @@ -1,36 +0,0 @@ -use askama::Template; -use iron::{status, Response}; - -#[derive(Template)] -#[template(path = "hello.html")] -struct HelloTemplate<'a> { - name: &'a str, -} - -#[derive(Template)] -#[template(path = "hello.txt")] -struct HelloTextTemplate<'a> { - name: &'a str, -} - -#[test] -fn test_iron() { - let rsp = Response::with((status::Ok, HelloTemplate { name: "world" })); - let mut buf = Vec::new(); - let _ = rsp.body.unwrap().write_body(&mut buf); - assert_eq!(buf, b"Hello, world!"); - - let content_type = rsp.headers.get::().unwrap(); - assert_eq!(format!("{}", content_type), "text/html; charset=utf-8"); -} - -#[test] -fn test_iron_non_html() { - let rsp = Response::with((status::Ok, HelloTextTemplate { name: "world" })); - let mut buf = Vec::new(); - let _ = rsp.body.unwrap().write_body(&mut buf); - assert_eq!(buf, b"Hello, world!"); - - let content_type = rsp.headers.get::(); - assert_eq!(content_type, None); -} -- cgit