sass 3.3.0 → 3.4.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -1
  3. data/CODE_OF_CONDUCT.md +10 -0
  4. data/CONTRIBUTING.md +148 -0
  5. data/MIT-LICENSE +1 -1
  6. data/README.md +76 -62
  7. data/Rakefile +104 -24
  8. data/VERSION +1 -1
  9. data/VERSION_DATE +1 -1
  10. data/VERSION_NAME +1 -1
  11. data/bin/sass +1 -1
  12. data/bin/scss +1 -1
  13. data/extra/sass-spec-ref.sh +32 -0
  14. data/extra/update_watch.rb +1 -1
  15. data/lib/sass/cache_stores/filesystem.rb +9 -5
  16. data/lib/sass/cache_stores/memory.rb +4 -5
  17. data/lib/sass/callbacks.rb +2 -2
  18. data/lib/sass/css.rb +12 -13
  19. data/lib/sass/deprecation.rb +55 -0
  20. data/lib/sass/engine.rb +106 -70
  21. data/lib/sass/environment.rb +39 -19
  22. data/lib/sass/error.rb +17 -20
  23. data/lib/sass/exec/base.rb +199 -0
  24. data/lib/sass/exec/sass_convert.rb +283 -0
  25. data/lib/sass/exec/sass_scss.rb +440 -0
  26. data/lib/sass/exec.rb +5 -771
  27. data/lib/sass/features.rb +9 -2
  28. data/lib/sass/importers/base.rb +8 -3
  29. data/lib/sass/importers/filesystem.rb +30 -38
  30. data/lib/sass/logger/base.rb +8 -2
  31. data/lib/sass/logger/delayed.rb +50 -0
  32. data/lib/sass/logger.rb +8 -3
  33. data/lib/sass/media.rb +1 -4
  34. data/lib/sass/plugin/compiler.rb +224 -90
  35. data/lib/sass/plugin/configuration.rb +38 -22
  36. data/lib/sass/plugin/merb.rb +2 -2
  37. data/lib/sass/plugin/rack.rb +3 -3
  38. data/lib/sass/plugin/rails.rb +1 -1
  39. data/lib/sass/plugin/staleness_checker.rb +4 -4
  40. data/lib/sass/plugin.rb +6 -5
  41. data/lib/sass/script/css_lexer.rb +1 -1
  42. data/lib/sass/script/css_parser.rb +2 -3
  43. data/lib/sass/script/css_variable_warning.rb +52 -0
  44. data/lib/sass/script/functions.rb +739 -318
  45. data/lib/sass/script/lexer.rb +134 -54
  46. data/lib/sass/script/parser.rb +252 -56
  47. data/lib/sass/script/tree/funcall.rb +13 -6
  48. data/lib/sass/script/tree/interpolation.rb +127 -4
  49. data/lib/sass/script/tree/list_literal.rb +31 -4
  50. data/lib/sass/script/tree/literal.rb +4 -0
  51. data/lib/sass/script/tree/node.rb +21 -3
  52. data/lib/sass/script/tree/operation.rb +54 -1
  53. data/lib/sass/script/tree/selector.rb +26 -0
  54. data/lib/sass/script/tree/string_interpolation.rb +59 -38
  55. data/lib/sass/script/tree/variable.rb +1 -1
  56. data/lib/sass/script/tree.rb +1 -0
  57. data/lib/sass/script/value/base.rb +17 -14
  58. data/lib/sass/script/value/bool.rb +0 -5
  59. data/lib/sass/script/value/color.rb +78 -42
  60. data/lib/sass/script/value/helpers.rb +119 -2
  61. data/lib/sass/script/value/list.rb +0 -15
  62. data/lib/sass/script/value/map.rb +1 -1
  63. data/lib/sass/script/value/null.rb +0 -5
  64. data/lib/sass/script/value/number.rb +112 -31
  65. data/lib/sass/script/value/string.rb +102 -13
  66. data/lib/sass/script/value.rb +0 -1
  67. data/lib/sass/script.rb +3 -3
  68. data/lib/sass/scss/css_parser.rb +24 -4
  69. data/lib/sass/scss/parser.rb +290 -383
  70. data/lib/sass/scss/rx.rb +17 -9
  71. data/lib/sass/scss/static_parser.rb +306 -4
  72. data/lib/sass/scss.rb +0 -2
  73. data/lib/sass/selector/abstract_sequence.rb +35 -18
  74. data/lib/sass/selector/comma_sequence.rb +114 -19
  75. data/lib/sass/selector/pseudo.rb +266 -0
  76. data/lib/sass/selector/sequence.rb +146 -40
  77. data/lib/sass/selector/simple.rb +22 -33
  78. data/lib/sass/selector/simple_sequence.rb +122 -39
  79. data/lib/sass/selector.rb +57 -197
  80. data/lib/sass/shared.rb +2 -2
  81. data/lib/sass/source/map.rb +31 -14
  82. data/lib/sass/source/position.rb +4 -4
  83. data/lib/sass/stack.rb +2 -8
  84. data/lib/sass/supports.rb +10 -13
  85. data/lib/sass/tree/at_root_node.rb +1 -0
  86. data/lib/sass/tree/charset_node.rb +1 -1
  87. data/lib/sass/tree/comment_node.rb +1 -1
  88. data/lib/sass/tree/css_import_node.rb +9 -1
  89. data/lib/sass/tree/directive_node.rb +8 -2
  90. data/lib/sass/tree/error_node.rb +18 -0
  91. data/lib/sass/tree/extend_node.rb +1 -1
  92. data/lib/sass/tree/function_node.rb +9 -0
  93. data/lib/sass/tree/import_node.rb +6 -5
  94. data/lib/sass/tree/keyframe_rule_node.rb +15 -0
  95. data/lib/sass/tree/node.rb +5 -3
  96. data/lib/sass/tree/prop_node.rb +6 -7
  97. data/lib/sass/tree/rule_node.rb +26 -11
  98. data/lib/sass/tree/visitors/check_nesting.rb +56 -32
  99. data/lib/sass/tree/visitors/convert.rb +59 -44
  100. data/lib/sass/tree/visitors/cssize.rb +34 -30
  101. data/lib/sass/tree/visitors/deep_copy.rb +6 -1
  102. data/lib/sass/tree/visitors/extend.rb +15 -13
  103. data/lib/sass/tree/visitors/perform.rb +87 -50
  104. data/lib/sass/tree/visitors/set_options.rb +15 -1
  105. data/lib/sass/tree/visitors/to_css.rb +72 -43
  106. data/lib/sass/util/multibyte_string_scanner.rb +0 -2
  107. data/lib/sass/util/normalized_map.rb +0 -1
  108. data/lib/sass/util/subset_map.rb +2 -3
  109. data/lib/sass/util.rb +334 -154
  110. data/lib/sass/version.rb +7 -7
  111. data/lib/sass.rb +10 -8
  112. data/test/sass/cache_test.rb +62 -20
  113. data/test/sass/callbacks_test.rb +1 -1
  114. data/test/sass/compiler_test.rb +24 -11
  115. data/test/sass/conversion_test.rb +241 -50
  116. data/test/sass/css2sass_test.rb +73 -5
  117. data/test/sass/css_variable_test.rb +132 -0
  118. data/test/sass/encoding_test.rb +219 -0
  119. data/test/sass/engine_test.rb +343 -260
  120. data/test/sass/exec_test.rb +12 -2
  121. data/test/sass/extend_test.rb +333 -44
  122. data/test/sass/functions_test.rb +353 -260
  123. data/test/sass/importer_test.rb +40 -21
  124. data/test/sass/logger_test.rb +1 -1
  125. data/test/sass/more_results/more_import.css +1 -1
  126. data/test/sass/more_templates/more1.sass +10 -10
  127. data/test/sass/more_templates/more_import.sass +2 -2
  128. data/test/sass/plugin_test.rb +24 -21
  129. data/test/sass/results/compact.css +1 -1
  130. data/test/sass/results/complex.css +4 -4
  131. data/test/sass/results/expanded.css +1 -1
  132. data/test/sass/results/import.css +1 -1
  133. data/test/sass/results/import_charset_ibm866.css +2 -2
  134. data/test/sass/results/mixins.css +17 -17
  135. data/test/sass/results/nested.css +1 -1
  136. data/test/sass/results/parent_ref.css +2 -2
  137. data/test/sass/results/script.css +5 -5
  138. data/test/sass/results/scss_import.css +1 -1
  139. data/test/sass/script_conversion_test.rb +71 -39
  140. data/test/sass/script_test.rb +714 -123
  141. data/test/sass/scss/css_test.rb +213 -30
  142. data/test/sass/scss/rx_test.rb +8 -4
  143. data/test/sass/scss/scss_test.rb +766 -22
  144. data/test/sass/source_map_test.rb +263 -95
  145. data/test/sass/superselector_test.rb +210 -0
  146. data/test/sass/templates/_partial.sass +1 -1
  147. data/test/sass/templates/basic.sass +10 -10
  148. data/test/sass/templates/bork1.sass +1 -1
  149. data/test/sass/templates/bork5.sass +1 -1
  150. data/test/sass/templates/compact.sass +10 -10
  151. data/test/sass/templates/complex.sass +187 -187
  152. data/test/sass/templates/compressed.sass +10 -10
  153. data/test/sass/templates/expanded.sass +10 -10
  154. data/test/sass/templates/import.sass +2 -2
  155. data/test/sass/templates/importee.sass +3 -3
  156. data/test/sass/templates/mixins.sass +22 -22
  157. data/test/sass/templates/multiline.sass +4 -4
  158. data/test/sass/templates/nested.sass +13 -13
  159. data/test/sass/templates/parent_ref.sass +12 -12
  160. data/test/sass/templates/script.sass +70 -70
  161. data/test/sass/templates/scss_import.scss +2 -1
  162. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
  163. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
  164. data/test/sass/templates/subdir/subdir.sass +3 -3
  165. data/test/sass/templates/units.sass +10 -10
  166. data/test/sass/test_helper.rb +1 -1
  167. data/test/sass/util/multibyte_string_scanner_test.rb +11 -3
  168. data/test/sass/util/normalized_map_test.rb +1 -1
  169. data/test/sass/util/subset_map_test.rb +2 -2
  170. data/test/sass/util_test.rb +46 -45
  171. data/test/sass/value_helpers_test.rb +5 -7
  172. data/test/sass-spec.yml +3 -0
  173. data/test/test_helper.rb +7 -6
  174. data/vendor/listen/CHANGELOG.md +1 -228
  175. data/vendor/listen/Gemfile +5 -15
  176. data/vendor/listen/README.md +111 -77
  177. data/vendor/listen/Rakefile +0 -42
  178. data/vendor/listen/lib/listen/adapter.rb +195 -82
  179. data/vendor/listen/lib/listen/adapters/bsd.rb +27 -64
  180. data/vendor/listen/lib/listen/adapters/darwin.rb +21 -58
  181. data/vendor/listen/lib/listen/adapters/linux.rb +23 -55
  182. data/vendor/listen/lib/listen/adapters/polling.rb +25 -34
  183. data/vendor/listen/lib/listen/adapters/windows.rb +50 -46
  184. data/vendor/listen/lib/listen/directory_record.rb +96 -61
  185. data/vendor/listen/lib/listen/listener.rb +135 -37
  186. data/vendor/listen/lib/listen/turnstile.rb +9 -5
  187. data/vendor/listen/lib/listen/version.rb +1 -1
  188. data/vendor/listen/lib/listen.rb +33 -19
  189. data/vendor/listen/listen.gemspec +6 -0
  190. data/vendor/listen/spec/listen/adapter_spec.rb +43 -77
  191. data/vendor/listen/spec/listen/adapters/polling_spec.rb +8 -8
  192. data/vendor/listen/spec/listen/directory_record_spec.rb +81 -56
  193. data/vendor/listen/spec/listen/listener_spec.rb +128 -39
  194. data/vendor/listen/spec/listen_spec.rb +15 -21
  195. data/vendor/listen/spec/spec_helper.rb +4 -0
  196. data/vendor/listen/spec/support/adapter_helper.rb +52 -15
  197. data/vendor/listen/spec/support/directory_record_helper.rb +7 -5
  198. data/vendor/listen/spec/support/listeners_helper.rb +30 -7
  199. metadata +310 -300
  200. data/CONTRIBUTING +0 -3
  201. data/ext/mkrf_conf.rb +0 -27
  202. data/lib/sass/script/value/deprecated_false.rb +0 -55
  203. data/lib/sass/scss/script_lexer.rb +0 -15
  204. data/lib/sass/scss/script_parser.rb +0 -25
  205. data/vendor/listen/lib/listen/dependency_manager.rb +0 -126
  206. data/vendor/listen/lib/listen/multi_listener.rb +0 -143
  207. data/vendor/listen/spec/listen/dependency_manager_spec.rb +0 -107
  208. data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -174
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/test_helper'
4
4
  require 'mock_importer'
