sass 3.7.4 → 4.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. checksums.yaml +13 -5
  2. data/.yardopts +1 -1
  3. data/CODE_OF_CONDUCT.md +1 -1
  4. data/CONTRIBUTING.md +1 -146
  5. data/MIT-LICENSE +1 -1
  6. data/README.md +25 -39
  7. data/Rakefile +274 -0
  8. data/VERSION +1 -1
  9. data/VERSION_DATE +1 -1
  10. data/lib/sass.rb +3 -3
  11. data/lib/sass/cache_stores/filesystem.rb +2 -2
  12. data/lib/sass/cache_stores/memory.rb +5 -4
  13. data/lib/sass/callbacks.rb +2 -2
  14. data/lib/sass/css.rb +12 -12
  15. data/lib/sass/engine.rb +44 -62
  16. data/lib/sass/environment.rb +7 -35
  17. data/lib/sass/error.rb +14 -14
  18. data/lib/sass/exec/base.rb +14 -3
  19. data/lib/sass/exec/sass_convert.rb +6 -20
  20. data/lib/sass/exec/sass_scss.rb +29 -5
  21. data/lib/sass/features.rb +2 -3
  22. data/lib/sass/importers/filesystem.rb +6 -11
  23. data/lib/sass/logger.rb +3 -8
  24. data/lib/sass/logger/base.rb +2 -19
  25. data/lib/sass/plugin.rb +2 -3
  26. data/lib/sass/plugin/compiler.rb +67 -48
  27. data/lib/sass/plugin/configuration.rb +3 -3
  28. data/lib/sass/plugin/merb.rb +1 -1
  29. data/lib/sass/plugin/rack.rb +3 -3
  30. data/lib/sass/plugin/staleness_checker.rb +3 -3
  31. data/lib/sass/railtie.rb +1 -1
  32. data/lib/sass/script.rb +3 -3
  33. data/lib/sass/script/css_parser.rb +15 -5
  34. data/lib/sass/script/functions.rb +121 -337
  35. data/lib/sass/script/lexer.rb +36 -102
  36. data/lib/sass/script/parser.rb +153 -529
  37. data/lib/sass/script/tree/funcall.rb +34 -42
  38. data/lib/sass/script/tree/interpolation.rb +26 -171
  39. data/lib/sass/script/tree/list_literal.rb +8 -23
  40. data/lib/sass/script/tree/map_literal.rb +2 -2
  41. data/lib/sass/script/tree/node.rb +3 -3
  42. data/lib/sass/script/tree/operation.rb +16 -43
  43. data/lib/sass/script/tree/string_interpolation.rb +43 -64
  44. data/lib/sass/script/tree/variable.rb +1 -1
  45. data/lib/sass/script/value.rb +0 -2
  46. data/lib/sass/script/value/arg_list.rb +1 -1
  47. data/lib/sass/script/value/base.rb +9 -27
  48. data/lib/sass/script/value/color.rb +18 -26
  49. data/lib/sass/script/value/helpers.rb +18 -44
  50. data/lib/sass/script/value/list.rb +14 -35
  51. data/lib/sass/script/value/map.rb +2 -2
  52. data/lib/sass/script/value/number.rb +16 -26
  53. data/lib/sass/script/value/string.rb +1 -30
  54. data/lib/sass/scss.rb +2 -0
  55. data/lib/sass/scss/css_parser.rb +3 -7
  56. data/lib/sass/scss/parser.rb +78 -196
  57. data/lib/sass/scss/rx.rb +14 -7
  58. data/lib/sass/scss/script_lexer.rb +15 -0
  59. data/lib/sass/scss/script_parser.rb +25 -0
  60. data/lib/sass/scss/static_parser.rb +55 -38
  61. data/lib/sass/selector.rb +10 -7
  62. data/lib/sass/selector/abstract_sequence.rb +12 -15
  63. data/lib/sass/selector/comma_sequence.rb +6 -24
  64. data/lib/sass/selector/pseudo.rb +6 -19
  65. data/lib/sass/selector/sequence.rb +16 -14
  66. data/lib/sass/selector/simple.rb +7 -9
  67. data/lib/sass/selector/simple_sequence.rb +12 -16
  68. data/lib/sass/shared.rb +1 -1
  69. data/lib/sass/source/map.rb +9 -7
  70. data/lib/sass/source/position.rb +4 -4
  71. data/lib/sass/stack.rb +3 -23
  72. data/lib/sass/tree/charset_node.rb +1 -1
  73. data/lib/sass/tree/comment_node.rb +1 -1
  74. data/lib/sass/tree/function_node.rb +3 -2
  75. data/lib/sass/tree/node.rb +3 -5
  76. data/lib/sass/tree/prop_node.rb +58 -49
  77. data/lib/sass/tree/rule_node.rb +8 -15
  78. data/lib/sass/tree/visitors/check_nesting.rb +23 -19
  79. data/lib/sass/tree/visitors/convert.rb +13 -15
  80. data/lib/sass/tree/visitors/cssize.rb +15 -4
  81. data/lib/sass/tree/visitors/deep_copy.rb +2 -2
  82. data/lib/sass/tree/visitors/extend.rb +14 -10
  83. data/lib/sass/tree/visitors/perform.rb +18 -29
  84. data/lib/sass/tree/visitors/set_options.rb +2 -2
  85. data/lib/sass/tree/visitors/to_css.rb +47 -77
  86. data/lib/sass/util.rb +311 -98
  87. data/lib/sass/util/cross_platform_random.rb +19 -0
  88. data/lib/sass/util/multibyte_string_scanner.rb +133 -127
  89. data/lib/sass/util/normalized_map.rb +8 -1
  90. data/lib/sass/util/ordered_hash.rb +192 -0
  91. data/lib/sass/version.rb +6 -2
  92. data/test/sass/cache_test.rb +131 -0
  93. data/test/sass/callbacks_test.rb +61 -0
  94. data/test/sass/compiler_test.rb +236 -0
  95. data/test/sass/conversion_test.rb +2171 -0
  96. data/test/sass/css2sass_test.rb +526 -0
  97. data/test/sass/data/hsl-rgb.txt +319 -0
  98. data/test/sass/encoding_test.rb +219 -0
  99. data/test/sass/engine_test.rb +3400 -0
  100. data/test/sass/exec_test.rb +86 -0
  101. data/test/sass/extend_test.rb +1719 -0
  102. data/test/sass/fixtures/test_staleness_check_across_importers.css +1 -0
  103. data/test/sass/fixtures/test_staleness_check_across_importers.scss +1 -0
  104. data/test/sass/functions_test.rb +1984 -0
  105. data/test/sass/importer_test.rb +421 -0
  106. data/test/sass/logger_test.rb +58 -0
  107. data/test/sass/mock_importer.rb +49 -0
  108. data/test/sass/more_results/more1.css +9 -0
  109. data/test/sass/more_results/more1_with_line_comments.css +26 -0
  110. data/test/sass/more_results/more_import.css +29 -0
  111. data/test/sass/more_templates/_more_partial.sass +2 -0
  112. data/test/sass/more_templates/more1.sass +23 -0
  113. data/test/sass/more_templates/more_import.sass +11 -0
  114. data/test/sass/plugin_test.rb +556 -0
  115. data/test/sass/results/alt.css +4 -0
  116. data/test/sass/results/basic.css +9 -0
  117. data/test/sass/results/cached_import_option.css +3 -0
  118. data/test/sass/results/compact.css +5 -0
  119. data/test/sass/results/complex.css +86 -0
  120. data/test/sass/results/compressed.css +1 -0
  121. data/test/sass/results/expanded.css +19 -0
  122. data/test/sass/results/filename_fn.css +3 -0
  123. data/test/sass/results/if.css +3 -0
  124. data/test/sass/results/import.css +31 -0
  125. data/test/sass/results/import_charset.css +5 -0
  126. data/test/sass/results/import_charset_1_8.css +5 -0
  127. data/test/sass/results/import_charset_ibm866.css +5 -0
  128. data/test/sass/results/import_content.css +1 -0
  129. data/test/sass/results/line_numbers.css +49 -0
  130. data/test/sass/results/mixins.css +95 -0
  131. data/test/sass/results/multiline.css +24 -0
  132. data/test/sass/results/nested.css +22 -0
  133. data/test/sass/results/options.css +1 -0
  134. data/test/sass/results/parent_ref.css +13 -0
  135. data/test/sass/results/script.css +16 -0
  136. data/test/sass/results/scss_import.css +31 -0
  137. data/test/sass/results/scss_importee.css +2 -0
  138. data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  139. data/test/sass/results/subdir/subdir.css +3 -0
  140. data/test/sass/results/units.css +11 -0
  141. data/test/sass/results/warn.css +0 -0
  142. data/test/sass/results/warn_imported.css +0 -0
  143. data/test/sass/script_conversion_test.rb +306 -0
  144. data/test/sass/script_test.rb +1206 -0
  145. data/test/sass/scss/css_test.rb +1281 -0
  146. data/test/sass/scss/rx_test.rb +160 -0
  147. data/test/sass/scss/scss_test.rb +4147 -0
  148. data/test/sass/scss/test_helper.rb +37 -0
  149. data/test/sass/source_map_test.rb +1055 -0
  150. data/test/sass/superselector_test.rb +210 -0
  151. data/test/sass/templates/_cached_import_option_partial.scss +1 -0
  152. data/test/sass/templates/_double_import_loop2.sass +1 -0
  153. data/test/sass/templates/_filename_fn_import.scss +11 -0
  154. data/test/sass/templates/_imported_charset_ibm866.sass +4 -0
  155. data/test/sass/templates/_imported_charset_utf8.sass +4 -0
  156. data/test/sass/templates/_imported_content.sass +3 -0
  157. data/test/sass/templates/_partial.sass +2 -0
  158. data/test/sass/templates/_same_name_different_partiality.scss +1 -0
  159. data/test/sass/templates/alt.sass +16 -0
  160. data/test/sass/templates/basic.sass +23 -0
  161. data/test/sass/templates/bork1.sass +2 -0
  162. data/test/sass/templates/bork2.sass +2 -0
  163. data/test/sass/templates/bork3.sass +2 -0
  164. data/test/sass/templates/bork4.sass +2 -0
  165. data/test/sass/templates/bork5.sass +3 -0
  166. data/test/sass/templates/cached_import_option.scss +3 -0
  167. data/test/sass/templates/compact.sass +17 -0
  168. data/test/sass/templates/complex.sass +305 -0
  169. data/test/sass/templates/compressed.sass +15 -0
  170. data/test/sass/templates/double_import_loop1.sass +1 -0
  171. data/test/sass/templates/expanded.sass +17 -0
  172. data/test/sass/templates/filename_fn.scss +18 -0
  173. data/test/sass/templates/if.sass +11 -0
  174. data/test/sass/templates/import.sass +12 -0
  175. data/test/sass/templates/import_charset.sass +9 -0
  176. data/test/sass/templates/import_charset_1_8.sass +6 -0
  177. data/test/sass/templates/import_charset_ibm866.sass +11 -0
  178. data/test/sass/templates/import_content.sass +4 -0
  179. data/test/sass/templates/importee.less +2 -0
  180. data/test/sass/templates/importee.sass +19 -0
  181. data/test/sass/templates/line_numbers.sass +13 -0
  182. data/test/sass/templates/mixin_bork.sass +5 -0
  183. data/test/sass/templates/mixins.sass +76 -0
  184. data/test/sass/templates/multiline.sass +20 -0
  185. data/test/sass/templates/nested.sass +25 -0
  186. data/test/sass/templates/nested_bork1.sass +2 -0
  187. data/test/sass/templates/nested_bork2.sass +2 -0
  188. data/test/sass/templates/nested_bork3.sass +2 -0
  189. data/test/sass/templates/nested_bork4.sass +2 -0
  190. data/test/sass/templates/nested_import.sass +2 -0
  191. data/test/sass/templates/nested_mixin_bork.sass +6 -0
  192. data/test/sass/templates/options.sass +2 -0
  193. data/test/sass/templates/parent_ref.sass +25 -0
  194. data/test/sass/templates/same_name_different_ext.sass +2 -0
  195. data/test/sass/templates/same_name_different_ext.scss +1 -0
  196. data/test/sass/templates/same_name_different_partiality.scss +1 -0
  197. data/test/sass/templates/script.sass +101 -0
  198. data/test/sass/templates/scss_import.scss +12 -0
  199. data/test/sass/templates/scss_importee.scss +1 -0
  200. data/test/sass/templates/single_import_loop.sass +1 -0
  201. data/test/sass/templates/subdir/import_up1.scss +1 -0
  202. data/test/sass/templates/subdir/import_up2.scss +1 -0
  203. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  204. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  205. data/test/sass/templates/subdir/subdir.sass +6 -0
  206. data/test/sass/templates/units.sass +11 -0
  207. data/test/sass/templates/warn.sass +3 -0
  208. data/test/sass/templates/warn_imported.sass +4 -0
  209. data/test/sass/test_helper.rb +8 -0
  210. data/test/sass/util/multibyte_string_scanner_test.rb +147 -0
  211. data/test/sass/util/normalized_map_test.rb +51 -0
  212. data/test/sass/util/subset_map_test.rb +91 -0
  213. data/test/sass/util_test.rb +438 -0
  214. data/test/sass/value_helpers_test.rb +179 -0
  215. data/test/test_helper.rb +110 -0
  216. data/vendor/listen/CHANGELOG.md +1 -0
  217. data/vendor/listen/CONTRIBUTING.md +38 -0
  218. data/vendor/listen/Gemfile +20 -0
  219. data/vendor/listen/Guardfile +8 -0
  220. data/vendor/listen/LICENSE +20 -0
  221. data/vendor/listen/README.md +349 -0
  222. data/vendor/listen/Rakefile +5 -0
  223. data/vendor/listen/Vagrantfile +96 -0
  224. data/vendor/listen/lib/listen.rb +54 -0
  225. data/vendor/listen/lib/listen/adapter.rb +327 -0
  226. data/vendor/listen/lib/listen/adapters/bsd.rb +75 -0
  227. data/vendor/listen/lib/listen/adapters/darwin.rb +48 -0
  228. data/vendor/listen/lib/listen/adapters/linux.rb +81 -0
  229. data/vendor/listen/lib/listen/adapters/polling.rb +58 -0
  230. data/vendor/listen/lib/listen/adapters/windows.rb +91 -0
  231. data/vendor/listen/lib/listen/directory_record.rb +406 -0
  232. data/vendor/listen/lib/listen/listener.rb +323 -0
  233. data/vendor/listen/lib/listen/turnstile.rb +32 -0
  234. data/vendor/listen/lib/listen/version.rb +3 -0
  235. data/vendor/listen/listen.gemspec +28 -0
  236. data/vendor/listen/spec/listen/adapter_spec.rb +149 -0
  237. data/vendor/listen/spec/listen/adapters/bsd_spec.rb +36 -0
  238. data/vendor/listen/spec/listen/adapters/darwin_spec.rb +37 -0
  239. data/vendor/listen/spec/listen/adapters/linux_spec.rb +47 -0
  240. data/vendor/listen/spec/listen/adapters/polling_spec.rb +68 -0
  241. data/vendor/listen/spec/listen/adapters/windows_spec.rb +30 -0
  242. data/vendor/listen/spec/listen/directory_record_spec.rb +1250 -0
  243. data/vendor/listen/spec/listen/listener_spec.rb +258 -0
  244. data/vendor/listen/spec/listen/turnstile_spec.rb +56 -0
  245. data/vendor/listen/spec/listen_spec.rb +67 -0
  246. data/vendor/listen/spec/spec_helper.rb +25 -0
  247. data/vendor/listen/spec/support/adapter_helper.rb +666 -0
  248. data/vendor/listen/spec/support/directory_record_helper.rb +57 -0
  249. data/vendor/listen/spec/support/fixtures_helper.rb +29 -0
  250. data/vendor/listen/spec/support/listeners_helper.rb +179 -0
  251. data/vendor/listen/spec/support/platform_helper.rb +15 -0
  252. metadata +217 -76
  253. data/extra/sass-spec-ref.sh +0 -40
  254. data/lib/sass/deprecation.rb +0 -55
  255. data/lib/sass/logger/delayed.rb +0 -50
  256. data/lib/sass/script/value/callable.rb +0 -25
  257. data/lib/sass/script/value/function.rb +0 -19
@@ -0,0 +1,57 @@
1
+ # Prepares a record for the test and fetches changes
2
+ # afterwards.
3
+ #
4
+ # @param [String] root_path the path to watch
5
+ # @param [Hash] options
6
+ # @option options [Array<string>] :paths optional paths fetch changes for
7
+ # @option options [Boolean] :use_last_record allow the use of an already
8
+ # created record, handy for ordered tests.
9
+ #
10
+ # @return [Array, Array, Array] the changes
11
+ #
12
+ def changes(root_path, options = {})
13
+ unless @record || options[:use_last_record]
14
+ @record = Listen::DirectoryRecord.new(root_path)
15
+ @record.filter(options.delete(:filter)) if options[:filter]
16
+ @record.ignore(options.delete(:ignore)) if options[:ignore]
17
+
18
+ # Build the record after adding the filtering and ignoring patterns
19
+ @record.build
20
+ end
21
+
22
+ yield if block_given?
23
+
24
+ paths = options.delete(:paths) || [root_path]
25
+ options[:recursive] = true if options[:recursive].nil?
26
+
27
+ changes = @record.fetch_changes(paths, { :relative_paths => true }.merge(options))
28
+
29
+ [changes[:modified], changes[:added], changes[:removed]]
30
+ end
31
+
32
+ # Generates a small time difference before performing a time sensitive
33
+ # task (like comparing mtimes of files).
34
+ #
35
+ # @note Modification time for files only includes the milliseconds on Linux with MRI > 1.9.2
36
+ # and platform that support it (OS X 10.8 not included),
37
+ # that's why we generate a difference that's greater than 1 second.
38
+ #
39
+ def small_time_difference
40
+ t = Time.now
41
+ diff = t.to_f - t.to_i
42
+
43
+ sleep(1.05 - diff)
44
+ end
45
+
46
+ # Ensures that the test runs at almost the same second at which
47
+ # changes are being checked.
48
+ #
49
+ def ensure_same_second
50
+ t = Time.now
51
+ diff = t.to_f - t.to_i
52
+
53
+ # We are not at the end of a second
54
+ if diff >= (1 - Listen::Adapter::DEFAULT_LATENCY)
55
+ sleep(1.05 - diff)
56
+ end
57
+ end
@@ -0,0 +1,29 @@
1
+ require 'tmpdir'
2
+
3
+ include FileUtils
4
+
5
+ # Prepares temporary fixture-directories and
6
+ # cleans them afterwards.
7
+ #
8
+ # @param [Fixnum] number_of_directories the number of fixture-directories to make
9
+ #
10
+ # @yield [path1, path2, ...] the empty fixture-directories
11
+ # @yieldparam [String] path the path to a fixture directory
12
+ #
13
+ def fixtures(number_of_directories = 1)
14
+ current_pwd = pwd
15
+ paths = 1.upto(number_of_directories).map do
16
+ File.expand_path(File.join(pwd, "spec/.fixtures/#{Time.now.to_f.to_s.sub('.', '') + rand(9999).to_s}"))
17
+ end
18
+
19
+ # Create the dirs
20
+ paths.each { |p| mkdir_p(p) }
21
+
22
+ cd(paths.first) if number_of_directories == 1
23
+
24
+ yield(*paths)
25
+
26
+ ensure
27
+ cd current_pwd
28
+ paths.map { |p| rm_rf(p) if File.exists?(p) }
29
+ end
@@ -0,0 +1,179 @@
1
+ shared_examples_for 'a listener to changes on a file-system' do
2
+ describe '#start' do
3
+ before do
4
+ subject.stub(:initialize_adapter) { adapter }
5
+ end
6
+
7
+ it 'starts the adapter' do
8
+ adapter.should_receive(:start)
9
+ subject.start
10
+ end
11
+
12
+ context 'with the blocking deprecated param set to true' do
13
+ it 'displays a deprecation notice' do
14
+ Kernel.should_receive(:warn).with(/#{Listen::Listener::BLOCKING_PARAMETER_DEPRECATION_MESSAGE}/)
15
+ subject.start(true)
16
+ end
17
+ end
18
+
19
+ context 'with the blocking deprecated param set to false' do
20
+ it 'displays a deprecation notice' do
21
+ Kernel.should_receive(:warn).with(/#{Listen::Listener::BLOCKING_PARAMETER_DEPRECATION_MESSAGE}/)
22
+ subject.start(false)
23
+ end
24
+ end
25
+ end
26
+
27
+ describe '#start!' do
28
+ before do
29
+ subject.stub(:initialize_adapter) { adapter }
30
+ end
31
+
32
+ it 'starts the adapter' do
33
+ adapter.should_receive(:start!)
34
+ subject.start!
35
+ end
36
+
37
+ it 'passes the blocking param to the adapter' do
38
+ adapter.should_receive(:start!)
39
+ subject.start!
40
+ end
41
+ end
42
+
43
+ context 'with a started listener' do
44
+ before do
45
+ subject.start
46
+ end
47
+
48
+ describe '#stop' do
49
+ it "stops adapter" do
50
+ adapter.should_receive(:stop)
51
+ subject.stop
52
+ end
53
+ end
54
+
55
+ describe '#pause' do
56
+ it 'sets adapter.paused to true' do
57
+ adapter.should_receive(:pause)
58
+ subject.pause
59
+ end
60
+
61
+ it 'returns the same listener to allow chaining' do
62
+ subject.pause.should equal subject
63
+ end
64
+ end
65
+
66
+ describe '#unpause' do
67
+ it 'sets adapter.paused to false' do
68
+ adapter.should_receive(:unpause)
69
+ subject.unpause
70
+ end
71
+
72
+ it 'returns the same listener to allow chaining' do
73
+ subject.unpause.should equal subject
74
+ end
75
+ end
76
+
77
+ describe '#paused?' do
78
+ it 'returns false when there is no adapter' do
79
+ subject.instance_variable_set(:@adapter, nil)
80
+ subject.should_not be_paused
81
+ end
82
+
83
+ it 'returns true when adapter is paused' do
84
+ adapter.should_receive(:paused?) { true }
85
+ subject.should be_paused
86
+ end
87
+
88
+ it 'returns false when adapter is not paused' do
89
+ adapter.should_receive(:paused?) { false }
90
+ subject.should_not be_paused
91
+ end
92
+ end
93
+ end
94
+
95
+ describe '#change' do
96
+ it 'sets the callback block' do
97
+ callback = lambda { |modified, added, removed| }
98
+ subject.change(&callback)
99
+ subject.instance_variable_get(:@block).should eq callback
100
+ end
101
+
102
+ it 'returns the same listener to allow chaining' do
103
+ subject.change(&Proc.new{}).should equal subject
104
+ end
105
+ end
106
+
107
+ describe '#ignore' do
108
+ it 'returns the same listener to allow chaining' do
109
+ subject.ignore('some_directory').should equal subject
110
+ end
111
+ end
112
+
113
+ describe '#ignore!' do
114
+ it 'returns the same listener to allow chaining' do
115
+ subject.ignore!('some_directory').should equal subject
116
+ end
117
+ end
118
+
119
+ describe '#filter' do
120
+ it 'returns the same listener to allow chaining' do
121
+ subject.filter(/\.txt$/).should equal subject
122
+ end
123
+ end
124
+
125
+ describe '#filter!' do
126
+ it 'returns the same listener to allow chaining' do
127
+ subject.filter!(/\.txt$/).should equal subject
128
+ end
129
+ end
130
+
131
+ describe '#latency' do
132
+ it 'sets the latency to @adapter_options' do
133
+ subject.latency(0.7)
134
+ subject.instance_variable_get(:@adapter_options).should eq(:latency => 0.7)
135
+ end
136
+
137
+ it 'returns the same listener to allow chaining' do
138
+ subject.latency(0.7).should equal subject
139
+ end
140
+ end
141
+
142
+ describe '#force_polling' do
143
+ it 'sets force_polling to @adapter_options' do
144
+ subject.force_polling(false)
145
+ subject.instance_variable_get(:@adapter_options).should eq(:force_polling => false)
146
+ end
147
+
148
+ it 'returns the same listener to allow chaining' do
149
+ subject.force_polling(true).should equal subject
150
+ end
151
+ end
152
+
153
+ describe '#relative_paths' do
154
+ it 'sets the relative paths option for paths in the callback' do
155
+ subject.relative_paths(true)
156
+ subject.instance_variable_get(:@use_relative_paths).should be_true
157
+ end
158
+
159
+ it 'returns the same listener to allow chaining' do
160
+ subject.relative_paths(true).should equal subject
161
+ end
162
+ end
163
+
164
+ describe '#polling_fallback_message' do
165
+ it 'sets custom polling fallback message to @adapter_options' do
166
+ subject.polling_fallback_message('custom message')
167
+ subject.instance_variable_get(:@adapter_options).should eq(:polling_fallback_message => 'custom message')
168
+ end
169
+
170
+ it 'sets polling fallback message to false in @adapter_options' do
171
+ subject.polling_fallback_message(false)
172
+ subject.instance_variable_get(:@adapter_options).should eq(:polling_fallback_message => false)
173
+ end
174
+
175
+ it 'returns the same listener to allow chaining' do
176
+ subject.polling_fallback_message('custom message').should equal subject
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,15 @@
1
+ def mac?
2
+ RbConfig::CONFIG['target_os'] =~ /darwin/i
3
+ end
4
+
5
+ def linux?
6
+ RbConfig::CONFIG['target_os'] =~ /linux/i
7
+ end
8
+
9
+ def bsd?
10
+ RbConfig::CONFIG['target_os'] =~ /freebsd/i
11
+ end
12
+
13
+ def windows?
14
+ RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
15
+ end
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.7.4
4
+ version: 4.0.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -10,85 +10,54 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-04-04 00:00:00.000000000 Z
13
+ date: 2015-12-09 00:00:00.000000000 Z
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: sass-listen
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - "~>"
20
- - !ruby/object:Gem::Version
21
- version: 4.0.0
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "~>"
27
- - !ruby/object:Gem::Version
28
- version: 4.0.0
29
15
  - !ruby/object:Gem::Dependency
30
16
  name: yard
31
17
  requirement: !ruby/object:Gem::Requirement
32
18
  requirements:
33
- - - "~>"
34
- - !ruby/object:Gem::Version
35
- version: 0.8.7.6
36
- type: :development
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: 0.8.7.6
43
- - !ruby/object:Gem::Dependency
44
- name: redcarpet
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
19
+ - - ! '>='
48
20
  - !ruby/object:Gem::Version
49
- version: '3.3'
21
+ version: 0.5.3
50
22
  type: :development
51
23
  prerelease: false
52
24
  version_requirements: !ruby/object:Gem::Requirement
53
25
  requirements:
54
- - - "~>"
26
+ - - ! '>='
55
27
  - !ruby/object:Gem::Version
56
- version: '3.3'
28
+ version: 0.5.3
57
29
  - !ruby/object:Gem::Dependency
58
- name: nokogiri
30
+ name: maruku
59
31
  requirement: !ruby/object:Gem::Requirement
60
32
  requirements:
61
- - - "~>"
33
+ - - ! '>='
62
34
  - !ruby/object:Gem::Version
63
- version: 1.6.0
35
+ version: 0.5.9
64
36
  type: :development
65
37
  prerelease: false
66
38
  version_requirements: !ruby/object:Gem::Requirement
67
39
  requirements:
68
- - - "~>"
40
+ - - ! '>='
69
41
  - !ruby/object:Gem::Version
70
- version: 1.6.0
42
+ version: 0.5.9
71
43
  - !ruby/object:Gem::Dependency
72
44
  name: minitest
73
45
  requirement: !ruby/object:Gem::Requirement
74
46
  requirements:
75
- - - ">="
47
+ - - ! '>='
76
48
  - !ruby/object:Gem::Version
77
49
  version: '5'
78
50
  type: :development
79
51
  prerelease: false
80
52
  version_requirements: !ruby/object:Gem::Requirement
81
53
  requirements:
82
- - - ">="
54
+ - - ! '>='
83
55
  - !ruby/object:Gem::Version
84
56
  version: '5'
85
- description: |2
86
- Ruby Sass is deprecated! See https://sass-lang.com/ruby-sass for details.
87
-
88
- Sass makes CSS fun again. Sass is an extension of CSS, adding
89
- nested rules, variables, mixins, selector inheritance, and more.
90
- It's translated to well-formatted, standard CSS using the
91
- command line tool or a web-framework plugin.
57
+ description: ! " Sass makes CSS fun again. Sass is an extension of CSS, adding\n
58
+ \ nested rules, variables, mixins, selector inheritance, and more.\n It's
59
+ translated to well-formatted, standard CSS using the\n command line tool or
60
+ a web-framework plugin.\n"
92
61
  email: sass-lang@googlegroups.com
93
62
  executables:
94
63
  - sass
@@ -97,19 +66,19 @@ executables:
97
66
  extensions: []
98
67
  extra_rdoc_files: []
99
68
  files:
100
- - ".yardopts"
69
+ - .yardopts
101
70
  - CODE_OF_CONDUCT.md
102
71
  - CONTRIBUTING.md
103
72
  - MIT-LICENSE
104
73
  - README.md
105
74
  - REVISION
75
+ - Rakefile
106
76
  - VERSION
107
77
  - VERSION_DATE
108
78
  - VERSION_NAME
109
79
  - bin/sass
110
80
  - bin/sass-convert
111
81
  - bin/scss
112
- - extra/sass-spec-ref.sh
113
82
  - extra/update_watch.rb
114
83
  - init.rb
115
84
  - lib/sass.rb
@@ -121,7 +90,6 @@ files:
121
90
  - lib/sass/cache_stores/null.rb
122
91
  - lib/sass/callbacks.rb
123
92
  - lib/sass/css.rb
124
- - lib/sass/deprecation.rb
125
93
  - lib/sass/engine.rb
126
94
  - lib/sass/environment.rb
127
95
  - lib/sass/error.rb
@@ -136,7 +104,6 @@ files:
136
104
  - lib/sass/importers/filesystem.rb
137
105
  - lib/sass/logger.rb
138
106
  - lib/sass/logger/base.rb
139
- - lib/sass/logger/delayed.rb
140
107
  - lib/sass/logger/log_level.rb
141
108
  - lib/sass/media.rb
142
109
  - lib/sass/plugin.rb
@@ -172,9 +139,7 @@ files:
172
139
  - lib/sass/script/value/arg_list.rb
173
140
  - lib/sass/script/value/base.rb
174
141
  - lib/sass/script/value/bool.rb
175
- - lib/sass/script/value/callable.rb
176
142
  - lib/sass/script/value/color.rb
177
- - lib/sass/script/value/function.rb
178
143
  - lib/sass/script/value/helpers.rb
179
144
  - lib/sass/script/value/list.rb
180
145
  - lib/sass/script/value/map.rb
@@ -185,6 +150,8 @@ files:
185
150
  - lib/sass/scss/css_parser.rb
186
151
  - lib/sass/scss/parser.rb
187
152
  - lib/sass/scss/rx.rb
153
+ - lib/sass/scss/script_lexer.rb
154
+ - lib/sass/scss/script_parser.rb
188
155
  - lib/sass/scss/static_parser.rb
189
156
  - lib/sass/selector.rb
190
157
  - lib/sass/selector/abstract_sequence.rb
@@ -237,47 +204,221 @@ files:
237
204
  - lib/sass/tree/warn_node.rb
238
205
  - lib/sass/tree/while_node.rb
239
206
  - lib/sass/util.rb
207
+ - lib/sass/util/cross_platform_random.rb
240
208
  - lib/sass/util/multibyte_string_scanner.rb
241
209
  - lib/sass/util/normalized_map.rb
210
+ - lib/sass/util/ordered_hash.rb
242
211
  - lib/sass/util/subset_map.rb
243
212
  - lib/sass/util/test.rb
244
213
  - lib/sass/version.rb
245
214
  - rails/init.rb
246
- homepage: https://sass-lang.com/
215
+ - test/sass/cache_test.rb
216
+ - test/sass/callbacks_test.rb
217
+ - test/sass/compiler_test.rb
218
+ - test/sass/conversion_test.rb
219
+ - test/sass/css2sass_test.rb
220
+ - test/sass/data/hsl-rgb.txt
221
+ - test/sass/encoding_test.rb
222
+ - test/sass/engine_test.rb
223
+ - test/sass/exec_test.rb
224
+ - test/sass/extend_test.rb
225
+ - test/sass/fixtures/test_staleness_check_across_importers.css
226
+ - test/sass/fixtures/test_staleness_check_across_importers.scss
227
+ - test/sass/functions_test.rb
228
+ - test/sass/importer_test.rb
229
+ - test/sass/logger_test.rb
230
+ - test/sass/mock_importer.rb
231
+ - test/sass/more_results/more1.css
232
+ - test/sass/more_results/more1_with_line_comments.css
233
+ - test/sass/more_results/more_import.css
234
+ - test/sass/more_templates/_more_partial.sass
235
+ - test/sass/more_templates/more1.sass
236
+ - test/sass/more_templates/more_import.sass
237
+ - test/sass/plugin_test.rb
238
+ - test/sass/results/alt.css
239
+ - test/sass/results/basic.css
240
+ - test/sass/results/cached_import_option.css
241
+ - test/sass/results/compact.css
242
+ - test/sass/results/complex.css
243
+ - test/sass/results/compressed.css
244
+ - test/sass/results/expanded.css
245
+ - test/sass/results/filename_fn.css
246
+ - test/sass/results/if.css
247
+ - test/sass/results/import.css
248
+ - test/sass/results/import_charset.css
249
+ - test/sass/results/import_charset_1_8.css
250
+ - test/sass/results/import_charset_ibm866.css
251
+ - test/sass/results/import_content.css
252
+ - test/sass/results/line_numbers.css
253
+ - test/sass/results/mixins.css
254
+ - test/sass/results/multiline.css
255
+ - test/sass/results/nested.css
256
+ - test/sass/results/options.css
257
+ - test/sass/results/parent_ref.css
258
+ - test/sass/results/script.css
259
+ - test/sass/results/scss_import.css
260
+ - test/sass/results/scss_importee.css
261
+ - test/sass/results/subdir/nested_subdir/nested_subdir.css
262
+ - test/sass/results/subdir/subdir.css
263
+ - test/sass/results/units.css
264
+ - test/sass/results/warn.css
265
+ - test/sass/results/warn_imported.css
266
+ - test/sass/script_conversion_test.rb
267
+ - test/sass/script_test.rb
268
+ - test/sass/scss/css_test.rb
269
+ - test/sass/scss/rx_test.rb
270
+ - test/sass/scss/scss_test.rb
271
+ - test/sass/scss/test_helper.rb
272
+ - test/sass/source_map_test.rb
273
+ - test/sass/superselector_test.rb
274
+ - test/sass/templates/_cached_import_option_partial.scss
275
+ - test/sass/templates/_double_import_loop2.sass
276
+ - test/sass/templates/_filename_fn_import.scss
277
+ - test/sass/templates/_imported_charset_ibm866.sass
278
+ - test/sass/templates/_imported_charset_utf8.sass
279
+ - test/sass/templates/_imported_content.sass
280
+ - test/sass/templates/_partial.sass
281
+ - test/sass/templates/_same_name_different_partiality.scss
282
+ - test/sass/templates/alt.sass
283
+ - test/sass/templates/basic.sass
284
+ - test/sass/templates/bork1.sass
285
+ - test/sass/templates/bork2.sass
286
+ - test/sass/templates/bork3.sass
287
+ - test/sass/templates/bork4.sass
288
+ - test/sass/templates/bork5.sass
289
+ - test/sass/templates/cached_import_option.scss
290
+ - test/sass/templates/compact.sass
291
+ - test/sass/templates/complex.sass
292
+ - test/sass/templates/compressed.sass
293
+ - test/sass/templates/double_import_loop1.sass
294
+ - test/sass/templates/expanded.sass
295
+ - test/sass/templates/filename_fn.scss
296
+ - test/sass/templates/if.sass
297
+ - test/sass/templates/import.sass
298
+ - test/sass/templates/import_charset.sass
299
+ - test/sass/templates/import_charset_1_8.sass
300
+ - test/sass/templates/import_charset_ibm866.sass
301
+ - test/sass/templates/import_content.sass
302
+ - test/sass/templates/importee.less
303
+ - test/sass/templates/importee.sass
304
+ - test/sass/templates/line_numbers.sass
305
+ - test/sass/templates/mixin_bork.sass
306
+ - test/sass/templates/mixins.sass
307
+ - test/sass/templates/multiline.sass
308
+ - test/sass/templates/nested.sass
309
+ - test/sass/templates/nested_bork1.sass
310
+ - test/sass/templates/nested_bork2.sass
311
+ - test/sass/templates/nested_bork3.sass
312
+ - test/sass/templates/nested_bork4.sass
313
+ - test/sass/templates/nested_import.sass
314
+ - test/sass/templates/nested_mixin_bork.sass
315
+ - test/sass/templates/options.sass
316
+ - test/sass/templates/parent_ref.sass
317
+ - test/sass/templates/same_name_different_ext.sass
318
+ - test/sass/templates/same_name_different_ext.scss
319
+ - test/sass/templates/same_name_different_partiality.scss
320
+ - test/sass/templates/script.sass
321
+ - test/sass/templates/scss_import.scss
322
+ - test/sass/templates/scss_importee.scss
323
+ - test/sass/templates/single_import_loop.sass
324
+ - test/sass/templates/subdir/import_up1.scss
325
+ - test/sass/templates/subdir/import_up2.scss
326
+ - test/sass/templates/subdir/nested_subdir/_nested_partial.sass
327
+ - test/sass/templates/subdir/nested_subdir/nested_subdir.sass
328
+ - test/sass/templates/subdir/subdir.sass
329
+ - test/sass/templates/units.sass
330
+ - test/sass/templates/warn.sass
331
+ - test/sass/templates/warn_imported.sass
332
+ - test/sass/test_helper.rb
333
+ - test/sass/util/multibyte_string_scanner_test.rb
334
+ - test/sass/util/normalized_map_test.rb
335
+ - test/sass/util/subset_map_test.rb
336
+ - test/sass/util_test.rb
337
+ - test/sass/value_helpers_test.rb
338
+ - test/test_helper.rb
339
+ - vendor/listen/CHANGELOG.md
340
+ - vendor/listen/CONTRIBUTING.md
341
+ - vendor/listen/Gemfile
342
+ - vendor/listen/Guardfile
343
+ - vendor/listen/LICENSE
344
+ - vendor/listen/README.md
345
+ - vendor/listen/Rakefile
346
+ - vendor/listen/Vagrantfile
347
+ - vendor/listen/lib/listen.rb
348
+ - vendor/listen/lib/listen/adapter.rb
349
+ - vendor/listen/lib/listen/adapters/bsd.rb
350
+ - vendor/listen/lib/listen/adapters/darwin.rb
351
+ - vendor/listen/lib/listen/adapters/linux.rb
352
+ - vendor/listen/lib/listen/adapters/polling.rb
353
+ - vendor/listen/lib/listen/adapters/windows.rb
354
+ - vendor/listen/lib/listen/directory_record.rb
355
+ - vendor/listen/lib/listen/listener.rb
356
+ - vendor/listen/lib/listen/turnstile.rb
357
+ - vendor/listen/lib/listen/version.rb
358
+ - vendor/listen/listen.gemspec
359
+ - vendor/listen/spec/listen/adapter_spec.rb
360
+ - vendor/listen/spec/listen/adapters/bsd_spec.rb
361
+ - vendor/listen/spec/listen/adapters/darwin_spec.rb
362
+ - vendor/listen/spec/listen/adapters/linux_spec.rb
363
+ - vendor/listen/spec/listen/adapters/polling_spec.rb
364
+ - vendor/listen/spec/listen/adapters/windows_spec.rb
365
+ - vendor/listen/spec/listen/directory_record_spec.rb
366
+ - vendor/listen/spec/listen/listener_spec.rb
367
+ - vendor/listen/spec/listen/turnstile_spec.rb
368
+ - vendor/listen/spec/listen_spec.rb
369
+ - vendor/listen/spec/spec_helper.rb
370
+ - vendor/listen/spec/support/adapter_helper.rb
371
+ - vendor/listen/spec/support/directory_record_helper.rb
372
+ - vendor/listen/spec/support/fixtures_helper.rb
373
+ - vendor/listen/spec/support/listeners_helper.rb
374
+ - vendor/listen/spec/support/platform_helper.rb
375
+ homepage: http://sass-lang.com/
247
376
  licenses:
248
377
  - MIT
249
- metadata:
250
- source_code_uri: https://github.com/sass/ruby-sass
251
- post_install_message: |2+
252
-
253
- Ruby Sass has reached end-of-life and should no longer be used.
254
-
255
- * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
256
- primary implementation: https://sass-lang.com/install
257
-
258
- * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
259
- sassc gem: https://github.com/sass/sassc-ruby#readme
260
-
261
- * For more details, please refer to the Sass blog:
262
- https://sass-lang.com/blog/posts/7828841
263
-
378
+ metadata: {}
379
+ post_install_message:
264
380
  rdoc_options: []
265
381
  require_paths:
266
382
  - lib
267
383
  required_ruby_version: !ruby/object:Gem::Requirement
268
384
  requirements:
269
- - - ">="
385
+ - - ! '>='
270
386
  - !ruby/object:Gem::Version
271
- version: 2.0.0
387
+ version: 1.8.7
272
388
  required_rubygems_version: !ruby/object:Gem::Requirement
273
389
  requirements:
274
- - - ">="
390
+ - - ! '>'
275
391
  - !ruby/object:Gem::Version
276
- version: '0'
392
+ version: 1.3.1
277
393
  requirements: []
278
394
  rubyforge_project: sass
279
- rubygems_version: 2.6.14
395
+ rubygems_version: 2.4.3
280
396
  signing_key:
281
397
  specification_version: 4
282
398
  summary: A powerful but elegant CSS compiler that makes CSS fun again.
283
- test_files: []
399
+ test_files:
400
+ - test/sass/importer_test.rb
401
+ - test/sass/engine_test.rb
402
+ - test/sass/value_helpers_test.rb
403
+ - test/sass/superselector_test.rb
404
+ - test/sass/logger_test.rb
405
+ - test/sass/util_test.rb
406
+ - test/sass/cache_test.rb
407
+ - test/sass/encoding_test.rb
408
+ - test/sass/source_map_test.rb
409
+ - test/sass/css2sass_test.rb
410
+ - test/sass/plugin_test.rb
411
+ - test/sass/conversion_test.rb
412
+ - test/sass/util/subset_map_test.rb
413
+ - test/sass/util/multibyte_string_scanner_test.rb
414
+ - test/sass/util/normalized_map_test.rb
415
+ - test/sass/exec_test.rb
416
+ - test/sass/scss/rx_test.rb
417
+ - test/sass/scss/scss_test.rb
418
+ - test/sass/scss/css_test.rb
419
+ - test/sass/callbacks_test.rb
420
+ - test/sass/functions_test.rb
421
+ - test/sass/extend_test.rb
422
+ - test/sass/script_conversion_test.rb
423
+ - test/sass/script_test.rb
424
+ - test/sass/compiler_test.rb