compass 1.0.0.alpha.21 → 1.0.0.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +11 -5
- data/features/command_line.feature +5 -25
- data/features/step_definitions/command_line_steps.rb +3 -3
- data/lib/compass.rb +2 -2
- data/lib/compass/actions.rb +4 -3
- data/lib/compass/commands/update_project.rb +50 -45
- data/lib/compass/commands/watch_project.rb +62 -13
- data/lib/compass/compiler.rb +2 -0
- data/lib/compass/configuration/adapters.rb +21 -0
- data/lib/compass/configuration/helpers.rb +8 -0
- data/lib/compass/deprecation.rb +19 -0
- data/lib/compass/exec/global_options_parser.rb +0 -4
- data/lib/compass/generated_version.rb +4 -0
- data/lib/compass/logger.rb +31 -18
- data/lib/compass/sass_compiler.rb +134 -0
- data/lib/compass/sass_extensions/functions/sprites.rb +3 -3
- data/lib/compass/sprite_importer.rb +1 -1
- data/lib/compass/version.rb +29 -31
- data/test/fixtures/stylesheets/compass/css/background-clip.css +2 -0
- data/test/fixtures/stylesheets/compass/css/background-origin.css +2 -0
- data/test/fixtures/stylesheets/compass/css/background-size.css +3 -0
- data/test/fixtures/stylesheets/compass/css/browser-support.css +22 -11
- data/test/fixtures/stylesheets/compass/css/filters.css +6 -6
- data/test/fixtures/stylesheets/compass/css/grid_background.css +4 -0
- data/test/fixtures/stylesheets/compass/css/support.css +6 -6
- data/test/fixtures/stylesheets/compass/css/transition.css +19 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css +1 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css +1 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css +1 -0
- data/test/fixtures/stylesheets/sourcemaps/css/another_simple.css +1 -0
- data/test/fixtures/stylesheets/sourcemaps/css/another_simple.css.map +2 -1
- data/test/fixtures/stylesheets/sourcemaps/css/simple.css +1 -0
- data/test/fixtures/stylesheets/sourcemaps/css/simple.css.map +2 -1
- data/test/fixtures/stylesheets/sourcemaps/css/with_libraries.css +1 -0
- data/test/fixtures/stylesheets/sourcemaps/css/with_libraries.css.map +2 -1
- data/test/integrations/compass_test.rb +5 -4
- data/test/units/caniuse_test.rb +8 -2
- data/test/units/command_line_test.rb +3 -3
- data/test/units/compiler_test.rb +7 -2
- data/test/units/configuration_test.rb +1 -1
- metadata +9 -22
- data/RELEASE_VERSION +0 -1
- data/VERSION +0 -1
- data/lib/compass/watcher.rb +0 -11
- data/lib/compass/watcher/compiler.rb +0 -60
- data/lib/compass/watcher/project_watcher.rb +0 -179
- data/lib/compass/watcher/watch.rb +0 -51
- data/test/fixtures/stylesheets/valid/css/another_simple.css +0 -4
- data/test/fixtures/stylesheets/valid/css/simple.css +0 -4
- data/test/units/watcher/compiler_test.rb +0 -39
- data/test/units/watcher/project_watcher_test.rb +0 -85
- data/test/units/watcher/watch_test.rb +0 -42
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'compass'
|
3
|
-
|
4
|
-
class WatcherWatchTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
test "should throw exception if given absolute path" do
|
7
|
-
begin
|
8
|
-
watcher = Compass::Watcher::Watch.new('/images/*.png') do
|
9
|
-
puts "something"
|
10
|
-
end
|
11
|
-
rescue Compass::Watcher::AbsolutePathError
|
12
|
-
assert true, "Compass::Watcher::AbsolutePathError was not raised"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
test "should throw exception if not given a block" do
|
17
|
-
begin
|
18
|
-
watcher = Compass::Watcher::Watch.new('images/*.png')
|
19
|
-
rescue Compass::Watcher::NoCallbackError
|
20
|
-
assert true, "Compass::Watcher::NoCallbackError was not raised"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
test "changed path matches glob" do
|
25
|
-
watcher = Compass::Watcher::Watch.new('images/*.png') { }
|
26
|
-
assert watcher.match?('images/baz.png'), "Path does not match"
|
27
|
-
end
|
28
|
-
|
29
|
-
test "changed path doesn't matches glob" do
|
30
|
-
watcher = Compass::Watcher::Watch.new('images/*.png') { }
|
31
|
-
assert !watcher.match?('foo/baz.png'), "Path does match and it shouldn't"
|
32
|
-
end
|
33
|
-
|
34
|
-
test "can run callback" do
|
35
|
-
test = 0
|
36
|
-
watcher = Compass::Watcher::Watch.new('images/*.png') { test = 1}
|
37
|
-
watcher.run_callback(:project, :local, :action)
|
38
|
-
assert_equal 1, test
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
end
|