express_templates 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -6
- data/lib/core_extensions/proc.rb +42 -0
- data/lib/express_templates.rb +7 -2
- data/lib/express_templates/compiler.rb +27 -0
- data/lib/express_templates/components.rb +7 -4
- data/lib/express_templates/components/base.rb +54 -0
- data/lib/express_templates/components/capabilities/conditionality.rb +52 -0
- data/lib/express_templates/components/capabilities/configurable.rb +91 -0
- data/lib/express_templates/components/capabilities/iterating.rb +80 -0
- data/lib/express_templates/components/capabilities/parenting.rb +74 -0
- data/lib/express_templates/components/capabilities/rendering.rb +93 -0
- data/lib/express_templates/components/capabilities/templating.rb +196 -0
- data/lib/express_templates/components/capabilities/wrapping.rb +100 -0
- data/lib/express_templates/components/column.rb +13 -0
- data/lib/express_templates/components/container.rb +7 -0
- data/lib/express_templates/components/form_rails_support.rb +19 -0
- data/lib/express_templates/components/row.rb +28 -0
- data/lib/express_templates/expander.rb +51 -35
- data/lib/express_templates/indenter.rb +44 -0
- data/lib/express_templates/macro.rb +44 -0
- data/lib/express_templates/markup.rb +9 -0
- data/lib/express_templates/{components → markup}/html_tag.rb +9 -3
- data/lib/express_templates/markup/tag.rb +118 -0
- data/lib/express_templates/markup/wrapper.rb +88 -0
- data/lib/express_templates/{components → markup}/yielder.rb +2 -2
- data/lib/express_templates/renderer.rb +3 -8
- data/lib/express_templates/template/handler.rb +1 -1
- data/lib/express_templates/version.rb +1 -1
- data/lib/tasks/{gara_tasks.rake → express_templates.rake} +0 -0
- data/test/compiler_test.rb +9 -0
- data/test/components/base_test.rb +77 -0
- data/test/components/column_test.rb +11 -0
- data/test/components/conditionality_test.rb +37 -0
- data/test/components/configurable_test.rb +43 -0
- data/test/components/container_test.rb +49 -0
- data/test/components/iterating_test.rb +85 -0
- data/test/components/row_test.rb +16 -0
- data/test/core_extensions/proc_test.rb +41 -0
- data/test/dummy/log/test.log +72489 -0
- data/test/expander_test.rb +55 -13
- data/test/{gara_test.rb → express_templates_test.rb} +0 -0
- data/test/handler_test.rb +4 -4
- data/test/indenter_test.rb +25 -0
- data/test/markup/tag_test.rb +127 -0
- data/test/markup/wrapper_test.rb +42 -0
- data/test/markup/yielder_test.rb +9 -0
- data/test/performance_test.rb +2 -2
- data/test/test_helper.rb +6 -0
- metadata +78 -24
- data/lib/express_templates/component.rb +0 -92
- data/lib/express_templates/components/wrapper.rb +0 -51
- data/lib/express_templates/html5_emitter.rb +0 -45
- data/test/component_test.rb +0 -77
- data/test/wrapper_test.rb +0 -23
data/test/expander_test.rb
CHANGED
@@ -2,22 +2,16 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class ExpanderTest < ActiveSupport::TestCase
|
4
4
|
|
5
|
-
class Foo < ExpressTemplates::
|
6
|
-
class Bar < ExpressTemplates::
|
7
|
-
class Baz < ExpressTemplates::
|
5
|
+
class Foo < ExpressTemplates::Markup::Tag ; end
|
6
|
+
class Bar < ExpressTemplates::Markup::Tag ; end
|
7
|
+
class Baz < ExpressTemplates::Markup::Tag ; end
|
8
8
|
|
9
9
|
ExpressTemplates::Expander.register_macros_for(Foo,Bar,Baz)
|
10
10
|
|
11
|
-
test ".expand returns a string" do
|
12
|
-
source = "foo"
|
13
|
-
result = ExpressTemplates::Expander.expand(nil, source)
|
14
|
-
assert_kind_of String, result
|
15
|
-
end
|
16
|
-
|
17
11
|
test "#expand returns an array containing a component" do
|
18
12
|
source = "foo"
|
19
13
|
result = ExpressTemplates::Expander.new(nil).expand(source)
|
20
|
-
assert_kind_of ExpressTemplates::
|
14
|
+
assert_kind_of ExpressTemplates::Markup::Tag, result.first
|
21
15
|
end
|
22
16
|
|
23
17
|
test "#expand of 'foo { foo } returns a component with a child component" do
|
@@ -42,15 +36,63 @@ class ExpanderTest < ActiveSupport::TestCase
|
|
42
36
|
assert_kind_of Baz, result.first.children.last
|
43
37
|
end
|
44
38
|
|
45
|
-
test "#expand correctly allocated helpers and parameters
|
39
|
+
test "#expand correctly allocated helpers and parameters" do
|
46
40
|
source = 'helper ; foo { buzz }'
|
47
41
|
result = ExpressTemplates::Expander.new(nil).expand(source)
|
48
42
|
assert_equal 0, result.first.children.size
|
49
43
|
assert_equal 1, result[1].children.size
|
50
|
-
assert_kind_of ExpressTemplates::
|
44
|
+
assert_kind_of ExpressTemplates::Markup::Wrapper, result.first
|
51
45
|
assert_kind_of Foo, result[1]
|
52
|
-
assert_kind_of ExpressTemplates::
|
46
|
+
assert_kind_of ExpressTemplates::Markup::Wrapper, result[1].children.first
|
47
|
+
end
|
48
|
+
|
49
|
+
test "#expand works with css class specification syntax xxx" do
|
50
|
+
source = 'foo.active { baz }'
|
51
|
+
result = ExpressTemplates::Expander.new(nil).expand(source)
|
52
|
+
assert_equal 1, result[0].children.size
|
53
|
+
end
|
54
|
+
|
55
|
+
test "#expand doesn't yield [] for children" do
|
56
|
+
source = %Q(ul(class: 'title-area') {
|
57
|
+
li.name {
|
58
|
+
a("Something", href: '#', disabled: true)
|
59
|
+
}
|
60
|
+
li(class:"ugly markup") {
|
61
|
+
a(href: "#") { span "menu item" }
|
62
|
+
}
|
63
|
+
})
|
64
|
+
result = ExpressTemplates::Expander.new(nil).expand(source)
|
65
|
+
child_of_first_child = result.first.children.first
|
66
|
+
assert_equal 1, child_of_first_child.children.size
|
67
|
+
assert_kind_of ExpressTemplates::Markup::Tag, child_of_first_child.children.first
|
53
68
|
end
|
54
69
|
|
70
|
+
class Special
|
71
|
+
def self.render(label)
|
72
|
+
:dummy
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
test "initializer accepts special handlers hash" do
|
77
|
+
source = "render(:markup)"
|
78
|
+
assert_equal [:dummy], ExpressTemplates::Expander.new(nil, render: Special).expand(source)
|
79
|
+
end
|
80
|
+
|
81
|
+
test "helpers can take blocks" do
|
82
|
+
result = ExpressTemplates::Expander.new(nil).expand do
|
83
|
+
helper do
|
84
|
+
foo
|
85
|
+
end
|
86
|
+
end
|
87
|
+
assert_equal %q("#{helper do
|
88
|
+
foo
|
89
|
+
end}"), result.first.compile
|
90
|
+
end
|
91
|
+
|
92
|
+
test "non-interpolated string children containing string interpolations will interpolate in context" do
|
93
|
+
source = 'p %q(some text #{helper})'
|
94
|
+
result = ExpressTemplates::Expander.new(nil).expand(source)
|
95
|
+
assert_equal %q("<p>"+"some text #{helper}"+"</p>"), result.first.compile
|
96
|
+
end
|
55
97
|
|
56
98
|
end
|
File without changes
|
data/test/handler_test.rb
CHANGED
@@ -86,10 +86,10 @@ class HandlerTest < ActiveSupport::TestCase
|
|
86
86
|
assert_equal "<p class=\"whatever another\">Lorum Ipsum</p>", render
|
87
87
|
end
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
test "string in block works" do
|
90
|
+
@template = new_template "h1 { 'foo' } "
|
91
|
+
assert_equal "<h1>foo</h1>", render
|
92
|
+
end
|
93
93
|
|
94
94
|
# test "real document has doctype and newline" do
|
95
95
|
# @template = new_template("html { body { h1 \"hello\" } }")
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class IndenterTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
Indenter = ExpressTemplates::Indenter
|
6
|
+
|
7
|
+
test ".for(:name) takes a block receiving whitespace" do
|
8
|
+
assert_equal "\n ", Indenter.for(:foo) { |indent, indent_with_newline| indent_with_newline }
|
9
|
+
assert_equal " ", Indenter.for(:foo) { |indent, indent_with_newline| indent }
|
10
|
+
end
|
11
|
+
|
12
|
+
test "nesting blocks increases whitespace accordingly" do
|
13
|
+
nested_whitespace = Indenter.for(:foo) do |ws1|
|
14
|
+
Indenter.for(:foo) do |ws2|
|
15
|
+
ws2
|
16
|
+
end
|
17
|
+
end
|
18
|
+
assert_equal " ", nested_whitespace
|
19
|
+
end
|
20
|
+
|
21
|
+
test ".for(:name) returns current indent without newline when block is not given" do
|
22
|
+
assert_equal " ", Indenter.for(:foo) { |_| Indenter.for(:foo) }
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TagTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
class Bare < ExpressTemplates::Markup::Tag ; end
|
6
|
+
class Sub < ExpressTemplates::Markup::Tag ; end
|
7
|
+
|
8
|
+
def bare_tag(*args)
|
9
|
+
Bare.new(*args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def sub_tag(*args)
|
13
|
+
Sub.new(*args)
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
test "#macro_name returns the name of the class" do
|
18
|
+
assert_equal 'bare', bare_tag.macro_name
|
19
|
+
end
|
20
|
+
|
21
|
+
test "#compile returns a string" do
|
22
|
+
assert_kind_of String, bare_tag.compile
|
23
|
+
end
|
24
|
+
|
25
|
+
test "has no children" do
|
26
|
+
assert_empty bare_tag.children
|
27
|
+
end
|
28
|
+
|
29
|
+
def bare_with_2_children
|
30
|
+
tag = bare_tag "child1", "child2"
|
31
|
+
end
|
32
|
+
|
33
|
+
test "can be created with children" do
|
34
|
+
assert_equal 2, bare_with_2_children.children.size
|
35
|
+
assert_equal "child2", bare_with_2_children.children.last
|
36
|
+
end
|
37
|
+
|
38
|
+
test "#compile on bare_with_2_children yields '\"<bare>\"+\"child1\"+\"child2\"+\"</bare>\"'" do
|
39
|
+
assert_equal '"<bare>"+"child1"+"child2"+"</bare>"', bare_with_2_children.compile
|
40
|
+
end
|
41
|
+
|
42
|
+
test "#start_tag is my macro_name as an xml start tag" do
|
43
|
+
assert_equal "<#{bare_tag.macro_name}>", bare_tag.start_tag
|
44
|
+
end
|
45
|
+
|
46
|
+
test "#close_tag is my macro_name as an xml close tag" do
|
47
|
+
assert_equal "</#{bare_tag.macro_name}>", bare_tag.close_tag
|
48
|
+
end
|
49
|
+
|
50
|
+
def tag_with_subtag
|
51
|
+
bare_tag sub_tag
|
52
|
+
end
|
53
|
+
|
54
|
+
test "#compile on tag_with_subtag returns a string which when eval'd looks like '<bare><sub /></bare>'" do
|
55
|
+
assert_equal '<bare><sub /></bare>', eval(tag_with_subtag.compile)
|
56
|
+
end
|
57
|
+
|
58
|
+
test "#to_template on bare_tag returns 'bare'" do
|
59
|
+
assert_equal 'bare', bare_tag.to_template
|
60
|
+
end
|
61
|
+
|
62
|
+
test "#to_template on tag_with_subtag returns 'bare {\n sub\n}\n'" do
|
63
|
+
assert_equal "bare {\n sub\n}\n", tag_with_subtag.to_template
|
64
|
+
end
|
65
|
+
|
66
|
+
test "#to_template on nested tags indents properly'" do
|
67
|
+
expected = %Q(bare {
|
68
|
+
sub {
|
69
|
+
sub
|
70
|
+
}
|
71
|
+
}
|
72
|
+
)
|
73
|
+
assert_equal expected, Bare.new(Sub.new(Sub.new)).to_template
|
74
|
+
end
|
75
|
+
|
76
|
+
test "double bracketed option values are substituted for evaluation in context" do
|
77
|
+
assert_equal '"<bare should_eval_in_context=\"#{foo}\" />"', bare_tag(should_eval_in_context: "{{foo}}").compile
|
78
|
+
end
|
79
|
+
|
80
|
+
test "double bracketed child values are substituted for evaluation in context" do
|
81
|
+
assert_equal '"<bare>"+"#{foo}"+"</bare>"', bare_tag("{{foo}}").compile
|
82
|
+
end
|
83
|
+
|
84
|
+
test "data option value hashes are converted to data attributes similar to haml" do
|
85
|
+
assert_equal %("<bare data-one=\\"two\\" data-three=\\"four\\" />"),
|
86
|
+
bare_tag(data: {one: 'two', three: 'four'}).compile
|
87
|
+
end
|
88
|
+
|
89
|
+
test "data option value hashes can take immediate values" do
|
90
|
+
assert_equal %("<bare data-foo=\\"true\\" data-bar=\\"42\\" data-baz=\\"blah\\" />"),
|
91
|
+
bare_tag(data: {foo: true, bar: 42, baz: 'blah'}).compile
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
# todo?
|
96
|
+
# test "proc option values are evaluated in context"
|
97
|
+
|
98
|
+
test "empty tags use abbreviated empty tag form" do
|
99
|
+
assert_equal '"<bare />"', bare_tag.compile
|
100
|
+
end
|
101
|
+
|
102
|
+
test "empty i tag does does not use abbreviated form since it is used for icons" do
|
103
|
+
assert_equal '"<i>"+"</i>"', ExpressTemplates::Markup::I.new.compile
|
104
|
+
end
|
105
|
+
|
106
|
+
test "method missing returns self" do
|
107
|
+
tag = bare_tag
|
108
|
+
assert_equal tag, tag.foo
|
109
|
+
end
|
110
|
+
|
111
|
+
# the block form of this is tested in expander
|
112
|
+
test "children still evaluated after css class provided via method syntax" do
|
113
|
+
assert_equal '"<bare class=\"foo\">"+"<sub />"+"</bare>"', (bare_tag.foo(sub_tag)).compile
|
114
|
+
end
|
115
|
+
|
116
|
+
test "CSS classes specified with underscored method get translated to dashed" do
|
117
|
+
assert_equal '"<bare class=\"foo-bar\" />"', bare_tag._foo_bar.compile
|
118
|
+
end
|
119
|
+
|
120
|
+
test "dom ID may be passed as a symbol" do
|
121
|
+
assert_equal '"<bare id=\"foo\" />"', bare_tag(:foo).compile
|
122
|
+
end
|
123
|
+
|
124
|
+
# test "proc option values are evaluated in context"
|
125
|
+
|
126
|
+
|
127
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class WrapperTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
Wrapper = ExpressTemplates::Markup::Wrapper
|
6
|
+
|
7
|
+
test "name compiles to just name" do
|
8
|
+
assert_equal '"#{foo}"', Wrapper.new('foo').compile
|
9
|
+
end
|
10
|
+
|
11
|
+
test "simple args are preserved" do
|
12
|
+
wrapper = Wrapper.new('foo', "xyzzy", 'bar', "baz", 1, false, 3)
|
13
|
+
assert_equal '"#{foo("xyzzy", "bar", "baz", 1, false, 3)}"', wrapper.compile
|
14
|
+
end
|
15
|
+
|
16
|
+
test "args are preserved" do
|
17
|
+
wrapper = Wrapper.new('foo', "xyzzy", bar: "baz")
|
18
|
+
assert_equal '"#{foo("xyzzy", bar: "baz")}"', wrapper.compile
|
19
|
+
end
|
20
|
+
|
21
|
+
test "something returning nil when wrapped and compiled, evals to an empty string" do
|
22
|
+
assert_equal '', eval(Wrapper.new('nil').compile)
|
23
|
+
end
|
24
|
+
|
25
|
+
test "double-braced args are evaluated in context" do
|
26
|
+
wrapper = Wrapper.new('foo', "{{xyz}}", "{{zyx}}", bar: "baz")
|
27
|
+
assert_equal '"#{foo(xyz, zyx, bar: "baz")}"', wrapper.compile
|
28
|
+
end
|
29
|
+
|
30
|
+
test "initializer block is preserved in compile" do
|
31
|
+
wrapper = Wrapper.new('foo') { whatever }
|
32
|
+
assert_equal '"#{foo { whatever }}"', wrapper.compile
|
33
|
+
wrapper = Wrapper.new('foo', 'bar') { whatever }
|
34
|
+
assert_equal '"#{foo("bar") { whatever }}"', wrapper.compile
|
35
|
+
end
|
36
|
+
|
37
|
+
test "lambda option values are evaluated in context" do
|
38
|
+
wrapper = Wrapper.new('foo', bar: -> { something })
|
39
|
+
assert_equal '"#{foo(bar: (-> { something }).call)}"', wrapper.compile
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/test/performance_test.rb
CHANGED
@@ -76,11 +76,11 @@ HAML
|
|
76
76
|
assert_operator 1.0, :>, duration
|
77
77
|
end
|
78
78
|
|
79
|
-
test "performance no more than
|
79
|
+
test "performance no more than 3.5x slower than erubis" do
|
80
80
|
eruby = Erubis::Eruby.new
|
81
81
|
duration_erb = time(100) { eval(eruby.convert(ERB_EXAMPLE)) }
|
82
82
|
duration_express_templates = time(100) { ExpressTemplates.render(self, "#{GARA_EXAMPLE}") }
|
83
|
-
assert_operator 3.
|
83
|
+
assert_operator 3.5, :>, (duration_express_templates/duration_erb)
|
84
84
|
end
|
85
85
|
|
86
86
|
test "performance better than haml" do
|
data/test/test_helper.rb
CHANGED
@@ -15,3 +15,9 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
15
15
|
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
16
16
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
17
17
|
end
|
18
|
+
|
19
|
+
ECB = ExpressTemplates::Components::Base
|
20
|
+
|
21
|
+
ET = ExpressTemplates
|
22
|
+
|
23
|
+
Tag = ExpressTemplates::Markup::Tag
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Talcott Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.1'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,31 +84,33 @@ dependencies:
|
|
70
84
|
name: better_errors
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
89
|
+
version: '2.0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
96
|
+
version: '2.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: binding_of_caller
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
103
|
+
version: '0.7'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
description:
|
110
|
+
version: '0.7'
|
111
|
+
description: Replace Erb/HAML/Slim with ExpressTemplates and write templates in a
|
112
|
+
declartive style of Ruby. With ExpressTemplates you may easily create a library
|
113
|
+
of components for use across projects.
|
98
114
|
email:
|
99
115
|
- steve@aelogica.com
|
100
116
|
executables: []
|
@@ -104,19 +120,43 @@ files:
|
|
104
120
|
- LICENSE
|
105
121
|
- README.md
|
106
122
|
- Rakefile
|
123
|
+
- lib/core_extensions/proc.rb
|
107
124
|
- lib/express_templates.rb
|
108
|
-
- lib/express_templates/
|
125
|
+
- lib/express_templates/compiler.rb
|
109
126
|
- lib/express_templates/components.rb
|
110
|
-
- lib/express_templates/components/
|
111
|
-
- lib/express_templates/components/
|
112
|
-
- lib/express_templates/components/
|
127
|
+
- lib/express_templates/components/base.rb
|
128
|
+
- lib/express_templates/components/capabilities/conditionality.rb
|
129
|
+
- lib/express_templates/components/capabilities/configurable.rb
|
130
|
+
- lib/express_templates/components/capabilities/iterating.rb
|
131
|
+
- lib/express_templates/components/capabilities/parenting.rb
|
132
|
+
- lib/express_templates/components/capabilities/rendering.rb
|
133
|
+
- lib/express_templates/components/capabilities/templating.rb
|
134
|
+
- lib/express_templates/components/capabilities/wrapping.rb
|
135
|
+
- lib/express_templates/components/column.rb
|
136
|
+
- lib/express_templates/components/container.rb
|
137
|
+
- lib/express_templates/components/form_rails_support.rb
|
138
|
+
- lib/express_templates/components/row.rb
|
113
139
|
- lib/express_templates/expander.rb
|
114
|
-
- lib/express_templates/
|
140
|
+
- lib/express_templates/indenter.rb
|
141
|
+
- lib/express_templates/macro.rb
|
142
|
+
- lib/express_templates/markup.rb
|
143
|
+
- lib/express_templates/markup/html_tag.rb
|
144
|
+
- lib/express_templates/markup/tag.rb
|
145
|
+
- lib/express_templates/markup/wrapper.rb
|
146
|
+
- lib/express_templates/markup/yielder.rb
|
115
147
|
- lib/express_templates/renderer.rb
|
116
148
|
- lib/express_templates/template/handler.rb
|
117
149
|
- lib/express_templates/version.rb
|
118
|
-
- lib/tasks/
|
119
|
-
- test/
|
150
|
+
- lib/tasks/express_templates.rake
|
151
|
+
- test/compiler_test.rb
|
152
|
+
- test/components/base_test.rb
|
153
|
+
- test/components/column_test.rb
|
154
|
+
- test/components/conditionality_test.rb
|
155
|
+
- test/components/configurable_test.rb
|
156
|
+
- test/components/container_test.rb
|
157
|
+
- test/components/iterating_test.rb
|
158
|
+
- test/components/row_test.rb
|
159
|
+
- test/core_extensions/proc_test.rb
|
120
160
|
- test/dummy/Rakefile
|
121
161
|
- test/dummy/app/assets/javascripts/application.js
|
122
162
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -174,12 +214,15 @@ files:
|
|
174
214
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
175
215
|
- test/expander_stack_test.rb
|
176
216
|
- test/expander_test.rb
|
217
|
+
- test/express_templates_test.rb
|
177
218
|
- test/fixtures/a_big_page.html
|
178
|
-
- test/gara_test.rb
|
179
219
|
- test/handler_test.rb
|
220
|
+
- test/indenter_test.rb
|
221
|
+
- test/markup/tag_test.rb
|
222
|
+
- test/markup/wrapper_test.rb
|
223
|
+
- test/markup/yielder_test.rb
|
180
224
|
- test/performance_test.rb
|
181
225
|
- test/test_helper.rb
|
182
|
-
- test/wrapper_test.rb
|
183
226
|
homepage: https://github.com/aelogica/express_templates
|
184
227
|
licenses:
|
185
228
|
- MIT
|
@@ -203,9 +246,17 @@ rubyforge_project:
|
|
203
246
|
rubygems_version: 2.2.2
|
204
247
|
signing_key:
|
205
248
|
specification_version: 4
|
206
|
-
summary: Write HTML templates in
|
249
|
+
summary: Write HTML templates in declarative Ruby. Create reusable view components.
|
207
250
|
test_files:
|
208
|
-
- test/
|
251
|
+
- test/compiler_test.rb
|
252
|
+
- test/components/base_test.rb
|
253
|
+
- test/components/column_test.rb
|
254
|
+
- test/components/conditionality_test.rb
|
255
|
+
- test/components/configurable_test.rb
|
256
|
+
- test/components/container_test.rb
|
257
|
+
- test/components/iterating_test.rb
|
258
|
+
- test/components/row_test.rb
|
259
|
+
- test/core_extensions/proc_test.rb
|
209
260
|
- test/dummy/app/assets/javascripts/application.js
|
210
261
|
- test/dummy/app/assets/stylesheets/application.css
|
211
262
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -263,9 +314,12 @@ test_files:
|
|
263
314
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
264
315
|
- test/expander_stack_test.rb
|
265
316
|
- test/expander_test.rb
|
317
|
+
- test/express_templates_test.rb
|
266
318
|
- test/fixtures/a_big_page.html
|
267
|
-
- test/gara_test.rb
|
268
319
|
- test/handler_test.rb
|
320
|
+
- test/indenter_test.rb
|
321
|
+
- test/markup/tag_test.rb
|
322
|
+
- test/markup/wrapper_test.rb
|
323
|
+
- test/markup/yielder_test.rb
|
269
324
|
- test/performance_test.rb
|
270
325
|
- test/test_helper.rb
|
271
|
-
- test/wrapper_test.rb
|