sass 3.4.25 → 3.5.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +1 -1
  4. data/Rakefile +13 -157
  5. data/VERSION +1 -1
  6. data/VERSION_DATE +1 -1
  7. data/VERSION_NAME +1 -1
  8. data/lib/sass.rb +3 -10
  9. data/lib/sass/cache_stores/filesystem.rb +1 -1
  10. data/lib/sass/css.rb +2 -3
  11. data/lib/sass/engine.rb +46 -32
  12. data/lib/sass/environment.rb +27 -6
  13. data/lib/sass/error.rb +5 -5
  14. data/lib/sass/exec/base.rb +3 -12
  15. data/lib/sass/features.rb +1 -0
  16. data/lib/sass/importers/filesystem.rb +2 -2
  17. data/lib/sass/plugin.rb +1 -1
  18. data/lib/sass/plugin/compiler.rb +21 -51
  19. data/lib/sass/plugin/configuration.rb +1 -1
  20. data/lib/sass/plugin/rack.rb +3 -3
  21. data/lib/sass/plugin/staleness_checker.rb +3 -3
  22. data/lib/sass/railtie.rb +1 -1
  23. data/lib/sass/script.rb +3 -3
  24. data/lib/sass/script/functions.rb +238 -47
  25. data/lib/sass/script/lexer.rb +8 -6
  26. data/lib/sass/script/parser.rb +76 -75
  27. data/lib/sass/script/tree/funcall.rb +35 -30
  28. data/lib/sass/script/tree/list_literal.rb +23 -8
  29. data/lib/sass/script/tree/map_literal.rb +2 -2
  30. data/lib/sass/script/tree/node.rb +2 -10
  31. data/lib/sass/script/tree/operation.rb +16 -50
  32. data/lib/sass/script/value.rb +2 -0
  33. data/lib/sass/script/value/arg_list.rb +1 -1
  34. data/lib/sass/script/value/base.rb +20 -3
  35. data/lib/sass/script/value/callable.rb +25 -0
  36. data/lib/sass/script/value/color.rb +10 -10
  37. data/lib/sass/script/value/function.rb +19 -0
  38. data/lib/sass/script/value/helpers.rb +16 -7
  39. data/lib/sass/script/value/list.rb +33 -12
  40. data/lib/sass/script/value/map.rb +2 -2
  41. data/lib/sass/script/value/number.rb +3 -3
  42. data/lib/sass/script/value/string.rb +12 -5
  43. data/lib/sass/scss/parser.rb +101 -45
  44. data/lib/sass/scss/rx.rb +5 -11
  45. data/lib/sass/scss/static_parser.rb +0 -7
  46. data/lib/sass/selector.rb +4 -0
  47. data/lib/sass/selector/abstract_sequence.rb +5 -5
  48. data/lib/sass/selector/comma_sequence.rb +3 -15
  49. data/lib/sass/selector/pseudo.rb +4 -0
  50. data/lib/sass/selector/sequence.rb +30 -3
  51. data/lib/sass/selector/simple.rb +13 -7
  52. data/lib/sass/selector/simple_sequence.rb +1 -1
  53. data/lib/sass/shared.rb +3 -5
  54. data/lib/sass/source/map.rb +4 -4
  55. data/lib/sass/source/position.rb +4 -4
  56. data/lib/sass/stack.rb +21 -1
  57. data/lib/sass/tree/charset_node.rb +1 -1
  58. data/lib/sass/tree/comment_node.rb +1 -1
  59. data/lib/sass/tree/node.rb +3 -3
  60. data/lib/sass/tree/prop_node.rb +46 -54
  61. data/lib/sass/tree/rule_node.rb +7 -15
  62. data/lib/sass/tree/visitors/check_nesting.rb +1 -1
  63. data/lib/sass/tree/visitors/convert.rb +2 -3
  64. data/lib/sass/tree/visitors/cssize.rb +1 -10
  65. data/lib/sass/tree/visitors/deep_copy.rb +2 -2
  66. data/lib/sass/tree/visitors/perform.rb +23 -12
  67. data/lib/sass/tree/visitors/set_options.rb +1 -1
  68. data/lib/sass/tree/visitors/to_css.rb +46 -12
  69. data/lib/sass/util.rb +16 -321
  70. data/lib/sass/util/multibyte_string_scanner.rb +127 -131
  71. data/lib/sass/util/normalized_map.rb +1 -8
  72. data/lib/sass/version.rb +2 -2
  73. data/test/sass-spec.yml +1 -1
  74. data/test/sass/compiler_test.rb +4 -14
  75. data/test/sass/conversion_test.rb +113 -162
  76. data/test/sass/css2sass_test.rb +17 -19
  77. data/test/sass/css_variable_test.rb +176 -70
  78. data/test/sass/encoding_test.rb +2 -32
  79. data/test/sass/engine_test.rb +114 -65
  80. data/test/sass/extend_test.rb +37 -51
  81. data/test/sass/functions_test.rb +57 -15
  82. data/test/sass/importer_test.rb +2 -2
  83. data/test/sass/more_templates/more1.sass +10 -10
  84. data/test/sass/more_templates/more_import.sass +2 -2
  85. data/test/sass/plugin_test.rb +9 -12
  86. data/test/sass/script_conversion_test.rb +9 -0
  87. data/test/sass/script_test.rb +38 -48
  88. data/test/sass/scss/css_test.rb +5 -19
  89. data/test/sass/scss/scss_test.rb +58 -39
  90. data/test/sass/source_map_test.rb +26 -28
  91. data/test/sass/templates/_partial.sass +1 -1
  92. data/test/sass/templates/basic.sass +10 -10
  93. data/test/sass/templates/bork1.sass +1 -1
  94. data/test/sass/templates/bork5.sass +1 -1
  95. data/test/sass/templates/compact.sass +10 -10
  96. data/test/sass/templates/complex.sass +187 -187
  97. data/test/sass/templates/compressed.sass +10 -10
  98. data/test/sass/templates/expanded.sass +10 -10
  99. data/test/sass/templates/import.sass +2 -2
  100. data/test/sass/templates/importee.sass +3 -3
  101. data/test/sass/templates/mixins.sass +22 -22
  102. data/test/sass/templates/multiline.sass +4 -4
  103. data/test/sass/templates/nested.sass +13 -13
  104. data/test/sass/templates/parent_ref.sass +12 -12
  105. data/test/sass/templates/script.sass +70 -70
  106. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
  107. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
  108. data/test/sass/templates/subdir/subdir.sass +3 -3
  109. data/test/sass/templates/units.sass +10 -10
  110. data/test/sass/util/multibyte_string_scanner_test.rb +139 -149
  111. data/test/sass/util_test.rb +0 -36
  112. data/test/test_helper.rb +39 -0
  113. metadata +30 -57
  114. data/extra/sass-spec-ref.sh +0 -32
  115. data/lib/sass/deprecation.rb +0 -55
  116. data/lib/sass/script/css_variable_warning.rb +0 -52
  117. data/lib/sass/util/cross_platform_random.rb +0 -19
  118. data/lib/sass/util/ordered_hash.rb +0 -192
  119. data/test/sass/results/import_charset_1_8.css +0 -5
  120. data/test/sass/templates/import_charset_1_8.sass +0 -6
  121. data/vendor/listen/CHANGELOG.md +0 -1
  122. data/vendor/listen/CONTRIBUTING.md +0 -38
  123. data/vendor/listen/Gemfile +0 -20
  124. data/vendor/listen/Guardfile +0 -8
  125. data/vendor/listen/LICENSE +0 -20
  126. data/vendor/listen/README.md +0 -349
  127. data/vendor/listen/Rakefile +0 -5
  128. data/vendor/listen/Vagrantfile +0 -96
  129. data/vendor/listen/lib/listen.rb +0 -54
  130. data/vendor/listen/lib/listen/adapter.rb +0 -327
  131. data/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
  132. data/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
  133. data/vendor/listen/lib/listen/adapters/linux.rb +0 -81
  134. data/vendor/listen/lib/listen/adapters/polling.rb +0 -58
  135. data/vendor/listen/lib/listen/adapters/windows.rb +0 -91
  136. data/vendor/listen/lib/listen/directory_record.rb +0 -406
  137. data/vendor/listen/lib/listen/listener.rb +0 -323
  138. data/vendor/listen/lib/listen/turnstile.rb +0 -32
  139. data/vendor/listen/lib/listen/version.rb +0 -3
  140. data/vendor/listen/listen.gemspec +0 -28
  141. data/vendor/listen/spec/listen/adapter_spec.rb +0 -149
  142. data/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
  143. data/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
  144. data/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
  145. data/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
  146. data/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
  147. data/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
  148. data/vendor/listen/spec/listen/listener_spec.rb +0 -258
  149. data/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
  150. data/vendor/listen/spec/listen_spec.rb +0 -67
  151. data/vendor/listen/spec/spec_helper.rb +0 -25
  152. data/vendor/listen/spec/support/adapter_helper.rb +0 -666
  153. data/vendor/listen/spec/support/directory_record_helper.rb +0 -57
  154. data/vendor/listen/spec/support/fixtures_helper.rb +0 -29
  155. data/vendor/listen/spec/support/listeners_helper.rb +0 -179
  156. data/vendor/listen/spec/support/platform_helper.rb +0 -15
