compass 0.10.0.pre5 → 0.10.0.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/CHANGELOG.markdown +48 -0
  2. data/VERSION.yml +1 -1
  3. data/examples/css3/extensions/compass-colors/README.markdown +50 -0
  4. data/examples/css3/extensions/compass-colors/VERSION.yml +5 -0
  5. data/examples/css3/extensions/compass-colors/example/config.rb +13 -0
  6. data/examples/css3/extensions/compass-colors/example/src/_split_compliment_theme.sass +28 -0
  7. data/examples/css3/extensions/compass-colors/example/src/screen.sass +40 -0
  8. data/examples/css3/extensions/compass-colors/lib/compass-colors.rb +9 -0
  9. data/examples/css3/extensions/compass-colors/lib/compass-colors/compass_extension.rb +7 -0
  10. data/examples/css3/extensions/compass-colors/lib/compass-colors/hsl.rb +109 -0
  11. data/examples/css3/extensions/compass-colors/lib/compass-colors/sass_extensions.rb +112 -0
  12. data/examples/css3/extensions/compass-colors/spec/approximate_color_matching.rb +43 -0
  13. data/examples/css3/extensions/compass-colors/spec/sass_extensions_spec.rb +54 -0
  14. data/examples/css3/extensions/compass-colors/templates/analogous/_theme.sass +28 -0
  15. data/examples/css3/extensions/compass-colors/templates/analogous/manifest.rb +1 -0
  16. data/examples/css3/extensions/compass-colors/templates/basic/_theme.sass +7 -0
  17. data/examples/css3/extensions/compass-colors/templates/basic/manifest.rb +1 -0
  18. data/examples/css3/extensions/compass-colors/templates/complementary/_theme.sass +20 -0
  19. data/examples/css3/extensions/compass-colors/templates/complementary/manifest.rb +1 -0
  20. data/examples/css3/extensions/compass-colors/templates/split_complement/_theme.sass +28 -0
  21. data/examples/css3/extensions/compass-colors/templates/split_complement/manifest.rb +1 -0
  22. data/examples/css3/extensions/compass-colors/templates/triadic/_theme.sass +28 -0
  23. data/examples/css3/extensions/compass-colors/templates/triadic/manifest.rb +1 -0
  24. data/examples/css3/gradients.html.haml +60 -0
  25. data/examples/css3/index.html.haml +10 -8
  26. data/examples/css3/src/fancy-fonts.sass +1 -1
  27. data/examples/css3/src/gradients.sass +69 -0
  28. data/examples/css3/src/main.sass +38 -10
  29. data/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +12 -10
  30. data/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +1 -1
  31. data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +1 -1
  32. data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +1 -1
  33. data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +1 -1
  34. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +1 -1
  35. data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +1 -1
  36. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +1 -1
  37. data/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +1 -1
  38. data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +1 -1
  39. data/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +1 -1
  40. data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +1 -1
  41. data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +1 -1
  42. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +1 -1
  43. data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +1 -1
  44. data/frameworks/compass/stylesheets/compass/css3/_gradient.sass +54 -36
  45. data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +1 -0
  46. data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +7 -7
  47. data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +6 -2
  48. data/lib/compass.rb +1 -1
  49. data/lib/compass/app_integration/rails.rb +6 -0
  50. data/lib/compass/app_integration/rails/{action_controller.rb → actionpack2/action_controller.rb} +0 -0
  51. data/lib/compass/app_integration/rails/{sass_plugin.rb → actionpack2/sass_plugin.rb} +0 -0
  52. data/lib/compass/app_integration/rails/{urls.rb → actionpack2/urls.rb} +0 -0
  53. data/lib/compass/app_integration/rails/installer.rb +8 -5
  54. data/lib/compass/app_integration/rails/runtime.rb +8 -4
  55. data/lib/compass/commands/installer_command.rb +1 -3
  56. data/lib/compass/commands/project_base.rb +1 -3
  57. data/lib/compass/commands/write_configuration.rb +5 -2
  58. data/lib/compass/compiler.rb +7 -0
  59. data/lib/compass/configuration/adapters.rb +3 -3
  60. data/lib/compass/configuration/defaults.rb +4 -0
  61. data/lib/compass/configuration/helpers.rb +16 -0
  62. data/lib/compass/configuration/inheritance.rb +6 -2
  63. data/lib/compass/configuration/serialization.rb +8 -3
  64. data/lib/compass/exec.rb +5 -1
  65. data/lib/compass/frameworks.rb +15 -5
  66. data/lib/compass/logger.rb +8 -4
  67. data/lib/compass/sass_extensions/functions.rb +3 -2
  68. data/lib/compass/sass_extensions/functions/gradient_support.rb +186 -0
  69. data/lib/compass/sass_extensions/functions/image_size.rb +97 -0
  70. data/test/compass_test.rb +1 -1
  71. data/test/configuration_test.rb +30 -0
  72. data/test/fixtures/stylesheets/compass/100x150.jpg +0 -0
  73. data/test/fixtures/stylesheets/compass/css/gradients.css +71 -0
  74. data/test/fixtures/stylesheets/compass/css/image_size.css +15 -0
  75. data/test/fixtures/stylesheets/compass/css/layout.css +1 -0
  76. data/test/fixtures/stylesheets/compass/images/100x150.gif +0 -0
  77. data/test/fixtures/stylesheets/compass/images/100x150.jpeg +0 -0
  78. data/test/fixtures/stylesheets/compass/images/100x150.jpg +0 -0
  79. data/test/fixtures/stylesheets/compass/images/100x150.png +0 -0
  80. data/test/fixtures/stylesheets/compass/sass/gradients.sass +48 -0
  81. data/test/fixtures/stylesheets/compass/sass/image_size.sass +12 -0
  82. metadata +70 -15
  83. data/examples/css3/src/gradient.sass +0 -10
  84. data/lib/compass/sass_extensions/functions/color_stop.rb +0 -10
