sass 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/sass/cache_stores/base.rb +9 -4
- data/lib/sass/tree/debug_node.rb +5 -0
- data/lib/sass/tree/each_node.rb +6 -0
- data/lib/sass/tree/for_node.rb +5 -0
- data/lib/sass/tree/function_node.rb +5 -0
- data/lib/sass/tree/if_node.rb +5 -0
- data/lib/sass/tree/mixin_def_node.rb +5 -0
- data/lib/sass/tree/mixin_node.rb +5 -0
- data/lib/sass/tree/node.rb +13 -0
- data/lib/sass/tree/prop_node.rb +5 -0
- data/lib/sass/tree/return_node.rb +5 -0
- data/lib/sass/tree/rule_node.rb +5 -0
- data/lib/sass/tree/variable_node.rb +6 -0
- data/lib/sass/tree/warn_node.rb +6 -0
- data/lib/sass/tree/while_node.rb +6 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.4
|
@@ -42,15 +42,20 @@ module Sass
|
|
42
42
|
raise "#{self.class} must implement #_retrieve."
|
43
43
|
end
|
44
44
|
|
45
|
-
# Store
|
45
|
+
# Store an object to the Sass Cache.
|
46
46
|
#
|
47
47
|
# @param key [String] The key to store it under.
|
48
48
|
# @param sha [String] The checksum for the contents that are being stored.
|
49
49
|
# @param obj [Object] The object to cache.
|
50
|
-
def store(key, sha,
|
51
|
-
|
50
|
+
def store(key, sha, obj)
|
51
|
+
temp = obj.before_sass_cache_store if obj.respond_to?(:before_sass_cache_store)
|
52
|
+
begin
|
53
|
+
_store(key, Sass::VERSION, sha, Marshal.dump(obj))
|
54
|
+
ensure
|
55
|
+
obj.after_sass_cache_store(temp) if obj.respond_to?(:after_sass_cache_store)
|
56
|
+
end
|
52
57
|
rescue TypeError, LoadError => e
|
53
|
-
Sass::Util.sass_warn "Warning. Error encountered while saving cache #{path_to(key)}: #{e}"
|
58
|
+
Sass::Util.sass_warn "Warning. Error encountered while saving a #{obj.class.name} to cache #{path_to(key)}: #{e}"
|
54
59
|
end
|
55
60
|
|
56
61
|
# Retrieve a {Sass::Tree::RootNode}.
|
data/lib/sass/tree/debug_node.rb
CHANGED
data/lib/sass/tree/each_node.rb
CHANGED
data/lib/sass/tree/for_node.rb
CHANGED
data/lib/sass/tree/if_node.rb
CHANGED
data/lib/sass/tree/mixin_node.rb
CHANGED
data/lib/sass/tree/node.rb
CHANGED
@@ -66,6 +66,9 @@ module Sass
|
|
66
66
|
# @see #options
|
67
67
|
def options=(options)
|
68
68
|
children.each {|c| c.options = options}
|
69
|
+
if respond_to?(:subnodes)
|
70
|
+
subnodes.each {|n| n.options = options if n.respond_to?(:options=)}
|
71
|
+
end
|
69
72
|
@options = options
|
70
73
|
end
|
71
74
|
|
@@ -190,6 +193,16 @@ module Sass
|
|
190
193
|
node
|
191
194
|
end
|
192
195
|
|
196
|
+
def before_sass_cache_store
|
197
|
+
o = self.options
|
198
|
+
self.options = {}
|
199
|
+
return o
|
200
|
+
end
|
201
|
+
|
202
|
+
def after_sass_cache_store(o)
|
203
|
+
self.options = o
|
204
|
+
end
|
205
|
+
|
193
206
|
protected
|
194
207
|
|
195
208
|
# @see Sass::Shared.balance
|
data/lib/sass/tree/prop_node.rb
CHANGED
@@ -55,6 +55,11 @@ module Sass::Tree
|
|
55
55
|
super()
|
56
56
|
end
|
57
57
|
|
58
|
+
# Returns sub nodes that are not tree children.
|
59
|
+
def subnodes
|
60
|
+
Array(name).select{|n| n.is_a?(Sass::Script::Node)} + [value]
|
61
|
+
end
|
62
|
+
|
58
63
|
# Compares the names and values of two properties.
|
59
64
|
#
|
60
65
|
# @param other [Object] The object to compare with
|
data/lib/sass/tree/rule_node.rb
CHANGED
data/lib/sass/tree/warn_node.rb
CHANGED
data/lib/sass/tree/while_node.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.1.
|
5
|
+
version: 3.1.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nathan Weizenbaum
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2011-
|
15
|
+
date: 2011-07-02 00:00:00 -07:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|