sass 3.3.14 → 3.4.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +5 -5
  4. data/VERSION +1 -1
  5. data/VERSION_DATE +1 -1
  6. data/VERSION_NAME +1 -1
  7. data/bin/sass +1 -1
  8. data/bin/scss +1 -1
  9. data/lib/sass.rb +0 -5
  10. data/lib/sass/css.rb +1 -3
  11. data/lib/sass/engine.rb +28 -39
  12. data/lib/sass/environment.rb +13 -17
  13. data/lib/sass/error.rb +6 -9
  14. data/lib/sass/exec.rb +5 -771
  15. data/lib/sass/exec/base.rb +187 -0
  16. data/lib/sass/exec/sass_convert.rb +264 -0
  17. data/lib/sass/exec/sass_scss.rb +419 -0
  18. data/lib/sass/features.rb +6 -0
  19. data/lib/sass/importers.rb +0 -1
  20. data/lib/sass/importers/base.rb +5 -1
  21. data/lib/sass/importers/filesystem.rb +4 -21
  22. data/lib/sass/media.rb +1 -4
  23. data/lib/sass/plugin/compiler.rb +32 -136
  24. data/lib/sass/script/css_lexer.rb +1 -1
  25. data/lib/sass/script/functions.rb +363 -39
  26. data/lib/sass/script/lexer.rb +68 -50
  27. data/lib/sass/script/parser.rb +29 -14
  28. data/lib/sass/script/tree.rb +1 -0
  29. data/lib/sass/script/tree/funcall.rb +1 -1
  30. data/lib/sass/script/tree/interpolation.rb +19 -1
  31. data/lib/sass/script/tree/selector.rb +26 -0
  32. data/lib/sass/script/value.rb +0 -1
  33. data/lib/sass/script/value/bool.rb +0 -5
  34. data/lib/sass/script/value/color.rb +32 -12
  35. data/lib/sass/script/value/helpers.rb +107 -0
  36. data/lib/sass/script/value/list.rb +0 -15
  37. data/lib/sass/script/value/null.rb +0 -5
  38. data/lib/sass/script/value/number.rb +60 -14
  39. data/lib/sass/script/value/string.rb +53 -9
  40. data/lib/sass/scss/css_parser.rb +8 -2
  41. data/lib/sass/scss/parser.rb +175 -319
  42. data/lib/sass/scss/rx.rb +14 -5
  43. data/lib/sass/scss/static_parser.rb +298 -1
  44. data/lib/sass/selector.rb +56 -193
  45. data/lib/sass/selector/abstract_sequence.rb +28 -13
  46. data/lib/sass/selector/comma_sequence.rb +91 -12
  47. data/lib/sass/selector/pseudo.rb +256 -0
  48. data/lib/sass/selector/sequence.rb +99 -31
  49. data/lib/sass/selector/simple.rb +14 -25
  50. data/lib/sass/selector/simple_sequence.rb +101 -37
  51. data/lib/sass/shared.rb +1 -1
  52. data/lib/sass/source/map.rb +23 -9
  53. data/lib/sass/stack.rb +0 -6
  54. data/lib/sass/supports.rb +1 -1
  55. data/lib/sass/tree/at_root_node.rb +1 -0
  56. data/lib/sass/tree/directive_node.rb +7 -1
  57. data/lib/sass/tree/error_node.rb +18 -0
  58. data/lib/sass/tree/keyframe_rule_node.rb +15 -0
  59. data/lib/sass/tree/prop_node.rb +1 -1
  60. data/lib/sass/tree/rule_node.rb +11 -6
  61. data/lib/sass/tree/visitors/check_nesting.rb +3 -4
  62. data/lib/sass/tree/visitors/convert.rb +8 -17
  63. data/lib/sass/tree/visitors/cssize.rb +12 -24
  64. data/lib/sass/tree/visitors/deep_copy.rb +5 -0
  65. data/lib/sass/tree/visitors/perform.rb +43 -28
  66. data/lib/sass/tree/visitors/set_options.rb +5 -0
  67. data/lib/sass/tree/visitors/to_css.rb +14 -13
  68. data/lib/sass/util.rb +94 -90
  69. data/test/sass/cache_test.rb +1 -1
  70. data/test/sass/callbacks_test.rb +1 -1
  71. data/test/sass/compiler_test.rb +5 -14
  72. data/test/sass/conversion_test.rb +47 -1
  73. data/test/sass/css2sass_test.rb +3 -3
  74. data/test/sass/encoding_test.rb +219 -0
  75. data/test/sass/engine_test.rb +128 -191
  76. data/test/sass/exec_test.rb +2 -2
  77. data/test/sass/extend_test.rb +234 -17
  78. data/test/sass/functions_test.rb +268 -213
  79. data/test/sass/importer_test.rb +31 -21
  80. data/test/sass/logger_test.rb +1 -1
  81. data/test/sass/more_results/more_import.css +1 -1
  82. data/test/sass/plugin_test.rb +12 -11
  83. data/test/sass/results/compact.css +1 -1
  84. data/test/sass/results/complex.css +4 -4
  85. data/test/sass/results/expanded.css +1 -1
  86. data/test/sass/results/import.css +1 -1
  87. data/test/sass/results/import_charset_ibm866.css +2 -2
  88. data/test/sass/results/mixins.css +17 -17
  89. data/test/sass/results/nested.css +1 -1
  90. data/test/sass/results/parent_ref.css +2 -2
  91. data/test/sass/results/script.css +3 -3
  92. data/test/sass/results/scss_import.css +1 -1
  93. data/test/sass/script_conversion_test.rb +7 -4
  94. data/test/sass/script_test.rb +202 -79
  95. data/test/sass/scss/css_test.rb +95 -25
  96. data/test/sass/scss/rx_test.rb +4 -4
  97. data/test/sass/scss/scss_test.rb +363 -19
  98. data/test/sass/source_map_test.rb +48 -41
  99. data/test/sass/superselector_test.rb +191 -0
  100. data/test/sass/templates/scss_import.scss +2 -1
  101. data/test/sass/test_helper.rb +1 -1
  102. data/test/sass/util/multibyte_string_scanner_test.rb +1 -1
  103. data/test/sass/util/normalized_map_test.rb +1 -1
  104. data/test/sass/util/subset_map_test.rb +2 -2
  105. data/test/sass/util_test.rb +1 -1
  106. data/test/sass/value_helpers_test.rb +3 -3
  107. data/test/test_helper.rb +2 -2
  108. metadata +30 -7
  109. data/lib/sass/importers/deprecated_path.rb +0 -51
  110. data/lib/sass/script/value/deprecated_false.rb +0 -55
