diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-08-05 11:51:00 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-08-05 13:16:44 +0200 |
commit | 23df4c5b9e5b7fc6b1116dd74a6168419a54d658 (patch) | |
tree | 16781f269b39bebcc56fb14b445fdc9e0ac5319a /askama_iron | |
parent | d45e106bf219d6da94538e2816472ca8026500ba (diff) | |
download | askama-23df4c5b9e5b7fc6b1116dd74a6168419a54d658.tar.gz askama-23df4c5b9e5b7fc6b1116dd74a6168419a54d658.tar.bz2 askama-23df4c5b9e5b7fc6b1116dd74a6168419a54d658.zip |
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.
Diffstat (limited to 'askama_iron')
-rw-r--r-- | askama_iron/Cargo.toml | 18 | ||||
l--------- | askama_iron/LICENSE-APACHE | 1 | ||||
l--------- | askama_iron/LICENSE-MIT | 1 | ||||
-rw-r--r-- | askama_iron/README.md | 9 | ||||
-rw-r--r-- | askama_iron/src/lib.rs | 5 | ||||
-rw-r--r-- | askama_iron/templates/hello.html | 1 | ||||
-rw-r--r-- | askama_iron/templates/hello.txt | 1 | ||||
-rw-r--r-- | askama_iron/tests/basic.rs | 36 |
8 files changed, 0 insertions, 72 deletions
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 <dirkjan@ochtman.nl>"] -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::<iron::headers::ContentType>().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::<iron::headers::ContentType>(); - assert_eq!(content_type, None); -} |