hmote 1.5.2 → 1.6.0

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: 681e6d2ed849cb5930849bf1a1a2259231fb408d
4
- data.tar.gz: b57b67bf12dd5e9fd635a654946b4d0e2ecabd06
3
+ metadata.gz: ffbdcc2bd38e5cafe31aee54f8d72541d693dccd
4
+ data.tar.gz: b0633bf8b9ac9e0e85ac6296ae125ac9051de17d
5
5
  SHA512:
6
- metadata.gz: 1a3dbff43808f5529fc9ff21ce491974a6539a7692a2ac73e5877e485fec0f8994a5434652726858edd7d7b153b3f19d26283410cf1ddd55b09c6a81943c1612
7
- data.tar.gz: 701809588b0350638b5e38b2165f2197a3ce9857af607646d7c1ae7e3a1814cec69d7aa271b895a919d0bf3098721683057005b107aff3d544e621e273a3bab7
6
+ metadata.gz: 90c158105f3594f8f6f2edb958a5c8a77969f28d7cfae470e80e0e4e04bb2da2b8056ce71a08b9286e2dcfd65e6ebe8793e83baac4c0ec3cfa47069e4726478f
7
+ data.tar.gz: adccb100a8b96363e08253a7c491e8ea3bb8dcca754cd5e8c2c3aa0b09c3131471e5aa4d0419637c34b2e3e907968a2412b5fb17fbcc0e217eab51a9b2b728b6
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- hmote
1
+ HMote [![Build Status](https://travis-ci.org/frodsan/hmote.svg)](https://travis-ci.org/frodsan/hmote)
2
2
  =====
3
3
 
4
4
  Minimal template engine with default escaping.
@@ -6,7 +6,7 @@ Minimal template engine with default escaping.
6
6
  Description
7
7
  -----------
8
8
 
9
- hmote is a fork of [Mote][mote] that uses [Hache][hache]
9
+ HMote is a fork of [Mote][mote] that uses [Hache][hache]
10
10
  to auto-escape HTML special characters.
11
11
 
12
12
  Installation
@@ -43,7 +43,7 @@ template.call
43
43
  # => "your template goes here!"
44
44
  ```
45
45
 
46
- Hmote recognizes three tags to evaluate Ruby code: `%`, `{{}}` and `<? ?>`.
46
+ HMote recognizes three tags to evaluate Ruby code: `%`, `{{}}` and `<? ?>`.
47
47
  The difference between them is that while the `%` and `<? ?>` tags only
48
48
  evaluate the code, the `{{}}` tag also prints the result to the template.
49
49
 
@@ -174,7 +174,7 @@ For bug reports and pull requests use [GitHub][issues].
174
174
  License
175
175
  -------
176
176
 
177
- hmote is released under the [MIT License][mit].
177
+ HMote is released under the [MIT License][mit].
178
178
 
179
179
  [mit]: http://www.opensource.org/licenses/MIT
180
180
  [mote]: https://github.com/soveran/mote
@@ -34,7 +34,7 @@ class HMote
34
34
  terms = template.split(PATTERN)
35
35
  parts = "Proc.new do |params, __o|\n params ||= {}; __o ||= ''\n".dup
36
36
 
37
- vars.each { |var| parts << format("%s = params[%p]\n", var, var) }
37
+ vars.each { |var| parts << sprintf("%s = params[%p]\n", var, var) }
38
38
 
39
39
  while (term = terms.shift)
40
40
  parts << parse_expression(terms, term)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HMote
4
- VERSION = "1.5.2"
4
+ VERSION = "1.6.0"
5
5
  end
@@ -96,11 +96,11 @@ class ParsingTest < Minitest::Test
96
96
  end
97
97
 
98
98
  test "escapes by default" do
99
- text = %q(<>&"'/)
99
+ text = %q(<>&"')
100
100
  template = HMote.parse("{{ params[:text] }}")
101
101
  result = template.call(text: text)
102
102
 
103
- assert_equal("&lt;&gt;&amp;&quot;&#x27;&#x2F;", result)
103
+ assert_equal("&lt;&gt;&amp;&#39;&#34;", result)
104
104
  end
105
105
 
106
106
  test "no escaping please" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hmote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
- - Francesco Rodríguez
7
+ - Francesco Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hache
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '11.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '11.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.39'
83
83
  description: A minimum operational template that escapes HTML tags by default
84
- email: frodsan@hello.com
84
+ email: frodsan@protonmail.com
85
85
  executables: []
86
86
  extensions: []
87
87
  extra_rdoc_files: []