Skip to content

Commit

Permalink
Merge pull request #10 from olorin37/dependecy-bumpup-handlebars
Browse files Browse the repository at this point in the history
Bump up handlebars lib version to 5.x branch
  • Loading branch information
olorin37 authored Jun 28, 2024
2 parents 3104f3f + b4d4472 commit 3799556
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: CLI test
run: cd fixtures; ./test.sh
14 changes: 4 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hbs-cli"
description = "Simple CLI for generating text from handlebars templates, by feeding them with data from file YAML/JSON."
version = "0.2.2"
version = "0.2.3"
authors = [ "Jakub A. Gramsz <jakub@gramsz.com>" ]
homepage = "https://github.com/olorin37/hbs-cli"
repository = "https://github.com/olorin37/hbs-cli"
Expand All @@ -14,7 +14,7 @@ edition = "2018"

[dependencies]
structopt = "0.3.26"
handlebars = "3.5.5"
handlebars = "5.0"
serde = "1.0"
serde_yaml = "0.9"
glob = "0.3.1"
5 changes: 0 additions & 5 deletions fixtures/out_no_registration.txt

This file was deleted.

4 changes: 4 additions & 0 deletions fixtures/out_standalone.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Number: 1234567899.
Pi: 3.14.
Hello, I am hbs.

3 changes: 3 additions & 0 deletions fixtures/standalone.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Number: {{num}}.
Pi: {{value_a}}.
Hello, I am {{value_b}}.
13 changes: 7 additions & 6 deletions fixtures/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

## run it from /fixtures

# no templates registration
../target/debug/hbs-cli data.yaml template.hbs -o no_registration.txt
diff out_no_registration.txt no_registration.txt

# with registration
../target/debug/hbs-cli data.yaml template.hbs -r '**/*.hbs' -o a.txt
diff out.txt a.txt
# standalone template
../target/debug/hbs-cli data.yaml standalone.hbs -o standalone.txt
diff -u out_standalone.txt standalone.txt

# with partials registration
../target/debug/hbs-cli data.yaml template.hbs -r '**/*.hbs' -o partials.txt
diff -u out.txt partials.txt

0 comments on commit 3799556

Please sign in to comment.