@@ -1,6 +1,6 @@
1
1
  lib_dir = File.dirname(__FILE__) + '/../lib'
2
2
 
3
- require 'test/unit'
3
+ require 'minitest/autorun'
4
4
  require 'fileutils'
5
5
  $:.unshift lib_dir unless $:.include?(lib_dir)
6
6
  require 'sass'
@@ -22,7 +22,7 @@ module Sass::Script::Functions
22
22
  end
23
23
  end
24
24
 
25
- class Test::Unit::TestCase
25
+ class MiniTest::Test
26
26
  def munge_filename(opts = {})
27
27
  opts[:filename] ||= filename_for_test(opts[:syntax] || :sass)
28
28
  opts[:sourcemap_filename] ||= sourcemap_filename_for_test
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.14
4
+ version: 3.4.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
- - Natalie Weizenbaum
7
+ - Nathan Weizenbaum
8
8
  - Chris Eppstein
9
9
  - Hampton Catlin
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-02 00:00:00.000000000 Z
13
+ date: 2014-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yard
@@ -40,6 +40,20 @@ dependencies:
40
40
  - - '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 0.5.9
43
+ - !ruby/object:Gem::Dependency
44
+ name: minitest
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '5'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '5'
43
57
  description: |2
44
58
  Sass makes CSS fun again. Sass is an extension of CSS3, adding
45
59
  nested rules, variables, mixins, selector inheritance, and more.