5
5
  require 'sass/plugin'
6
6
 
7
- class ImporterTest < Test::Unit::TestCase
7
+ class ImporterTest < MiniTest::Test
8
8
 
9
9
  class FruitImporter < Sass::Importers::Base
10
10
  def find(name, context = nil)
@@ -225,11 +225,11 @@ SCSS
225
225
  JSON
226
226
  end
227
227
 
228
- def test_source_map_with_only_css_uri_can_have_no_public_url_without_warning
228
+ def test_source_map_with_only_css_uri_can_have_no_public_url
229
229
  ephemeral_importer = NoPublicUrlImporter.new
230
230
  mock_importer = MockImporter.new
231
231
  def mock_importer.public_url(name, sourcemap_directory = nil)
232
- "css_uri"
232
+ "source_uri"
233
233
  end
234
234
 
235
235
  options = {
@@ -248,28 +248,26 @@ JSON
248
248
  }
249
249
  SCSS
250
250
 
251
- assert_warning("") do
252
- css_output, sourcemap = engine.render_with_sourcemap('sourcemap_uri')
253
- assert_equal <<CSS.strip, css_output.strip
251
+ css_output, sourcemap = engine.render_with_sourcemap('sourcemap_uri')
252
+ assert_equal <<CSS.strip, css_output.strip
254
253
  .orange {
255
254
  color: orange; }
256
255
 
257
256
  /*# sourceMappingURL=sourcemap_uri */
258
257
  CSS
259
- map = sourcemap.to_json(:css_uri => 'css_uri')
260
- assert_equal <<JSON.strip, map
258
+ map = sourcemap.to_json(:css_uri => 'css_uri')
259
+ assert_equal <<JSON.strip, map
261
260
  {
262
261
  "version": 3,
263
262
  "mappings": "AACA,OAAQ",
264
- "sources": ["css_uri"],
263
+ "sources": ["source_uri"],
265
264
  "names": [],
266
265
  "file": "css_uri"
267
266
  }
268
267
  JSON
269
- end
270
268
  end
271
269
 
272
- def test_source_map_with_only_css_uri_doesnt_support_filesystem_importer
270
+ def test_source_map_with_only_css_uri_falls_back_to_file_uris
273
271
  file_system_importer = Sass::Importers::Filesystem.new('.')
274
272
  options = {
275
273
  :filename => filename_for_test(:scss),
@@ -284,13 +282,19 @@ SCSS
284
282
 
285
283
  _, sourcemap = engine.render_with_sourcemap('http://1.example.com/style.map')
286
284
 
287
- assert_warning(<<WARNING) {sourcemap.to_json(:css_uri => 'css_uri')}
288
- WARNING: Couldn't determine public URL for "#{filename_for_test(:scss)}" while generating sourcemap.
289
- Without a public URL, there's nothing for the source map to link to.
290
- WARNING
285
+ uri = Sass::Util.file_uri_from_path(Sass::Util.absolute_path(filename_for_test(:scss)))
286
+ assert_equal <<JSON.strip, sourcemap.to_json(:css_uri => 'css_uri')
287
+ {
288
+ "version": 3,
289
+ "mappings": "AAAA,IAAK;EAAC,CAAC,EAAE,CAAC",
290
+ "sources": ["#{uri}"],
291
+ "names": [],
292
+ "file": "css_uri"
293
+ }
294
+ JSON
291
295
  end
292
296
 
293
- def test_source_map_with_css_uri_and_css_path_doesnt_support_filesystem_importer
297
+ def test_source_map_with_css_uri_and_css_path_falls_back_to_file_uris
294
298
  file_system_importer = Sass::Importers::Filesystem.new('.')
295
299
  options = {
296
300
  :filename => filename_for_test(:scss),
@@ -305,10 +309,16 @@ SCSS
305
309
 
306
310
  _, sourcemap = engine.render_with_sourcemap('http://1.example.com/style.map')
307
311
 
308
- assert_warning(<<WARNING) {sourcemap.to_json(:css_uri => 'css_uri', :css_path => 'css_path')}
309
- WARNING: Couldn't determine public URL for "#{filename_for_test(:scss)}" while generating sourcemap.
310
- Without a public URL, there's nothing for the source map to link to.
311
- WARNING
312
+ uri = Sass::Util.file_uri_from_path(Sass::Util.absolute_path(filename_for_test(:scss)))
313
+ assert_equal <<JSON.strip, sourcemap.to_json(:css_uri => 'css_uri', :css_path => 'css_path')
314
+ {
315
+ "version": 3,
316
+ "mappings": "AAAA,IAAK;EAAC,CAAC,EAAE,CAAC",
317
+ "sources": ["#{uri}"],
318
+ "names": [],
319
+ "file": "css_uri"
320
+ }
321
+ JSON
312
322
  end
313
323
 
314
324
  def test_source_map_with_css_uri_and_sourcemap_path_supports_filesystem_importer
@@ -395,8 +405,17 @@ MESSAGE
395
405
  File.join(fixture_dir, path)
396
406
  end
397
407
 
408
+ def test_filesystem_importer_eql
409
+ importer = Sass::Importers::Filesystem.new('.')
410
+ assert importer.eql?(Sass::Importers::Filesystem.new('.'))
411
+ assert importer.eql?(ReversedExtImporter.new('.'))
412
+ assert !importer.eql?(Sass::Importers::Filesystem.new('foo'))
413
+ assert !importer.eql?(nil)
414
+ assert !importer.eql?('foo')
415
+ end
416
+
398
417
  def test_absolute_files_across_template_locations
399
418
  importer = Sass::Importers::Filesystem.new(absolutize 'templates')
400
- assert_not_nil importer.mtime(absolutize('more_templates/more1.sass'), {})
419
+ refute_nil importer.mtime(absolutize('more_templates/more1.sass'), {})
401
420
  end
402
421
  end
@@ -2,7 +2,7 @@
2
2
  require File.dirname(__FILE__) + '/../test_helper'
3
3
  require 'pathname'
4
4
 
5
- class LoggerTest < Test::Unit::TestCase
5
+ class LoggerTest < MiniTest::Test
6
6
 
7
7
  class InterceptedLogger < Sass::Logger::Base
8
8
 
@@ -24,6 +24,6 @@ body { font: Arial; background: blue; }
24
24
  #content.user.show #container.top #column.right { width: 600px; }
25
25
  #content.user.show #container.bottom { background: brown; }
26
26
 
27
- #foo { background-color: #bbaaff; }
27
+ #foo { background-color: #baf; }
28
28
 
29
29
  nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
@@ -1,23 +1,23 @@
1
1
 
2
2
 
3
3
  body
4
- :font Arial
5
- :background blue
4
+ font: Arial
5
+ background: blue
6
6
 
7
7
  #page
8
- :width 700px
9
- :height 100
8
+ width: 700px
9
+ height: 100
10
10
  #header
11
- :height 300px
11
+ height: 300px
12
12
  h1
13
- :font-size 50px
14
- :color blue
13
+ font-size: 50px
14
+ color: blue
15
15
 
16
16
  #content.user.show
17
17
  #container.top
18
18
  #column.left
19
- :width 100px
19
+ width: 100px
20
20
  #column.right
21
- :width 600px
21
+ width: 600px
22
22
  #container.bottom
23
- :background brown
23
+ background: brown
@@ -6,6 +6,6 @@ $preconst: hello
6
6
  @import importee, basic, basic.css, ../results/complex.css, more_partial
7
7
 
8
8
  nonimported
9
- :myconst $preconst
10
- :otherconst $postconst
9
+ myconst: $preconst
10
+ otherconst: $postconst
11
11
  +postmixin
@@ -17,7 +17,7 @@ module Sass::Script::Functions
17
17
  end
18
18
  end
19
19
 
20
- class SassPluginTest < Test::Unit::TestCase
20
+ class SassPluginTest < MiniTest::Test
21
21
  @@templates = %w{
22
22
  complex script parent_ref import scss_import alt
23
23
  subdir/subdir subdir/nested_subdir/nested_subdir
@@ -29,8 +29,8 @@ class SassPluginTest < Test::Unit::TestCase
29
29
  @@cache_store = Sass::CacheStores::Memory.new
30
30
 
31
31
  def setup
32
- FileUtils.mkdir_p tempfile_loc
33
- FileUtils.mkdir_p tempfile_loc(nil,"more_")
32
+ Sass::Util.retry_on_windows {FileUtils.mkdir_p tempfile_loc}
33
+ Sass::Util.retry_on_windows {FileUtils.mkdir_p tempfile_loc(nil,"more_")}
34
34
  set_plugin_opts
35
35
  check_for_updates!
36
36
  reset_mtimes
@@ -39,13 +39,13 @@ class SassPluginTest < Test::Unit::TestCase
39
39
  def teardown
40
40
  clean_up_sassc
41
41
  Sass::Plugin.reset!
42
- FileUtils.rm_r tempfile_loc
43
- FileUtils.rm_r tempfile_loc(nil,"more_")
42
+ Sass::Util.retry_on_windows {FileUtils.rm_r tempfile_loc}
43
+ Sass::Util.retry_on_windows {FileUtils.rm_r tempfile_loc(nil,"more_")}
44
44
  end
45
45
 
46
46
  @@templates.each do |name|
47
47
  define_method("test_template_renders_correctly (#{name})") do
48
- assert_renders_correctly(name)
48
+ silence_warnings {assert_renders_correctly(name)}
49
49
  end
50
50
  end
51
51
 
@@ -113,11 +113,11 @@ class SassPluginTest < Test::Unit::TestCase
113
113
  File.open(tempfile_loc('bork1')) do |file|
114
114
  assert_equal(<<CSS.strip, file.read.split("\n")[0...6].join("\n"))
115
115
  /*
116
- Syntax error: Undefined variable: "$bork".
116
+ Error: Undefined variable: "$bork".
117
117
  on line 2 of #{template_loc('bork1')}
118
118
 
119
119
  1: bork
120
- 2: :bork $bork
120
+ 2: bork: $bork
121
121
  CSS
122
122
  end
123
123
  File.delete(tempfile_loc('bork1'))
@@ -129,12 +129,12 @@ CSS
129
129
  File.open(tempfile_loc('bork5')) do |file|
130
130
  assert_equal(<<CSS.strip, file.read.split("\n")[0...7].join("\n"))
131
131
  /*
132
- Syntax error: Undefined variable: "$bork".
132
+ Error: Undefined variable: "$bork".
133
133
  on line 3 of #{template_loc('bork5')}
134
134
 
135
135
  1: bork
136
136
  2: /* foo *\\/
137
- 3: :bork $bork
137
+ 3: bork: $bork
138
138
  CSS
139
139
  end
140
140
  File.delete(tempfile_loc('bork1'))
@@ -146,7 +146,7 @@ CSS
146
146
  File.open(tempfile_loc('single_import_loop')) do |file|
147
147
  assert_equal(<<CSS.strip, file.read.split("\n")[0...2].join("\n"))
148
148
  /*
149
- Syntax error: An @import loop has been found: #{template_loc('single_import_loop')} imports itself
149
+ Error: An @import loop has been found: #{template_loc('single_import_loop')} imports itself
150
150
  CSS
151
151
  end
152
152
  end
@@ -157,9 +157,9 @@ CSS
157
157
  File.open(tempfile_loc('double_import_loop1')) do |file|
158
158
  assert_equal(<<CSS.strip, file.read.split("\n")[0...4].join("\n"))
159
159
  /*
160
- Syntax error: An @import loop has been found:
161
- #{template_loc('double_import_loop1')} imports #{template_loc('_double_import_loop2')}
162
- #{template_loc('_double_import_loop2')} imports #{template_loc('double_import_loop1')}
160
+ Error: An @import loop has been found:
161
+ #{template_loc('double_import_loop1')} imports #{template_loc('_double_import_loop2')}
162
+ #{template_loc('_double_import_loop2')} imports #{template_loc('double_import_loop1')}
163
163
  CSS
164
164
  end
165
165
  end
@@ -170,8 +170,8 @@ CSS
170
170
  File.open(tempfile_loc('subdir/import_up1')) do |file|
171
171
  assert_equal(<<CSS.strip, file.read.split("\n")[0...5].join("\n"))
172
172
  /*
173
- Syntax error: File to import not found or unreadable: ../subdir/import_up3.scss.
174
- Load path: #{template_loc}
173
+ Error: File to import not found or unreadable: ../subdir/import_up3.scss.
174
+ Load path: #{template_loc}
175
175
  on line 1 of #{template_loc 'subdir/import_up2'}
176
176
  from line 1 of #{template_loc 'subdir/import_up1'}
177
177
  CSS
@@ -183,7 +183,7 @@ CSS
183
183
  Sass::Plugin.options[:full_exception] = false
184
184
 
185
185
  File.delete(tempfile_loc('bork1'))
186
- assert_raise(Sass::SyntaxError) {check_for_updates!}
186
+ assert_raises(Sass::SyntaxError) {check_for_updates!}
187
187
  ensure
188
188
  Sass::Plugin.options[:full_exception] = old_full_exception
189
189
  end
@@ -209,7 +209,7 @@ CSS
209
209
  end
210
210
 
211
211
  def test_doesnt_render_partials
212
- assert !File.exists?(tempfile_loc('_partial'))
212
+ assert !File.exist?(tempfile_loc('_partial'))
213
213
  end
214
214
 
215
215
  def test_template_location_array
@@ -501,13 +501,15 @@ WARNING
501
501
  Sass::Plugin::StalenessChecker.dependencies_cache = {}
502
502
  atime = Time.now
503
503
  mtime = Time.now - 5
504
- Dir["{#{template_loc},#{tempfile_loc}}/**/*.{css,sass,scss}"].each {|f| File.utime(atime, mtime, f)}
504
+ Dir["{#{template_loc},#{tempfile_loc}}/**/*.{css,sass,scss}"].each do |f|
505
+ Sass::Util.retry_on_windows {File.utime(atime, mtime, f)}
506
+ end
505
507
  end
506
508
 
507
509
  def template_loc(name = nil, prefix = nil)
508
510
  if name
509
511
  scss = absolutize "#{prefix}templates/#{name}.scss"
510
- File.exists?(scss) ? scss : absolutize("#{prefix}templates/#{name}.sass")
512
+ File.exist?(scss) ? scss : absolutize("#{prefix}templates/#{name}.sass")
511
513
  else
512
514
  absolutize "#{prefix}templates"
513
515
  end
@@ -537,7 +539,8 @@ WARNING
537
539
  :always_update => true,
538
540
  :never_update => false,
539
541
  :full_exception => true,
540
- :cache_store => @@cache_store
542
+ :cache_store => @@cache_store,
543
+ :sourcemap => :none
541
544
  )
542
545
  Sass::Plugin.options.merge!(overrides)
543
546
  end
@@ -1,4 +1,4 @@
1
- #main { width: 15em; color: blue; }
1
+ #main { width: 15em; color: #0000ff; }
2
2
  #main p { border-style: dotted; /* Nested comment More nested stuff */ border-width: 2px; }
3
3
  #main .cool { width: 100px; }
4
4
 
@@ -1,4 +1,4 @@
1
- body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; color: white; background: url(/images/global_bg.gif); }
1
+ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; color: #fff; background: url(/images/global_bg.gif); }
2
2
 
3
3
  #page { width: 900px; margin: 0 auto; background: #440008; border-top-width: 5px; border-top-style: solid; border-top-color: #ff8500; }
4
4
 
@@ -16,8 +16,8 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
16
16
 
17
17
  #menu { clear: both; text-align: right; height: 20px; border-bottom: 5px solid #006b95; background: #00a4e4; }
18
18
  #menu .contests ul { margin: 0 5px 0 0; padding: 0; }
19
- #menu .contests ul li { list-style-type: none; margin: 0 5px; padding: 5px 5px 0 5px; display: inline; font-size: 1.1em; color: white; background: #00a4e4; }
20
- #menu .contests a:link, #menu .contests a:visited { color: white; text-decoration: none; font-weight: bold; }
19
+ #menu .contests ul li { list-style-type: none; margin: 0 5px; padding: 5px 5px 0 5px; display: inline; font-size: 1.1em; color: #fff; background: #00a4e4; }
20
+ #menu .contests a:link, #menu .contests a:visited { color: #fff; text-decoration: none; font-weight: bold; }
21
21
  #menu .contests a:hover { text-decoration: underline; }
22
22
 
23
23
  #content { clear: both; }
@@ -81,6 +81,6 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
81
81
 
82
82
  img { border: none; }
83
83
 
84
- button.short { width: 60px; height: 22px; padding: 0 0 2px 0; color: white; border: none; background: url(/images/btn_short.gif) no-repeat; }
84
+ button.short { width: 60px; height: 22px; padding: 0 0 2px 0; color: #fff; border: none; background: url(/images/btn_short.gif) no-repeat; }
85
85
 
86
86
  table { border-collapse: collapse; }
@@ -1,6 +1,6 @@
1
1
  #main {
2
2
  width: 15em;
3
- color: blue;
3
+ color: #0000ff;
4
4
  }
5
5
  #main p {
6
6
  border-style: dotted;
@@ -26,6 +26,6 @@ body { font: Arial; background: blue; }
26
26
  #content.user.show #container.top #column.right { width: 600px; }
27
27
  #content.user.show #container.bottom { background: brown; }
28
28
 
29
- #foo { background-color: #bbaaff; }
29
+ #foo { background-color: #baf; }
30
30
 
31
31
  nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
@@ -1,5 +1,5 @@
1
- @charset "IBM866";
1
+ @charset "UTF-8";
2
2
  @import url(foo.css);
3
3
  .foo { a: b; }
4
4
 
5
- .bar { a: �; }
5
+ .bar { a: щ; }
@@ -1,12 +1,12 @@
1
1
  #main {
2
2
  width: 15em;
3
- color: blue;
3
+ color: #0000ff;
4
4
  }
