feather 0.4.0 → 0.4.1
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 +7 -0
- data/RELEASES.txt +2 -0
- data/VERSION +1 -1
- data/feather.gemspec +6 -5
- data/lib/feather/template.rb +1 -1
- data/test/helper.rb +2 -2
- data/test/test_feather.rb +1 -1
- data/test/test_feather_support.rb +1 -1
- data/test/test_feather_template.rb +8 -1
- metadata +10 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1de807935a97f70d69017324bb6afde148c0670a
|
4
|
+
data.tar.gz: addc943b185f849e2962b0cd0160e5262b5cdfb0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 99cc59b1e93a2cbac2190dd4df4eac34be97d9737c4ea13cb5cb5b933a388bfcfca9e7a41c256e6acb5863efea7e346b52c34458cf84281b39c85f099701123e
|
7
|
+
data.tar.gz: 5e8f80df8cf82d39b4ceeb89f8408793c218a711034414601099c1c62754c2611659bbba1f3eab28728ccc07762a69ab197fba39392c2dc4161cc9bf94ac3f69
|
data/RELEASES.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/feather.gemspec
CHANGED
@@ -2,14 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: feather 0.4.1 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "feather"
|
8
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.1"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
11
13
|
s.authors = ["Scott Tadman"]
|
12
|
-
s.date = "
|
14
|
+
s.date = "2015-01-26"
|
13
15
|
s.description = "A simple light-weight text templating system"
|
14
16
|
s.email = "github@tadman.ca"
|
15
17
|
s.extra_rdoc_files = [
|
@@ -36,12 +38,11 @@ Gem::Specification.new do |s|
|
|
36
38
|
]
|
37
39
|
s.homepage = "http://github.com/twg/feather"
|
38
40
|
s.licenses = ["MIT"]
|
39
|
-
s.
|
40
|
-
s.rubygems_version = "1.8.25"
|
41
|
+
s.rubygems_version = "2.2.2"
|
41
42
|
s.summary = "Light-weight text tempating system"
|
42
43
|
|
43
44
|
if s.respond_to? :specification_version then
|
44
|
-
s.specification_version =
|
45
|
+
s.specification_version = 4
|
45
46
|
|
46
47
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
48
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
data/lib/feather/template.rb
CHANGED
@@ -176,7 +176,7 @@ class Feather::Template
|
|
176
176
|
# HTML escaped
|
177
177
|
index = stack[-1][2][tag.inspect]
|
178
178
|
|
179
|
-
source and source << "v&&r<<h.html_escape(v[#{tag.inspect}].to_s);"
|
179
|
+
source and source << "v&&r<<h.html_escape((v.is_a?(Array)?v[#{index}]:v[#{tag.inspect}]).to_s);"
|
180
180
|
|
181
181
|
variables and variables[tag] = true
|
182
182
|
when '%'
|
data/test/helper.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
2
|
+
require 'minitest/autorun'
|
3
3
|
|
4
4
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
6
|
|
7
7
|
require 'feather'
|
8
8
|
|
9
|
-
class Test
|
9
|
+
class Minitest::Test
|
10
10
|
def assert_exception(exception_class, message = nil)
|
11
11
|
begin
|
12
12
|
yield
|
data/test/test_feather.rb
CHANGED
@@ -2,7 +2,7 @@ require_relative './helper'
|
|
2
2
|
|
3
3
|
require 'yaml'
|
4
4
|
|
5
|
-
class TestFeatherTemplate < Test
|
5
|
+
class TestFeatherTemplate < Minitest::Test
|
6
6
|
def test_empty_template
|
7
7
|
template = Feather::Template.new('')
|
8
8
|
|
@@ -26,6 +26,13 @@ class TestFeatherTemplate < Test::Unit::TestCase
|
|
26
26
|
|
27
27
|
assert_equal 'example something text', template.render(:example => 'something')
|
28
28
|
end
|
29
|
+
|
30
|
+
def test_repeated_rendering
|
31
|
+
template = Feather::Template.new('example')
|
32
|
+
|
33
|
+
assert_equal 'example', template.render
|
34
|
+
assert_equal 'example', template.render
|
35
|
+
end
|
29
36
|
|
30
37
|
def test_boolean_templates
|
31
38
|
template = Feather::Template.new('{{?boolean}}true {{/}}false')
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Scott Tadman
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: jeweler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: A simple light-weight text templating system
|
@@ -35,7 +32,7 @@ extra_rdoc_files:
|
|
35
32
|
- LICENSE.txt
|
36
33
|
- README.md
|
37
34
|
files:
|
38
|
-
- .document
|
35
|
+
- ".document"
|
39
36
|
- Gemfile
|
40
37
|
- LICENSE.txt
|
41
38
|
- README.md
|
@@ -54,26 +51,25 @@ files:
|
|
54
51
|
homepage: http://github.com/twg/feather
|
55
52
|
licenses:
|
56
53
|
- MIT
|
54
|
+
metadata: {}
|
57
55
|
post_install_message:
|
58
56
|
rdoc_options: []
|
59
57
|
require_paths:
|
60
58
|
- lib
|
61
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
60
|
requirements:
|
64
|
-
- -
|
61
|
+
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: '0'
|
67
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
65
|
requirements:
|
70
|
-
- -
|
66
|
+
- - ">="
|
71
67
|
- !ruby/object:Gem::Version
|
72
68
|
version: '0'
|
73
69
|
requirements: []
|
74
70
|
rubyforge_project:
|
75
|
-
rubygems_version:
|
71
|
+
rubygems_version: 2.2.2
|
76
72
|
signing_key:
|
77
|
-
specification_version:
|
73
|
+
specification_version: 4
|
78
74
|
summary: Light-weight text tempating system
|
79
75
|
test_files: []
|