@@ -36,13 +36,13 @@
36
36
  // Main layout grid, override these constants to build your grid and container sizes.
37
37
  // The width shown gives the right floored percentage values.
38
38
  !blueprint_liquid_grid_columns ||= 24
39
- !blueprint_liquid_grid_width ||= 4.173%
40
- !blueprint_liquid_grid_margin ||= 0.833em
39
+ !blueprint_liquid_grid_width ||= 3.167%
40
+ !blueprint_liquid_grid_margin ||= 1.042%
41
41
 
42
42
  // Do not edit below this line unless you really know what you're doing.
43
43
  !blueprint_liquid_container_width = 80%
44
44
  !blueprint_liquid_container_min_width = 950px
45
- !blueprint_liquid_grid_push_pull = -(!blueprint_liquid_grid_margin * 4)
45
+ !blueprint_liquid_grid_push_pull = -(!blueprint_liquid_grid_margin + !blueprint_liquid_grid_width)
46
46
 
47
47
  =blueprint-liquid-grid
48
48
  // A container should group all your columns
@@ -82,7 +82,7 @@
82
82
  +clearfix
83
83
 
84
84
  =span(!n, !override = false)
85
- !width = (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1)
85
+ !width = (!blueprint_liquid_grid_width * !n) + (!blueprint_liquid_grid_margin * (!n - 1))
86
86
  @if !override
87
87
  width= !width !important
88
88
  @else
@@ -101,10 +101,10 @@
101
101
  margin-right= !blueprint_liquid_grid_margin
102
102
 
103
103
  =append(!n)
104
- padding-right= (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1)
104
+ padding-right= (!blueprint_liquid_grid_width + !blueprint_liquid_grid_margin) * !n
105
105
 
106
106
  =prepend(!n)
107
- padding-left= (!blueprint_liquid_grid_width * !n) - ((!blueprint_liquid_grid_width * !n) % 1)
107
+ padding-left= (!blueprint_liquid_grid_width + !blueprint_liquid_grid_margin) * !n
108
108
 
109
109
  =pull(!n, !last = false)
