Commit Graph

187 Commits

Author SHA1 Message Date
Tom Alexander
9c7883358a Better error handling added to walkable 2020-04-12 20:52:30 -04:00
Tom Alexander
a647ed6d43 fix tests 2020-04-12 18:31:27 -04:00
Tom Alexander
d51392fe8a Initial move to returning results from render calls. 2020-04-12 18:29:40 -04:00
Tom Alexander
d30749f709 Updated to the latest nom 2020-04-12 17:39:24 -04:00
Tom Alexander
28b5cf1d34 Fix handling of surrounding whitespace 2020-04-12 16:02:26 -04:00
Tom Alexander
4856fb6d11 Support passing args to the dockerized test runner 2020-04-12 15:47:38 -04:00
Tom Alexander
aa24f50dfa Merge branch 'docker_compliance_tests' into render 2020-04-12 15:25:32 -04:00
Tom Alexander
8435028a55 Dockerized tests are now working and added a flag to toggle showing the test case diff. 2020-04-12 15:24:38 -04:00
Tom Alexander
aa7155d467 Correctly counting test failures 2020-04-12 14:44:53 -04:00
Tom Alexander
db575d145e Initial attempt at docker compliance tests. 2020-04-12 14:37:54 -04:00
Tom Alexander
542c2c4536 Switching render_template to render_body.
The body element is re-used as a child element in blocks, so it makes more sense to make a function that renders that as opposed to a function that renders a top-level-only container that contains only a body.
2020-04-11 23:03:07 -04:00
Tom Alexander
869c32df21 Moving the custom types for the walk_path test inside the test function 2020-04-11 22:54:48 -04:00
Tom Alexander
273f6204d8 Rendering my first template with actually following paths.
Before I was hard-coding the path to the reference. Now I am following the full path programmatically using the new ContextElement and Walkable traits.
2020-04-11 22:52:20 -04:00
Tom Alexander
e5e1703fab Implement ContextElement for serde_json::Value 2020-04-11 22:47:31 -04:00
Tom Alexander
0f60baf31c Merge branch 'walkable' into render 2020-04-11 22:37:27 -04:00
Tom Alexander
dbfa7ea4dc Cleaning up 2020-04-11 22:36:22 -04:00
Tom Alexander
47bb055b67 I think its working 2020-04-11 22:23:59 -04:00
Tom Alexander
5efa650b67 Switching to a combined ContextElement trait for Walkable and Renderable 2020-04-11 22:19:54 -04:00
Tom Alexander
07e5c9f0af turns out putting dyn everywhere fixes it 2020-04-11 22:04:44 -04:00
Tom Alexander
c094997032 Getting rid of some lifetimes 2020-04-11 21:59:21 -04:00
Tom Alexander
5098ee6338 Switching over to dyn Walkables 2020-04-11 21:57:24 -04:00
Tom Alexander
ec3276af79 Much cleaner with impl walkable but don't know if I can loop yet 2020-04-11 21:51:12 -04:00
Tom Alexander
110b03fc45 Going to try returning impl trait before resorting to boxing 2020-04-11 21:44:42 -04:00
Tom Alexander
43e57f4134 setup for moving into a multi-step walk function 2020-04-11 21:26:36 -04:00
Tom Alexander
f62d50df95 Taking 1 step in a deep context is working! 2020-04-11 21:20:45 -04:00
Tom Alexander
d89d3d9f3c Added another test proving do_the_walk is now generic 2020-04-11 21:13:21 -04:00
Tom Alexander
54e6613f14 do_the_walk may be generic now? 2020-04-11 21:12:42 -04:00
Tom Alexander
c647301662 removing unnecessary lifetime 2020-04-11 21:08:33 -04:00
Tom Alexander
9e1f102540 removing unnecessary static 2020-04-11 21:07:39 -04:00
Tom Alexander
63124bc6e3 Adding &str 2020-04-11 21:07:12 -04:00
Tom Alexander
d296ad6b56 Maybe have a generic implementation of walkable working 2020-04-11 21:03:21 -04:00
Tom Alexander
7ace4be3c7 working on two levels 2020-04-11 20:34:16 -04:00
Tom Alexander
d5c3985c29 initial walkable implementation 2020-04-11 20:31:44 -04:00
Tom Alexander
15c8ee57a7 Successfully rendering my first template. 2020-04-11 19:19:40 -04:00
Tom Alexander
e26b158ab4 Initial implementation of custom Renderable trait. 2020-04-11 19:11:14 -04:00
Tom Alexander
af5122ab9f Figured out how to get a value using to_string()
Figured out how to get a value using `to_string()` but serde_json's `to_string()` is wrapping a string in quotes. I think I want to implement my own trait to support custom logic for rendering values.
2020-04-11 19:05:50 -04:00
Tom Alexander
265afe7eeb I think I figured out how to get the Index trait back into the generic type. 2020-04-11 19:05:50 -04:00
Tom Alexander
f65a144b3c Beginning of the render_tag function.
Beginning of the render_tag function. At this point I need to figure out how to access elements in the context.
2020-04-11 19:05:40 -04:00
Tom Alexander
2459d7b418 Rendering spans 2020-04-11 18:25:48 -04:00
Tom Alexander
13934e8699 Rename DustContext to DustRenderer 2020-04-10 20:58:55 -04:00
Tom Alexander
2842d0a14a Loading the compiled templates into a context 2020-04-10 20:55:44 -04:00
Tom Alexander
743106684a compiling templates in the same manner as the shim 2020-04-10 20:27:27 -04:00
Tom Alexander
7e0a617ba6 Add support for supplying multiple templates to the dustjs shim to support testing partials. 2020-04-10 19:07:02 -04:00
Tom Alexander
608c55575e Merge branch 'helpers' 2020-04-10 19:05:09 -04:00
Tom Alexander
05d9e20a8f Add all the helpers 2020-04-07 21:49:28 -04:00
Tom Alexander
15c732b3a3 Also stealing the ParameterizedBlock struct 2020-04-07 20:37:15 -04:00
Tom Alexander
b7120a34de Forking the partial code for reuse as helper code 2020-04-07 20:21:26 -04:00
Tom Alexander
ad33f98404 Merge branch 'partials' 2020-04-07 19:56:44 -04:00
Tom Alexander
2ebe4798d5 Add test for quoted partial 2020-04-07 19:53:57 -04:00
Tom Alexander
e2f03de297 Integrated the partial parser into the rest of the grammar 2020-04-07 19:51:06 -04:00