@@ -79,6 +93,7 @@ files:
79
93
  - lib/sass/tree/trace_node.rb
80
94
  - lib/sass/tree/return_node.rb
81
95
  - lib/sass/tree/root_node.rb
96
+ - lib/sass/tree/keyframe_rule_node.rb
82
97
  - lib/sass/tree/if_node.rb
83
98
  - lib/sass/tree/charset_node.rb
84
99
  - lib/sass/tree/css_import_node.rb
@@ -92,6 +107,7 @@ files:
92
107
  - lib/sass/tree/at_root_node.rb
93
108
  - lib/sass/tree/node.rb
94
109
  - lib/sass/tree/mixin_node.rb
110
+ - lib/sass/tree/error_node.rb
95
111
  - lib/sass/tree/extend_node.rb
96
112
  - lib/sass/tree/mixin_def_node.rb
97
113
  - lib/sass/tree/supports_node.rb
@@ -111,6 +127,9 @@ files:
111
127
  - lib/sass/tree/prop_node.rb
112
128
  - lib/sass/tree/variable_node.rb
113
129
  - lib/sass/engine.rb
130
+ - lib/sass/exec/sass_scss.rb
131
+ - lib/sass/exec/base.rb
132
+ - lib/sass/exec/sass_convert.rb
114
133
  - lib/sass/plugin.rb
115
134
  - lib/sass/root.rb
116
135
  - lib/sass/features.rb
@@ -138,7 +157,6 @@ files:
138
157
  - lib/sass/script.rb
139
158
  - lib/sass/util.rb
140
159
  - lib/sass/importers/filesystem.rb
141
- - lib/sass/importers/deprecated_path.rb
142
160
  - lib/sass/importers/base.rb
143
161
  - lib/sass/script/parser.rb
144
162
  - lib/sass/script/functions.rb
@@ -151,6 +169,7 @@ files:
151
169
  - lib/sass/script/tree/list_literal.rb
152
170
  - lib/sass/script/tree/node.rb
153
171
  - lib/sass/script/tree/unary_operation.rb
172
+ - lib/sass/script/tree/selector.rb
154
173
  - lib/sass/script/tree/map_literal.rb
155
174
  - lib/sass/script/tree.rb
156
175
  - lib/sass/script/lexer.rb
@@ -159,7 +178,6 @@ files:
159
178
  - lib/sass/script/value/color.rb
160
179
  - lib/sass/script/value/number.rb
161
180
  - lib/sass/script/value/map.rb
162
- - lib/sass/script/value/deprecated_false.rb
163
181
  - lib/sass/script/value/arg_list.rb
164
182
  - lib/sass/script/value/bool.rb
165
183
  - lib/sass/script/value/list.rb
@@ -171,6 +189,7 @@ files:
171
189
  - lib/sass/selector.rb
172
190
  - lib/sass/callbacks.rb
173
191
  - lib/sass/selector/simple.rb
192
+ - lib/sass/selector/pseudo.rb
174
193
  - lib/sass/selector/sequence.rb
175
194
  - lib/sass/selector/abstract_sequence.rb
176
195
  - lib/sass/selector/comma_sequence.rb
@@ -332,6 +351,8 @@ files:
332
351
  - test/sass/more_templates/more_import.sass
333
352
  - test/sass/more_templates/more1.sass
334
353
  - test/sass/script_conversion_test.rb
354
+ - test/sass/superselector_test.rb
355
+ - test/sass/encoding_test.rb
335
356
  - test/sass/more_results/more1.css
336
357
  - test/sass/more_results/more1_with_line_comments.css
337
358
  - test/sass/more_results/more_import.css
@@ -365,9 +386,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
365
386
  version: 1.8.7
366
387
  required_rubygems_version: !ruby/object:Gem::Requirement
367
388
  requirements:
368
- - - '>='
389
+ - - '>'
369
390
  - !ruby/object:Gem::Version
370
- version: '0'
391
+ version: 1.3.1
371
392
  requirements: []
372
393
  rubyforge_project: sass
373
394
  rubygems_version: 2.0.3
@@ -395,6 +416,8 @@ test_files:
395
416
  - test/sass/scss/rx_test.rb
396
417
  - test/sass/util_test.rb
397
418
  - test/sass/script_conversion_test.rb
419
+ - test/sass/superselector_test.rb
420
+ - test/sass/encoding_test.rb
398
421
  - test/sass/cache_test.rb
399
422
  - test/sass/source_map_test.rb
400
423
  - test/sass/plugin_test.rb
@@ -1,51 +0,0 @@
1
- module Sass
2
- module Importers
3
- # This importer emits a deprecation warning the first time it is used to
4
- # import a file. It is used to deprecate the current working
5
- # directory from the list of automatic sass load paths.
6
- class DeprecatedPath < Filesystem
7
- # @param root [String] The absolute, expanded path to the folder that is deprecated.
8
- def initialize(root)
9
- @specified_root = root
10
- @warning_given = false
11
- super
12
- end
13
-
14
- # @see Sass::Importers::Base#find
15
- def find(*args)
16
- found = super
17
- if found && !@warning_given
18
- @warning_given = true
19
- Sass::Util.sass_warn deprecation_warning
20
- end
21
- found
22
- end
23
-
24
- # @see Base#directories_to_watch
25
- def directories_to_watch
26
- # The current working directory was not watched in Sass 3.2,
27
- # so we continue not to watch it while it's deprecated.
28
- []
29
- end
30
-
31
- # @see Sass::Importers::Base#to_s
32
- def to_s
33
- "#{@root} (DEPRECATED)"
34
- end
35
-
36
- protected
37
-
38
- # @return [String] The deprecation warning that will be printed the first
39
- # time an import occurs.
40
- def deprecation_warning
41
- path = @specified_root == "." ? "the current working directory" : @specified_root
42
- <<WARNING
43
- DEPRECATION WARNING: Importing from #{path} will not be
44
- automatic in future versions of Sass. To avoid future errors, you can add it
45
- to your environment explicitly by setting `SASS_PATH=#{@specified_root}`, by using the -I command
46
- line option, or by changing your Sass configuration options.
47
- WARNING
48
- end
49
- end
50
- end
51
- end
@@ -1,55 +0,0 @@
1
- module Sass::Script::Value
2
- # A SassScript object representing a `false` value that came from a call to
3
- # `index()`. It will print deprecation warnings if it's used with `==`.
4
- class DeprecatedFalse < Bool
5
- def self.new(environment)
6
- obj = allocate
7
- obj.send(:initialize, environment)
8
- obj
9
- end
10
-
11
- def initialize(environment)
12
- @value = false
13
- @global_env = environment.global_env
14
- if (frame = environment.stack.frames.last)
15
- @filename = frame.filename
16
- @line = frame.line
17
- end
18
- end
19
-
20
- def eq(other)
21
- if other.value == false && !warned?
22
- self.warned = true
23
- Sass::Util.sass_warn <<WARNING + @global_env.stack.to_s.gsub(/^/, ' ')
24
- DEPRECATION WARNING: The return value of index() will change from "false" to
25
- "null" in future versions of Sass. For compatibility, avoid using "== false" on
26
- the return value. For example, instead of "@if index(...) == false", just write
27
- "@if not index(...)".
28
- WARNING
29
- end
30
- Bool.new(other.value == false)
31
- end
32
-
33
- def neq(other)
34
- if other.value.nil? && !warned?
35
- self.warned = true
36
- Sass::Util.sass_warn <<WARNING + @global_env.stack.to_s.gsub(/^/, ' ')
37
- DEPRECATION WARNING: The return value of index() will change from "false" to
38
- "null" in future versions of Sass. For compatibility, avoid using "!= null" on
39
- the return value.
40
- WARNING
41
- end
42
- Bool.new(other.value != false)
43
- end
44
-
45
- private
46
-
47
- def warned?
48
- @global_env.deprecated_false_warning_given.include?([@filename, @line])
49
- end
50
-
51
- def warned=(value)
52
- @global_env.deprecated_false_warning_given << [@filename, @line]
53
- end
54
- end
55
- end