haml 3.1.8 → 3.2.0.alpha.2

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.

Files changed (148) hide show
  1. data/CONTRIBUTING +1 -1
  2. data/README.md +2 -2
  3. data/REVISION +1 -1
  4. data/Rakefile +16 -41
  5. data/VERSION +1 -1
  6. data/VERSION_NAME +1 -1
  7. data/lib/haml/buffer.rb +1 -5
  8. data/lib/haml/compiler.rb +7 -8
  9. data/lib/haml/exec.rb +1 -1
  10. data/lib/haml/helpers.rb +3 -5
  11. data/lib/haml/helpers/action_view_mods.rb +5 -21
  12. data/lib/haml/parser.rb +1 -1
  13. data/lib/haml/template.rb +1 -3
  14. data/lib/haml/util.rb +1 -1
  15. data/test/haml/engine_test.rb +12 -51
  16. data/test/haml/helper_test.rb +8 -25
  17. data/test/haml/html2haml_test.rb +1 -1
  18. data/test/haml/results/whitespace_handling.xhtml +50 -46
  19. data/test/haml/template_test.rb +2 -28
  20. data/test/haml/templates/partial_layout.haml +1 -4
  21. data/test/linked_rails.rb +4 -4
  22. data/vendor/sass/VERSION +1 -1
  23. data/vendor/sass/doc-src/SASS_CHANGELOG.md +2 -115
  24. data/vendor/sass/doc-src/SASS_REFERENCE.md +4 -12
  25. data/vendor/sass/lib/sass.rb +0 -1
  26. data/vendor/sass/lib/sass/cache_stores/base.rb +1 -3
  27. data/vendor/sass/lib/sass/cache_stores/filesystem.rb +0 -2
  28. data/vendor/sass/lib/sass/css.rb +1 -2
  29. data/vendor/sass/lib/sass/engine.rb +23 -39
  30. data/vendor/sass/lib/sass/environment.rb +0 -11
  31. data/vendor/sass/lib/sass/exec.rb +1 -14
  32. data/vendor/sass/lib/sass/importers/base.rb +1 -2
  33. data/vendor/sass/lib/sass/importers/filesystem.rb +13 -18
  34. data/vendor/sass/lib/sass/less.rb +2 -2
  35. data/vendor/sass/lib/sass/plugin.rb +8 -4
  36. data/vendor/sass/lib/sass/plugin/compiler.rb +17 -42
  37. data/vendor/sass/lib/sass/plugin/configuration.rb +2 -0
  38. data/vendor/sass/lib/sass/railtie.rb +1 -1
  39. data/vendor/sass/lib/sass/script/funcall.rb +1 -14
  40. data/vendor/sass/lib/sass/script/functions.rb +1 -44
  41. data/vendor/sass/lib/sass/script/interpolation.rb +0 -9
  42. data/vendor/sass/lib/sass/script/lexer.rb +1 -6
  43. data/vendor/sass/lib/sass/script/list.rb +0 -7
  44. data/vendor/sass/lib/sass/script/literal.rb +0 -5
  45. data/vendor/sass/lib/sass/script/node.rb +0 -8
  46. data/vendor/sass/lib/sass/script/number.rb +5 -28
  47. data/vendor/sass/lib/sass/script/operation.rb +0 -8
  48. data/vendor/sass/lib/sass/script/parser.rb +5 -12
  49. data/vendor/sass/lib/sass/script/string_interpolation.rb +0 -9
  50. data/vendor/sass/lib/sass/script/unary_operation.rb +0 -7
  51. data/vendor/sass/lib/sass/script/variable.rb +0 -5
  52. data/vendor/sass/lib/sass/scss/parser.rb +38 -78
  53. data/vendor/sass/lib/sass/scss/rx.rb +1 -2
  54. data/vendor/sass/lib/sass/scss/static_parser.rb +2 -2
  55. data/vendor/sass/lib/sass/shared.rb +1 -1
  56. data/vendor/sass/lib/sass/tree/comment_node.rb +11 -24
  57. data/vendor/sass/lib/sass/tree/debug_node.rb +1 -1
  58. data/vendor/sass/lib/sass/tree/each_node.rb +1 -1
  59. data/vendor/sass/lib/sass/tree/extend_node.rb +1 -1
  60. data/vendor/sass/lib/sass/tree/for_node.rb +2 -2
  61. data/vendor/sass/lib/sass/tree/function_node.rb +1 -1
  62. data/vendor/sass/lib/sass/tree/if_node.rb +14 -1
  63. data/vendor/sass/lib/sass/tree/mixin_def_node.rb +1 -1
  64. data/vendor/sass/lib/sass/tree/mixin_node.rb +2 -2
  65. data/vendor/sass/lib/sass/tree/node.rb +5 -2
  66. data/vendor/sass/lib/sass/tree/prop_node.rb +9 -2
  67. data/vendor/sass/lib/sass/tree/return_node.rb +1 -1
  68. data/vendor/sass/lib/sass/tree/rule_node.rb +2 -9
  69. data/vendor/sass/lib/sass/tree/variable_node.rb +1 -1
  70. data/vendor/sass/lib/sass/tree/visitors/check_nesting.rb +18 -17
  71. data/vendor/sass/lib/sass/tree/visitors/convert.rb +5 -10
  72. data/vendor/sass/lib/sass/tree/visitors/perform.rb +19 -50
  73. data/vendor/sass/lib/sass/tree/visitors/to_css.rb +15 -9
  74. data/vendor/sass/lib/sass/tree/warn_node.rb +1 -1
  75. data/vendor/sass/lib/sass/tree/while_node.rb +1 -1
  76. data/vendor/sass/lib/sass/util.rb +6 -58
  77. data/vendor/sass/sass.gemspec +1 -2
  78. data/vendor/sass/test/sass/cache_test.rb +0 -15
  79. data/vendor/sass/test/sass/conversion_test.rb +6 -2
  80. data/vendor/sass/test/sass/css2sass_test.rb +0 -9
  81. data/vendor/sass/test/sass/engine_test.rb +26 -124
  82. data/vendor/sass/test/sass/functions_test.rb +0 -13
  83. data/vendor/sass/test/sass/importer_test.rb +0 -110
  84. data/vendor/sass/test/sass/plugin_test.rb +13 -16
  85. data/vendor/sass/test/sass/script_conversion_test.rb +0 -2
  86. data/vendor/sass/test/sass/script_test.rb +0 -18
  87. data/vendor/sass/test/sass/scss/css_test.rb +1 -7
  88. data/vendor/sass/test/sass/scss/scss_test.rb +13 -37
  89. data/vendor/sass/test/sass/test_helper.rb +1 -1
  90. data/vendor/sass/test/sass/util_test.rb +0 -12
  91. data/vendor/sass/vendor/fssm/LICENSE +1 -1
  92. data/vendor/sass/vendor/fssm/README.markdown +27 -55
  93. data/vendor/sass/vendor/fssm/Rakefile +54 -6
  94. data/vendor/sass/vendor/fssm/VERSION.yml +5 -0
  95. data/vendor/sass/vendor/fssm/example.rb +3 -6
  96. data/vendor/sass/vendor/fssm/fssm.gemspec +70 -17
  97. data/vendor/sass/vendor/fssm/lib/fssm.rb +3 -7
  98. data/vendor/sass/vendor/fssm/lib/fssm/backends/fsevents.rb +1 -1
  99. data/vendor/sass/vendor/fssm/lib/fssm/backends/inotify.rb +2 -2
  100. data/vendor/sass/vendor/fssm/lib/fssm/backends/polling.rb +2 -2
  101. data/vendor/sass/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +10 -10
  102. data/vendor/sass/vendor/fssm/lib/fssm/monitor.rb +9 -19
  103. data/vendor/sass/vendor/fssm/lib/fssm/path.rb +21 -24
  104. data/vendor/sass/vendor/fssm/lib/fssm/pathname.rb +479 -13
  105. data/vendor/sass/vendor/fssm/lib/fssm/state/directory.rb +11 -29
  106. data/vendor/sass/vendor/fssm/lib/fssm/state/file.rb +1 -1
  107. data/vendor/sass/vendor/fssm/lib/fssm/support.rb +12 -41
  108. data/vendor/sass/vendor/fssm/lib/fssm/tree.rb +6 -6
  109. data/vendor/sass/vendor/fssm/profile/prof-cache.rb +3 -3
  110. data/vendor/sass/vendor/fssm/profile/prof-pathname.rb +7 -7
  111. data/vendor/sass/vendor/fssm/spec/path_spec.rb +15 -36
  112. data/vendor/sass/vendor/fssm/spec/spec_helper.rb +6 -6
  113. metadata +78 -125
  114. data/lib/haml/helpers/rails_323_textarea_fix.rb +0 -41
  115. data/test/gemfiles/Gemfile.rails-2.0.x +0 -8
  116. data/test/gemfiles/Gemfile.rails-2.0.x.lock +0 -38
  117. data/test/gemfiles/Gemfile.rails-2.1.x +0 -8
  118. data/test/gemfiles/Gemfile.rails-2.1.x.lock +0 -38
  119. data/test/gemfiles/Gemfile.rails-2.2.x +0 -8
  120. data/test/gemfiles/Gemfile.rails-2.2.x.lock +0 -38
  121. data/test/gemfiles/Gemfile.rails-2.3.x +0 -8
  122. data/test/gemfiles/Gemfile.rails-2.3.x.lock +0 -40
  123. data/test/gemfiles/Gemfile.rails-3.0.x +0 -8
  124. data/test/gemfiles/Gemfile.rails-3.0.x.lock +0 -85
  125. data/test/gemfiles/Gemfile.rails-3.1.x +0 -8
  126. data/test/gemfiles/Gemfile.rails-3.1.x.lock +0 -97
  127. data/test/gemfiles/Gemfile.rails-3.2.x +0 -8
  128. data/test/gemfiles/Gemfile.rails-3.2.x.lock +0 -95
  129. data/test/gemfiles/Gemfile.rails-xss-2.3.x +0 -9
  130. data/test/gemfiles/Gemfile.rails-xss-2.3.x.lock +0 -42
  131. data/vendor/sass/lib/sass/logger.rb +0 -15
  132. data/vendor/sass/lib/sass/logger/base.rb +0 -32
  133. data/vendor/sass/lib/sass/logger/log_level.rb +0 -49
  134. data/vendor/sass/lib/sass/tree/visitors/deep_copy.rb +0 -87
  135. data/vendor/sass/lib/sass/tree/visitors/set_options.rb +0 -97
  136. data/vendor/sass/test/Gemfile +0 -4
  137. data/vendor/sass/test/Gemfile.lock +0 -19
  138. data/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.css +0 -1
  139. data/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -1
  140. data/vendor/sass/test/sass/logger_test.rb +0 -58
  141. data/vendor/sass/test/sass/templates/bork5.sass +0 -3
  142. data/vendor/sass/test/sass/templates/nested_bork5.sass +0 -2
  143. data/vendor/sass/vendor/fssm/Gemfile +0 -3
  144. data/vendor/sass/vendor/fssm/lib/fssm/backends/rbfsevent.rb +0 -42
  145. data/vendor/sass/vendor/fssm/lib/fssm/version.rb +0 -3
  146. data/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb +0 -35
  147. data/vendor/sass/vendor/fssm/spec/count_down_latch.rb +0 -151
  148. data/vendor/sass/vendor/fssm/spec/monitor_spec.rb +0 -202