@@ -2,154 +2,144 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  require File.dirname(__FILE__) + '/../../test_helper'
4
4
 
5
- unless Sass::Util.ruby1_8?
6
- class MultibyteStringScannerTest < MiniTest::Test
7
- def setup
8
- @scanner = Sass::Util::MultibyteStringScanner.new("cölorfül")
9
- end
10
-
11
- def test_initial
12
- assert_scanner_state 0, 0, nil, nil
13
- end
14
-
15
- def test_check
16
- assert_equal 'cö', @scanner.check(/../)
17
- assert_scanner_state 0, 0, 2, 3
18
- assert_equal 0, @scanner.pos
19
- assert_equal 0, @scanner.pos
20
- assert_equal 2, @scanner.matched_size
21
- assert_equal 3, @scanner.byte_matched_size
22
- end
23
-
24
- def test_check_until
25
- assert_equal 'cölorfü', @scanner.check_until(/f./)
26
- assert_scanner_state 0, 0, 2, 3
27
- end
28
-
29
- def test_getch
30
- assert_equal 'c', @scanner.getch
31
- assert_equal 'ö', @scanner.getch
32
- assert_scanner_state 2, 3, 1, 2
33
- end
34
-
35
- def test_match?
36
- assert_equal 2, @scanner.match?(/../)
37
- assert_scanner_state 0, 0, 2, 3
38
- end
39
-
40
- def test_peek
41
- assert_equal 'cö', @scanner.peek(2)
42
- assert_scanner_state 0, 0, nil, nil
43
- end
44
-
45
- def test_rest_size
46
- assert_equal 'cö', @scanner.scan(/../)
47
- assert_equal 6, @scanner.rest_size
48
- end
49
-
50
- def test_scan
51
- assert_equal 'cö', @scanner.scan(/../)
52
- assert_scanner_state 2, 3, 2, 3
53
- end
54
-
55
- def test_scan_until
56
- assert_equal 'cölorfü', @scanner.scan_until(/f./)
57
- assert_scanner_state 7, 9, 2, 3
58
- end
59
-
60
- def test_skip
61
- assert_equal 2, @scanner.skip(/../)
62
- assert_scanner_state 2, 3, 2, 3
63
- end
64
-
65
- def test_skip_until
66
- assert_equal 7, @scanner.skip_until(/f./)
67
- assert_scanner_state 7, 9, 2, 3
68
- end
69
-
70
- def test_set_pos
71
- @scanner.pos = 7
72
- assert_scanner_state 7, 9, nil, nil
73
- @scanner.pos = 6
74
- assert_scanner_state 6, 7, nil, nil
75
- @scanner.pos = 1
76
- assert_scanner_state 1, 1, nil, nil
77
- end
78
-
79
- def test_reset
80
- @scanner.scan(/../)
81
- @scanner.reset
82
- assert_scanner_state 0, 0, nil, nil
83
- end
84
-
85
- def test_scan_full
86
- assert_equal 'cö', @scanner.scan_full(/../, true, true)
87
- assert_scanner_state 2, 3, 2, 3
88
-
89
- @scanner.reset
90
- assert_equal 'cö', @scanner.scan_full(/../, false, true)
91
- assert_scanner_state 0, 0, 2, 3
92
-
93
- @scanner.reset
94
- assert_nil @scanner.scan_full(/../, true, false)
95
- assert_scanner_state 2, 3, 2, 3
96
-
97
- @scanner.reset
98
- assert_nil @scanner.scan_full(/../, false, false)
99
- assert_scanner_state 0, 0, 2, 3
100
- end
101
-
102
- def test_search_full
103
- assert_equal 'cölorfü', @scanner.search_full(/f./, true, true)
104
- assert_scanner_state 7, 9, 2, 3
105
-
106
- @scanner.reset
107
- assert_equal 'cölorfü', @scanner.search_full(/f./, false, true)
108
- assert_scanner_state 0, 0, 2, 3
109
-
110
- @scanner.reset
111
- assert_nil @scanner.search_full(/f./, true, false)
112
- assert_scanner_state 7, 9, 2, 3
113
-
114
- @scanner.reset
115
- assert_nil @scanner.search_full(/f./, false, false)
116
- assert_scanner_state 0, 0, 2, 3
117
- end
118
-
119
- def test_set_string
120
- @scanner.scan(/../)
121
- @scanner.string = 'föóbâr'
122
- assert_scanner_state 0, 0, nil, nil
123
- end
124
-
125
- def test_terminate
126
- @scanner.scan(/../)
127
- @scanner.terminate
128
- assert_scanner_state 8, 10, nil, nil
129
- end
130
-
131
- def test_unscan
132
- @scanner.scan(/../)
133
- @scanner.scan_until(/f./)
134
- @scanner.unscan
135
- assert_scanner_state 2, 3, nil, nil
136
- end
137
-
138
- private
139
-
140
- def assert_scanner_state(pos, byte_pos, matched_size, byte_matched_size)
141
- assert_equal pos, @scanner.pos, 'pos'
142
- assert_equal byte_pos, @scanner.byte_pos, 'byte_pos'
143
- if matched_size.nil?
144
- assert_nil @scanner.matched_size, 'matched_size'
145
- else
146
- assert_equal matched_size, @scanner.matched_size, 'matched_size'
147
- end
148
- if byte_matched_size.nil?
149
- assert_nil @scanner.byte_matched_size, 'byte_matched_size'
150
- else
151
- assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
152
- end
153
- end
5
+ class MultibyteStringScannerTest < MiniTest::Test
6
+ def setup
7
+ @scanner = Sass::Util::MultibyteStringScanner.new("cölorfül")
8
+ end
9
+
10
+ def test_initial
11
+ assert_scanner_state 0, 0, nil, nil
12
+ end
13
+
14
+ def test_check
15
+ assert_equal 'cö', @scanner.check(/../)
16
+ assert_scanner_state 0, 0, 2, 3
17
+ assert_equal 0, @scanner.pos
18
+ assert_equal 0, @scanner.pos
19
+ assert_equal 2, @scanner.matched_size
20
+ assert_equal 3, @scanner.byte_matched_size
21
+ end
22
+
23
+ def test_check_until
24
+ assert_equal 'cölorfü', @scanner.check_until(/f./)
25
+ assert_scanner_state 0, 0, 2, 3
26
+ end
27
+
28
+ def test_getch
29
+ assert_equal 'c', @scanner.getch
30
+ assert_equal 'ö', @scanner.getch
31
+ assert_scanner_state 2, 3, 1, 2
32
+ end
33
+
34
+ def test_match?
35
+ assert_equal 2, @scanner.match?(/../)
36
+ assert_scanner_state 0, 0, 2, 3
37
+ end
38
+
39
+ def test_peek
40
+ assert_equal 'cö', @scanner.peek(2)
41
+ assert_scanner_state 0, 0, nil, nil
42
+ end
43
+
44
+ def test_rest_size
45
+ assert_equal 'cö', @scanner.scan(/../)
46
+ assert_equal 6, @scanner.rest_size
47
+ end
48
+
49
+ def test_scan
50
+ assert_equal 'cö', @scanner.scan(/../)
51
+ assert_scanner_state 2, 3, 2, 3
52
+ end
53
+
54
+ def test_scan_until
55
+ assert_equal 'cölorfü', @scanner.scan_until(/f./)
56
+ assert_scanner_state 7, 9, 2, 3
57
+ end
58
+
59
+ def test_skip
60
+ assert_equal 2, @scanner.skip(/../)
61
+ assert_scanner_state 2, 3, 2, 3
62
+ end
63
+
64
+ def test_skip_until
65
+ assert_equal 7, @scanner.skip_until(/f./)
66
+ assert_scanner_state 7, 9, 2, 3
67
+ end
68
+
69
+ def test_set_pos
70
+ @scanner.pos = 7
71
+ assert_scanner_state 7, 9, nil, nil
72
+ @scanner.pos = 6
73
+ assert_scanner_state 6, 7, nil, nil
74
+ @scanner.pos = 1
75
+ assert_scanner_state 1, 1, nil, nil
76
+ end
77
+
78
+ def test_reset
79
+ @scanner.scan(/../)
80
+ @scanner.reset
81
+ assert_scanner_state 0, 0, nil, nil
82
+ end
83
+
84
+ def test_scan_full
85
+ assert_equal 'cö', @scanner.scan_full(/../, true, true)
86
+ assert_scanner_state 2, 3, 2, 3
87
+
88
+ @scanner.reset
89
+ assert_equal 'cö', @scanner.scan_full(/../, false, true)
90
+ assert_scanner_state 0, 0, 2, 3
91
+
92
+ @scanner.reset
93
+ assert_nil @scanner.scan_full(/../, true, false)
94
+ assert_scanner_state 2, 3, 2, 3
95
+
96
+ @scanner.reset
97
+ assert_nil @scanner.scan_full(/../, false, false)
98
+ assert_scanner_state 0, 0, 2, 3
99
+ end
100
+
101
+ def test_search_full
102
+ assert_equal 'cölorfü', @scanner.search_full(/f./, true, true)
103
+ assert_scanner_state 7, 9, 2, 3
104
+
105
+ @scanner.reset
106
+ assert_equal 'cölorfü', @scanner.search_full(/f./, false, true)
107
+ assert_scanner_state 0, 0, 2, 3
108
+
109
+ @scanner.reset
110
+ assert_nil @scanner.search_full(/f./, true, false)
111
+ assert_scanner_state 7, 9, 2, 3
112
+
113
+ @scanner.reset
114
+ assert_nil @scanner.search_full(/f./, false, false)
115
+ assert_scanner_state 0, 0, 2, 3
116
+ end
117
+
118
+ def test_set_string
119
+ @scanner.scan(/../)
120
+ @scanner.string = 'föóbâr'
121
+ assert_scanner_state 0, 0, nil, nil
122
+ end
123
+
124
+ def test_terminate
125
+ @scanner.scan(/../)
126
+ @scanner.terminate
127
+ assert_scanner_state 8, 10, nil, nil
128
+ end
129
+
130
+ def test_unscan
131
+ @scanner.scan(/../)
132
+ @scanner.scan_until(/f./)
133
+ @scanner.unscan
134
+ assert_scanner_state 2, 3, nil, nil
135
+ end
136
+
137
+ private
138
+
139
+ def assert_scanner_state(pos, byte_pos, matched_size, byte_matched_size)
140
+ assert_equal pos, @scanner.pos, 'pos'
141
+ assert_equal byte_pos, @scanner.byte_pos, 'byte_pos'
142
+ assert_equal matched_size, @scanner.matched_size, 'matched_size'
143
+ assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
154
144
  end
