remove unused badges from readme and format code

This commit is contained in:
Anton Maminov 2018-11-05 22:40:15 +02:00
parent 0339265b3d
commit c680398930
9 changed files with 10 additions and 15 deletions

View file

@ -1,4 +1,4 @@
# Kilt [![Build Status](https://travis-ci.org/jeromegn/kilt.svg?branch=master)](https://travis-ci.org/jeromegn/kilt) [![Dependency Status](https://shards.rocks/badge/github/jeromegn/kilt/status.svg)](https://shards.rocks/github/jeromegn/kilt) [![devDependency Status](https://shards.rocks/badge/github/jeromegn/kilt/dev_status.svg)](https://shards.rocks/github/jeromegn/kilt)
# Kilt [![Build Status](https://travis-ci.org/jeromegn/kilt.svg?branch=master)](https://travis-ci.org/jeromegn/kilt)
Generic templating interface for Crystal.

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,3 @@
require "spec"
require "../src/kilt"
require "./support/raw_engine"
require "./support/raw_engine"

View file

@ -2,4 +2,4 @@ module Raw
macro embed(filename, io)
{{ io.id }} << {{`cat #{filename}`.stringify}}
end
end
end

View file

@ -1,4 +1,4 @@
require "./kilt"
require "crustache"
Kilt.register_engine "mustache", Mustache.embed
Kilt.register_engine "mustache", Mustache.embed

View file

@ -2,4 +2,4 @@ module Kilt
class Exception < ::Exception
# Nothing special
end
end
end