mirror of
https://gitea.invidious.io/iv-org/shard-kilt.git
synced 2024-08-15 00:43:15 +00:00
remove unused badges from readme and format code
This commit is contained in:
parent
0339265b3d
commit
c680398930
9 changed files with 10 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
# Kilt [](https://travis-ci.org/jeromegn/kilt) [](https://shards.rocks/github/jeromegn/kilt) [](https://shards.rocks/github/jeromegn/kilt)
|
||||
# Kilt [](https://travis-ci.org/jeromegn/kilt)
|
||||
|
||||
Generic templating interface for Crystal.
|
||||
|
||||
|
|
|
@ -14,13 +14,11 @@ class MustacheView
|
|||
end
|
||||
|
||||
describe "kilt/crustache" do
|
||||
|
||||
it "renders crustache" do
|
||||
Kilt.render("spec/fixtures/test.mustache", { "pid" => Process.pid }).should eq("<span>#{Process.pid}</span>")
|
||||
Kilt.render("spec/fixtures/test.mustache", {"pid" => Process.pid}).should eq("<span>#{Process.pid}</span>")
|
||||
end
|
||||
|
||||
it "works with classes" do
|
||||
MustacheView.new.to_s.should eq("<span>#{Process.pid}</span>")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ require "../spec_helper"
|
|||
require "../../src/liquid"
|
||||
|
||||
class LiquidView
|
||||
@process = { "pid" => Process.pid }
|
||||
@process = {"pid" => Process.pid}
|
||||
Kilt.file "spec/fixtures/test.liquid"
|
||||
end
|
||||
|
||||
|
@ -11,14 +11,15 @@ class LiquidViewWithCustomContext
|
|||
# avoid name clash with 'context' variable existing within spec.
|
||||
def initialize
|
||||
@context = Liquid::Context.new
|
||||
@context.set "process", { "pid" => Process.pid }
|
||||
@context.set "process", {"pid" => Process.pid}
|
||||
end
|
||||
|
||||
Kilt.file "spec/fixtures/test.liquid", "__kilt_io__", "@context"
|
||||
end
|
||||
|
||||
it "renders liquid" do
|
||||
ctx = Liquid::Context.new
|
||||
ctx.set "process", { "pid" => Process.pid }
|
||||
ctx.set "process", {"pid" => Process.pid}
|
||||
Kilt.render("spec/fixtures/test.liquid", ctx).should eq("<span>#{Process.pid}</span>\n")
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ class SlangView
|
|||
end
|
||||
|
||||
describe "kilt/slang" do
|
||||
|
||||
it "renders slang" do
|
||||
Kilt.render("spec/fixtures/test.slang").should eq("<span>#{Process.pid}</span>")
|
||||
end
|
||||
|
@ -14,5 +13,4 @@ describe "kilt/slang" do
|
|||
it "works with classes" do
|
||||
SlangView.new.to_s.should eq("<span>#{Process.pid}</span>")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -5,7 +5,6 @@ class View
|
|||
end
|
||||
|
||||
describe Kilt do
|
||||
|
||||
it "renders ecr" do
|
||||
Kilt.render("spec/fixtures/test.ecr").should eq("<span>#{Process.pid}</span>")
|
||||
end
|
||||
|
@ -24,5 +23,4 @@ describe Kilt do
|
|||
Kilt.register_engine "raw", Raw.embed
|
||||
Kilt.render("spec/fixtures/test.raw").should eq("Hello World!")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
require "spec"
|
||||
require "../src/kilt"
|
||||
require "./support/raw_engine"
|
||||
require "./support/raw_engine"
|
||||
|
|
|
@ -2,4 +2,4 @@ module Raw
|
|||
macro embed(filename, io)
|
||||
{{ io.id }} << {{`cat #{filename}`.stringify}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "./kilt"
|
||||
require "crustache"
|
||||
|
||||
Kilt.register_engine "mustache", Mustache.embed
|
||||
Kilt.register_engine "mustache", Mustache.embed
|
||||
|
|
|
@ -2,4 +2,4 @@ module Kilt
|
|||
class Exception < ::Exception
|
||||
# Nothing special
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue