sass 3.1.0.alpha.217 → 3.1.0.alpha.218

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/REVISION CHANGED
@@ -1 +1 @@
1
- 3ee1e35e2dfa2c1f5c2a24ca5cc807700d249ced
1
+ 03e3ddbf0f214df543c3f570f24fea124017f6b4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0.alpha.217
1
+ 3.1.0.alpha.218
@@ -42,13 +42,16 @@ module Sass::Tree
42
42
  end
43
43
 
44
44
  def _dump(f)
45
- Marshal.dump([self.expr, self.else])
45
+ Marshal.dump([self.expr, self.else, self.children])
46
46
  end
47
47
 
48
48
  def self._load(data)
49
- expr, else_ = Marshal.load(data)
49
+ expr, else_, children = Marshal.load(data)
50
50
  node = IfNode.new(expr)
51
51
  node.else = else_
52
+ node.children = children
53
+ node.instance_variable_set('@last_else',
54
+ node.else ? node.else.instance_variable_get('@last_else') : node)
52
55
  node
53
56
  end
54
57
 
@@ -282,6 +282,16 @@ CSS
282
282
  Sass::Plugin.options[:always_update] = old_always_update
283
283
  end
284
284
 
285
+ def test_cached_if
286
+ set_plugin_opts :cache_store => Sass::CacheStores::Filesystem.new(tempfile_loc + '/cache')
287
+ update_all_stylesheets!
288
+ assert_renders_correctly 'if'
289
+ update_all_stylesheets!
290
+ assert_renders_correctly 'if'
291
+ ensure
292
+ set_plugin_opts :cache_store => @@cache_store
293
+ end
294
+
285
295
  private
286
296
 
287
297
  def assert_renders_correctly(*arguments)
@@ -0,0 +1,3 @@
1
+ a { branch: if; }
2
+
3
+ b { branch: else; }
@@ -0,0 +1,11 @@
1
+ a
2
+ @if true
3
+ branch: if
4
+ @else
5
+ branch: else
6
+
7
+ b
8
+ @if false
9
+ branch: if
10
+ @else
11
+ branch: else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.alpha.217
4
+ version: 3.1.0.alpha.218
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-01-14 00:00:00 -05:00
14
+ date: 2011-01-18 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -215,6 +215,7 @@ files:
215
215
  - test/sass/results/units.css
216
216
  - test/sass/results/warn.css
217
217
  - test/sass/results/warn_imported.css
218
+ - test/sass/results/if.css
218
219
  - test/sass/script_conversion_test.rb
219
220
  - test/sass/mock_importer.rb
220
221
  - test/sass/scss/css_test.rb
@@ -262,6 +263,7 @@ files:
262
263
  - test/sass/templates/warn.sass
263
264
  - test/sass/templates/warn_imported.sass
264
265
  - test/sass/templates/nested_import.sass
266
+ - test/sass/templates/if.sass
265
267
  - test/sass/test_helper.rb
266
268
  - test/sass/util/subset_map_test.rb
267
269
  - test/sass/util_test.rb