155
145
  end
@@ -10,14 +10,6 @@ class UtilTest < MiniTest::Test
10
10
  assert(File.exist?(scope("Rakefile")))
11
11
  end
12
12
 
13
- def test_to_hash
14
- assert_equal({
15
- :foo => 1,
16
- :bar => 2,
17
- :baz => 3
18
- }, to_hash([[:foo, 1], [:bar, 2], [:baz, 3]]))
19
- end
20
-
21
13
  def test_map_keys
22
14
  assert_equal({
23
15
  "foo" => 1,
@@ -52,7 +44,6 @@ class UtilTest < MiniTest::Test
52
44
  end
53
45
 
54
46
  def test_powerset
55
- return unless Set[Set[]] == Set[Set[]] # There's a bug in Ruby 1.8.6 that breaks nested set equality
56
47
  assert_equal([[].to_set].to_set,
57
48
  powerset([]))
58
49
  assert_equal([[].to_set, [1].to_set].to_set,
@@ -139,13 +130,6 @@ class UtilTest < MiniTest::Test
139
130
  lcs([-5, 3, 2, 8], [-4, 1, 8]) {|a, b| (a - b).abs <= 1 && [a, b].max})
140
131
  end
141
132
 
142
- def test_group_by_to_a
143
- assert_equal([[1, [1, 3, 5, 7]], [0, [2, 4, 6, 8]]],
144
- group_by_to_a(1..8) {|i| i % 2})
145
- assert_equal([[1, [1, 4, 7, 10]], [2, [2, 5, 8, 11]], [0, [3, 6, 9, 12]]],
146
- group_by_to_a(1..12) {|i| i % 3})
147
- end
148
-
149
133
  def test_subsequence
150
134
  assert(subsequence?([1, 2, 3], [1, 2, 3]))
151
135
  assert(subsequence?([1, 2, 3], [1, :a, 2, :b, 3]))
@@ -180,32 +164,12 @@ class UtilTest < MiniTest::Test
180
164
  $stderr = old_stderr
181
165
  end
182
166
 
183
- def test_has
184
- assert(has?(:instance_method, String, :chomp!))
185
- assert(has?(:private_instance_method, Sass::Engine, :parse_interp))
186
- end
187
-
188
- def test_enum_with_index
189
- assert_equal(%w[foo0 bar1 baz2],
190
- enum_with_index(%w[foo bar baz]).map {|s, i| "#{s}#{i}"})
191
- end
192
-
193
- def test_enum_cons
194
- assert_equal(%w[foobar barbaz],
195
- enum_cons(%w[foo bar baz], 2).map {|s1, s2| "#{s1}#{s2}"})
196
- end
197
-
198
167
  def test_extract
199
168
  arr = [1, 2, 3, 4, 5]
200
169
  assert_equal([1, 3, 5], extract!(arr) {|e| e % 2 == 1})
201
170
  assert_equal([2, 4], arr)
202
171
  end
203
172
 
204
- def test_ord
205
- assert_equal(102, ord("f"))
206
- assert_equal(98, ord("bar"))
207
- end
208
-
209
173
  def test_flatten_vertically
210
174
  assert_equal([1, 2, 3], flatten_vertically([1, 2, 3]))
211
175
  assert_equal([1, 3, 5, 2, 4, 6], flatten_vertically([[1, 2], [3, 4], [5, 6]]))
@@ -93,6 +93,45 @@ class MiniTest::Test
93
93
  else
94
94
  flunk "Expected exception on line #{line}, none raised"
95
95
  end
96
+
97
+ def assert_sass_to_sass(sass, options: {})
98
+ assert_equal(sass.rstrip, to_sass(sass, options).rstrip,
99
+ "Expected Sass to transform to itself")
100
+ end
101
+
102
+ def assert_scss_to_sass(sass, scss, options: {})
103
+ assert_equal(sass.rstrip, to_sass(scss, options.merge(:syntax => :scss)).rstrip,
104
+ "Expected SCSS to transform to Sass")
105
+ end
106
+
107
+ def assert_scss_to_scss(scss, source: scss, options: {})
108
+ assert_equal(scss.rstrip, to_scss(source, options.merge(:syntax => :scss)).rstrip,
109
+ "Expected SCSS to transform to #{scss == source ? 'itself' : 'SCSS'}")
110
+ end
111
+
112
+ def assert_sass_to_scss(scss, sass, options: {})
113
+ assert_equal(scss.rstrip, to_scss(sass, options).rstrip,
114
+ "Expected Sass to transform to SCSS")
115
+ end
116
+
117
+ def assert_converts(sass, scss, options: {})
118
+ assert_sass_to_sass(sass, options: options)
119
+ assert_scss_to_sass(sass, scss, options: options)
120
+ assert_scss_to_scss(scss, options: options)
121
+ assert_sass_to_scss(scss, sass, options: options)
122
+ end
123
+
124
+ def to_sass(scss, options = {})
125
+ Sass::Util.silence_sass_warnings do
126
+ Sass::Engine.new(scss, options).to_tree.to_sass(options)
127
+ end
128
+ end
129
+
130
+ def to_scss(sass, options = {})
131
+ Sass::Util.silence_sass_warnings do
132
+ Sass::Engine.new(sass, options).to_tree.to_scss(options)
133
+ end
134
+ end
96
135
  end
97
136
 
98
137
  module PublicApiLinter
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.4.25
4
+ version: 3.5.0.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -10,36 +10,50 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-07 00:00:00.000000000 Z
13
+ date: 2016-08-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: yard
16
+ name: sass-listen
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.7.6
22
- type: :development
21
+ version: 3.0.7
22
+ type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.8.7.6
28
+ version: 3.0.7
29
29
  - !ruby/object:Gem::Dependency
30
- name: redcarpet
30
+ name: yard
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 2.3.0
35
+ version: 0.5.3
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 2.3.0
42
+ version: 0.5.3
43
+ - !ruby/object:Gem::Dependency
44
+ name: maruku
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.5.9
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.5.9
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: minitest
45
59
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +94,6 @@ files:
80
94
  - bin/sass
81
95
  - bin/sass-convert
82
96
  - bin/scss
83
- - extra/sass-spec-ref.sh
84
97
  - extra/update_watch.rb
85
98
  - init.rb
86
99
  - lib/sass.rb
@@ -92,7 +105,6 @@ files:
92
105
  - lib/sass/cache_stores/null.rb
93
106
  - lib/sass/callbacks.rb
94
107
  - lib/sass/css.rb
95
- - lib/sass/deprecation.rb
96
108
  - lib/sass/engine.rb
97
109
  - lib/sass/environment.rb
98
110
  - lib/sass/error.rb
@@ -124,7 +136,6 @@ files:
124
136
  - lib/sass/script.rb
125
137
  - lib/sass/script/css_lexer.rb
126
138
  - lib/sass/script/css_parser.rb
127
- - lib/sass/script/css_variable_warning.rb
128
139
  - lib/sass/script/functions.rb
129
140
  - lib/sass/script/lexer.rb
130
141
  - lib/sass/script/parser.rb
@@ -144,7 +155,9 @@ files:
144
155
  - lib/sass/script/value/arg_list.rb
145
156
  - lib/sass/script/value/base.rb
146
157
  - lib/sass/script/value/bool.rb
158
+ - lib/sass/script/value/callable.rb
147
159
  - lib/sass/script/value/color.rb
160
+ - lib/sass/script/value/function.rb
148
161
  - lib/sass/script/value/helpers.rb
149
162
  - lib/sass/script/value/list.rb
150
163
  - lib/sass/script/value/map.rb
@@ -207,10 +220,8 @@ files:
207
220
  - lib/sass/tree/warn_node.rb
208
221
  - lib/sass/tree/while_node.rb
209
222
  - lib/sass/util.rb
210
- - lib/sass/util/cross_platform_random.rb
211
223
  - lib/sass/util/multibyte_string_scanner.rb
212
224
  - lib/sass/util/normalized_map.rb
213
- - lib/sass/util/ordered_hash.rb
214
225
  - lib/sass/util/subset_map.rb
215
226
  - lib/sass/util/test.rb
216
227
  - lib/sass/version.rb
@@ -251,7 +262,6 @@ files:
251
262
  - test/sass/results/if.css
252
263
  - test/sass/results/import.css
253
264
  - test/sass/results/import_charset.css
254
- - test/sass/results/import_charset_1_8.css
255
265
  - test/sass/results/import_charset_ibm866.css
256
266
  - test/sass/results/import_content.css
257
267
  - test/sass/results/line_numbers.css
@@ -301,7 +311,6 @@ files:
301
311
  - test/sass/templates/if.sass
302
312
  - test/sass/templates/import.sass
303
313
  - test/sass/templates/import_charset.sass
304
- - test/sass/templates/import_charset_1_8.sass
305
314
  - test/sass/templates/import_charset_ibm866.sass
306
315
  - test/sass/templates/import_content.sass
307
316
  - test/sass/templates/importee.less
@@ -341,42 +350,6 @@ files:
341
350
  - test/sass/util_test.rb
342
351
  - test/sass/value_helpers_test.rb
343
352
  - test/test_helper.rb
344
- - vendor/listen/CHANGELOG.md
345
- - vendor/listen/CONTRIBUTING.md
346
- - vendor/listen/Gemfile
347
- - vendor/listen/Guardfile
348
- - vendor/listen/LICENSE
349
- - vendor/listen/README.md
350
- - vendor/listen/Rakefile
351
- - vendor/listen/Vagrantfile
352
- - vendor/listen/lib/listen.rb
353
- - vendor/listen/lib/listen/adapter.rb
354
- - vendor/listen/lib/listen/adapters/bsd.rb
355
- - vendor/listen/lib/listen/adapters/darwin.rb
356
- - vendor/listen/lib/listen/adapters/linux.rb
357
- - vendor/listen/lib/listen/adapters/polling.rb
358
- - vendor/listen/lib/listen/adapters/windows.rb
359
- - vendor/listen/lib/listen/directory_record.rb
360
- - vendor/listen/lib/listen/listener.rb
361
- - vendor/listen/lib/listen/turnstile.rb
362
- - vendor/listen/lib/listen/version.rb
363
- - vendor/listen/listen.gemspec
364
- - vendor/listen/spec/listen/adapter_spec.rb
365
- - vendor/listen/spec/listen/adapters/bsd_spec.rb
366
- - vendor/listen/spec/listen/adapters/darwin_spec.rb
367
- - vendor/listen/spec/listen/adapters/linux_spec.rb
368
- - vendor/listen/spec/listen/adapters/polling_spec.rb
369
- - vendor/listen/spec/listen/adapters/windows_spec.rb
370
- - vendor/listen/spec/listen/directory_record_spec.rb
371
- - vendor/listen/spec/listen/listener_spec.rb
372
- - vendor/listen/spec/listen/turnstile_spec.rb
373
- - vendor/listen/spec/listen_spec.rb
374
- - vendor/listen/spec/spec_helper.rb
375
- - vendor/listen/spec/support/adapter_helper.rb
376
- - vendor/listen/spec/support/directory_record_helper.rb
377
- - vendor/listen/spec/support/fixtures_helper.rb
378
- - vendor/listen/spec/support/listeners_helper.rb
379
- - vendor/listen/spec/support/platform_helper.rb
380
353
  homepage: http://sass-lang.com/
381
354
  licenses:
382
355
  - MIT
@@ -389,12 +362,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
389
362
  requirements:
390
363
  - - ">="
391
364
  - !ruby/object:Gem::Version
392
- version: 1.8.7
365
+ version: 2.0.0
393
366
  required_rubygems_version: !ruby/object:Gem::Requirement
394
367
  requirements:
395
- - - ">="
368
+ - - ">"
396
369
  - !ruby/object:Gem::Version
397
- version: '0'
370
+ version: 1.3.1
398
371
  requirements: []
399
372
  rubyforge_project: sass
400
373
  rubygems_version: 2.4.8