5
5
  #main p {
6
6
  border-top-width: 2px;
7
- border-top-color: #ffcc00;
7
+ border-top-color: #fc0;
8
8
  border-left-width: 1px;
9
- border-left-color: black;
9
+ border-left-color: #000;
10
10
  -moz-border-radius: 10px;
11
11
  border-style: dotted;
12
12
  border-width: 2px;
@@ -17,9 +17,9 @@
17
17
 
18
18
  #left {
19
19
  border-top-width: 2px;
20
- border-top-color: #ffcc00;
20
+ border-top-color: #fc0;
21
21
  border-left-width: 1px;
22
- border-left-color: black;
22
+ border-left-color: #000;
23
23
  -moz-border-radius: 10px;
24
24
  font-size: 2em;
25
25
  font-weight: bold;
@@ -28,25 +28,25 @@
28
28
 
29
29
  #right {
30
30
  border-top-width: 2px;
31
- border-top-color: #ffcc00;
31
+ border-top-color: #fc0;
32
32
  border-left-width: 1px;
33
- border-left-color: black;
33
+ border-left-color: #000;
34
34
  -moz-border-radius: 10px;
35
- color: red;
35
+ color: #f00;
36
36
  font-size: 20px;
37
37
  float: right;
38
38
  }
39
39
 
