sass 3.5.0.pre.rc.1 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/README.md +1 -1
- data/Rakefile +40 -11
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/extra/sass-spec-ref.sh +32 -0
- data/lib/sass.rb +3 -3
- data/lib/sass/css.rb +1 -1
- data/lib/sass/deprecation.rb +55 -0
- data/lib/sass/engine.rb +16 -12
- data/lib/sass/environment.rb +1 -1
- data/lib/sass/error.rb +3 -3
- data/lib/sass/exec/base.rb +1 -1
- data/lib/sass/plugin.rb +1 -1
- data/lib/sass/plugin/compiler.rb +1 -1
- data/lib/sass/plugin/configuration.rb +2 -2
- data/lib/sass/plugin/rack.rb +3 -3
- data/lib/sass/plugin/staleness_checker.rb +3 -3
- data/lib/sass/script.rb +3 -3
- data/lib/sass/script/functions.rb +23 -22
- data/lib/sass/script/lexer.rb +17 -8
- data/lib/sass/script/parser.rb +8 -7
- data/lib/sass/script/tree/node.rb +2 -2
- data/lib/sass/script/tree/operation.rb +43 -16
- data/lib/sass/script/value/base.rb +3 -3
- data/lib/sass/script/value/color.rb +15 -10
- data/lib/sass/script/value/helpers.rb +13 -2
- data/lib/sass/script/value/list.rb +2 -2
- data/lib/sass/script/value/number.rb +4 -4
- data/lib/sass/script/value/string.rb +5 -12
- data/lib/sass/scss/parser.rb +7 -4
- data/lib/sass/scss/rx.rb +1 -1
- data/lib/sass/scss/static_parser.rb +12 -24
- data/lib/sass/selector/abstract_sequence.rb +12 -11
- data/lib/sass/selector/comma_sequence.rb +18 -3
- data/lib/sass/selector/pseudo.rb +15 -2
- data/lib/sass/selector/sequence.rb +9 -7
- data/lib/sass/selector/simple.rb +5 -4
- data/lib/sass/selector/simple_sequence.rb +7 -3
- data/lib/sass/shared.rb +5 -3
- data/lib/sass/source/map.rb +2 -2
- data/lib/sass/source/position.rb +4 -4
- data/lib/sass/tree/comment_node.rb +1 -1
- data/lib/sass/tree/node.rb +3 -3
- data/lib/sass/tree/prop_node.rb +1 -1
- data/lib/sass/tree/rule_node.rb +15 -6
- data/lib/sass/tree/visitors/cssize.rb +3 -5
- data/lib/sass/tree/visitors/deep_copy.rb +1 -1
- data/lib/sass/tree/visitors/extend.rb +2 -8
- data/lib/sass/tree/visitors/perform.rb +3 -2
- data/lib/sass/tree/visitors/to_css.rb +3 -3
- data/lib/sass/util.rb +32 -5
- data/lib/sass/version.rb +2 -4
- data/test/sass/cache_test.rb +0 -1
- data/test/sass/callbacks_test.rb +0 -1
- data/test/sass/compiler_test.rb +0 -1
- data/test/sass/conversion_test.rb +3 -4
- data/test/sass/css2sass_test.rb +1 -2
- data/test/sass/css_variable_test.rb +0 -1
- data/test/sass/encoding_test.rb +0 -1
- data/test/sass/engine_test.rb +63 -60
- data/test/sass/exec_test.rb +0 -1
- data/test/sass/extend_test.rb +40 -81
- data/test/sass/functions_test.rb +8 -6
- data/test/sass/importer_test.rb +0 -1
- data/test/sass/logger_test.rb +0 -1
- data/test/sass/more_templates/more1.sass +10 -10
- data/test/sass/more_templates/more_import.sass +2 -2
- data/test/sass/plugin_test.rb +3 -4
- data/test/sass/results/script.css +1 -1
- data/test/sass/results/units.css +2 -2
- data/test/sass/script_conversion_test.rb +1 -2
- data/test/sass/script_test.rb +55 -47
- data/test/sass/scss/css_test.rb +2 -3
- data/test/sass/scss/rx_test.rb +0 -1
- data/test/sass/scss/scss_test.rb +26 -12
- data/test/sass/source_map_test.rb +13 -14
- data/test/sass/superselector_test.rb +0 -1
- data/test/sass/templates/_partial.sass +1 -1
- data/test/sass/templates/basic.sass +10 -10
- data/test/sass/templates/bork1.sass +1 -1
- data/test/sass/templates/bork5.sass +1 -1
- data/test/sass/templates/compact.sass +10 -10
- data/test/sass/templates/complex.sass +187 -187
- data/test/sass/templates/compressed.sass +10 -10
- data/test/sass/templates/expanded.sass +10 -10
- data/test/sass/templates/import.sass +2 -2
- data/test/sass/templates/importee.sass +3 -3
- data/test/sass/templates/mixins.sass +22 -22
- data/test/sass/templates/multiline.sass +4 -4
- data/test/sass/templates/nested.sass +13 -13
- data/test/sass/templates/parent_ref.sass +12 -12
- data/test/sass/templates/script.sass +70 -70
- data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
- data/test/sass/templates/subdir/subdir.sass +3 -3
- data/test/sass/templates/units.sass +10 -10
- data/test/sass/util/multibyte_string_scanner_test.rb +10 -3
- data/test/sass/util/normalized_map_test.rb +0 -1
- data/test/sass/util/subset_map_test.rb +0 -1
- data/test/sass/util_test.rb +4 -3
- data/test/sass/value_helpers_test.rb +0 -1
- metadata +15 -13
@@ -163,7 +163,7 @@ module Sass
|
|
163
163
|
next sel if seen.include?([sel])
|
164
164
|
extended = sel.selector.do_extend(extends, parent_directives, replace, seen, false)
|
165
165
|
next sel if extended == sel.selector
|
166
|
-
extended.members.reject! {|seq| seq.
|
166
|
+
extended.members.reject! {|seq| seq.invisible?}
|
167
167
|
|
168
168
|
# For `:not()`, we usually want to get rid of any complex
|
169
169
|
# selectors because that will cause the selector to fail to
|
@@ -191,10 +191,9 @@ module Sass
|
|
191
191
|
# seq is A, sels is B, and self is C
|
192
192
|
|
193
193
|
self_without_sel = Sass::Util.array_minus(members, sels)
|
194
|
-
group.each {|e| e.
|
194
|
+
group.each {|e| e.success = true}
|
195
195
|
unified = seq.members.last.unify(SimpleSequence.new(self_without_sel, subject?))
|
196
196
|
next unless unified
|
197
|
-
group.each {|e| e.result = :succeeded}
|
198
197
|
group.each {|e| check_directives_match!(e, parent_directives)}
|
199
198
|
new_seq = Sequence.new(seq.members[0...-1] + [unified])
|
200
199
|
new_seq.add_sources!(sources + [seq])
|
@@ -287,6 +286,11 @@ module Sass
|
|
287
286
|
# @see Simple#to_s
|
288
287
|
def to_s(opts = {})
|
289
288
|
res = @members.map {|m| m.to_s(opts)}.join
|
289
|
+
|
290
|
+
# :not(%foo) may resolve to the empty string, but it should match every
|
291
|
+
# selector so we replace it with "*".
|
292
|
+
res = '*' if res.empty?
|
293
|
+
|
290
294
|
res << '!' if subject?
|
291
295
|
res
|
292
296
|
end
|
data/lib/sass/shared.rb
CHANGED
@@ -27,9 +27,11 @@ module Sass
|
|
27
27
|
# from to
|
28
28
|
#
|
29
29
|
# @param scanner [StringScanner] The string scanner to move
|
30
|
-
# @param start [
|
31
|
-
#
|
32
|
-
# @param
|
30
|
+
# @param start [Character] The character opening the balanced pair.
|
31
|
+
# A `Fixnum` in 1.8, a `String` in 1.9
|
32
|
+
# @param finish [Character] The character closing the balanced pair.
|
33
|
+
# A `Fixnum` in 1.8, a `String` in 1.9
|
34
|
+
# @param count [Integer] The number of opening characters matched
|
33
35
|
# before calling this method
|
34
36
|
# @return [(String, String)] The string matched within the balanced pair
|
35
37
|
# and the rest of the string.
|
data/lib/sass/source/map.rb
CHANGED
@@ -37,7 +37,7 @@ module Sass::Source
|
|
37
37
|
|
38
38
|
# Shifts all output source ranges forward one or more lines.
|
39
39
|
#
|
40
|
-
# @param delta [
|
40
|
+
# @param delta [Integer] The number of lines to shift the ranges forward.
|
41
41
|
def shift_output_lines(delta)
|
42
42
|
return if delta == 0
|
43
43
|
@data.each do |m|
|
@@ -49,7 +49,7 @@ module Sass::Source
|
|
49
49
|
# Shifts any output source ranges that lie on the first line forward one or
|
50
50
|
# more characters on that line.
|
51
51
|
#
|
52
|
-
# @param delta [
|
52
|
+
# @param delta [Integer] The number of characters to shift the ranges
|
53
53
|
# forward.
|
54
54
|
def shift_output_offsets(delta)
|
55
55
|
return if delta == 0
|
data/lib/sass/source/position.rb
CHANGED
@@ -2,17 +2,17 @@ module Sass::Source
|
|
2
2
|
class Position
|
3
3
|
# The one-based line of the document associated with the position.
|
4
4
|
#
|
5
|
-
# @return [
|
5
|
+
# @return [Integer]
|
6
6
|
attr_accessor :line
|
7
7
|
|
8
8
|
# The one-based offset in the line of the document associated with the
|
9
9
|
# position.
|
10
10
|
#
|
11
|
-
# @return [
|
11
|
+
# @return [Integer]
|
12
12
|
attr_accessor :offset
|
13
13
|
|
14
|
-
# @param line [
|
15
|
-
# @param offset [
|
14
|
+
# @param line [Integer] The source line
|
15
|
+
# @param offset [Integer] The source offset
|
16
16
|
def initialize(line, offset)
|
17
17
|
@line = line
|
18
18
|
@offset = offset
|
data/lib/sass/tree/node.rb
CHANGED
@@ -69,7 +69,7 @@ module Sass
|
|
69
69
|
|
70
70
|
# The line of the document on which this node appeared.
|
71
71
|
#
|
72
|
-
# @return [
|
72
|
+
# @return [Integer]
|
73
73
|
attr_accessor :line
|
74
74
|
|
75
75
|
# The source range in the document on which this node appeared.
|
@@ -83,7 +83,7 @@ module Sass
|
|
83
83
|
attr_writer :filename
|
84
84
|
|
85
85
|
# The options hash for the node.
|
86
|
-
# See {file:SASS_REFERENCE.md#
|
86
|
+
# See {file:SASS_REFERENCE.md#Options the Sass options documentation}.
|
87
87
|
#
|
88
88
|
# @return [{Symbol => Object}]
|
89
89
|
attr_reader :options
|
@@ -151,7 +151,7 @@ module Sass
|
|
151
151
|
# @return [Boolean]
|
152
152
|
def invisible?; false; end
|
153
153
|
|
154
|
-
# The output style. See {file:SASS_REFERENCE.md#
|
154
|
+
# The output style. See {file:SASS_REFERENCE.md#Options the Sass options documentation}.
|
155
155
|
#
|
156
156
|
# @return [Symbol]
|
157
157
|
def style
|
data/lib/sass/tree/prop_node.rb
CHANGED
@@ -43,7 +43,7 @@ module Sass::Tree
|
|
43
43
|
# * This is a child property of another property
|
44
44
|
# * The parent property has a value, and thus will be rendered
|
45
45
|
#
|
46
|
-
# @return [
|
46
|
+
# @return [Integer]
|
47
47
|
attr_accessor :tabs
|
48
48
|
|
49
49
|
# The source range in which the property name appears.
|
data/lib/sass/tree/rule_node.rb
CHANGED
@@ -40,7 +40,7 @@ module Sass::Tree
|
|
40
40
|
# * This is a child rule of another rule
|
41
41
|
# * The parent rule has properties, and thus will be rendered
|
42
42
|
#
|
43
|
-
# @return [
|
43
|
+
# @return [Integer]
|
44
44
|
attr_accessor :tabs
|
45
45
|
|
46
46
|
# The entire selector source range for this rule.
|
@@ -127,7 +127,7 @@ module Sass::Tree
|
|
127
127
|
|
128
128
|
# A rule node is invisible if it has only placeholder selectors.
|
129
129
|
def invisible?
|
130
|
-
resolved_rules.members.all? {|seq| seq.
|
130
|
+
resolved_rules.members.all? {|seq| seq.invisible?}
|
131
131
|
end
|
132
132
|
|
133
133
|
private
|
@@ -138,10 +138,19 @@ module Sass::Tree
|
|
138
138
|
|
139
139
|
# We don't use real filename/line info because we don't have it yet.
|
140
140
|
# When we get it, we'll set it on the parsed rules if possible.
|
141
|
-
parser =
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
parser = nil
|
142
|
+
warnings = Sass::Util.silence_warnings do
|
143
|
+
parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
|
144
|
+
# rubocop:disable RescueModifier
|
145
|
+
@parsed_rules = parser.parse_selector rescue nil
|
146
|
+
# rubocop:enable RescueModifier
|
147
|
+
|
148
|
+
$stderr.string
|
149
|
+
end
|
150
|
+
|
151
|
+
# If parsing produces a warning, throw away the result so we can parse
|
152
|
+
# later with the real filename info.
|
153
|
+
@parsed_rules = nil unless warnings.empty?
|
145
154
|
end
|
146
155
|
end
|
147
156
|
end
|
@@ -106,11 +106,9 @@ class Sass::Tree::Visitors::Cssize < Sass::Tree::Visitors::Base
|
|
106
106
|
# @attr node [Sass::Tree::ExtendNode] The node that produced this extend.
|
107
107
|
# @attr directives [Array<Sass::Tree::DirectiveNode>]
|
108
108
|
# The directives containing the `@extend`.
|
109
|
-
# @attr
|
110
|
-
#
|
111
|
-
|
112
|
-
# unified with the extender), or `:succeeded`.
|
113
|
-
Extend = Struct.new(:extender, :target, :node, :directives, :result)
|
109
|
+
# @attr success [Boolean]
|
110
|
+
# Whether this extend successfully matched a selector.
|
111
|
+
Extend = Struct.new(:extender, :target, :node, :directives, :success)
|
114
112
|
|
115
113
|
# Registers an extension in the `@extends` subset map.
|
116
114
|
def visit_extend(node)
|
@@ -55,7 +55,7 @@ class Sass::Tree::Visitors::DeepCopy < Sass::Tree::Visitors::Base
|
|
55
55
|
|
56
56
|
def visit_mixin(node)
|
57
57
|
node.args = node.args.map {|a| a.deep_copy}
|
58
|
-
node.keywords = Hash[node.keywords.map {|k, v| [k, v.deep_copy]}]
|
58
|
+
node.keywords = Sass::Util::NormalizedMap.new(Hash[node.keywords.map {|k, v| [k, v.deep_copy]}])
|
59
59
|
yield
|
60
60
|
end
|
61
61
|
|
@@ -49,19 +49,13 @@ class Sass::Tree::Visitors::Extend < Sass::Tree::Visitors::Base
|
|
49
49
|
|
50
50
|
def check_extends_fired!(extends)
|
51
51
|
extends.each_value do |ex|
|
52
|
-
next if ex.
|
52
|
+
next if ex.success || ex.node.optional?
|
53
53
|
message = "\"#{ex.extender}\" failed to @extend \"#{ex.target.join}\"."
|
54
|
-
reason =
|
55
|
-
if ex.result == :not_found
|
56
|
-
"The selector \"#{ex.target.join}\" was not found."
|
57
|
-
else
|
58
|
-
"No selectors matching \"#{ex.target.join}\" could be unified with \"#{ex.extender}\"."
|
59
|
-
end
|
60
54
|
|
61
55
|
# TODO(nweiz): this should use the Sass stack trace of the extend node.
|
62
56
|
raise Sass::SyntaxError.new(<<MESSAGE, :filename => ex.node.filename, :line => ex.node.line)
|
63
57
|
#{message}
|
64
|
-
#{
|
58
|
+
The selector "#{ex.target.join}" was not found.
|
65
59
|
Use "@extend #{ex.target.join} !optional" if the extend should be able to fail.
|
66
60
|
MESSAGE
|
67
61
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# A visitor for converting a dynamic Sass tree into a static Sass tree.
|
2
2
|
class Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base
|
3
|
+
@@function_name_deprecation = Sass::Deprecation.new
|
4
|
+
|
3
5
|
class << self
|
4
6
|
# @param root [Tree::Node] The root node of the tree to visit.
|
5
7
|
# @param environment [Sass::Environment] The lexical environment.
|
@@ -280,8 +282,7 @@ class Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base
|
|
280
282
|
|
281
283
|
if node.normalized_name == 'calc' || node.normalized_name == 'element' ||
|
282
284
|
node.name == 'expression' || node.name == 'url'
|
283
|
-
|
284
|
-
DEPRECATION WARNING on line #{node.line}#{" of #{node.filename}" if node.filename}:
|
285
|
+
@@function_name_deprecation.warn(node.filename, node.line, <<WARNING)
|
285
286
|
Naming a function "#{node.name}" is disallowed and will be an error in future versions of Sass.
|
286
287
|
This name conflicts with an existing CSS function with special parse rules.
|
287
288
|
WARNING
|
@@ -12,7 +12,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
12
12
|
@tabs = 0
|
13
13
|
@line = 1
|
14
14
|
@offset = 1
|
15
|
-
@result = ""
|
15
|
+
@result = String.new("")
|
16
16
|
@source_mapping = build_source_mapping ? Sass::Source::Map.new : nil
|
17
17
|
@lstrip = nil
|
18
18
|
@in_directive = false
|
@@ -296,8 +296,8 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
296
296
|
end
|
297
297
|
|
298
298
|
joined_rules = node.resolved_rules.members.map do |seq|
|
299
|
-
next if seq.
|
300
|
-
rule_part = seq.to_s(:
|
299
|
+
next if seq.invisible?
|
300
|
+
rule_part = seq.to_s(style: node.style, placeholder: false)
|
301
301
|
if node.style == :compressed
|
302
302
|
rule_part.gsub!(/([^,])\s*\n\s*/m, '\1 ')
|
303
303
|
rule_part.gsub!(/\s*([+>])\s*/m, '\1')
|
data/lib/sass/util.rb
CHANGED
@@ -290,6 +290,18 @@ module Sass
|
|
290
290
|
lcs_backtrace(lcs_table(x, y, &block), x, y, x.size - 1, y.size - 1, &block)
|
291
291
|
end
|
292
292
|
|
293
|
+
# Like `String.upcase`, but only ever upcases ASCII letters.
|
294
|
+
def upcase(string)
|
295
|
+
return string.upcase unless ruby2_4?
|
296
|
+
string.upcase(:ascii)
|
297
|
+
end
|
298
|
+
|
299
|
+
# Like `String.downcase`, but only ever downcases ASCII letters.
|
300
|
+
def downcase(string)
|
301
|
+
return string.downcase unless ruby2_4?
|
302
|
+
string.downcase(:ascii)
|
303
|
+
end
|
304
|
+
|
293
305
|
# Returns a sub-array of `minuend` containing only elements that are also in
|
294
306
|
# `subtrahend`. Ensures that the return value has the same order as
|
295
307
|
# `minuend`, even on Rubinius where that's not guaranteed by `Array#-`.
|
@@ -369,7 +381,7 @@ module Sass
|
|
369
381
|
# Returns information about the caller of the previous method.
|
370
382
|
#
|
371
383
|
# @param entry [String] An entry in the `#caller` list, or a similarly formatted string
|
372
|
-
# @return [[String,
|
384
|
+
# @return [[String, Integer, (String, nil)]]
|
373
385
|
# An array containing the filename, line, and method name of the caller.
|
374
386
|
# The method name may be nil
|
375
387
|
def caller_info(entry = nil)
|
@@ -568,7 +580,7 @@ module Sass
|
|
568
580
|
|
569
581
|
# Returns an array of ints representing the JRuby version number.
|
570
582
|
#
|
571
|
-
# @return [Array<
|
583
|
+
# @return [Array<Integer>]
|
572
584
|
def jruby_version
|
573
585
|
@jruby_version ||= ::JRUBY_VERSION.split(".").map {|s| s.to_i}
|
574
586
|
end
|
@@ -700,6 +712,21 @@ module Sass
|
|
700
712
|
UTF_16BE_BOM = bom.encode("UTF-16BE").force_encoding('BINARY')
|
701
713
|
UTF_16LE_BOM = bom.encode("UTF-16LE").force_encoding('BINARY')
|
702
714
|
|
715
|
+
## Cross-Ruby-Version Compatibility
|
716
|
+
|
717
|
+
# Whether or not this is running under Ruby 2.4 or higher.
|
718
|
+
#
|
719
|
+
# @return [Boolean]
|
720
|
+
def ruby2_4?
|
721
|
+
return @ruby2_4 if defined?(@ruby2_4)
|
722
|
+
@ruby2_4 =
|
723
|
+
if RUBY_VERSION_COMPONENTS[0] == 2
|
724
|
+
RUBY_VERSION_COMPONENTS[1] >= 4
|
725
|
+
else
|
726
|
+
RUBY_VERSION_COMPONENTS[0] > 2
|
727
|
+
end
|
728
|
+
end
|
729
|
+
|
703
730
|
# Like {\#check\_encoding}, but also checks for a `@charset` declaration
|
704
731
|
# at the beginning of the file and uses that encoding if it exists.
|
705
732
|
#
|
@@ -890,11 +917,11 @@ module Sass
|
|
890
917
|
|
891
918
|
# Converts the argument into a valid JSON value.
|
892
919
|
#
|
893
|
-
# @param v [
|
920
|
+
# @param v [Integer, String, Array, Boolean, nil]
|
894
921
|
# @return [String]
|
895
922
|
def json_value_of(v)
|
896
923
|
case v
|
897
|
-
when
|
924
|
+
when Integer
|
898
925
|
v.to_s
|
899
926
|
when String
|
900
927
|
"\"" + json_escape_string(v) + "\""
|
@@ -927,7 +954,7 @@ module Sass
|
|
927
954
|
|
928
955
|
# Encodes `value` as VLQ (http://en.wikipedia.org/wiki/VLQ).
|
929
956
|
#
|
930
|
-
# @param value [
|
957
|
+
# @param value [Integer]
|
931
958
|
# @return [String] The encoded value
|
932
959
|
def encode_vlq(value)
|
933
960
|
if value < 0
|
data/lib/sass/version.rb
CHANGED
@@ -8,7 +8,7 @@ module Sass
|
|
8
8
|
# if it was installed from Git.
|
9
9
|
module Version
|
10
10
|
# Returns a hash representing the version of Sass.
|
11
|
-
# The `:major`, `:minor`, and `:teeny` keys have their respective numbers as
|
11
|
+
# The `:major`, `:minor`, and `:teeny` keys have their respective numbers as Integers.
|
12
12
|
# The `:name` key has the name of the version.
|
13
13
|
# The `:string` key contains a human-readable string representation of the version.
|
14
14
|
# The `:number` key is the major, minor, and teeny keys separated by periods.
|
@@ -41,9 +41,8 @@ module Sass
|
|
41
41
|
# :prerelease_number => 1
|
42
42
|
# }
|
43
43
|
#
|
44
|
-
# @return [{Symbol => String/
|
44
|
+
# @return [{Symbol => String/Integer}] The version hash
|
45
45
|
# @comment
|
46
|
-
# rubocop:disable ClassVars
|
47
46
|
def version
|
48
47
|
return @@version if defined?(@@version)
|
49
48
|
|
@@ -80,7 +79,6 @@ module Sass
|
|
80
79
|
@@version[:string] << " (#{name})"
|
81
80
|
@@version
|
82
81
|
end
|
83
|
-
# rubocop:enable ClassVars
|
84
82
|
|
85
83
|
private
|
86
84
|
|
data/test/sass/cache_test.rb
CHANGED
data/test/sass/callbacks_test.rb
CHANGED
data/test/sass/compiler_test.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
require File.dirname(__FILE__) + '/../test_helper'
|
3
2
|
|
4
3
|
class ConversionTest < MiniTest::Test
|
@@ -13,7 +12,7 @@ foo bar {
|
|
13
12
|
bip: bop;
|
14
13
|
}
|
15
14
|
SCSS
|
16
|
-
assert_converts <<SASS, <<SCSS, options: {old: true}
|
15
|
+
silence_warnings {assert_converts <<SASS, <<SCSS, options: {old: true}}
|
17
16
|
foo bar
|
18
17
|
:baz bang
|
19
18
|
:bip bop
|
@@ -183,7 +182,7 @@ SCSS
|
|
183
182
|
end
|
184
183
|
|
185
184
|
def test_dynamic_properties_with_old
|
186
|
-
assert_converts <<SASS, <<SCSS, options: {old: true}
|
185
|
+
silence_warnings {assert_converts <<SASS, <<SCSS, options: {old: true}}
|
187
186
|
foo bar
|
188
187
|
:baz 12 $bang "bip"
|
189
188
|
SASS
|
@@ -1436,7 +1435,7 @@ SCSS
|
|
1436
1435
|
end
|
1437
1436
|
|
1438
1437
|
def test_old_declaration_hacks
|
1439
|
-
assert_converts <<SASS, <<SCSS, options: {old: true}
|
1438
|
+
silence_warnings {assert_converts <<SASS, <<SCSS, options: {old: true}}
|
1440
1439
|
foo
|
1441
1440
|
:_name val
|
1442
1441
|
:*name val
|
data/test/sass/css2sass_test.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
require 'minitest/autorun'
|
3
2
|
require File.dirname(__FILE__) + '/../test_helper'
|
4
3
|
require 'sass/css'
|
@@ -14,7 +13,7 @@ CSS
|
|
14
13
|
h1
|
15
14
|
color: red
|
16
15
|
SASS
|
17
|
-
assert_equal(<<SASS, css2sass(css, :old => true))
|
16
|
+
silence_warnings {assert_equal(<<SASS, css2sass(css, :old => true))}
|
18
17
|
h1
|
19
18
|
:color red
|
20
19
|
SASS
|
data/test/sass/encoding_test.rb
CHANGED