haml 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of haml might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.3
1
+ 2.2.4
@@ -164,7 +164,6 @@ END
164
164
  end
165
165
 
166
166
  File.open(File.join(dir, 'init.rb'), 'w') do |file|
167
- file.puts "require 'rubygems'"
168
167
  file << File.read(File.dirname(__FILE__) + "/../../init.rb")
169
168
  end
170
169
 
@@ -398,8 +398,8 @@ END
398
398
  end
399
399
 
400
400
  # Closes a Ruby block.
401
- def close_script
402
- push_silent "end", true
401
+ def close_script(push_end = true)
402
+ push_silent("end", true) if push_end
403
403
  @template_tabs -= 1
404
404
  end
405
405
 
@@ -42,9 +42,9 @@ module Sass::Tree
42
42
  # @raise [Sass::SyntaxError] if the property uses invalid syntax
43
43
  def to_s(tabs, parent_name = nil)
44
44
  if @options[:property_syntax] == :old && @prop_syntax == :new
45
- raise Sass::SyntaxError.new("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.")
45
+ raise Sass::SyntaxError.new("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.", @line)
46
46
  elsif @options[:property_syntax] == :new && @prop_syntax == :old
47
- raise Sass::SyntaxError.new("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.")
47
+ raise Sass::SyntaxError.new("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.", @line)
48
48
  end
49
49
 
50
50
  if value[-1] == ?;
@@ -318,6 +318,31 @@ HTML
318
318
  HAML
319
319
  end
320
320
 
321
+ def test_silent_end_with_stuff
322
+ assert_equal(<<HTML, render(<<HAML))
323
+ e
324
+ d
325
+ c
326
+ b
327
+ a
328
+ HTML
329
+ - str = "abcde"
330
+ - if true
331
+ = str.slice!(-1).chr
332
+ - end until str.empty?
333
+ HAML
334
+
335
+ assert_equal(<<HTML, render(<<HAML))
336
+ <p>hi!</p>
337
+ HTML
338
+ - if true
339
+ %p hi!
340
+ - end if "foo".gsub(/f/) do
341
+ - "z"
342
+ - end + "bar"
343
+ HAML
344
+ end
345
+
321
346
  def test_multiline_with_colon_after_filter
322
347
  assert_equal(<<HTML, render(<<HAML))
323
348
  Foo
@@ -255,12 +255,14 @@ SASS
255
255
  rescue Sass::SyntaxError => e
256
256
  assert_equal("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.",
257
257
  e.message)
258
+ assert_equal(2, e.sass_line)
258
259
  else
259
260
  assert(false, "SyntaxError not raised for :property_syntax => :old")
260
261
  end
261
262
 
262
263
  begin
263
264
  render("a\n :b c", :property_syntax => :new)
265
+ assert_equal(2, e.sass_line)
264
266
  rescue Sass::SyntaxError => e