40
40
  .bordered {
41
41
  border-top-width: 2px;
42
- border-top-color: #ffcc00;
42
+ border-top-color: #fc0;
43
43
  border-left-width: 1px;
44
- border-left-color: black;
44
+ border-left-color: #000;
45
45
  -moz-border-radius: 10px;
46
46
  }
47
47
 
48
48
  .complex {
49
- color: red;
49
+ color: #f00;
50
50
  font-size: 20px;
51
51
  text-decoration: none;
52
52
  }
@@ -59,12 +59,12 @@
59
59
  }
60
60
  * html .complex {
61
61
  height: 1px;
62
- color: red;
62
+ color: #f00;
63
63
  font-size: 20px;
64
64
  }
65
65
 
66
66
  .more-complex {
67
- color: red;
67
+ color: #f00;
68
68
  font-size: 20px;
69
69
  text-decoration: none;
70
70
  display: inline;
@@ -80,16 +80,16 @@
80
80
  }
81
81
  * html .more-complex {
82
82
  height: 1px;
83
- color: red;
83
+ color: #f00;
84
84
  font-size: 20px;
85
85
  }
86
86
  .more-complex a:hover {
87
87
  text-decoration: underline;
88
- color: red;
88
+ color: #f00;
89
89
  font-size: 20px;
90
90
  border-top-width: 2px;
91
- border-top-color: #ffcc00;
91
+ border-top-color: #fc0;
92
92
  border-left-width: 1px;
93
- border-left-color: black;
93
+ border-left-color: #000;
94
94
  -moz-border-radius: 10px;
95
95
  }
