temple 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 524637aaba62c678fcfe02760bb49ec94a2073c3
4
- data.tar.gz: a342126edf52f3e3578c4cc9f70540aed6b32b84
3
+ metadata.gz: 55957f55fcf577f188ba54ba8c9851344a41a652
4
+ data.tar.gz: 70d128d51b774affc4be599f00e272628e062f03
5
5
  SHA512:
6
- metadata.gz: 1bbc62f26373b9fb48c57cad57672ef3c379af1b991ba2538f3d7b699f6f0c22b19199520849869463349af07b810946a52029c345e7ec532aa81fb8b893d1e8
7
- data.tar.gz: 98da558eb0435b349b4c5ee44c407c92c07ee7eba8d08619d8a5158e447c423e16693707a052077ac4822aea810b1784f7fa0cc446fcf2648267b17dced0f421
6
+ metadata.gz: 678eaaf1c3a7632cb38421a41c94d3e2c91c718233a261b3ac69d342e74b2b2987ae7b05033e3a69b212904c49ab6de3f00861129ec732a927ed30ea4915c08f
7
+ data.tar.gz: ddec9236857f4f70d7044d7b03579647d803377da3fd4b90606c82f97aeea248708fe4fbb6f5a360ac109bd0d774e82808f888e72d72ba9963b8ddd001886acf
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ 0.8.1
2
+
3
+ * Stop relying on deprecated method in Rails (#121)
4
+ * Fix issue with --enable-frozen-string-literal
5
+ * Escape html in markdown
6
+
1
7
  0.8.0
2
8
 
3
9
  * Add Temple::StaticAnalyzer to analyze Ruby expressions
@@ -220,7 +220,7 @@ generates:
220
220
  ### [:html, :tag, identifier, attributes, optional-sexp]
221
221
 
222
222
  HTML tag abstraction. Identifier can be a String or a Symbol. If the optional content Sexp is omitted
223
- the tag is closed (e.g. <br/> <img/>). The tag is also closed if the content Sexp is empty
223
+ the tag is closed (e.g. `<br/>` `<img/>`). The tag is also closed if the content Sexp is empty
224
224
  (consists only of :multi and :newline expressions) and the tag is registered as auto-closing.
225
225
 
226
226
  Example:
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Temple
2
2
  ======
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/judofyr/temple.png?branch=master)](http://travis-ci.org/judofyr/temple) [![Dependency Status](https://gemnasium.com/judofyr/temple.png?travis)](https://gemnasium.com/judofyr/temple) [![Code Climate](https://codeclimate.com/github/judofyr/temple.png)](https://codeclimate.com/github/judofyr/temple)
4
+ [![Build Status](https://secure.travis-ci.org/judofyr/temple.svg?branch=master)](http://travis-ci.org/judofyr/temple) [![Dependency Status](https://gemnasium.com/judofyr/temple.svg?travis)](https://gemnasium.com/judofyr/temple) [![Code Climate](https://codeclimate.com/github/judofyr/temple.svg)](https://codeclimate.com/github/judofyr/temple) [![Gem Version](https://badge.fury.io/rb/temple.svg)](https://rubygems.org/gems/temple)
5
5
 
6
6
  Temple is an abstraction and a framework for compiling templates to pure Ruby.
7
7
  It's all about making it easier to experiment, implement and optimize template
@@ -90,7 +90,8 @@ module Temple
90
90
  raise 'Invalid dispatcher node' unless method
91
91
  call_method
92
92
  else
93
- code = "case(exp[#{level}])\n"
93
+ code = String.new
94
+ code << "case(exp[#{level}])\n"
94
95
  each do |key, child|
95
96
  code << "when #{key.inspect}\n " <<
96
97
  child.compile(level + 1, call_method).gsub("\n".freeze, "\n ".freeze) << "\n".freeze
@@ -3,9 +3,9 @@ module Temple
3
3
  class Rails
4
4
  extend Mixins::Template
5
5
 
6
- def call(template)
6
+ def call(template, source = nil)
7
7
  opts = {}.update(self.class.options).update(file: template.identifier)
8
- self.class.compile(template.source, opts)
8
+ self.class.compile((source || template.source), opts)
9
9
  end
10
10
 
11
11
  def supports_streaming?
@@ -1,3 +1,3 @@
1
1
  module Temple
2
- VERSION = '0.8.0'
2
+ VERSION = '0.8.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-12 00:00:00.000000000 Z
12
+ date: 2019-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.6.8
181
+ rubygems_version: 2.6.11
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Template compilation framework in Ruby