sinatra-thymeleaf 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ef7fa213cb6eca7db5e1f8d45b96ed439b03be3
4
- data.tar.gz: 9ef2e4dd49028eca9c7f5440fbfda3f13e76283b
3
+ metadata.gz: 5cdd7cc3ea3c6bb967aa872d33abc3b595985dd0
4
+ data.tar.gz: e2f0a4481652a921d4f9092f503e2b11470f04b5
5
5
  SHA512:
6
- metadata.gz: 5d89b7bb41dd4c35d6f556e8c67669bda9f8eea327d357b2d446805cb783266d190d611d12b58fe7ffa6edadc70ac588ded1baf02b15984ce725294f73ca3953
7
- data.tar.gz: 26a553c6817d770ed8b6a26b9230c19ab5700148d072a13403e5cd06f1956f30e7e8143c8836faf29dc765a10b2b0ce0669674ec09e3dfbf554df5cf14c0c8e3
6
+ metadata.gz: 7c0c566c5c3042834d60985364986e98cc4efc854400a291bf101fab82976161132445546cc2d0102ec32fccf5b3e5035e60380cbb4b63ded2293705875bd23b
7
+ data.tar.gz: 6ce66a748547fdde1da8e7f0b9387f185720000c7d2a6800176fca2f11ddcc5fe6427cc2c629e2a4cd02666986f3163f4b55c95927738b5592b35296606a3462
data/README.md CHANGED
@@ -1,2 +1,40 @@
1
+ [![Gem Version](https://badge.fury.io/rb/sinatra-thymeleaf.svg)](https://badge.fury.io/rb/sinatra-thymeleaf)
2
+
1
3
  # sinatra-thymeleaf
2
4
  Sinatra template support for Thymeleaf.rb
5
+
6
+ # Thymeleaf.rb
7
+ Thymeleaf.rb is a Ruby adaptation of Thymeleaf, a natural templating engine.
8
+
9
+ It allows to create natural templates (HTML that can be correctly displayed in browsers and also work as static prototypes) and render with a data set to provide them functionality.
10
+
11
+ You can find Thymeleaf.rb here: https://github.com/trabe/thymeleaf-rb
12
+ Templating language is here: http://www.thymeleaf.org
13
+
14
+ # Usage
15
+
16
+ This is a gem so just pop it in your Gemfile:
17
+
18
+ ```
19
+ gem 'sinatra-thymeleaf'
20
+ ```
21
+
22
+ Then, require it and activate the helper in your app:
23
+ ```
24
+ require 'sinatra/base'
25
+ require 'sinatra-thymeleaf'
26
+
27
+ class App < Sinatra::Base
28
+ helpers Sinatra::Thymeleaf
29
+
30
+ get "/test" do
31
+ thyme :test
32
+ end
33
+ end
34
+ ```
35
+
36
+ The views have an html externsion and should be placed in the views directory.
37
+ That's about it.
38
+
39
+ I'll continue to add functionality and details, as I'm looking to use this in a project.
40
+ Please add issues if you spot any problems.
@@ -10,10 +10,7 @@ module Tilt
10
10
  end
11
11
 
12
12
  def evaluate(scope, locals, &block)
13
- puts locals.inspect
14
- result = Thymeleaf::Template.new(data, locals).render
15
- puts result
16
- @output ||= result
13
+ @output ||= Thymeleaf::Template.new(data, locals).render
17
14
  end
18
15
  end
19
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-thymeleaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Costea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thymeleaf