slim 0.9.0 → 0.9.1.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +53 -0
- data/lib/slim/version.rb +1 -1
- data/test/helper.rb +177 -0
- data/test/integration/rails/dummy/Rakefile +7 -0
- data/test/integration/rails/dummy/app/controllers/application_controller.rb +3 -0
- data/test/integration/rails/dummy/app/controllers/parents_controller.rb +84 -0
- data/test/integration/rails/dummy/app/controllers/slim_controller.rb +25 -0
- data/test/integration/rails/dummy/app/helpers/application_helper.rb +2 -0
- data/test/integration/rails/dummy/app/models/child.rb +5 -0
- data/test/integration/rails/dummy/app/models/parent.rb +6 -0
- data/test/integration/rails/dummy/app/views/layouts/application.html.slim +10 -0
- data/test/integration/rails/dummy/app/views/parents/_form.html.slim +8 -0
- data/test/integration/rails/dummy/app/views/parents/edit.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/parents/new.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/parents/show.html.slim +5 -0
- data/test/integration/rails/dummy/app/views/slim/_partial.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/slim/content_for.html.slim +7 -0
- data/test/integration/rails/dummy/app/views/slim/erb.html.erb +1 -0
- data/test/integration/rails/dummy/app/views/slim/integers.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/slim/nil.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/slim/no_layout.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/slim/normal.html.slim +1 -0
- data/test/integration/rails/dummy/app/views/slim/partial.html.slim +2 -0
- data/test/integration/rails/dummy/app/views/slim/variables.html.slim +1 -0
- data/test/integration/rails/dummy/config/application.rb +44 -0
- data/test/integration/rails/dummy/config/boot.rb +10 -0
- data/test/integration/rails/dummy/config/database.yml +22 -0
- data/test/integration/rails/dummy/config/environment.rb +5 -0
- data/test/integration/rails/dummy/config/environments/development.rb +26 -0
- data/test/integration/rails/dummy/config/environments/production.rb +49 -0
- data/test/integration/rails/dummy/config/environments/test.rb +35 -0
- data/test/integration/rails/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/integration/rails/dummy/config/initializers/inflections.rb +10 -0
- data/test/integration/rails/dummy/config/initializers/mime_types.rb +5 -0
- data/test/integration/rails/dummy/config/initializers/secret_token.rb +7 -0
- data/test/integration/rails/dummy/config/initializers/session_store.rb +8 -0
- data/test/integration/rails/dummy/config/locales/en.yml +5 -0
- data/test/integration/rails/dummy/config/routes.rb +60 -0
- data/test/integration/rails/dummy/config.ru +4 -0
- data/test/integration/rails/dummy/db/migrate/20101220223037_parents_and_children.rb +17 -0
- data/test/integration/rails/dummy/script/rails +6 -0
- data/test/integration/rails/test_helper.rb +10 -0
- data/test/integration/rails/test_slim_rails.rb +66 -0
- data/test/slim/test_code_blocks.rb +68 -0
- data/test/slim/test_code_escaping.rb +53 -0
- data/test/slim/test_code_evaluation.rb +201 -0
- data/test/slim/test_code_output.rb +124 -0
- data/test/slim/test_code_structure.rb +95 -0
- data/test/slim/test_embedded_engines.rb +98 -0
- data/test/slim/test_html_escaping.rb +32 -0
- data/test/slim/test_html_structure.rb +307 -0
- data/test/slim/test_parser_errors.rb +107 -0
- data/test/slim/test_ruby_errors.rb +144 -0
- data/test/slim/test_sections.rb +90 -0
- data/test/slim/test_slim_template.rb +123 -0
- data/test/slim/test_text_interpolation.rb +56 -0
- data/test/slim/test_validator.rb +47 -0
- data/test/slim/test_wrapper.rb +32 -0
- metadata +68 -7
@@ -0,0 +1,144 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSlimRubyErrors < TestSlim
|
4
|
+
def test_broken_output_line
|
5
|
+
source = %q{
|
6
|
+
p = hello_world + \
|
7
|
+
hello_world + \
|
8
|
+
unknown_ruby_method
|
9
|
+
}
|
10
|
+
|
11
|
+
assert_ruby_error NameError, "test.slim:4", source, :file => 'test.slim'
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_broken_output_line2
|
15
|
+
source = %q{
|
16
|
+
p = hello_world + \
|
17
|
+
hello_world
|
18
|
+
p Hello
|
19
|
+
= unknown_ruby_method
|
20
|
+
}
|
21
|
+
|
22
|
+
assert_ruby_error NameError,"(__TEMPLATE__):5", source
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_output_block
|
26
|
+
source = %q{
|
27
|
+
p = hello_world "Hello Ruby" do
|
28
|
+
= unknown_ruby_method
|
29
|
+
}
|
30
|
+
|
31
|
+
assert_ruby_error NameError,"(__TEMPLATE__):3", source
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_output_block2
|
35
|
+
source = %q{
|
36
|
+
p = hello_world "Hello Ruby" do
|
37
|
+
= "Hello from block"
|
38
|
+
p Hello
|
39
|
+
= unknown_ruby_method
|
40
|
+
}
|
41
|
+
|
42
|
+
assert_ruby_error NameError, "(__TEMPLATE__):5", source
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_text_block
|
46
|
+
source = %q{
|
47
|
+
p Text line 1
|
48
|
+
Text line 2
|
49
|
+
= unknown_ruby_method
|
50
|
+
}
|
51
|
+
|
52
|
+
assert_ruby_error NameError,"(__TEMPLATE__):4", source
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_text_block2
|
56
|
+
source = %q{
|
57
|
+
|
|
58
|
+
Text line 1
|
59
|
+
Text line 2
|
60
|
+
= unknown_ruby_method
|
61
|
+
}
|
62
|
+
|
63
|
+
assert_ruby_error NameError,"(__TEMPLATE__):5", source
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_comment
|
67
|
+
source = %q{
|
68
|
+
/ Comment line 1
|
69
|
+
Comment line 2
|
70
|
+
= unknown_ruby_method
|
71
|
+
}
|
72
|
+
|
73
|
+
assert_ruby_error NameError,"(__TEMPLATE__):4", source
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_embedded_ruby
|
77
|
+
source = %q{
|
78
|
+
ruby:
|
79
|
+
a = 1
|
80
|
+
b = 2
|
81
|
+
= a + b
|
82
|
+
= unknown_ruby_method
|
83
|
+
}
|
84
|
+
|
85
|
+
assert_ruby_error NameError,"(__TEMPLATE__):5", source
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_embedded_javascript
|
89
|
+
source = %q{
|
90
|
+
javascript:
|
91
|
+
alert();
|
92
|
+
alert();
|
93
|
+
= unknown_ruby_method
|
94
|
+
}
|
95
|
+
|
96
|
+
assert_ruby_error NameError,"(__TEMPLATE__):5", source
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_invalid_nested_code
|
100
|
+
source = %q{
|
101
|
+
p
|
102
|
+
- test = 123
|
103
|
+
= "Hello from within a block! "
|
104
|
+
}
|
105
|
+
assert_ruby_syntax_error "(__TEMPLATE__):5", source
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_invalid_nested_output
|
109
|
+
source = %q{
|
110
|
+
p
|
111
|
+
= "Hello Ruby!"
|
112
|
+
= "Hello from within a block! "
|
113
|
+
}
|
114
|
+
assert_ruby_syntax_error "(__TEMPLATE__):5", source
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_invalid_embedded_engine
|
118
|
+
source = %q{
|
119
|
+
p
|
120
|
+
embed_unknown:
|
121
|
+
1+1
|
122
|
+
}
|
123
|
+
|
124
|
+
assert_runtime_error 'Invalid embedded engine embed_unknown', source
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_explicit_end
|
128
|
+
source = %q{
|
129
|
+
div
|
130
|
+
- if show_first?
|
131
|
+
p The first paragraph
|
132
|
+
- end
|
133
|
+
}
|
134
|
+
|
135
|
+
assert_runtime_error 'Explicit end statements are forbidden', source
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_id_attribute_merging2
|
139
|
+
source = %{
|
140
|
+
#alpha id="beta" Test it
|
141
|
+
}
|
142
|
+
assert_runtime_error 'Multiple id attributes specified, but id concatenation disabled', source
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSlimLogicLess < TestSlim
|
4
|
+
def setup
|
5
|
+
Slim::Sections.set_default_options(:dictionary_access => :symbol)
|
6
|
+
end
|
7
|
+
|
8
|
+
def teardown
|
9
|
+
Slim::Sections.set_default_options(:dictionary => 'self')
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_sections
|
13
|
+
source = %q{
|
14
|
+
p
|
15
|
+
- person
|
16
|
+
.name = name
|
17
|
+
}
|
18
|
+
|
19
|
+
hash = {
|
20
|
+
:person => [
|
21
|
+
{ :name => 'Joe', },
|
22
|
+
{ :name => 'Jack', }
|
23
|
+
]
|
24
|
+
}
|
25
|
+
|
26
|
+
assert_html '<p><div class="name">Joe</div><div class="name">Jack</div></p>', source, :scope => hash, :sections => true
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_sections_string_access
|
30
|
+
source = %q{
|
31
|
+
p
|
32
|
+
- person
|
33
|
+
.name = name
|
34
|
+
}
|
35
|
+
|
36
|
+
hash = {
|
37
|
+
'person' => [
|
38
|
+
{ 'name' => 'Joe', },
|
39
|
+
{ 'name' => 'Jack', }
|
40
|
+
]
|
41
|
+
}
|
42
|
+
|
43
|
+
assert_html '<p><div class="name">Joe</div><div class="name">Jack</div></p>', source, :scope => hash, :sections => true, :dictionary_access => :string
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_flag_section
|
47
|
+
source = %q{
|
48
|
+
p
|
49
|
+
- show_person
|
50
|
+
- person
|
51
|
+
.name = name
|
52
|
+
- show_person
|
53
|
+
| shown
|
54
|
+
}
|
55
|
+
|
56
|
+
hash = {
|
57
|
+
:show_person => true,
|
58
|
+
:person => [
|
59
|
+
{ :name => 'Joe', },
|
60
|
+
{ :name => 'Jack', }
|
61
|
+
]
|
62
|
+
}
|
63
|
+
|
64
|
+
assert_html '<p><div class="name">Joe</div><div class="name">Jack</div>shown</p>', source, :scope => hash, :sections => true
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_inverted_section
|
68
|
+
source = %q{
|
69
|
+
p
|
70
|
+
- person
|
71
|
+
.name = name
|
72
|
+
-! person
|
73
|
+
| No person
|
74
|
+
- !person
|
75
|
+
| No person 2
|
76
|
+
}
|
77
|
+
|
78
|
+
hash = {}
|
79
|
+
|
80
|
+
assert_html '<p>No person No person 2</p>', source, :scope => hash, :sections => true
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_output_with_content
|
84
|
+
source = %{
|
85
|
+
p = method_with_block do
|
86
|
+
block
|
87
|
+
}
|
88
|
+
assert_runtime_error 'Output statements with content are forbidden in sections mode', source, :sections => true
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class ::MockError < NameError
|
4
|
+
end
|
5
|
+
|
6
|
+
class TestSlimTemplate < MiniTest::Unit::TestCase
|
7
|
+
class Scope
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_registered_extension
|
11
|
+
assert_equal Slim::Template, Tilt['test.slim']
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_preparing_and_evaluating
|
15
|
+
template = Slim::Template.new { |t| "p Hello World!\n" }
|
16
|
+
assert_equal "<p>Hello World!</p>", template.render
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_passing_locals
|
20
|
+
template = Slim::Template.new { "p = 'Hey ' + name + '!'\n" }
|
21
|
+
assert_equal "<p>Hey Joe!</p>", template.render(Object.new, :name => 'Joe')
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_evaluating_in_an_object_scope
|
25
|
+
template = Slim::Template.new { "p = 'Hey ' + @name + '!'\n" }
|
26
|
+
scope = Object.new
|
27
|
+
scope.instance_variable_set :@name, 'Joe'
|
28
|
+
assert_equal "<p>Hey Joe!</p>", template.render(scope)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_passing_a_block_for_yield
|
32
|
+
template = Slim::Template.new { "p = 'Hey ' + yield + '!'\n" }
|
33
|
+
assert_equal "<p>Hey Joe!</p>", template.render { 'Joe' }
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_backtrace_file_and_line_reporting_without_locals
|
37
|
+
data = File.read(__FILE__).split("\n__END__\n").last
|
38
|
+
fail unless data[0] == ?h
|
39
|
+
template = Slim::Template.new('test.slim', 10) { data }
|
40
|
+
begin
|
41
|
+
template.render
|
42
|
+
fail 'should have raised an exception'
|
43
|
+
rescue => boom
|
44
|
+
assert_kind_of NameError, boom
|
45
|
+
line = boom.backtrace.first
|
46
|
+
assert_equal 'test.slim', line.split(":").first
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_backtrace_file_and_line_reporting_with_locals
|
51
|
+
data = File.read(__FILE__).split("\n__END__\n").last
|
52
|
+
fail unless data[0] == ?h
|
53
|
+
template = Slim::Template.new('test.slim') { data }
|
54
|
+
begin
|
55
|
+
res = template.render(Object.new, :name => 'Joe', :foo => 'bar')
|
56
|
+
rescue => boom
|
57
|
+
assert_kind_of MockError, boom
|
58
|
+
line = boom.backtrace.first
|
59
|
+
assert_equal 'test.slim', line.split(":").first
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_compiling_template_source_to_a_method
|
64
|
+
template = Slim::Template.new { |t| "Hello World!" }
|
65
|
+
template.render(Scope.new)
|
66
|
+
method = template.send(:compiled_method, [])
|
67
|
+
assert_kind_of UnboundMethod, method
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
def test_passing_locals
|
72
|
+
template = Slim::Template.new { "p = 'Hey ' + name + '!'\n" }
|
73
|
+
assert_equal "<p>Hey Joe!</p>", template.render(Scope.new, :name => 'Joe')
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_evaluating_in_an_object_scope
|
77
|
+
template = Slim::Template.new { "p = 'Hey ' + @name + '!'\n" }
|
78
|
+
scope = Scope.new
|
79
|
+
scope.instance_variable_set :@name, 'Joe'
|
80
|
+
assert_equal "<p>Hey Joe!</p>", template.render(scope)
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_passing_a_block_for_yield
|
84
|
+
template = Slim::Template.new { "p = 'Hey ' + yield + '!'\n" }
|
85
|
+
assert_equal "<p>Hey Joe!</p>", template.render(Scope.new) { 'Joe' }
|
86
|
+
end
|
87
|
+
|
88
|
+
def backtrace_file_and_line_reporting_without_locals
|
89
|
+
data = File.read(__FILE__).split("\n__END__\n").last
|
90
|
+
fail unless data[0] == ?h
|
91
|
+
template = Slim::Template.new('test.slim', 10) { data }
|
92
|
+
begin
|
93
|
+
template.render(Scope.new)
|
94
|
+
fail 'should have raised an exception'
|
95
|
+
rescue => boom
|
96
|
+
assert_kind_of NameError, boom
|
97
|
+
line = boom.backtrace.first
|
98
|
+
assert_equal 'test.slim', line.split(":").first
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_backtrace_file_and_line_reporting_with_locals
|
103
|
+
data = File.read(__FILE__).split("\n__END__\n").last
|
104
|
+
fail unless data[0] == ?h
|
105
|
+
template = Slim::Template.new('test.slim') { data }
|
106
|
+
begin
|
107
|
+
res = template.render(Scope.new, :name => 'Joe', :foo => 'bar')
|
108
|
+
rescue => boom
|
109
|
+
assert_kind_of MockError, boom
|
110
|
+
line = boom.backtrace.first
|
111
|
+
assert_equal 'test.slim', line.split(":").first
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
__END__
|
117
|
+
html
|
118
|
+
body
|
119
|
+
h1 = "Hey #{name}"
|
120
|
+
|
121
|
+
= raise MockError
|
122
|
+
|
123
|
+
p we never get here
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSlimTextInterpolation < TestSlim
|
4
|
+
|
5
|
+
def test_interpolation_in_text
|
6
|
+
source = %q{
|
7
|
+
p
|
8
|
+
| #{hello_world} with "quotes"
|
9
|
+
p
|
10
|
+
|
|
11
|
+
A message from the compiler: #{hello_world}
|
12
|
+
}
|
13
|
+
|
14
|
+
assert_html '<p>Hello World from @env with "quotes"</p><p>A message from the compiler: Hello World from @env</p>', source
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_interpolation_in_tag
|
18
|
+
source = %q{
|
19
|
+
p #{hello_world}
|
20
|
+
}
|
21
|
+
|
22
|
+
assert_html '<p>Hello World from @env</p>', source
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_escape_interpolation
|
26
|
+
source = %q{
|
27
|
+
p \\#{hello_world}
|
28
|
+
}
|
29
|
+
|
30
|
+
assert_html '<p>#{hello_world}</p>', source
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_complex_interpolation
|
34
|
+
source = %q{
|
35
|
+
p Message: #{message('hello', "user #{output_number}")}
|
36
|
+
}
|
37
|
+
|
38
|
+
assert_html '<p>Message: hello user 1337</p>', source
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_interpolation_with_escaping
|
42
|
+
source = %q{
|
43
|
+
| #{evil_method}
|
44
|
+
}
|
45
|
+
|
46
|
+
assert_html '<script>do_something_evil();</script>', source
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_interpolation_without_escaping
|
50
|
+
source = %q{
|
51
|
+
| #{{evil_method}}
|
52
|
+
}
|
53
|
+
|
54
|
+
assert_html '<script>do_something_evil();</script>', source
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSlimValidator < TestSlim
|
4
|
+
def test_valid_true?
|
5
|
+
source = %q{
|
6
|
+
p Slim
|
7
|
+
}
|
8
|
+
assert_valid? true, source
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_valid_false?
|
12
|
+
source = %q{
|
13
|
+
p
|
14
|
+
Slim
|
15
|
+
}
|
16
|
+
assert_valid? false, source
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_valid!
|
20
|
+
source = %q{
|
21
|
+
p Slim
|
22
|
+
}
|
23
|
+
assert_valid! false, source
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_invalid!
|
27
|
+
source = %q{
|
28
|
+
p
|
29
|
+
Slim
|
30
|
+
}
|
31
|
+
assert_invalid! Slim::Parser::SyntaxError, source
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def assert_valid?(expected, source)
|
37
|
+
assert_equal expected, Slim::Validator.valid?(source)
|
38
|
+
end
|
39
|
+
|
40
|
+
def assert_valid!(expected, source)
|
41
|
+
assert_equal true, Slim::Validator.validate!(source)
|
42
|
+
end
|
43
|
+
|
44
|
+
def assert_invalid!(expected, source)
|
45
|
+
assert_equal expected, Slim::Validator.validate!(source).class
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
|
4
|
+
class TestSlimWrapper < TestSlim
|
5
|
+
def setup
|
6
|
+
Slim::Sections.set_default_options(:dictionary => 'ViewEnv.new')
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
Slim::Sections.set_default_options(:dictionary => 'self')
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_sections
|
14
|
+
source = %q{
|
15
|
+
p
|
16
|
+
- person
|
17
|
+
.name = name
|
18
|
+
}
|
19
|
+
assert_html '<p><div class="name">Joe</div><div class="name">Jack</div></p>', source, :sections => true
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_with_array
|
23
|
+
source = %q{
|
24
|
+
ul
|
25
|
+
- people_with_locations
|
26
|
+
li = name
|
27
|
+
li = city
|
28
|
+
}
|
29
|
+
assert_html '<ul><li>Andy</li><li>Atlanta</li><li>Fred</li><li>Melbourne</li><li>Daniel</li><li>Karlsruhe</li></ul>', source, :sections => true
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: true
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
|
8
|
+
- 1
|
9
|
+
- alpha
|
10
|
+
- 1
|
11
|
+
version: 0.9.1.alpha.1
|
10
12
|
platform: ruby
|
11
13
|
authors:
|
12
14
|
- Andrew Stone
|
@@ -16,7 +18,7 @@ autorequire:
|
|
16
18
|
bindir: bin
|
17
19
|
cert_chain: []
|
18
20
|
|
19
|
-
date: 2011-
|
21
|
+
date: 2011-02-03 00:00:00 +11:00
|
20
22
|
default_executable:
|
21
23
|
dependencies:
|
22
24
|
- !ruby/object:Gem::Dependency
|
@@ -154,6 +156,7 @@ extra_rdoc_files:
|
|
154
156
|
- README.md
|
155
157
|
files:
|
156
158
|
- README.md
|
159
|
+
- Rakefile
|
157
160
|
- bin/slimrb
|
158
161
|
- lib/slim.rb
|
159
162
|
- lib/slim/command.rb
|
@@ -170,6 +173,62 @@ files:
|
|
170
173
|
- lib/slim/validator.rb
|
171
174
|
- lib/slim/version.rb
|
172
175
|
- lib/slim/wrapper.rb
|
176
|
+
- test/helper.rb
|
177
|
+
- test/integration/rails/dummy/Rakefile
|
178
|
+
- test/integration/rails/dummy/app/controllers/application_controller.rb
|
179
|
+
- test/integration/rails/dummy/app/controllers/parents_controller.rb
|
180
|
+
- test/integration/rails/dummy/app/controllers/slim_controller.rb
|
181
|
+
- test/integration/rails/dummy/app/helpers/application_helper.rb
|
182
|
+
- test/integration/rails/dummy/app/models/child.rb
|
183
|
+
- test/integration/rails/dummy/app/models/parent.rb
|
184
|
+
- test/integration/rails/dummy/app/views/layouts/application.html.slim
|
185
|
+
- test/integration/rails/dummy/app/views/parents/_form.html.slim
|
186
|
+
- test/integration/rails/dummy/app/views/parents/edit.html.slim
|
187
|
+
- test/integration/rails/dummy/app/views/parents/new.html.slim
|
188
|
+
- test/integration/rails/dummy/app/views/parents/show.html.slim
|
189
|
+
- test/integration/rails/dummy/app/views/slim/_partial.html.slim
|
190
|
+
- test/integration/rails/dummy/app/views/slim/content_for.html.slim
|
191
|
+
- test/integration/rails/dummy/app/views/slim/erb.html.erb
|
192
|
+
- test/integration/rails/dummy/app/views/slim/integers.html.slim
|
193
|
+
- test/integration/rails/dummy/app/views/slim/nil.html.slim
|
194
|
+
- test/integration/rails/dummy/app/views/slim/no_layout.html.slim
|
195
|
+
- test/integration/rails/dummy/app/views/slim/normal.html.slim
|
196
|
+
- test/integration/rails/dummy/app/views/slim/partial.html.slim
|
197
|
+
- test/integration/rails/dummy/app/views/slim/variables.html.slim
|
198
|
+
- test/integration/rails/dummy/config.ru
|
199
|
+
- test/integration/rails/dummy/config/application.rb
|
200
|
+
- test/integration/rails/dummy/config/boot.rb
|
201
|
+
- test/integration/rails/dummy/config/database.yml
|
202
|
+
- test/integration/rails/dummy/config/environment.rb
|
203
|
+
- test/integration/rails/dummy/config/environments/development.rb
|
204
|
+
- test/integration/rails/dummy/config/environments/production.rb
|
205
|
+
- test/integration/rails/dummy/config/environments/test.rb
|
206
|
+
- test/integration/rails/dummy/config/initializers/backtrace_silencers.rb
|
207
|
+
- test/integration/rails/dummy/config/initializers/inflections.rb
|
208
|
+
- test/integration/rails/dummy/config/initializers/mime_types.rb
|
209
|
+
- test/integration/rails/dummy/config/initializers/secret_token.rb
|
210
|
+
- test/integration/rails/dummy/config/initializers/session_store.rb
|
211
|
+
- test/integration/rails/dummy/config/locales/en.yml
|
212
|
+
- test/integration/rails/dummy/config/routes.rb
|
213
|
+
- test/integration/rails/dummy/db/migrate/20101220223037_parents_and_children.rb
|
214
|
+
- test/integration/rails/dummy/script/rails
|
215
|
+
- test/integration/rails/test_helper.rb
|
216
|
+
- test/integration/rails/test_slim_rails.rb
|
217
|
+
- test/slim/test_code_blocks.rb
|
218
|
+
- test/slim/test_code_escaping.rb
|
219
|
+
- test/slim/test_code_evaluation.rb
|
220
|
+
- test/slim/test_code_output.rb
|
221
|
+
- test/slim/test_code_structure.rb
|
222
|
+
- test/slim/test_embedded_engines.rb
|
223
|
+
- test/slim/test_html_escaping.rb
|
224
|
+
- test/slim/test_html_structure.rb
|
225
|
+
- test/slim/test_parser_errors.rb
|
226
|
+
- test/slim/test_ruby_errors.rb
|
227
|
+
- test/slim/test_sections.rb
|
228
|
+
- test/slim/test_slim_template.rb
|
229
|
+
- test/slim/test_text_interpolation.rb
|
230
|
+
- test/slim/test_validator.rb
|
231
|
+
- test/slim/test_wrapper.rb
|
173
232
|
has_rdoc: true
|
174
233
|
homepage: http://github.com/stonean/slim
|
175
234
|
licenses: []
|
@@ -190,11 +249,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
250
|
none: false
|
192
251
|
requirements:
|
193
|
-
- - "
|
252
|
+
- - ">"
|
194
253
|
- !ruby/object:Gem::Version
|
195
254
|
segments:
|
196
|
-
-
|
197
|
-
|
255
|
+
- 1
|
256
|
+
- 3
|
257
|
+
- 1
|
258
|
+
version: 1.3.1
|
198
259
|
requirements: []
|
199
260
|
|
200
261
|
rubyforge_project: slim
|