mirror of
https://gitea.invidious.io/iv-org/shard-kilt.git
synced 2024-08-15 00:43:15 +00:00
Add liquid.cr support
This commit is contained in:
parent
d177f02e12
commit
795309263f
4 changed files with 18 additions and 0 deletions
|
@ -13,3 +13,5 @@ development_dependencies:
|
|||
github: MakeNowJust/crustache
|
||||
temel:
|
||||
github: f/temel
|
||||
liquid:
|
||||
github: Techmagister/liquid.cr
|
||||
|
|
1
spec/fixtures/test.liquid
vendored
Normal file
1
spec/fixtures/test.liquid
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
<span>{{ process.pid }}</span>
|
11
spec/kilt/liquid_spec.cr
Normal file
11
spec/kilt/liquid_spec.cr
Normal file
|
@ -0,0 +1,11 @@
|
|||
require "../spec_helper"
|
||||
require "../../src/liquid"
|
||||
|
||||
class LiquidView
|
||||
@process = { "pid" => Process.pid }
|
||||
Kilt.file "spec/fixtures/test.liquid"
|
||||
end
|
||||
|
||||
it "works with classes" do
|
||||
LiquidView.new.to_s.should eq("<span>#{Process.pid}</span>\n")
|
||||
end
|
4
src/liquid.cr
Normal file
4
src/liquid.cr
Normal file
|
@ -0,0 +1,4 @@
|
|||
require "./kilt"
|
||||
require "liquid"
|
||||
|
||||
Kilt.register_engine "liquid", Liquid.embed
|
Loading…
Add table
Add a link
Reference in a new issue