@@ -219,7 +219,7 @@ HTML
219
219
  end
220
220
 
221
221
  def test_style_to_css_filter
222
- assert_equal(<<HAML.rstrip, render(<<HTML))
222
+ assert_equal(<<HAML.rstrip, render_erb(<<HTML))
223
223
  :css
224
224
  foo {
225
225
  bar: baz;
@@ -1,26 +1,28 @@
1
1
  <div id='whitespace_test'>
2
2
  <div class='text_area_test_area'>
3
- <textarea>Oneline</textarea>
4
- </div>
5
- <textarea>BLAH
6
- </textarea>
3
+ <textarea>Oneline</textarea>
4
+ </div>
5
+ <textarea>BLAH
6
+ </textarea>
7
7
  <div class='text_area_test_area'>
8
- <textarea>Two&#x000A;lines</textarea>
9
- </div>
10
- <textarea>BLAH
11
- </textarea>
8
+ <textarea>Two&#x000A;lines</textarea>
9
+ </div>
10
+ <textarea>BLAH
11
+ </textarea>
12
12
  <div class='text_area_test_area'>
13
- <textarea>Oneline</textarea>
14
- </div>
15
- <textarea>BLAH</textarea>
13
+ <textarea>Oneline</textarea>
14
+ </div>
15
+ <textarea>BLAH</textarea>
16
16
  <div class='text_area_test_area'>
17
- <textarea>Two&#x000A;lines</textarea>
18
- </div>
19
- <textarea>BLAH</textarea>
20
- <div id='flattened'><div class='text_area_test_area'>
21
- <textarea>Two&#x000A;lines</textarea>
22
- </div>
23
- <textarea>BLAH</textarea></div>
17
+ <textarea>Two&#x000A;lines</textarea>
18
+ </div>
19
+ <textarea>BLAH</textarea>
20
+ <div id='flattened'>
21
+ <div class='text_area_test_area'>
22
+ <textarea>Two&#x000A;lines</textarea>
23
+ </div>
24
+ <textarea>BLAH</textarea>
25
+ </div>
24
26
  </div>
25
27
  <div class='hithere'>
26
28
  Foo bar
@@ -28,40 +30,42 @@
28
30
  <pre>foo&#x000A;bar</pre>
29
31
  <p><pre>foo&#x000A;bar</pre></p>
30
32
  <p>
31
- foo
32
- bar
33
- </p>
33
+ foo
34
+ bar
35
+ </p>
34
36
  </div>
35
37
  <div class='foo'>
36
38
  13
37
- <textarea>
38
- a
39
- </textarea>
39
+ <textarea>
40
+ a
41
+ </textarea>
40
42
  <textarea>&#x000A;a</textarea>
41
43
  </div>
42
44
  <div id='whitespace_test'>
43
45
  <div class='text_area_test_area'>
44
- <textarea>Oneline</textarea>
45
- </div>
46
- <textarea>BLAH
47
- </textarea>
46
+ <textarea>Oneline</textarea>
47
+ </div>
48
+ <textarea>BLAH
49
+ </textarea>
48
50
  <div class='text_area_test_area'>
49
- <textarea>Two&#x000A;lines</textarea>
50
- </div>
51
- <textarea>BLAH
52
- </textarea>
51
+ <textarea>Two&#x000A;lines</textarea>
52
+ </div>
53
+ <textarea>BLAH
54
+ </textarea>
53
55
  <div class='text_area_test_area'>
54
- <textarea>Oneline</textarea>
55
- </div>
56
- <textarea>BLAH</textarea>
56
+ <textarea>Oneline</textarea>
57
+ </div>
58
+ <textarea>BLAH</textarea>
57
59
  <div class='text_area_test_area'>
58
- <textarea>Two&#x000A;lines</textarea>
59
- </div>
60
- <textarea>BLAH</textarea>
61
- <div id='flattened'><div class='text_area_test_area'>
62
- <textarea>Two&#x000A;lines</textarea>
63
- </div>
64
- <textarea>BLAH</textarea></div>
60
+ <textarea>Two&#x000A;lines</textarea>
61
+ </div>
62
+ <textarea>BLAH</textarea>
63
+ <div id='flattened'>
64
+ <div class='text_area_test_area'>
65
+ <textarea>Two&#x000A;lines</textarea>
66
+ </div>
67
+ <textarea>BLAH</textarea>
68
+ </div>
65
69
  </div>
66
70
  <div class='hithere'>
67
71
  Foo bar
@@ -69,9 +73,9 @@
69
73
  <pre>foo&#x000A;bar</pre>
70
74
  <p><pre>foo&#x000A;bar</pre></p>
71
75
  <p>
72
- foo
73
- bar
74
- </p>
76
+ foo
77
+ bar
78
+ </p>
75
79
  <pre> ___&#x000A; ,o88888&#x000A; ,o8888888'&#x000A; ,:o:o:oooo. ,8O88Pd8888"&#x000A; ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"&#x000A; ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"&#x000A; , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"&#x000A; , ..:.::o:ooOoOO8O888O8O,COCOO"&#x000A; , . ..:.::o:ooOoOOOO8OOOOCOCO"&#x000A; . ..:.::o:ooOoOoOO8O8OCCCC"o&#x000A; . ..:.::o:ooooOoCoCCC"o:o&#x000A; . ..:.::o:o:,cooooCo"oo:o:&#x000A; ` . . ..:.:cocoooo"'o:o:::'&#x000A; .` . ..::ccccoc"'o:o:o:::'&#x000A; :.:. ,c:cccc"':.:.:.:.:.'&#x000A; ..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/&#x000A; ...:.'.:.::::"' . . . . .'&#x000A; .. . ....:."' ` . . . ''&#x000A; . . . ...."'&#x000A; .. . ."' -hrr-&#x000A; .&#x000A;&#x000A;&#x000A; It's a planet!&#x000A;%strong This shouldn't be bold!</pre>
76
80
  <strong>This should!</strong>
77
81
  <textarea> ___ ___ ___ ___ &#x000A; /\__\ /\ \ /\__\ /\__\&#x000A; /:/ / /::\ \ /::| | /:/ /&#x000A; /:/__/ /:/\:\ \ /:|:| | /:/ / &#x000A; /::\ \ ___ /::\~\:\ \ /:/|:|__|__ /:/ / &#x000A; /:/\:\ /\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/__/ &#x000A; \/__\:\/:/ / \/__\:\/:/ / \/__/~~/:/ / \:\ \ &#x000A; \::/ / \::/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\ \ &#x000A; /:/ / /:/ / /:/ / \:\__\&#x000A; \/__/ \/__/ \/__/ \/__/&#x000A; &#x000A; Many&#x000A; thanks&#x000A; to&#x000A; http://www.network-science.de/ascii/
@@ -82,4 +86,4 @@
82
86
  </div>
83
87
  <pre> __ ______ __ ______&#x000A;.----.| |--.|__ |.----.| |--..--------.| __ |&#x000A;| __|| ||__ || __|| < | || __ |&#x000A;|____||__|__||______||____||__|__||__|__|__||______|</pre>
84
88
  <pre>foo
85
- bar</pre>
89
+ bar</pre>
@@ -297,22 +297,6 @@ HAML
297
297
  end
298
298
  end
299
299
 
300
- if ActionPack::VERSION::MAJOR >= 3
301
- # Rails 3's #label helper can take a block.
302
- def test_form_builder_label_with_block
303
- assert_equal(<<HTML, render(<<HAML, :action_view))
304
- <form #{rails_form_attr}action="" method="post">#{rails_form_opener}
305
- <label for="article_title">Block content
306
- </label>
307
- </form>
308
- HTML
309
- #{rails_block_helper_char} form_for #{form_for_calling_convention(:article)}, :url => '' do |f|
310
- = f.label :title do
311
- Block content
312
- HAML
313
- end
314
- end
315
-
316
300
  ## XSS Protection Tests
317
301
 
318
302
  # In order to enable these, either test against Rails 3.0
@@ -339,14 +323,6 @@ HAML
339
323
  assert_equal("Foo &amp; Bar\n", render('Foo #{"&"} Bar', :action_view))
340
324
  end
341
325
 
342
- def test_xss_protection_in_attributes
343
- assert_equal("<div data-html='&lt;foo&gt;bar&lt;/foo&gt;'></div>\n", render('%div{ "data-html" => "<foo>bar</foo>" }', :action_view))
344
- end
345
-
346
- def test_xss_protection_in_attributes_with_safe_strings
347
- assert_equal("<div data-html='<foo>bar</foo>'></div>\n", render('%div{ "data-html" => "<foo>bar</foo>".html_safe }', :action_view))
348
- end
349
-
350
326
  def test_xss_protection_with_bang_in_interpolation
351
327
  assert_equal("Foo & Bar\n", render('! Foo #{"&"} Bar', :action_view))
352
328
  end
@@ -418,15 +394,13 @@ HTML
418
394
  HAML
419
395
  end
420
396
 
421
- if defined?(ActionView::Helpers::PrototypeHelper)
422
- def test_rjs
423
- assert_equal(<<HTML, render(<<HAML, :action_view))
397
+ def test_rjs
398
+ assert_equal(<<HTML, render(<<HAML, :action_view))
424
399
  window.location.reload();
425
400
  HTML
426
401
  = update_page do |p|
427
402
  - p.reload
428
403
  HAML
429
- end
430
404
  end
431
405
 
432
406
  def test_cache
@@ -1,8 +1,5 @@
1
1
  %h1 Partial layout used with for block:
2
- - if Haml::Util.ap_geq?("3.2.0.alpha1")
3
- = render :layout => 'layout_for_partial' do
4
- %p Some content within a layout
5
- - elsif Haml::Util.ap_geq_3?
2
+ - if Haml::Util.ap_geq_3?
6
3
  = render :layout => 'layout_for_partial.haml' do
7
4
  %p Some content within a layout
8
5
  - else
@@ -8,16 +8,16 @@ if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib
8
8
  $:.unshift linked_rails + '/railties/lib'
9
9
  end
10
10
  require 'rubygems'
11
- require 'action_pack'
12
11
  require 'action_controller'
13
12
  require 'action_view'
14
13
 
15
- if ActionPack::VERSION::MAJOR >= 3
14
+ begin
16
15
  # Necessary for Rails 3
17
16
  require 'rails'
18
- else
19
- # Necessary for Rails 2.3.*
17
+ rescue LoadError
18
+ # Necessary for Rails 2.3.7
20
19
  require 'initializer'
20
+ rescue LoadError
21
21
  end
22
22
 
23
23
  if defined?(Rails::Application) # Rails 3
@@ -1 +1 @@
1
- 3.1.11
1
+ 3.1.0
@@ -3,120 +3,7 @@
3
3
  * Table of contents
4
4
  {:toc}
5
5
 
6
- ## 3.1.11
7
-
8
- * Allow control directives (such as `@if`) to be nested beneath properties.
9
- * Allow property names to begin with a hyphen followed by interpolation (e.g. `-#{...}`).
10
- * Fix a parsing error with interpolation in comma-separated lists.
11
- * Make `--cache-store` with with `--update`.
12
- * Properly report `ArgumentError`s that occur within user-defined functions.
13
- * Don't crash on JRuby if the underlying Java doesn't support every Unicode encoding.
14
- * Add new `updated_stylesheet` callback, which is run after each stylesheet has
15
- been successfully compiled. Thanks to [Christian Peters](https://github.com/ChristianPeters).
16
- * Allow absolute paths to be used in an importer with a different root.
17
- * Don't destructively modify the options when running `Sass::Plugin.force_update`.
18
-
19
- ### Deprecations -- Must Read!
20
-
21
- * The `updating_stylesheet` is deprecated and will be removed in a
22
- future release. Use the new `updated_stylesheet` callback instead.
23
-
24
- ## 3.1.10
25
-
26
- * Fix another aspect of the 3.1.8 regression relating to `+`.
27
-
28
- ## 3.1.9
29
-
30
- * Fix a regression in 3.1.8 that broke the `+` combinator in selectors.
31
-
32
- * Deprecate the loud-comment flag when used with silent comments (e.g. `//!`).
33
- Using it with multi-line comments (e.g. `/*!`) still works.
34
-
35
- ## 3.1.8
36
-
37
- * Deprecate parent selectors followed immediately by identifiers (e.g. `&foo`).
38
- This should never have worked, since it violates the rule
39
- of `&` only being usable where an element selector would.
40
-
41
- * Add a `--force` option to the `sass` executable which makes `--update`
42
- always compile all stylesheets, even if the CSS is newer.
43
-
44
- * Disallow semicolons at the end of `@import` directives in the indented syntax.
45
-
46
- * Don't error out when being used as a library without requiring `fileutil`.
47
-
48
- * Don't crash when Compass-style sprite imports are used with `StalenessChecker`
49
- (thanks to [Matthias Bauer](https://github.com/moeffju)).
50
-
51
- * The numeric precision of numbers in Sass can now be set using the
52
- `--precision` option to the command line. Additionally, the default
53
- number of digits of precision in Sass output can now be
54
- changed by setting `Sass::Script::Number.precision` to an integer
55
- (defaults to 3). Since this value can now be changed, the `PRECISION`
56
- constant in `Sass::Script::Number` has been deprecated. In the unlikely
57
- event that you were using it in your code, you should now use
58
- `Sass::Script::Number.precision_factor` instead.
59
-
60
- * Don't crash when running `sass-convert` with selectors with two commas in a row.
61
-
62
- * Explicitly require Ruby >= 1.8.7 (thanks [Eric Mason](https://github.com/ericmason)).
63
-
64
- * Properly validate the nesting of elements in imported stylesheets.
65
-
66
- * Properly compile files in parent directories with `--watch` and `--update`.
67
-
68
- * Properly null out options in mixin definitions before caching them. This fixes
69
- a caching bug that has been plaguing some Rails 3.1 users.
70
-
71
- ## 3.1.7
72
-
73
- * Don't crash when doing certain operations with `@function`s.
74
-
75
- ## 3.1.6
76
-
77
- * The option `:trace_selectors` can now be used to emit a full trace
78
- before each selector. This can be helpful for in-browser debugging of
79
- stylesheet imports and mixin includes. This option supersedes the
80
- `:line_comments` option and is superseded by the `:debug_info`
81
- option.
82
-
83
- * Fix a bug where long `@if`/`@else` chains would cause exponential slowdown
84
- under some circumstances.
85
-
86
- ## 3.1.5
87
-
88
- * Updated the vendored FSSM version, which will avoid segfaults on OS
89
- X Lion when using `--watch`.
90
-
91
- ## 3.1.4
92
-
93
- * Sass no longer unnecessarily caches the sass options hash.
94
- This allows objects that cannot be marshaled to be placed into the
95
- options hash.
96
-
97
- ## 3.1.3
98
-
99
- * Sass now logs message thru a logger object which can be changed to
100
- provide integration with other frameworks' logging infrastructure.
101
-
102
-
103
- ## 3.1.2
104
-
105
- * Fix some issues that were breaking Sass when running within Rubinius.
106
- * Fix some issues that were affecting Rails 3.1 integration.
107
- * New function `zip` allows several lists to be combined into one
108
- list of lists. For example:
109
- `zip(1px 1px 3px, solid dashed solid, red green blue)` becomes
110
- `1px solid red, 1px dashed green, 3px solid blue`
111
- * New function `index` returns the list index of a value
112
- within a list. For example: `index(1px solid red, solid)`
113
- returns `2`. When the value is not found `false` is returned.
114
-
115
- ## 3.1.1
116
-
117
- * Make sure `Sass::Plugin` is loaded at the correct time in Rails 3.
118
-
119
- ## 3.1.0
6
+ ## 3.1.0 (Unreleased)
120
7
 
121
8
  * Add an {Sass::Script::Functions#invert `invert` function} that takes the inverse of colors.
122
9
 
@@ -248,7 +135,7 @@ or by commas (e.g. `Helvetica, Arial, sans-serif`).
248
135
  In addition, individual values count as single-item lists.
249
136
 
250
137
  Lists won't behave any differently in Sass 3.1 than they did in 3.0.
251
- However, you can now do more with them using the new [list functions](Sass/Script/Functions.html#list-functions):
138
+ However, you can now do more with them using the new {file:Sass/Script/Functions.html#list-functions list functions}:
252
139
 
253
140
  * The {Sass::Script::Functions#nth `nth($list, $n)` function} returns the nth item in a list.
254
141
  For example, `nth(1px 2px 10px, 2)` returns the second item, `2px`.
@@ -295,15 +295,7 @@ Available options are:
295
295
  and mixins.
296
296
  This option may also be called `:line_comments`.
297
297
  Automatically disabled when using the `:compressed` output style
298
- or the `:debug_info`/`:trace_selectors` options.
299
-
300
- {#trace_selectors-option} `:trace_selectors`
301
- : When set to true, emit a full trace of imports and mixins before
302
- each selector. This can be helpful for in-browser debugging of
303
- stylesheet imports and mixin includes. This option supersedes
304
- the `:line_comments` option and is superseded by the
305
- `:debug_info` option. Automatically disabled when using the
306
- `:compressed` output style.
298
+ or the `:debug_info` option.
307
299
 
308
300
  {#debug_info-option} `:debug_info`
309
301
  : When set to true, causes the line number and file
@@ -484,7 +476,7 @@ are all in the `font` namespace.
484
476
  In CSS, if you want to set a bunch of properties in the same namespace,
485
477
  you have to type it out each time.
486
478
  Sass provides a shortcut for this:
487
- just write the namespace once,
479
+ just write the namespace one,
488
480
  then nest each of the sub-properties within it.
489
481
  For example:
490
482
 
@@ -666,7 +658,7 @@ Lists are just a series of other values, separated by either spaces or commas.
666
658
  In fact, individual values count as lists, too: they're just lists with one item.
667
659
 
668
660
  On their own, lists don't do much,
669
- but the [Sass list functions](Sass/Script/Functions.html#list-functions)
661
+ but the {file:Sass/Script/Functions.html#list-functions Sass list functions}
670
662
  make them useful.
671
663
  The {Sass::Script::Functions#nth nth function} can access items in a list,
672
664
  the {Sass::Script::Functions#join join function} can join multiple lists together,
@@ -911,7 +903,7 @@ for boolean values.
911
903
 
912
904
  Lists don't support any special operations.
913
905
  Instead, they're manipulated using the
914
- [list functions](Sass/Script/Functions.html#list-functions).
906
+ {file:Sass/Script/Functions.html#list-functions list functions}.
915
907
 
916
908
  ### Parentheses
917
909
 
@@ -65,7 +65,6 @@ module Sass
65
65
  end
66
66
  end
67
67
 
68
- require 'sass/logger'
69
68
  require 'sass/util'
70
69
 
71
70
  require 'sass/engine'
@@ -49,8 +49,6 @@ module Sass
49
49
  # @param obj [Object] The object to cache.
50
50
  def store(key, sha, root)
51
51
  _store(key, Sass::VERSION, sha, Marshal.dump(root))
52
- rescue TypeError, LoadError => e
53
- Sass::Util.sass_warn "Warning. Error encountered while saving cache #{path_to(key)}: #{e}"
54
52
  end
55
53
 
56
54
  # Retrieve a {Sass::Tree::RootNode}.
@@ -61,7 +59,7 @@ module Sass
61
59
  def retrieve(key, sha)
62
60
  contents = _retrieve(key, Sass::VERSION, sha)
63
61
  Marshal.load(contents) if contents
64
- rescue EOFError, TypeError, ArgumentError, LoadError => e
62
+ rescue EOFError, TypeError, ArgumentError => e
65
63
  Sass::Util.sass_warn "Warning. Error encountered while reading cache #{path_to(key)}: #{e}"
66
64
  end
67
65
 
@@ -1,5 +1,3 @@
1
- require 'fileutils'
2
-
3
1
  module Sass
4
2
  module CacheStores
5
3
  # A backend for the Sass cache using the filesystem.
@@ -75,7 +75,7 @@ module Sass
75
75
  #
76
76
  # @return [Tree::Node] The root node of the parsed tree
77
77
  def build_tree
78
- root = Sass::SCSS::CssParser.new(@template, @options[:filename]).parse
78
+ root = Sass::SCSS::CssParser.new(@template).parse
79
79
  expand_commas root
80
80
  parent_ref_rules root
81
81
  remove_parent_refs root
@@ -106,7 +106,6 @@ module Sass
106
106
  next child
107
107
  end
108
108
  child.rule.first.split(',').map do |rule|
109
- next if rule.strip.empty?
110
109
  node = Tree::RuleNode.new([rule.strip])
111
110
  node.children = child.children
112
111
  node