sass 3.3.0.rc.3 → 3.3.0.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/ext/mkrf_conf.rb +9 -5
- data/lib/sass/plugin/compiler.rb +1 -0
- data/lib/sass/script/parser.rb +1 -1
- data/lib/sass/script/value/list.rb +13 -4
- data/lib/sass/selector/sequence.rb +1 -1
- data/test/sass/functions_test.rb +4 -0
- data/test/sass/scss/scss_test.rb +18 -0
- metadata +231 -270
- data/vendor/listen/CHANGELOG.md +0 -228
- data/vendor/listen/CONTRIBUTING.md +0 -38
- data/vendor/listen/Gemfile +0 -30
- data/vendor/listen/Guardfile +0 -8
- data/vendor/listen/LICENSE +0 -20
- data/vendor/listen/README.md +0 -315
- data/vendor/listen/Rakefile +0 -47
- data/vendor/listen/Vagrantfile +0 -96
- data/vendor/listen/lib/listen.rb +0 -40
- data/vendor/listen/lib/listen/adapter.rb +0 -214
- data/vendor/listen/lib/listen/adapters/bsd.rb +0 -112
- data/vendor/listen/lib/listen/adapters/darwin.rb +0 -85
- data/vendor/listen/lib/listen/adapters/linux.rb +0 -113
- data/vendor/listen/lib/listen/adapters/polling.rb +0 -67
- data/vendor/listen/lib/listen/adapters/windows.rb +0 -87
- data/vendor/listen/lib/listen/dependency_manager.rb +0 -126
- data/vendor/listen/lib/listen/directory_record.rb +0 -371
- data/vendor/listen/lib/listen/listener.rb +0 -225
- data/vendor/listen/lib/listen/multi_listener.rb +0 -143
- data/vendor/listen/lib/listen/turnstile.rb +0 -28
- data/vendor/listen/lib/listen/version.rb +0 -3
- data/vendor/listen/listen.gemspec +0 -22
- data/vendor/listen/spec/listen/adapter_spec.rb +0 -183
- data/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
- data/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
- data/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
- data/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
- data/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
- data/vendor/listen/spec/listen/dependency_manager_spec.rb +0 -107
- data/vendor/listen/spec/listen/directory_record_spec.rb +0 -1225
- data/vendor/listen/spec/listen/listener_spec.rb +0 -169
- data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -174
- data/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
- data/vendor/listen/spec/listen_spec.rb +0 -73
- data/vendor/listen/spec/spec_helper.rb +0 -21
- data/vendor/listen/spec/support/adapter_helper.rb +0 -629
- data/vendor/listen/spec/support/directory_record_helper.rb +0 -55
- data/vendor/listen/spec/support/fixtures_helper.rb +0 -29
- data/vendor/listen/spec/support/listeners_helper.rb +0 -156
- data/vendor/listen/spec/support/platform_helper.rb +0 -15
@@ -1,55 +0,0 @@
|
|
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
|
-
# that's why we generate a difference that's greater than 1 second.
|
37
|
-
#
|
38
|
-
def small_time_difference
|
39
|
-
t = Time.now
|
40
|
-
diff = t.to_f - t.to_i
|
41
|
-
|
42
|
-
sleep( 1.5 - (diff < 0.5 ? diff : 0.4) )
|
43
|
-
end
|
44
|
-
|
45
|
-
# Ensures that the test runs at almost the same second at which
|
46
|
-
# changes are being checked.
|
47
|
-
#
|
48
|
-
def ensure_same_second
|
49
|
-
t = Time.now
|
50
|
-
diff = t.to_f - t.to_i
|
51
|
-
|
52
|
-
if diff > 0.1 # We are not at the beginning of a second
|
53
|
-
sleep 1.1 - diff # 1.1 is used instead of 1 to account for the processing time (estimated at 0.1 sec)
|
54
|
-
end
|
55
|
-
end
|
@@ -1,29 +0,0 @@
|
|
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
|
@@ -1,156 +0,0 @@
|
|
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 param set to false' do
|
13
|
-
it 'passes the blocking param to the adapter' do
|
14
|
-
adapter.should_receive(:start).with(false)
|
15
|
-
subject.start(false)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context 'with a started listener' do
|
21
|
-
before do
|
22
|
-
subject.start
|
23
|
-
end
|
24
|
-
|
25
|
-
describe '#stop' do
|
26
|
-
it "stops adapter" do
|
27
|
-
adapter.should_receive(:stop)
|
28
|
-
subject.stop
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe '#pause' do
|
33
|
-
it 'sets adapter.paused to true' do
|
34
|
-
adapter.should_receive(:paused=).with(true)
|
35
|
-
subject.pause
|
36
|
-
end
|
37
|
-
|
38
|
-
it 'returns the same listener to allow chaining' do
|
39
|
-
subject.pause.should equal subject
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
describe '#unpause' do
|
44
|
-
it 'sets adapter.paused to false' do
|
45
|
-
adapter.should_receive(:paused=).with(false)
|
46
|
-
subject.unpause
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'returns the same listener to allow chaining' do
|
50
|
-
subject.unpause.should equal subject
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe '#paused?' do
|
55
|
-
it 'returns false when there is no adapter' do
|
56
|
-
subject.instance_variable_set(:@adapter, nil)
|
57
|
-
subject.should_not be_paused
|
58
|
-
end
|
59
|
-
|
60
|
-
it 'returns true when adapter is paused' do
|
61
|
-
adapter.should_receive(:paused) { true }
|
62
|
-
subject.should be_paused
|
63
|
-
end
|
64
|
-
|
65
|
-
it 'returns false when adapter is not paused' do
|
66
|
-
adapter.should_receive(:paused) { false }
|
67
|
-
subject.should_not be_paused
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
describe '#change' do
|
73
|
-
it 'sets the callback block' do
|
74
|
-
callback = lambda { |modified, added, removed| }
|
75
|
-
subject.change(&callback)
|
76
|
-
subject.instance_variable_get(:@block).should eq callback
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'returns the same listener to allow chaining' do
|
80
|
-
subject.change(&Proc.new{}).should equal subject
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
describe '#ignore' do
|
85
|
-
it 'returns the same listener to allow chaining' do
|
86
|
-
subject.ignore('some_directory').should equal subject
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
describe '#ignore!' do
|
91
|
-
it 'returns the same listener to allow chaining' do
|
92
|
-
subject.ignore!('some_directory').should equal subject
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe '#filter' do
|
97
|
-
it 'returns the same listener to allow chaining' do
|
98
|
-
subject.filter(/\.txt$/).should equal subject
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
describe '#filter!' do
|
103
|
-
it 'returns the same listener to allow chaining' do
|
104
|
-
subject.filter!(/\.txt$/).should equal subject
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
describe '#latency' do
|
109
|
-
it 'sets the latency to @adapter_options' do
|
110
|
-
subject.latency(0.7)
|
111
|
-
subject.instance_variable_get(:@adapter_options).should eq(:latency => 0.7)
|
112
|
-
end
|
113
|
-
|
114
|
-
it 'returns the same listener to allow chaining' do
|
115
|
-
subject.latency(0.7).should equal subject
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
describe '#force_polling' do
|
120
|
-
it 'sets force_polling to @adapter_options' do
|
121
|
-
subject.force_polling(false)
|
122
|
-
subject.instance_variable_get(:@adapter_options).should eq(:force_polling => false)
|
123
|
-
end
|
124
|
-
|
125
|
-
it 'returns the same listener to allow chaining' do
|
126
|
-
subject.force_polling(true).should equal subject
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
describe '#relative_paths' do
|
131
|
-
it 'sets the relative paths option for paths in the callback' do
|
132
|
-
subject.relative_paths(true)
|
133
|
-
subject.instance_variable_get(:@use_relative_paths).should be_true
|
134
|
-
end
|
135
|
-
|
136
|
-
it 'returns the same listener to allow chaining' do
|
137
|
-
subject.relative_paths(true).should equal subject
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
describe '#polling_fallback_message' do
|
142
|
-
it 'sets custom polling fallback message to @adapter_options' do
|
143
|
-
subject.polling_fallback_message('custom message')
|
144
|
-
subject.instance_variable_get(:@adapter_options).should eq(:polling_fallback_message => 'custom message')
|
145
|
-
end
|
146
|
-
|
147
|
-
it 'sets polling fallback message to false in @adapter_options' do
|
148
|
-
subject.polling_fallback_message(false)
|
149
|
-
subject.instance_variable_get(:@adapter_options).should eq(:polling_fallback_message => false)
|
150
|
-
end
|
151
|
-
|
152
|
-
it 'returns the same listener to allow chaining' do
|
153
|
-
subject.polling_fallback_message('custom message').should equal subject
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
@@ -1,15 +0,0 @@
|
|
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
|