265
267
  assert_equal("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.",
266
268
  e.message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-08-25 00:00:00 -07:00
13
+ date: 2009-09-14 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,7 @@ dependencies:
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.5.9
35
35
  version:
36
- description: Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML that's designed to express the structure of XHTML or XML documents in a non-repetitive, elegant, easy way, using indentation rather than closing tags and allowing Ruby to be embedded with ease. It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.
36
+ description: " Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML\n that's designed to express the structure of XHTML or XML documents\n in a non-repetitive, elegant, easy way,\n using indentation rather than closing tags\n and allowing Ruby to be embedded with ease.\n It was originally envisioned as a plugin for Ruby on Rails,\n but it can function as a stand-alone templating engine.\n"
37
37
  email: haml@googlegroups.com
38
38
  executables:
39
39
  - haml
@@ -43,218 +43,197 @@ executables:
43
43
  extensions: []
44
44
 
45
45
  extra_rdoc_files:
46
- - VERSION_NAME
47
- - README.md
48
- - MIT-LICENSE
49
46
  - VERSION
47
+ - MIT-LICENSE
48
+ - README.md
49
+ - VERSION_NAME
50
50
  - REVISION
51
51
  files:
52
52
  - rails/init.rb
53
53
  - lib/sass.rb
54
- - lib/sass
55
- - lib/sass/css.rb
56
- - lib/sass/script
57
- - lib/sass/script/node.rb
58
- - lib/sass/script/number.rb
59
- - lib/sass/script/operation.rb
60
- - lib/sass/script/literal.rb
61
- - lib/sass/script/functions.rb
62
- - lib/sass/script/bool.rb
63
- - lib/sass/script/color.rb
64
- - lib/sass/script/lexer.rb
65
- - lib/sass/script/parser.rb
66
- - lib/sass/script/variable.rb
67
- - lib/sass/script/string.rb
68
- - lib/sass/script/funcall.rb
69
- - lib/sass/script/unary_operation.rb
54
+ - lib/sass/plugin/rails.rb
55
+ - lib/sass/plugin/merb.rb
70
56
  - lib/sass/script.rb
71
57
  - lib/sass/error.rb
72
- - lib/sass/repl.rb
73
- - lib/sass/tree
74
- - lib/sass/tree/comment_node.rb
75
- - lib/sass/tree/node.rb
76
58
  - lib/sass/tree/for_node.rb
77
- - lib/sass/tree/debug_node.rb
78
- - lib/sass/tree/import_node.rb
79
- - lib/sass/tree/while_node.rb
80
- - lib/sass/tree/mixin_def_node.rb
81
- - lib/sass/tree/if_node.rb
82
59
  - lib/sass/tree/mixin_node.rb
83
- - lib/sass/tree/directive_node.rb
84
- - lib/sass/tree/rule_node.rb
60
+ - lib/sass/tree/if_node.rb
85
61
  - lib/sass/tree/prop_node.rb
62
+ - lib/sass/tree/mixin_def_node.rb
86
63
  - lib/sass/tree/variable_node.rb
87
- - lib/sass/plugin
88
- - lib/sass/plugin/rails.rb
89
- - lib/sass/plugin/merb.rb
90
- - lib/sass/environment.rb
64
+ - lib/sass/tree/debug_node.rb
65
+ - lib/sass/tree/directive_node.rb
66
+ - lib/sass/tree/node.rb
67
+ - lib/sass/tree/comment_node.rb
68
+ - lib/sass/tree/rule_node.rb
69
+ - lib/sass/tree/import_node.rb
70
+ - lib/sass/tree/while_node.rb
91
71
  - lib/sass/files.rb
92
- - lib/sass/engine.rb
93
72
  - lib/sass/plugin.rb
94
- - lib/haml
95
- - lib/haml/filters.rb
73
+ - lib/sass/script/parser.rb
74
+ - lib/sass/script/color.rb
75
+ - lib/sass/script/string.rb
76
+ - lib/sass/script/unary_operation.rb
77
+ - lib/sass/script/number.rb
78
+ - lib/sass/script/funcall.rb
79
+ - lib/sass/script/variable.rb
80
+ - lib/sass/script/functions.rb
81
+ - lib/sass/script/bool.rb
82
+ - lib/sass/script/lexer.rb
83
+ - lib/sass/script/operation.rb
84
+ - lib/sass/script/node.rb
85
+ - lib/sass/script/literal.rb
86
+ - lib/sass/css.rb
87
+ - lib/sass/engine.rb
88
+ - lib/sass/repl.rb
89
+ - lib/sass/environment.rb
90
+ - lib/haml/util.rb
96
91
  - lib/haml/exec.rb
92
+ - lib/haml/html.rb
97
93
  - lib/haml/error.rb
94
+ - lib/haml/buffer.rb
98
95
  - lib/haml/template.rb
99
- - lib/haml/shared.rb
100
- - lib/haml/engine.rb
101
- - lib/haml/version.rb
102
- - lib/haml/template
103
- - lib/haml/template/patch.rb
104
96
  - lib/haml/template/plugin.rb
97
+ - lib/haml/template/patch.rb
105
98
  - lib/haml/helpers.rb
106
- - lib/haml/buffer.rb
107
- - lib/haml/html.rb
99
+ - lib/haml/version.rb
100
+ - lib/haml/filters.rb
101
+ - lib/haml/engine.rb
108
102
  - lib/haml/precompiler.rb
109
- - lib/haml/util.rb
110
- - lib/haml/helpers
111
- - lib/haml/helpers/action_view_mods.rb
103
+ - lib/haml/shared.rb
112
104
  - lib/haml/helpers/action_view_extensions.rb
105
+ - lib/haml/helpers/action_view_mods.rb
113
106
  - lib/haml.rb
114
- - bin/sass
115
107
  - bin/css2sass
116
- - bin/html2haml
108
+ - bin/sass
117
109
  - bin/haml
118
- - test/linked_rails.rb
119
- - test/benchmark.rb
120
- - test/sass
110
+ - bin/html2haml
121
111
  - test/sass/script_test.rb
122
- - test/sass/css2sass_test.rb
123
- - test/sass/results
124
- - test/sass/results/units.css
125
- - test/sass/results/parent_ref.css
126
- - test/sass/results/compressed.css
127
- - test/sass/results/complex.css
128
- - test/sass/results/compact.css
129
- - test/sass/results/mixins.css
130
- - test/sass/results/line_numbers.css
131
- - test/sass/results/alt.css
132
- - test/sass/results/subdir
133
- - test/sass/results/subdir/subdir.css
134
- - test/sass/results/subdir/nested_subdir
135
- - test/sass/results/subdir/nested_subdir/nested_subdir.css
136
- - test/sass/results/nested.css
137
- - test/sass/results/import.css
138
- - test/sass/results/multiline.css
139
- - test/sass/results/script.css
140
- - test/sass/results/basic.css
141
- - test/sass/results/expanded.css
142
- - test/sass/more_results
143
- - test/sass/more_results/more_import.css
144
112
  - test/sass/more_results/more1_with_line_comments.css
145
113
  - test/sass/more_results/more1.css
146
- - test/sass/templates
147
- - test/sass/templates/basic.sass
148
- - test/sass/templates/bork.sass
114
+ - test/sass/more_results/more_import.css
115
+ - test/sass/templates/bork2.sass
149
116
  - test/sass/templates/compressed.sass
150
- - test/sass/templates/import.sass
151
- - test/sass/templates/script.sass
152
117
  - test/sass/templates/expanded.sass
153
- - test/sass/templates/nested.sass
118
+ - test/sass/templates/import.sass
119
+ - test/sass/templates/subdir/subdir.sass
120
+ - test/sass/templates/subdir/nested_subdir/_nested_partial.sass
121
+ - test/sass/templates/subdir/nested_subdir/nested_subdir.sass
122
+ - test/sass/templates/basic.sass
154
123
  - test/sass/templates/_partial.sass
124
+ - test/sass/templates/units.sass
125
+ - test/sass/templates/mixins.sass
126
+ - test/sass/templates/multiline.sass
155
127
  - test/sass/templates/line_numbers.sass
128
+ - test/sass/templates/nested.sass
156
129
  - test/sass/templates/compact.sass
157
- - test/sass/templates/subdir
158
- - test/sass/templates/subdir/subdir.sass
159
- - test/sass/templates/subdir/nested_subdir
160
- - test/sass/templates/subdir/nested_subdir/nested_subdir.sass
161
- - test/sass/templates/subdir/nested_subdir/_nested_partial.sass
162
- - test/sass/templates/parent_ref.sass
163
130
  - test/sass/templates/alt.sass
131
+ - test/sass/templates/script.sass
164
132
  - test/sass/templates/importee.sass
165
- - test/sass/templates/mixins.sass
166
- - test/sass/templates/multiline.sass
167
- - test/sass/templates/units.sass
133
+ - test/sass/templates/parent_ref.sass
134
+ - test/sass/templates/bork.sass
168
135
  - test/sass/templates/complex.sass
169
- - test/sass/templates/bork2.sass
170
- - test/sass/more_templates
171
- - test/sass/more_templates/_more_partial.sass
136
+ - test/sass/css2sass_test.rb
137
+ - test/sass/plugin_test.rb
172
138
  - test/sass/more_templates/more1.sass
173
139
  - test/sass/more_templates/more_import.sass
140
+ - test/sass/more_templates/_more_partial.sass
174
141
  - test/sass/functions_test.rb
142
+ - test/sass/results/nested.css
143
+ - test/sass/results/units.css
144
+ - test/sass/results/script.css
145
+ - test/sass/results/subdir/nested_subdir/nested_subdir.css
146
+ - test/sass/results/subdir/subdir.css
147
+ - test/sass/results/import.css
148
+ - test/sass/results/compact.css
149
+ - test/sass/results/expanded.css
150
+ - test/sass/results/alt.css
151
+ - test/sass/results/mixins.css
152
+ - test/sass/results/complex.css
153
+ - test/sass/results/compressed.css
154
+ - test/sass/results/parent_ref.css
155
+ - test/sass/results/line_numbers.css
156
+ - test/sass/results/multiline.css
157
+ - test/sass/results/basic.css
175
158
  - test/sass/engine_test.rb
176
- - test/sass/plugin_test.rb
177
- - test/haml
178
- - test/haml/mocks
179
159
  - test/haml/mocks/article.rb
180
- - test/haml/rhtml
181
- - test/haml/rhtml/_av_partial_2.rhtml
182
- - test/haml/rhtml/standard.rhtml
183
- - test/haml/rhtml/_av_partial_1.rhtml
184
- - test/haml/rhtml/action_view.rhtml
185
160
  - test/haml/util_test.rb
186
- - test/haml/html2haml_test.rb
187
161
  - test/haml/template_test.rb
162
+ - test/haml/html2haml_test.rb
163
+ - test/haml/rhtml/_av_partial_1.rhtml
164
+ - test/haml/rhtml/standard.rhtml
165
+ - test/haml/rhtml/action_view.rhtml
166
+ - test/haml/rhtml/_av_partial_2.rhtml
188
167
  - test/haml/helper_test.rb
189
- - test/haml/results
190
- - test/haml/results/tag_parsing.xhtml
191
- - test/haml/results/content_for_layout.xhtml
192
- - test/haml/results/helpers.xhtml
193
- - test/haml/results/original_engine.xhtml
194
- - test/haml/results/very_basic.xhtml
195
- - test/haml/results/helpful.xhtml
196
- - test/haml/results/list.xhtml
197
- - test/haml/results/partials.xhtml
198
- - test/haml/results/eval_suppressed.xhtml
199
- - test/haml/results/nuke_inner_whitespace.xhtml
200
- - test/haml/results/whitespace_handling.xhtml
201
- - test/haml/results/render_layout.xhtml
202
- - test/haml/results/silent_script.xhtml
203
- - test/haml/results/standard.xhtml
204
- - test/haml/results/just_stuff.xhtml
205
- - test/haml/results/partial_layout.xhtml
206
- - test/haml/results/filters.xhtml
207
- - test/haml/results/nuke_outer_whitespace.xhtml
208
- - test/haml/markaby
209
- - test/haml/markaby/standard.mab
210
- - test/haml/templates
211
- - test/haml/templates/tag_parsing.haml
212
- - test/haml/templates/nuke_inner_whitespace.haml
168
+ - test/haml/templates/action_view_ugly.haml
169
+ - test/haml/templates/list.haml
170
+ - test/haml/templates/_text_area.haml
171
+ - test/haml/templates/_partial.haml
172
+ - test/haml/templates/nuke_outer_whitespace.haml
173
+ - test/haml/templates/render_layout.haml
174
+ - test/haml/templates/_av_partial_2.haml
213
175
  - test/haml/templates/partial_layout.haml
214
- - test/haml/templates/_av_partial_2_ugly.haml
176
+ - test/haml/templates/helpful.haml
177
+ - test/haml/templates/_av_partial_1_ugly.haml
178
+ - test/haml/templates/just_stuff.haml
179
+ - test/haml/templates/standard_ugly.haml
180
+ - test/haml/templates/silent_script.haml
181
+ - test/haml/templates/very_basic.haml
182
+ - test/haml/templates/nuke_inner_whitespace.haml
183
+ - test/haml/templates/eval_suppressed.haml
184
+ - test/haml/templates/tag_parsing.haml
185
+ - test/haml/templates/whitespace_handling.haml
215
186
  - test/haml/templates/partials.haml
187
+ - test/haml/templates/standard.haml
188
+ - test/haml/templates/partialize.haml
216
189
  - test/haml/templates/_layout_for_partial.haml
217
- - test/haml/templates/original_engine.haml
218
- - test/haml/templates/helpers.haml
190
+ - test/haml/templates/_av_partial_1.haml
191
+ - test/haml/templates/filters.haml
219
192
  - test/haml/templates/_layout.erb
220
- - test/haml/templates/action_view_ugly.haml
221
193
  - test/haml/templates/content_for_layout.haml
222
- - test/haml/templates/silent_script.haml
223
- - test/haml/templates/very_basic.haml
224
- - test/haml/templates/render_layout.haml
225
- - test/haml/templates/filters.haml
226
- - test/haml/templates/_av_partial_1.haml
227
- - test/haml/templates/standard_ugly.haml
228
- - test/haml/templates/_partial.haml
229
- - test/haml/templates/nuke_outer_whitespace.haml
194
+ - test/haml/templates/_av_partial_2_ugly.haml
195
+ - test/haml/templates/helpers.haml
196
+ - test/haml/templates/original_engine.haml
230
197
  - test/haml/templates/breakage.haml
231
- - test/haml/templates/list.haml
232
- - test/haml/templates/standard.haml
233
- - test/haml/templates/whitespace_handling.haml
234
- - test/haml/templates/eval_suppressed.haml
235
198
  - test/haml/templates/action_view.haml
236
- - test/haml/templates/_av_partial_2.haml
237
- - test/haml/templates/partialize.haml
238
- - test/haml/templates/just_stuff.haml
239
- - test/haml/templates/helpful.haml
240
- - test/haml/templates/_av_partial_1_ugly.haml
241
- - test/haml/templates/_text_area.haml
199
+ - test/haml/results/content_for_layout.xhtml
200
+ - test/haml/results/just_stuff.xhtml
201
+ - test/haml/results/whitespace_handling.xhtml
202
+ - test/haml/results/nuke_outer_whitespace.xhtml
203
+ - test/haml/results/silent_script.xhtml
204
+ - test/haml/results/filters.xhtml
205
+ - test/haml/results/standard.xhtml
206
+ - test/haml/results/nuke_inner_whitespace.xhtml
207
+ - test/haml/results/helpful.xhtml
208
+ - test/haml/results/very_basic.xhtml
209
+ - test/haml/results/eval_suppressed.xhtml
210
+ - test/haml/results/partials.xhtml
211
+ - test/haml/results/render_layout.xhtml
212
+ - test/haml/results/original_engine.xhtml
213
+ - test/haml/results/helpers.xhtml
214
+ - test/haml/results/list.xhtml
215
+ - test/haml/results/partial_layout.xhtml
216
+ - test/haml/results/tag_parsing.xhtml
217
+ - test/haml/markaby/standard.mab
242
218
  - test/haml/engine_test.rb
219
+ - test/linked_rails.rb
220
+ - test/benchmark.rb
243
221
  - test/test_helper.rb
244
- - test/rails
245
- - extra/haml-mode.el
246
222
  - extra/sass-mode.el
223
+ - extra/haml-mode.el
247
224
  - extra/update_watch.rb
248
225
  - Rakefile
249
226
  - init.rb
250
227
  - .yardopts
251
- - VERSION_NAME
252
- - README.md
253
- - MIT-LICENSE
254
228
  - VERSION
229
+ - MIT-LICENSE
230
+ - README.md
231
+ - VERSION_NAME
255
232
  - REVISION
256
233
  has_rdoc: true
257
234
  homepage: http://haml.hamptoncatlin.com/
235
+ licenses: []
236
+
258
237
  post_install_message:
259
238
  rdoc_options:
260
239
  - --title
@@ -282,18 +261,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
261
  requirements: []
283
262
 
284
263
  rubyforge_project: haml
285
- rubygems_version: 1.3.1
264
+ rubygems_version: 1.3.5
286
265
  signing_key:
287
- specification_version: 2
266
+ specification_version: 3
288
267
  summary: An elegant, structured XHTML/XML templating engine. Comes with Sass, a similar CSS templating engine.
289
268
  test_files:
290
269
  - test/sass/script_test.rb
291
270
  - test/sass/css2sass_test.rb
271
+ - test/sass/plugin_test.rb
292
272
  - test/sass/functions_test.rb
293
273
  - test/sass/engine_test.rb
294
- - test/sass/plugin_test.rb
295
274
  - test/haml/util_test.rb
296
- - test/haml/html2haml_test.rb
297
275
  - test/haml/template_test.rb
276
+ - test/haml/html2haml_test.rb
298
277
  - test/haml/helper_test.rb
299
278
  - test/haml/engine_test.rb