Skip to content

Commit

Permalink
Merge branch 'main' into block-fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
wrapperup committed Nov 5, 2023
2 parents 05b5b87 + b650827 commit aaf6794
Show file tree
Hide file tree
Showing 55 changed files with 1,007 additions and 528 deletions.
35 changes: 0 additions & 35 deletions .github/actions/setup/action.yml

This file was deleted.

34 changes: 23 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
rust: beta
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/setup
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
key: test-${{ matrix.os }}-${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-targets
- run: cargo test

Expand All @@ -38,21 +38,33 @@ jobs:
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/setup
with:
key: ${{ matrix.package }}
components: clippy
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cd ${{ matrix.package }} && cargo test --all-targets
- run: cd ${{ matrix.package }} && cargo clippy --all-targets -- -D warnings

Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/setup
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
key: lint
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets -- -D warnings

MSRV:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.65.0"
- run: cargo check --lib -p askama --all-features

Audit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Documentation](https://docs.rs/askama/badge.svg)](https://docs.rs/askama/)
[![Latest version](https://img.shields.io/crates/v/askama.svg)](https://crates.io/crates/askama)
[![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)
[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/ZucwjE6bmT)

Askama implements a template rendering engine based on [Jinja](https://jinja.palletsprojects.com/).
It generates Rust code from your templates at compile time
Expand Down
4 changes: 2 additions & 2 deletions askama/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "askama"
version = "0.12.0"
version = "0.12.1"
description = "Type-safe, compiled Jinja-like templates for Rust"
documentation = "https://docs.rs/askama"
keywords = ["markup", "template", "jinja2", "html"]
Expand All @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "../README.md"
edition = "2021"
rust-version = "1.58"
rust-version = "1.65"

[badges]
maintenance = { status = "actively-developed" }
Expand Down
2 changes: 1 addition & 1 deletion askama_actix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
rust-version = "1.58"
rust-version = "1.65"

[dependencies]
actix-web = { version = "4", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion askama_actix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Documentation](https://docs.rs/askama_actix/badge.svg)](https://docs.rs/askama_actix/)
[![Latest version](https://img.shields.io/crates/v/askama_actix.svg)](https://crates.io/crates/askama_actix)
[![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)
[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/ZucwjE6bmT)

Integration of the [Askama](https://github.com/djc/askama) templating engine in
code building on the Actix-web framework.
2 changes: 1 addition & 1 deletion askama_axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "askama_axum"
version = "0.3.0"
edition = "2021"
rust-version = "1.58"
rust-version = "1.65"
description = "Axum integration for Askama templates"
keywords = ["markup", "template", "jinja2", "html", "axum"]
categories = ["template-engine"]
Expand Down
2 changes: 1 addition & 1 deletion askama_axum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Documentation](https://docs.rs/askama_axum/badge.svg)](https://docs.rs/askama_axum/)
[![Latest version](https://img.shields.io/crates/v/askama_axum.svg)](https://crates.io/crates/askama_axum)
[![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)
[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/ZucwjE6bmT)

Integration of the [Askama](https://github.com/djc/askama) templating engine in
code building on the Axum web framework.
4 changes: 2 additions & 2 deletions askama_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "askama_derive"
version = "0.12.1"
version = "0.12.2"
description = "Procedural macro package for Askama"
homepage = "https://github.com/djc/askama"
repository = "https://github.com/djc/askama"
license = "MIT/Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
rust-version = "1.58"
rust-version = "1.65"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion askama_derive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Documentation](https://docs.rs/askama_derive/badge.svg)](https://docs.rs/askama_derive/)
[![Latest version](https://img.shields.io/crates/v/askama_derive.svg)](https://crates.io/crates/askama_derive)
[![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)
[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/ZucwjE6bmT)

This crate contains the procedural macros used by the
[Askama](https://github.com/djc/askama) templating engine.
10 changes: 2 additions & 8 deletions askama_derive/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{env, fs};
use serde::Deserialize;

use crate::CompileError;

use parser::node::Whitespace;
use parser::Syntax;

Expand Down Expand Up @@ -203,11 +202,12 @@ impl RawConfig<'_> {
}
}

#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[derive(Clone, Copy, Default, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "serde", derive(Deserialize))]
#[cfg_attr(feature = "serde", serde(field_identifier, rename_all = "lowercase"))]
pub(crate) enum WhitespaceHandling {
/// The default behaviour. It will leave the whitespace characters "as is".
#[default]
Preserve,
/// It'll remove all the whitespace characters before and after the jinja block.
Suppress,
Expand All @@ -227,12 +227,6 @@ impl From<WhitespaceHandling> for Whitespace {
}
}

impl Default for WhitespaceHandling {
fn default() -> Self {
WhitespaceHandling::Preserve
}
}

#[cfg_attr(feature = "serde", derive(Deserialize))]
struct General<'a> {
#[cfg_attr(feature = "serde", serde(borrow))]
Expand Down
Loading

0 comments on commit aaf6794

Please sign in to comment.