sass 3.1.0.alpha.217 → 3.1.0.alpha.218
Sign up to get free protection for your applications and to get access to all the features.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/lib/sass/tree/if_node.rb +5 -2
- data/test/sass/plugin_test.rb +10 -0
- data/test/sass/results/if.css +3 -0
- data/test/sass/templates/if.sass +11 -0
- metadata +4 -2
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
03e3ddbf0f214df543c3f570f24fea124017f6b4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.0.alpha.
|
1
|
+
3.1.0.alpha.218
|
data/lib/sass/tree/if_node.rb
CHANGED
@@ -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
|
|
data/test/sass/plugin_test.rb
CHANGED
@@ -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)
|
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.
|
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
|
+
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
|