@@ -1,6 +1,6 @@
1
1
  #main {
2
2
  width: 15em;
3
- color: blue; }
3
+ color: #0000ff; }
4
4
  #main p {
5
5
  border-style: dotted;
6
6
  /* Nested comment
@@ -1,5 +1,5 @@
1
- a { color: black; }
2
- a:hover { color: red; }
1
+ a { color: #000; }
2
+ a:hover { color: #f00; }
3
3
 
4
4
  p, div { width: 100em; }
5
5
  p foo, div foo { width: 10em; }
@@ -1,13 +1,13 @@
1
- #main { content: Hello\!; qstr: 'Quo"ted"!'; hstr: Hyph-en\!; width: 30em; background-color: black; color: #ffffaa; short-color: #112233; named-color: olive; con: "foo" bar 9 hi there "boom"; con2: "noquo" quo; }
2
- #main #sidebar { background-color: #00ff98; num-normal: 10; num-dec: 10.2; num-dec0: 99; num-neg: -10; esc: 10 \+12; many: 6; order: 7; complex: #4c9db1hi16; }
1
+ #main { content: Hello\!; qstr: 'Quo"ted"!'; hstr: Hyph-en\!; width: 30em; background-color: #000; color: #ffa; short-color: #123; named-color: olive; con: "foo" bar 9 hi there "boom"; con2: "noquo" quo; }
2
+ #main #sidebar { background-color: #00ff98; num-normal: 10; num-dec: 10.2; num-dec0: 99; num-neg: -10; esc: 10\+12; many: 6; order: 7; complex: #4c9db1hi16; }
3
3
 
4
- #plus { num-num: 7; num-num-un: 25em; num-num-un2: 23em; num-num-neg: 9.87; num-str: 100px; num-col: #b7b7b7; num-perc: 31%; str-str: "hi\ there"; str-str2: "hi there"; str-col: "14em solid #112233"; str-num: "times: 13"; col-num: #ff7b9d; col-col: #5173ff; }
4
+ #plus { num-num: 7; num-num-un: 25em; num-num-un2: 23em; num-num-neg: 9.87; num-str: 100px; num-col: #b7b7b7; num-perc: 31%; str-str: "hi there"; str-str2: "hi there"; str-col: "14em solid #123"; str-num: "times: 13"; col-num: #ff7c9e; col-col: #5173ff; }
5
5
 
6
- #minus { num-num: 900; col-num: #f9f9f4; col-col: #000035; unary-num: -1; unary-const: 10; unary-paren: -11; unary-two: 12; unary-many: 12; unary-crazy: -15; }
6
+ #minus { num-num: 900; col-num: #fafaf5; col-col: #000035; unary-num: -1; unary-const: 10; unary-paren: -11; unary-two: 12; unary-many: 12; unary-crazy: -15; }
7
7
 
8
8
  #times { num-num: 7; num-col: #7496b8; col-num: #092345; col-col: #243648; }
9
9
 
10
- #div { num-num: 3.33333; num-num2: 3.33333; col-num: #092345; col-col: #0b0d0f; comp: 1px; }
10
+ #div { num-num: 3.33333; num-num2: 3.33333; col-num: #092345; col-col: #0b0e10; comp: 1px; }
11
11
 
12
12
  #mod { num-num: 2; col-col: #0f0e05; col-num: #020001; }
13
13
 
@@ -26,6 +26,6 @@ body { font: Arial; background: blue; }
26
26
  #content.user.show #container.top #column.right { width: 600px; }
27
27
  #content.user.show #container.bottom { background: brown; }
28
28
 
29
- #foo { background-color: #bbaaff; }
29
+ #foo { background-color: #baf; }
30
30
 
31
31
  nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }