sass 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +58 -50
- data/Rakefile +1 -4
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/VERSION_NAME +1 -1
- data/bin/sass +1 -1
- data/bin/scss +1 -1
- data/lib/sass/cache_stores/filesystem.rb +6 -2
- data/lib/sass/css.rb +1 -3
- data/lib/sass/engine.rb +37 -46
- data/lib/sass/environment.rb +13 -17
- data/lib/sass/error.rb +6 -9
- data/lib/sass/exec/base.rb +187 -0
- data/lib/sass/exec/sass_convert.rb +264 -0
- data/lib/sass/exec/sass_scss.rb +424 -0
- data/lib/sass/exec.rb +5 -771
- data/lib/sass/features.rb +7 -0
- data/lib/sass/importers/base.rb +7 -2
- data/lib/sass/importers/filesystem.rb +9 -25
- data/lib/sass/importers.rb +0 -1
- data/lib/sass/media.rb +1 -4
- data/lib/sass/plugin/compiler.rb +200 -83
- data/lib/sass/plugin/staleness_checker.rb +1 -1
- data/lib/sass/plugin.rb +3 -3
- data/lib/sass/script/css_lexer.rb +1 -1
- data/lib/sass/script/functions.rb +622 -268
- data/lib/sass/script/lexer.rb +99 -34
- data/lib/sass/script/parser.rb +24 -23
- data/lib/sass/script/tree/funcall.rb +1 -1
- data/lib/sass/script/tree/interpolation.rb +20 -2
- data/lib/sass/script/tree/selector.rb +26 -0
- data/lib/sass/script/tree/string_interpolation.rb +1 -1
- data/lib/sass/script/tree.rb +1 -0
- data/lib/sass/script/value/base.rb +7 -5
- data/lib/sass/script/value/bool.rb +0 -5
- data/lib/sass/script/value/color.rb +39 -21
- data/lib/sass/script/value/helpers.rb +107 -0
- data/lib/sass/script/value/list.rb +0 -15
- data/lib/sass/script/value/null.rb +0 -5
- data/lib/sass/script/value/number.rb +62 -14
- data/lib/sass/script/value/string.rb +59 -11
- data/lib/sass/script/value.rb +0 -1
- data/lib/sass/scss/css_parser.rb +8 -2
- data/lib/sass/scss/parser.rb +190 -328
- data/lib/sass/scss/rx.rb +15 -6
- data/lib/sass/scss/static_parser.rb +298 -1
- data/lib/sass/selector/abstract_sequence.rb +28 -13
- data/lib/sass/selector/comma_sequence.rb +92 -13
- data/lib/sass/selector/pseudo.rb +256 -0
- data/lib/sass/selector/sequence.rb +94 -24
- data/lib/sass/selector/simple.rb +14 -25
- data/lib/sass/selector/simple_sequence.rb +97 -33
- data/lib/sass/selector.rb +57 -194
- data/lib/sass/shared.rb +1 -1
- data/lib/sass/source/map.rb +26 -12
- data/lib/sass/stack.rb +0 -6
- data/lib/sass/supports.rb +2 -3
- data/lib/sass/tree/at_root_node.rb +1 -0
- data/lib/sass/tree/charset_node.rb +1 -1
- data/lib/sass/tree/directive_node.rb +8 -2
- data/lib/sass/tree/error_node.rb +18 -0
- data/lib/sass/tree/extend_node.rb +1 -1
- data/lib/sass/tree/function_node.rb +4 -0
- data/lib/sass/tree/keyframe_rule_node.rb +15 -0
- data/lib/sass/tree/prop_node.rb +1 -1
- data/lib/sass/tree/rule_node.rb +12 -7
- data/lib/sass/tree/visitors/check_nesting.rb +38 -10
- data/lib/sass/tree/visitors/convert.rb +16 -18
- data/lib/sass/tree/visitors/cssize.rb +29 -29
- data/lib/sass/tree/visitors/deep_copy.rb +5 -0
- data/lib/sass/tree/visitors/perform.rb +45 -33
- data/lib/sass/tree/visitors/set_options.rb +14 -0
- data/lib/sass/tree/visitors/to_css.rb +15 -14
- data/lib/sass/util/subset_map.rb +1 -1
- data/lib/sass/util.rb +222 -99
- data/lib/sass/version.rb +5 -5
- data/lib/sass.rb +0 -5
- data/test/sass/cache_test.rb +62 -20
- data/test/sass/callbacks_test.rb +1 -1
- data/test/sass/compiler_test.rb +19 -10
- data/test/sass/conversion_test.rb +58 -1
- data/test/sass/css2sass_test.rb +23 -4
- data/test/sass/encoding_test.rb +219 -0
- data/test/sass/engine_test.rb +136 -199
- data/test/sass/exec_test.rb +2 -2
- data/test/sass/extend_test.rb +236 -19
- data/test/sass/functions_test.rb +295 -253
- data/test/sass/importer_test.rb +31 -21
- data/test/sass/logger_test.rb +1 -1
- data/test/sass/more_results/more_import.css +1 -1
- data/test/sass/plugin_test.rb +14 -13
- data/test/sass/results/compact.css +1 -1
- data/test/sass/results/complex.css +4 -4
- data/test/sass/results/expanded.css +1 -1
- data/test/sass/results/import.css +1 -1
- data/test/sass/results/import_charset_ibm866.css +2 -2
- data/test/sass/results/mixins.css +17 -17
- data/test/sass/results/nested.css +1 -1
- data/test/sass/results/parent_ref.css +2 -2
- data/test/sass/results/script.css +3 -3
- data/test/sass/results/scss_import.css +1 -1
- data/test/sass/script_conversion_test.rb +10 -7
- data/test/sass/script_test.rb +288 -74
- data/test/sass/scss/css_test.rb +141 -24
- data/test/sass/scss/rx_test.rb +4 -4
- data/test/sass/scss/scss_test.rb +457 -18
- data/test/sass/source_map_test.rb +115 -25
- data/test/sass/superselector_test.rb +191 -0
- data/test/sass/templates/scss_import.scss +2 -1
- data/test/sass/test_helper.rb +1 -1
- data/test/sass/util/multibyte_string_scanner_test.rb +1 -1
- data/test/sass/util/normalized_map_test.rb +1 -1
- data/test/sass/util/subset_map_test.rb +2 -2
- data/test/sass/util_test.rb +31 -1
- data/test/sass/value_helpers_test.rb +5 -7
- data/test/test_helper.rb +2 -2
- data/vendor/listen/CHANGELOG.md +1 -228
- data/vendor/listen/Gemfile +5 -15
- data/vendor/listen/README.md +111 -77
- data/vendor/listen/Rakefile +0 -42
- data/vendor/listen/lib/listen/adapter.rb +195 -82
- data/vendor/listen/lib/listen/adapters/bsd.rb +27 -64
- data/vendor/listen/lib/listen/adapters/darwin.rb +21 -58
- data/vendor/listen/lib/listen/adapters/linux.rb +23 -55
- data/vendor/listen/lib/listen/adapters/polling.rb +25 -34
- data/vendor/listen/lib/listen/adapters/windows.rb +50 -46
- data/vendor/listen/lib/listen/directory_record.rb +96 -61
- data/vendor/listen/lib/listen/listener.rb +135 -37
- data/vendor/listen/lib/listen/turnstile.rb +9 -5
- data/vendor/listen/lib/listen/version.rb +1 -1
- data/vendor/listen/lib/listen.rb +33 -19
- data/vendor/listen/listen.gemspec +6 -0
- data/vendor/listen/spec/listen/adapter_spec.rb +43 -77
- data/vendor/listen/spec/listen/adapters/polling_spec.rb +8 -8
- data/vendor/listen/spec/listen/directory_record_spec.rb +81 -56
- data/vendor/listen/spec/listen/listener_spec.rb +128 -39
- data/vendor/listen/spec/listen_spec.rb +15 -21
- data/vendor/listen/spec/spec_helper.rb +4 -0
- data/vendor/listen/spec/support/adapter_helper.rb +52 -15
- data/vendor/listen/spec/support/directory_record_helper.rb +7 -5
- data/vendor/listen/spec/support/listeners_helper.rb +30 -7
- metadata +25 -22
- data/ext/mkrf_conf.rb +0 -27
- data/lib/sass/importers/deprecated_path.rb +0 -51
- data/lib/sass/script/value/deprecated_false.rb +0 -55
- data/vendor/listen/lib/listen/dependency_manager.rb +0 -126
- data/vendor/listen/lib/listen/multi_listener.rb +0 -143
- data/vendor/listen/spec/listen/dependency_manager_spec.rb +0 -107
- data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -174
@@ -4,13 +4,24 @@
|
|
4
4
|
# @param [String] path the path to watch
|
5
5
|
#
|
6
6
|
def watch(listener, expected_changes, *paths)
|
7
|
-
|
8
|
-
|
7
|
+
sleep 0.05 # allow file/creation to be done (!)
|
8
|
+
|
9
|
+
callback = lambda do |changed_directories, options|
|
10
|
+
@called = true
|
11
|
+
listener.on_change(changed_directories)
|
12
|
+
end
|
13
|
+
@adapter = Listen::Adapter.select_and_initialize(paths, { :latency => test_latency }, &callback)
|
14
|
+
@adapter.stub(:start_poller) { nil }
|
9
15
|
|
10
16
|
forced_stop = false
|
11
|
-
prevent_deadlock =
|
17
|
+
prevent_deadlock = lambda do
|
18
|
+
sleep(10)
|
19
|
+
puts 'Forcing stop'
|
20
|
+
@adapter.stop
|
21
|
+
forced_stop = true
|
22
|
+
end
|
12
23
|
|
13
|
-
@adapter.start
|
24
|
+
@adapter.start
|
14
25
|
|
15
26
|
yield
|
16
27
|
|
@@ -32,25 +43,51 @@ shared_examples_for 'a filesystem adapter' do
|
|
32
43
|
subject { described_class.new(File.dirname(__FILE__), &Proc.new {}) }
|
33
44
|
|
34
45
|
describe '#start' do
|
46
|
+
before { Kernel.stub(:warn) }
|
35
47
|
after { subject.stop }
|
36
48
|
|
37
|
-
|
38
|
-
|
49
|
+
it 'do not block the current thread after starting the workers' do
|
50
|
+
@called = false
|
51
|
+
t = Thread.new { subject.start; @called = true }
|
52
|
+
sleep(test_latency * 3)
|
53
|
+
Thread.kill(t) if t
|
54
|
+
@called.should be_true
|
55
|
+
end
|
56
|
+
|
57
|
+
context 'with the blocking hash option set to false' do
|
58
|
+
subject { described_class.new(File.dirname(__FILE__), { :blocking => false }, &Proc.new {}) }
|
59
|
+
|
60
|
+
it 'does not block the current thread after starting the workers' do
|
39
61
|
@called = false
|
40
|
-
t = Thread.new { subject.start
|
62
|
+
t = Thread.new { subject.start; @called = true }
|
41
63
|
sleep(test_latency * 3)
|
42
64
|
Thread.kill(t) if t
|
43
|
-
@called.should
|
65
|
+
@called.should be_true
|
44
66
|
end
|
45
67
|
end
|
68
|
+
end
|
46
69
|
|
47
|
-
|
48
|
-
|
70
|
+
describe '#start!' do
|
71
|
+
before { Kernel.stub(:warn) }
|
72
|
+
after { subject.stop }
|
73
|
+
|
74
|
+
it 'blocks the current thread after starting the workers' do
|
75
|
+
@called = false
|
76
|
+
t = Thread.new { subject.start!; @called = true }
|
77
|
+
sleep(test_latency * 3)
|
78
|
+
Thread.kill(t) if t
|
79
|
+
@called.should be_false
|
80
|
+
end
|
81
|
+
|
82
|
+
context 'with the blocking hash option set to false' do
|
83
|
+
subject { described_class.new(File.dirname(__FILE__), { :blocking => true }, &Proc.new {}) }
|
84
|
+
|
85
|
+
it 'blocks the current thread after starting the workers' do
|
49
86
|
@called = false
|
50
|
-
t = Thread.new { subject.start
|
87
|
+
t = Thread.new { subject.start!; @called = true }
|
51
88
|
sleep(test_latency * 3)
|
52
89
|
Thread.kill(t) if t
|
53
|
-
@called.should
|
90
|
+
@called.should be_false
|
54
91
|
end
|
55
92
|
end
|
56
93
|
end
|
@@ -63,7 +100,7 @@ shared_examples_for 'a filesystem adapter' do
|
|
63
100
|
end
|
64
101
|
|
65
102
|
context 'with a stopped adapter' do
|
66
|
-
before { subject.start
|
103
|
+
before { subject.start; subject.stop }
|
67
104
|
|
68
105
|
it 'returns false' do
|
69
106
|
subject.should_not be_started
|
@@ -71,7 +108,7 @@ shared_examples_for 'a filesystem adapter' do
|
|
71
108
|
end
|
72
109
|
|
73
110
|
context 'with a started adapter' do
|
74
|
-
before { subject.start
|
111
|
+
before { subject.start }
|
75
112
|
after { subject.stop }
|
76
113
|
|
77
114
|
it 'returns true' do
|
@@ -83,7 +120,7 @@ end
|
|
83
120
|
|
84
121
|
shared_examples_for 'an adapter that call properly listener#on_change' do |*args|
|
85
122
|
options = (args.first && args.first.is_a?(Hash)) ? args.first : {}
|
86
|
-
let(:listener) {
|
123
|
+
let(:listener) { double(Listen::Listener) }
|
87
124
|
before { described_class.stub(:works?) { true } }
|
88
125
|
|
89
126
|
context 'single file operations' do
|
@@ -24,7 +24,7 @@ def changes(root_path, options = {})
|
|
24
24
|
paths = options.delete(:paths) || [root_path]
|
25
25
|
options[:recursive] = true if options[:recursive].nil?
|
26
26
|
|
27
|
-
changes = @record.fetch_changes(paths, {:relative_paths => true}.merge(options))
|
27
|
+
changes = @record.fetch_changes(paths, { :relative_paths => true }.merge(options))
|
28
28
|
|
29
29
|
[changes[:modified], changes[:added], changes[:removed]]
|
30
30
|
end
|
@@ -32,14 +32,15 @@ end
|
|
32
32
|
# Generates a small time difference before performing a time sensitive
|
33
33
|
# task (like comparing mtimes of files).
|
34
34
|
#
|
35
|
-
# @note Modification time for files only includes the milliseconds on Linux with MRI > 1.9.2
|
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),
|
36
37
|
# that's why we generate a difference that's greater than 1 second.
|
37
38
|
#
|
38
39
|
def small_time_difference
|
39
40
|
t = Time.now
|
40
41
|
diff = t.to_f - t.to_i
|
41
42
|
|
42
|
-
sleep(
|
43
|
+
sleep(1.05 - diff)
|
43
44
|
end
|
44
45
|
|
45
46
|
# Ensures that the test runs at almost the same second at which
|
@@ -49,7 +50,8 @@ def ensure_same_second
|
|
49
50
|
t = Time.now
|
50
51
|
diff = t.to_f - t.to_i
|
51
52
|
|
52
|
-
|
53
|
-
|
53
|
+
# We are not at the end of a second
|
54
|
+
if diff >= (1 - Listen::Adapter::DEFAULT_LATENCY)
|
55
|
+
sleep(1.05 - diff)
|
54
56
|
end
|
55
57
|
end
|
@@ -9,14 +9,37 @@ shared_examples_for 'a listener to changes on a file-system' do
|
|
9
9
|
subject.start
|
10
10
|
end
|
11
11
|
|
12
|
-
context 'with the blocking param set to
|
13
|
-
it '
|
14
|
-
|
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}/)
|
15
22
|
subject.start(false)
|
16
23
|
end
|
17
24
|
end
|
18
25
|
end
|
19
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
|
+
|
20
43
|
context 'with a started listener' do
|
21
44
|
before do
|
22
45
|
subject.start
|
@@ -31,7 +54,7 @@ shared_examples_for 'a listener to changes on a file-system' do
|
|
31
54
|
|
32
55
|
describe '#pause' do
|
33
56
|
it 'sets adapter.paused to true' do
|
34
|
-
adapter.should_receive(:
|
57
|
+
adapter.should_receive(:pause)
|
35
58
|
subject.pause
|
36
59
|
end
|
37
60
|
|
@@ -42,7 +65,7 @@ shared_examples_for 'a listener to changes on a file-system' do
|
|
42
65
|
|
43
66
|
describe '#unpause' do
|
44
67
|
it 'sets adapter.paused to false' do
|
45
|
-
adapter.should_receive(:
|
68
|
+
adapter.should_receive(:unpause)
|
46
69
|
subject.unpause
|
47
70
|
end
|
48
71
|
|
@@ -58,12 +81,12 @@ shared_examples_for 'a listener to changes on a file-system' do
|
|
58
81
|
end
|
59
82
|
|
60
83
|
it 'returns true when adapter is paused' do
|
61
|
-
adapter.should_receive(:paused) { true }
|
84
|
+
adapter.should_receive(:paused?) { true }
|
62
85
|
subject.should be_paused
|
63
86
|
end
|
64
87
|
|
65
88
|
it 'returns false when adapter is not paused' do
|
66
|
-
adapter.should_receive(:paused) { false }
|
89
|
+
adapter.should_receive(:paused?) { false }
|
67
90
|
subject.should_not be_paused
|
68
91
|
end
|
69
92
|
end
|
metadata
CHANGED
@@ -1,59 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Natalie Weizenbaum
|
8
8
|
- Chris Eppstein
|
9
9
|
- Hampton Catlin
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: yard
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
19
|
- - '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
type: :
|
21
|
+
version: 0.5.3
|
22
|
+
type: :development
|
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:
|
28
|
+
version: 0.5.3
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
|
-
name:
|
30
|
+
name: maruku
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '>='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.5.
|
35
|
+
version: 0.5.9
|
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: 0.5.
|
42
|
+
version: 0.5.9
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
|
-
name:
|
44
|
+
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: '5'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '>='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: '5'
|
57
57
|
description: |2
|
58
58
|
Sass makes CSS fun again. Sass is an extension of CSS3, adding
|
59
59
|
nested rules, variables, mixins, selector inheritance, and more.
|
@@ -64,8 +64,7 @@ executables:
|
|
64
64
|
- sass
|
65
65
|
- sass-convert
|
66
66
|
- scss
|
67
|
-
extensions:
|
68
|
-
- ext/mkrf_conf.rb
|
67
|
+
extensions: []
|
69
68
|
extra_rdoc_files: []
|
70
69
|
files:
|
71
70
|
- rails/init.rb
|
@@ -94,6 +93,7 @@ files:
|
|
94
93
|
- lib/sass/tree/trace_node.rb
|
95
94
|
- lib/sass/tree/return_node.rb
|
96
95
|
- lib/sass/tree/root_node.rb
|
96
|
+
- lib/sass/tree/keyframe_rule_node.rb
|
97
97
|
- lib/sass/tree/if_node.rb
|
98
98
|
- lib/sass/tree/charset_node.rb
|
99
99
|
- lib/sass/tree/css_import_node.rb
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/sass/tree/at_root_node.rb
|
108
108
|
- lib/sass/tree/node.rb
|
109
109
|
- lib/sass/tree/mixin_node.rb
|
110
|
+
- lib/sass/tree/error_node.rb
|
110
111
|
- lib/sass/tree/extend_node.rb
|
111
112
|
- lib/sass/tree/mixin_def_node.rb
|
112
113
|
- lib/sass/tree/supports_node.rb
|
@@ -126,6 +127,9 @@ files:
|
|
126
127
|
- lib/sass/tree/prop_node.rb
|
127
128
|
- lib/sass/tree/variable_node.rb
|
128
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
|
129
133
|
- lib/sass/plugin.rb
|
130
134
|
- lib/sass/root.rb
|
131
135
|
- lib/sass/features.rb
|
@@ -153,7 +157,6 @@ files:
|
|
153
157
|
- lib/sass/script.rb
|
154
158
|
- lib/sass/util.rb
|
155
159
|
- lib/sass/importers/filesystem.rb
|
156
|
-
- lib/sass/importers/deprecated_path.rb
|
157
160
|
- lib/sass/importers/base.rb
|
158
161
|
- lib/sass/script/parser.rb
|
159
162
|
- lib/sass/script/functions.rb
|
@@ -166,6 +169,7 @@ files:
|
|
166
169
|
- lib/sass/script/tree/list_literal.rb
|
167
170
|
- lib/sass/script/tree/node.rb
|
168
171
|
- lib/sass/script/tree/unary_operation.rb
|
172
|
+
- lib/sass/script/tree/selector.rb
|
169
173
|
- lib/sass/script/tree/map_literal.rb
|
170
174
|
- lib/sass/script/tree.rb
|
171
175
|
- lib/sass/script/lexer.rb
|
@@ -174,7 +178,6 @@ files:
|
|
174
178
|
- lib/sass/script/value/color.rb
|
175
179
|
- lib/sass/script/value/number.rb
|
176
180
|
- lib/sass/script/value/map.rb
|
177
|
-
- lib/sass/script/value/deprecated_false.rb
|
178
181
|
- lib/sass/script/value/arg_list.rb
|
179
182
|
- lib/sass/script/value/bool.rb
|
180
183
|
- lib/sass/script/value/list.rb
|
@@ -186,6 +189,7 @@ files:
|
|
186
189
|
- lib/sass/selector.rb
|
187
190
|
- lib/sass/callbacks.rb
|
188
191
|
- lib/sass/selector/simple.rb
|
192
|
+
- lib/sass/selector/pseudo.rb
|
189
193
|
- lib/sass/selector/sequence.rb
|
190
194
|
- lib/sass/selector/abstract_sequence.rb
|
191
195
|
- lib/sass/selector/comma_sequence.rb
|
@@ -200,8 +204,6 @@ files:
|
|
200
204
|
- vendor/listen/lib/listen/turnstile.rb
|
201
205
|
- vendor/listen/lib/listen/directory_record.rb
|
202
206
|
- vendor/listen/lib/listen/version.rb
|
203
|
-
- vendor/listen/lib/listen/dependency_manager.rb
|
204
|
-
- vendor/listen/lib/listen/multi_listener.rb
|
205
207
|
- vendor/listen/lib/listen/listener.rb
|
206
208
|
- vendor/listen/lib/listen/adapters/polling.rb
|
207
209
|
- vendor/listen/lib/listen/adapters/darwin.rb
|
@@ -215,7 +217,6 @@ files:
|
|
215
217
|
- vendor/listen/LICENSE
|
216
218
|
- vendor/listen/listen.gemspec
|
217
219
|
- vendor/listen/Vagrantfile
|
218
|
-
- vendor/listen/spec/listen/dependency_manager_spec.rb
|
219
220
|
- vendor/listen/spec/listen/directory_record_spec.rb
|
220
221
|
- vendor/listen/spec/listen/adapters/linux_spec.rb
|
221
222
|
- vendor/listen/spec/listen/adapters/darwin_spec.rb
|
@@ -225,7 +226,6 @@ files:
|
|
225
226
|
- vendor/listen/spec/listen/turnstile_spec.rb
|
226
227
|
- vendor/listen/spec/listen/adapter_spec.rb
|
227
228
|
- vendor/listen/spec/listen/listener_spec.rb
|
228
|
-
- vendor/listen/spec/listen/multi_listener_spec.rb
|
229
229
|
- vendor/listen/spec/listen_spec.rb
|
230
230
|
- vendor/listen/spec/spec_helper.rb
|
231
231
|
- vendor/listen/spec/support/directory_record_helper.rb
|
@@ -351,6 +351,8 @@ files:
|
|
351
351
|
- test/sass/more_templates/more_import.sass
|
352
352
|
- test/sass/more_templates/more1.sass
|
353
353
|
- test/sass/script_conversion_test.rb
|
354
|
+
- test/sass/superselector_test.rb
|
355
|
+
- test/sass/encoding_test.rb
|
354
356
|
- test/sass/more_results/more1.css
|
355
357
|
- test/sass/more_results/more1_with_line_comments.css
|
356
358
|
- test/sass/more_results/more_import.css
|
@@ -369,7 +371,6 @@ files:
|
|
369
371
|
- MIT-LICENSE
|
370
372
|
- VERSION
|
371
373
|
- CONTRIBUTING
|
372
|
-
- ext/mkrf_conf.rb
|
373
374
|
homepage: http://sass-lang.com/
|
374
375
|
licenses:
|
375
376
|
- MIT
|
@@ -415,6 +416,8 @@ test_files:
|
|
415
416
|
- test/sass/scss/rx_test.rb
|
416
417
|
- test/sass/util_test.rb
|
417
418
|
- test/sass/script_conversion_test.rb
|
419
|
+
- test/sass/superselector_test.rb
|
420
|
+
- test/sass/encoding_test.rb
|
418
421
|
- test/sass/cache_test.rb
|
419
422
|
- test/sass/source_map_test.rb
|
420
423
|
- test/sass/plugin_test.rb
|
data/ext/mkrf_conf.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/command.rb'
|
3
|
-
require 'rubygems/dependency_installer.rb'
|
4
|
-
|
5
|
-
require '../lib/sass'
|
6
|
-
|
7
|
-
# This script installs the correct version of listen. Listen versions
|
8
|
-
# beyond 1.1 don't support Ruby 1.8, any RubyGems isn't clever enough
|
9
|
-
# to install the most recent version that works, so we have to do it
|
10
|
-
# manually.
|
11
|
-
|
12
|
-
puts "Ensuring you have the right version of listen installed."
|
13
|
-
|
14
|
-
Gem::Command.build_args = ARGV
|
15
|
-
inst = Gem::DependencyInstaller.new
|
16
|
-
if Sass::Util.version_geq(RUBY_VERSION, "1.9.3")
|
17
|
-
puts "Installing listen >= 1.1.0, < 3.0.0"
|
18
|
-
inst.install "listen", Gem::Requirement.new(">= 1.1.0", "< 3.0.0")
|
19
|
-
else
|
20
|
-
puts "Installing listen ~> 1.1.0"
|
21
|
-
inst.install "listen", "~> 1.1.0"
|
22
|
-
end
|
23
|
-
|
24
|
-
# Create a dummy rakefile to indicate success.
|
25
|
-
f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w")
|
26
|
-
f.write("task :default\n")
|
27
|
-
f.close
|
@@ -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 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
|
@@ -1,126 +0,0 @@
|
|
1
|
-
require 'set'
|
2
|
-
|
3
|
-
module Listen
|
4
|
-
|
5
|
-
# The dependency-manager offers a simple DSL which allows
|
6
|
-
# classes to declare their gem dependencies and load them when
|
7
|
-
# needed.
|
8
|
-
# It raises a user-friendly exception when the dependencies
|
9
|
-
# can't be loaded which has the install command in the message.
|
10
|
-
#
|
11
|
-
module DependencyManager
|
12
|
-
|
13
|
-
GEM_LOAD_MESSAGE = <<-EOS.gsub(/^ {6}/, '')
|
14
|
-
Missing dependency '%s' (version '%s')!
|
15
|
-
EOS
|
16
|
-
|
17
|
-
GEM_INSTALL_COMMAND = <<-EOS.gsub(/^ {6}/, '')
|
18
|
-
Please run the following to satisfy the dependency:
|
19
|
-
gem install --version '%s' %s
|
20
|
-
EOS
|
21
|
-
|
22
|
-
BUNDLER_DECLARE_GEM = <<-EOS.gsub(/^ {6}/, '')
|
23
|
-
Please add the following to your Gemfile to satisfy the dependency:
|
24
|
-
gem '%s', '%s'
|
25
|
-
EOS
|
26
|
-
|
27
|
-
Dependency = Struct.new(:name, :version)
|
28
|
-
|
29
|
-
# The error raised when a dependency can't be loaded.
|
30
|
-
class Error < StandardError; end
|
31
|
-
|
32
|
-
# A list of all loaded dependencies in the dependency manager.
|
33
|
-
@_loaded_dependencies = Set.new
|
34
|
-
|
35
|
-
# class methods
|
36
|
-
class << self
|
37
|
-
|
38
|
-
# Initializes the extended class.
|
39
|
-
#
|
40
|
-
# @param [Class] the class for which some dependencies must be managed
|
41
|
-
#
|
42
|
-
def extended(base)
|
43
|
-
base.class_eval do
|
44
|
-
@_dependencies = Set.new
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Adds a loaded dependency to a list so that it doesn't have
|
49
|
-
# to be loaded again by another classes.
|
50
|
-
#
|
51
|
-
# @param [Dependency] dependency
|
52
|
-
#
|
53
|
-
def add_loaded(dependency)
|
54
|
-
@_loaded_dependencies << dependency
|
55
|
-
end
|
56
|
-
|
57
|
-
# Returns whether the dependency is alread loaded or not.
|
58
|
-
#
|
59
|
-
# @param [Dependency] dependency
|
60
|
-
# @return [Boolean]
|
61
|
-
#
|
62
|
-
def already_loaded?(dependency)
|
63
|
-
@_loaded_dependencies.include?(dependency)
|
64
|
-
end
|
65
|
-
|
66
|
-
# Clears the list of loaded dependencies.
|
67
|
-
#
|
68
|
-
def clear_loaded
|
69
|
-
@_loaded_dependencies.clear
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# Registers a new dependency.
|
74
|
-
#
|
75
|
-
# @param [String] name the name of the gem
|
76
|
-
# @param [String] version the version of the gem
|
77
|
-
#
|
78
|
-
def dependency(name, version)
|
79
|
-
@_dependencies << Dependency.new(name, version)
|
80
|
-
end
|
81
|
-
|
82
|
-
# Loads the registered dependencies.
|
83
|
-
#
|
84
|
-
# @raise DependencyManager::Error if the dependency can't be loaded.
|
85
|
-
#
|
86
|
-
def load_depenencies
|
87
|
-
@_dependencies.each do |dependency|
|
88
|
-
begin
|
89
|
-
next if DependencyManager.already_loaded?(dependency)
|
90
|
-
gem(dependency.name, dependency.version)
|
91
|
-
require(dependency.name)
|
92
|
-
DependencyManager.add_loaded(dependency)
|
93
|
-
@_dependencies.delete(dependency)
|
94
|
-
rescue Gem::LoadError
|
95
|
-
args = [dependency.name, dependency.version]
|
96
|
-
command = if running_under_bundler?
|
97
|
-
BUNDLER_DECLARE_GEM % args
|
98
|
-
else
|
99
|
-
GEM_INSTALL_COMMAND % args.reverse
|
100
|
-
end
|
101
|
-
message = GEM_LOAD_MESSAGE % args
|
102
|
-
|
103
|
-
raise Error.new(message + command)
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# Returns whether all the dependencies has been loaded or not.
|
109
|
-
#
|
110
|
-
# @return [Boolean]
|
111
|
-
#
|
112
|
-
def dependencies_loaded?
|
113
|
-
@_dependencies.empty?
|
114
|
-
end
|
115
|
-
|
116
|
-
private
|
117
|
-
|
118
|
-
# Returns whether we are running under bundler or not
|
119
|
-
#
|
120
|
-
# @return [Boolean]
|
121
|
-
#
|
122
|
-
def running_under_bundler?
|
123
|
-
!!(File.exists?('Gemfile') && ENV['BUNDLE_GEMFILE'])
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|