110
110
  margin-left= (!blueprint_liquid_grid_push_pull * !n)
@@ -113,7 +113,7 @@
113
113
  +float-right
114
114
  margin:
115
115
  top: 0
116
- left: 1.5em
116
+ left= !blueprint_liquid_grid_margin
117
117
  right= (!blueprint_liquid_grid_push_pull * !n)
118
118
  bottom: 0
119
119
 
@@ -121,8 +121,8 @@
121
121
  border-right: 1px solid #eee
122
122
 
123
123
  =colborder
124
- padding-right: 2%
125
- margin-right: 2%
124
+ padding-right= !blueprint_liquid_grid_margin * 2
125
+ margin-right= !blueprint_liquid_grid_margin * 2
126
126
  +border
127
127
 
128
128
  =colruler
@@ -131,7 +131,9 @@
131
131
  clear: both
132
132
  width: 100%
133
133
  height: 0.083em
134
- margin: 0 0 1.583em
134
+ margin: 0
135
+ margin-left= !blueprint_liquid_grid_margin * 2
136
+ margin-right= !blueprint_liquid_grid_margin * 2
135
137
  border: none
136
138
 
137
139
  =colspacer
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/buttons.sass has moved to blueprint/buttons.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/buttons.sass has moved to blueprint/buttons.sass"
2
2
  @import blueprint/buttons.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/colors.sass has moved to blueprint/colors.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/colors.sass has moved to blueprint/colors.sass"
2
2
  @import blueprint/colors.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/debug.sass has moved to blueprint/debug.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/debug.sass has moved to blueprint/debug.sass"
2
2
  @import blueprint/debug.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/fancy_type.sass has moved to blueprint/fancy_type.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/fancy_type.sass has moved to blueprint/fancy_type.sass"
2
2
  @import blueprint/fancy_type.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/form.sass has moved to blueprint/form.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/form.sass has moved to blueprint/form.sass"
2
2
  @import blueprint/form.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/grid.sass has moved to blueprint/grid.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/grid.sass has moved to blueprint/grid.sass"
2
2
  @import blueprint/grid.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/interaction.sass has moved to blueprint/interaction.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/interaction.sass has moved to blueprint/interaction.sass"
2
2
  @import blueprint/interaction.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/link_icons.sass has moved to blueprint/link_icons.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/link_icons.sass has moved to blueprint/link_icons.sass"
2
2
  @import blueprint/link_icons.sass
@@ -1,3 +1,3 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/liquid.sass has moved to blueprint/liquid.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/liquid.sass has moved to blueprint/liquid.sass"
2
2
  @import blueprint/liquid.sass
3
3
 
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/reset.sass has moved to blueprint/reset.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/reset.sass has moved to blueprint/reset.sass"
2
2
  @import blueprint/reset.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/rtl.sass has moved to blueprint/rtl.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/rtl.sass has moved to blueprint/rtl.sass"
2
2
  @import blueprint/rtl.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/scaffolding.sass has moved to blueprint/scaffolding.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/scaffolding.sass has moved to blueprint/scaffolding.sass"
2
2
  @import blueprint/scaffolding.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/typography.sass has moved to blueprint/typography.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/typography.sass has moved to blueprint/typography.sass"
2
2
  @import blueprint/typography.sass
@@ -1,2 +1,2 @@
1
- @debug "DEPRECATION WARINING: blueprint/modules/utilities.sass has moved to blueprint/utilities.sass"
1
+ @debug "DEPRECATION WARNING: blueprint/modules/utilities.sass has moved to blueprint/utilities.sass"
2
2
  @import blueprint/utilities.sass
@@ -1,40 +1,58 @@
1
- =gradient(!type, !coords, !color_start, !color_end, !color_stop = false)
2
- !gradient= "#{!coords}, from(#{!color_start}), to(#{!color_end})"
3
- @if !color_stop
4
- !gradient= !gradient + ", " + !color_stop
5
- background: -webkit-gradient(#{!type}, #{!gradient})
6
- background: -moz-#{!type}-gradient(#{!gradient})
1
+ // This yields a linear gradient spanning from top to bottom
2
+ //
3
+ // +linear-gradient(color_stops(white, black))
4
+ //
5
+ // This yields a linear gradient spanning from bottom to top
6
+ //
7
+ // +linear-gradient(color_stops(white, black), "bottom")
8
+ //
9
+ // This yields a linear gradient spanning from left to right
10
+ //
11
+ // +linear-gradient(color_stops(white, black), "left")
12
+ //
13
+ // This yields a linear gradient starting at white passing
14
+ // thru blue at 33% down and then to black
15
+ //
16
+ // +linear-gradient(color_stops(white, blue 33%, black))
17
+ //
18
+ // This yields a linear gradient starting at white passing
19
+ // thru blue at 33% down and then to black at 67% until the end
20
+ //
21
+ // +linear-gradient(color_stops(white, blue 33%, black 67%))
22
+ //
23
+ // Browsers Supported:
24
+ //
25
+ // - Chrome
26
+ // - Safari
27
+ // - Firefox 3.6
7
28
 
8
- //*
9
- // This will yeild a radial gradient with an apparent specular highlight
10
- +radial-gradient("45 45, 10, 52 50, 30", Cyan, DodgerBlue)
11
-
12
- =radial-gradient(!coords, !color1, !color2, !color_stop = false)
13
- +gradient("radial", !coords, !color1, !color2, !color_stop)
29
+ =linear-gradient(!color_stops, !start = "top")
30
+ // Firefox's gradient api is nice.
31
+ // Webkit's gradient api sucks -- hence these backflips:
32
+ !end = grad_opposite_position(!start)
33
+ background-image: -webkit-gradient(linear, #{grad_point(!start)}, #{grad_point(!end)}, #{grad_color_stops(!color_stops)})
34
+ background-image: -moz-linear-gradient(#{!start}, #{!color_stops})
14
35
 
15
- //*
16
- // This yields a linear gradient spanning from !start to !end coordinates
17
- +linear-gradient("left top", "left bottom", #fff, #ddd)
36
+ // Due to limitation's of webkit, the radial gradient mixin works best if you use
37
+ // pixel-based color stops.
38
+ //
39
+ // Examples:
40
+ //
41
+ // // Defaults to a centered, 100px radius gradient
42
+ // +radial-gradient(color_stops(#c00, #00c))
43
+ // // 100px radius gradient in the top left corner
44
+ // +radial-gradient(color_stops(#c00, #00c), "top left")
45
+ // // Three colors, ending at 50px and passing thru #fff at 25px
46
+ // +radial-gradient(color_stops(#c00, #fff, #00c 50px))
47
+ //
48
+ // Browsers Supported:
49
+ //
50
+ // - Chrome
51
+ // - Safari
52
+ // - Firefox 3.6
18
53
 
19
- =linear-gradient(!start, !end, !color1, !color2, !color_stop = false)
20
- !coords = !start + ", " + !end
21
- +gradient("linear", !coords, !color1, !color2, !color_stop)
54
+ =radial-gradient(!color_stops, !center_position = "center center")
55
+ !end_pos = grad_end_position(!color_stops, true)
56
+ background-image: -webkit-gradient(radial, #{grad_point(!center_position)}, 0, #{grad_point(!center_position)}, #{!end_pos}, #{grad_color_stops(!color_stops)})
57
+ background-image: -moz-radial-gradient(#{!center_position}, circle, #{!color_stops})
22
58
 
23
- //*
24
- // This yields a gradient starting at the top with #fff, ending in #aaa
25
- +v-gradient(#fff, #aaa)
26
- // Same as above but with a #ccc at the halfway point
27
- +v-gradient(#fff, #aaa, color_stop(50%, #ccc))
28
- // Same as the first example but with #ccc at the 30% from the top, and #bbb at 70% from the top
29
- +v-gradient(#fff, #aaa, color_stop(30%, #ccc, 70%, #bbb))
30
-
31
- =v-gradient(!color1, !color2, !color_stop = false)
32
- +linear-gradient("left top", "left bottom", !color1, !color2, !color_stop)
33
-
34
- //*
35
- // This yields a horizontal linear gradient spanning from left to right
36
- // It can be used just like v-gradient above
37
- h-gradient(#fff, #ddd)
38
-
39
- =h-gradient(!color1, !color2, !color_stop = false)
40
- +linear-gradient("left top", "right top", !color1, !color2, !color_stop)
@@ -7,6 +7,7 @@
7
7
  html, body
8
8
  height: 100%
9
9
  #{!root_selector}
10
+ clear: both
10
11
  min-height: 100%
11
12
  height: auto !important
12
13
  height: 100%
@@ -5,11 +5,11 @@
5
5
  &
6
6
  display: block
7
7
 
8
- //**
9
- IE6 will let the !important property win
10
- While all the other browsers won't.
11
- TODO: link to blog post
12
- =bang-hack(!property, !hack_value, !value)
13
- #{!property}: #{!hack_value} !important
14
- #{!property}: #{!value}
8
+ //**
9
+ A hack to supply IE6 (and below) with a different property value.
10
+ See http://www.cssportal.com/css-hacks/#in_css-important
11
+ =bang-hack(!property, !value, !ie6_value)
12
+ #{!property}: #{!value} !important
13
+ #{!property}: #{!ie6_value}
14
+
15
15
 
@@ -30,6 +30,10 @@
30
30
  //**
31
31
  Can be mixed into any li selector that is meant to participate in a horizontal layout.
32
32
  Used to implement +horizontal-list.
33
+
34
+ :last-child is not fully supported
35
+ see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
36
+
33
37
  =horizontal-list-item(!padding = 4px)
34
38
  +no-bullet
35
39
  white-space: nowrap
@@ -37,9 +41,9 @@
37
41
  padding:
38
42
  left= !padding
39
43
  right= !padding
40
- &.first
44
+ &:first-child, &.first
41
45
  padding-left: 0px
42
- &.last
46
+ &:last-child, &.last
43
47
  padding-right: 0px
44
48
 
45
49
  //**
@@ -17,6 +17,6 @@ module Compass
17
17
  module_function :base_directory, :lib_directory
18
18
  end
19
19
 
20
- %w(configuration frameworks app_integration).each do |lib|
20
+ %w(configuration frameworks app_integration actions compiler).each do |lib|
21
21
  require "compass/#{lib}"
22
22
  end
@@ -20,6 +20,12 @@ module Compass
20
20
  extend(ConfigurationDefaults)
21
21
  end
22
22
 
23
+ def env
24
+ if rails_env = (defined?(::Rails) ? ::Rails.env : (defined?(RAILS_ENV) ? RAILS_ENV : nil))
25
+ rails_env.production? ? :production : :development
26
+ end
27
+ end
28
+
23
29
  end
24
30
  end
25
31
  end
@@ -80,9 +80,12 @@ module Compass
80
80
  end
81
81
 
82
82
  def config_contents
83
+ "# This configuration file works with both the Compass command line tool and within Rails.\n" +
83
84
  Compass.configuration.serialize do |prop, value|
84
85
  if prop == :project_path
85
86
  "project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n"
87
+ elsif prop == :environment
88
+ "environment = Compass::AppIntegration::Rails.env\n"
86
89
  elsif prop == :output_style
87
90
  ""
88
91
  end
@@ -91,11 +94,11 @@ module Compass
91
94
 
92
95
  def initializer_contents
93
96
  %Q{require 'compass'
94
- # If you have any compass plugins, require them here.
95
- Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.rb"))
96
- Compass.configuration.environment = (defined?(Rails) ? Rails.env : RAILS_ENV).to_sym
97
- Compass.configure_sass_plugin!
98
- }
97
+ |rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s
98
+ |Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb"))
99
+ |Compass.configure_sass_plugin!
100
+ |Compass.handle_configuration_change!
101
+ |}.gsub(/^\s+\|/,'')
99
102
  end
100
103
 
101
104
  def stylesheet_prefix
@@ -1,10 +1,14 @@
1
1
  unless defined?(Compass::RAILS_LOADED)
2
2
  Compass::RAILS_LOADED = true
3
-
4
- %w(action_controller sass_plugin urls).each do |lib|
5
- require "compass/app_integration/rails/#{lib}"
3
+
4
+ if ActionPack::VERSION::MAJOR >= 3
5
+ # figure something out so image_path works with rails integration
6
+ else
7
+ %w(action_controller sass_plugin urls).each do |lib|
8
+ require "compass/app_integration/rails/actionpack2/#{lib}"
9
+ end
6
10
  end
7
-
11
+
8
12
  # Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
9
13
  class Sass::Script::Functions::EvaluationContext
10
14
  include Sass::Script::Functions
@@ -12,9 +12,7 @@ module Compass
12
12
  Compass.add_project_configuration(:project_type => options.delete(:project_type))
13
13
  end
14
14
  Compass.add_configuration(options, 'command_line')
15
- if File.exists?(Compass.configuration.extensions_path)
16
- Compass::Frameworks.discover(Compass.configuration.extensions_path)
17
- end
15
+ Compass.discover_extensions!
18
16
  Compass.add_configuration(installer.completed_configuration, 'installer')
19
17
  end
20
18
 
@@ -23,9 +23,7 @@ module Compass
23
23
 
24
24
  def configure!
25
25
  add_project_configuration
26
- if File.exists?(Compass.configuration.extensions_path)
27
- Compass::Frameworks.discover(Compass.configuration.extensions_path)
28
- end
26
+ Compass.discover_extensions!
29
27
  end
30
28
 
31
29
  def add_project_configuration
@@ -59,8 +59,11 @@ module Compass
59
59
  end
60
60
  end
61
61
  else
62
- directory File.dirname(options[:configuration_file])
63
- installer.write_configuration_files(options[:configuration_file])
62
+ config_file = options[:configuration_file]
63
+ config_file ||= Compass.detect_configuration_file
64
+ config_file ||= Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.first
65
+ directory File.dirname(config_file)
66
+ installer.write_configuration_files(config_file)
64
67
  end
65
68
  end
66
69
 
@@ -58,6 +58,13 @@ module Compass
58
58
  nil
59
59
  end
60
60
 
61
+ def clean!
62
+ FileUtils.rm_rf options[:cache_location]
63
+ css_files.each do |css_file|
64
+ FileUtils.rm_f css_file
65
+ end
66
+ end
67
+
61
68
  def run
62
69
  if new_config?
63
70
  # Wipe out the cache and force compilation if the configuration has changed.
@@ -3,7 +3,7 @@ module Compass
3
3
  # The adapters module provides methods that make configuration data from a compass project
4
4
  # adapt to various consumers of configuration data
5
5
  module Adapters
6
- def to_compiler_arguments(additional_options)
6
+ def to_compiler_arguments(additional_options = {})
7
7
  [project_path, sass_path, css_path, to_sass_engine_options.merge(additional_options)]
8
8
  end
9
9
 
@@ -19,8 +19,8 @@ module Compass
19
19
  plugin_opts = {:template_location => locations}
20
20
  plugin_opts[:style] = output_style if output_style
21
21
  plugin_opts[:line_comments] = line_comments
22
- plugin_opts[:cache] = cache
23
- plugin_opts[:cache_location] = cache_path
22
+ plugin_opts[:cache] = cache unless cache.nil?
23
+ plugin_opts[:cache_location] = cache_path unless cache_path.nil?
24
24
  plugin_opts.merge!(sass_options || {})
25
25
  plugin_opts
26
26
  end
@@ -2,6 +2,10 @@ module Compass
2
2
  module Configuration
3
3
  module Defaults
4
4
 
5
+ def default_project_path
6
+ "."
7
+ end
8
+
5
9
  def default_project_type
6
10
  :stand_alone
7
11
  end