chriseppstein-compass 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -151,6 +151,7 @@ Rakefile
151
151
  README.markdown
152
152
  test/command_line_test.rb
153
153
  test/compass_test.rb
154
+ test/configuration_test.rb
154
155
  test/fixtures/stylesheets/blueprint/css/typography.css
155
156
  test/fixtures/stylesheets/blueprint/sass/ie.sass
156
157
  test/fixtures/stylesheets/blueprint/sass/print.sass
data/compass.gemspec CHANGED
@@ -1,23 +1,23 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{compass}
3
- s.version = "0.4.1"
3
+ s.version = "0.4.2"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Chris Eppstein"]
7
- s.date = %q{2009-02-08}
7
+ s.date = %q{2009-02-12}
8
8
  s.default_executable = %q{compass}
9
9
  s.description = %q{Sass-Based CSS Meta-Framework. Semantic, Maintainable CSS.}
10
10
  s.email = %q{chris@eppsteins.net}
11
11
  s.executables = ["compass"]
12
12
  s.extra_rdoc_files = ["bin/compass", "lib/compass/actions.rb", "lib/compass/commands/base.rb", "lib/compass/commands/create_project.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/compiler.rb", "lib/compass/configuration.rb", "lib/compass/core_ext.rb", "lib/compass/errors.rb", "lib/compass/exec.rb", "lib/compass/frameworks.rb", "lib/compass/installers/base.rb", "lib/compass/installers/manifest.rb", "lib/compass/installers/rails.rb", "lib/compass/installers/stand_alone.rb", "lib/compass/installers.rb", "lib/compass/logger.rb", "lib/compass/merb.rb", "lib/compass/test_case.rb", "lib/compass/validate/COPYRIGHT.html", "lib/compass/validate/css-validator-javadoc.jar", "lib/compass/validate/css-validator.jar", "lib/compass/validate/jigsaw.jar", "lib/compass/validate/JIGSAW_COPYRIGHT", "lib/compass/validate/README.html", "lib/compass/validate/xerces.jar", "lib/compass/validate/XERCES_COPYING.txt", "lib/compass/validate.rb", "lib/compass/validator.rb", "lib/compass/version.rb", "lib/compass.rb", "lib/sass_extensions.rb", "README.markdown"]
13
- s.files = ["bin/compass", "compass.gemspec", "examples/blueprint_default/index.html", "examples/blueprint_default/parts/elements.html", "examples/blueprint_default/parts/forms.html", "examples/blueprint_default/parts/grid.html", "examples/blueprint_default/parts/test-small.jpg", "examples/blueprint_default/parts/test.jpg", "examples/blueprint_default/parts/valid.png", "examples/blueprint_default/stylesheets/ie.sass", "examples/blueprint_default/stylesheets/images/grid.png", "examples/blueprint_default/stylesheets/print.sass", "examples/blueprint_default/stylesheets/screen.sass", "examples/blueprint_plugins/index.html", "examples/blueprint_plugins/parts/fancy_type.html", "examples/blueprint_plugins/parts/test-small.jpg", "examples/blueprint_plugins/parts/test.jpg", "examples/blueprint_plugins/parts/valid.png", "examples/blueprint_plugins/stylesheets/ie.sass", "examples/blueprint_plugins/stylesheets/images/grid.png", "examples/blueprint_plugins/stylesheets/print.sass", "examples/blueprint_plugins/stylesheets/screen.sass", "examples/blueprint_scoped/stylesheets/ie.sass", "examples/blueprint_scoped/stylesheets/print.sass", "examples/blueprint_scoped/stylesheets/screen.sass", "examples/blueprint_scoped_form/stylesheets/ie.sass", "examples/blueprint_scoped_form/stylesheets/print.sass", "examples/blueprint_scoped_form/stylesheets/screen.sass", "examples/blueprint_semantic/index.html", "examples/blueprint_semantic/parts/fancy_type.html", "examples/blueprint_semantic/parts/liquid.html", "examples/blueprint_semantic/parts/test-small.jpg", "examples/blueprint_semantic/parts/test.jpg", "examples/blueprint_semantic/parts/valid.png", "examples/blueprint_semantic/stylesheets/ie.sass", "examples/blueprint_semantic/stylesheets/images/grid.png", "examples/blueprint_semantic/stylesheets/liquid.sass", "examples/blueprint_semantic/stylesheets/print.sass", "examples/blueprint_semantic/stylesheets/screen.sass", "examples/compass/compass.html", "examples/compass/sticky_footer.html.haml", "examples/compass/stylesheets/compass.sass", "examples/compass/stylesheets/images/blue_arrow.gif", "examples/compass/stylesheets/sticky_footer.sass", "examples/compass/stylesheets/utilities.sass", "examples/compass/utilities.html.haml", "examples/yui/divisions.html.haml", "examples/yui/index.html.haml", "examples/yui/stylesheets/screen.sass", "examples/yui/sub_divisions.html.haml", "examples/yui/templates.html.haml", "examples/yui/test.jpg", "examples/yui/typography.html.haml", "frameworks/blueprint/lib/blueprint/constants.rb", "frameworks/blueprint/lib/blueprint/grid_builder.rb", "frameworks/blueprint/stylesheets/_blueprint.sass", "frameworks/blueprint/stylesheets/blueprint/_ie.sass", "frameworks/blueprint/stylesheets/blueprint/_print.sass", "frameworks/blueprint/stylesheets/blueprint/_screen.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_form.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass", "frameworks/blueprint/templates/project/grid.png", "frameworks/blueprint/templates/project/ie.sass", "frameworks/blueprint/templates/project/manifest.rb", "frameworks/blueprint/templates/project/print.sass", "frameworks/blueprint/templates/project/screen.sass", "frameworks/blueprint.rb", "frameworks/compass/stylesheets/_compass.sass", "frameworks/compass/stylesheets/compass/_layout.sass", "frameworks/compass/stylesheets/compass/_reset.sass", "frameworks/compass/stylesheets/compass/_utilities.sass", "frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass", "frameworks/compass/stylesheets/compass/utilities/_general.sass", "frameworks/compass/stylesheets/compass/utilities/_links.sass", "frameworks/compass/stylesheets/compass/utilities/_lists.sass", "frameworks/compass/stylesheets/compass/utilities/_print.sass", "frameworks/compass/stylesheets/compass/utilities/_tables.sass", "frameworks/compass/stylesheets/compass/utilities/_text.sass", "frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass", "frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass", "frameworks/compass/stylesheets/compass/utilities/general/_reset.sass", "frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass", "frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass", "frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass", "frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass", "frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass", "frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass", "frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass", "frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass", "frameworks/compass/templates/project/ie.sass", "frameworks/compass/templates/project/manifest.rb", "frameworks/compass/templates/project/print.sass", "frameworks/compass/templates/project/screen.sass", "frameworks/compass.rb", "frameworks/yui/COPYRIGHT", "frameworks/yui/stylesheets/_yui.sass", "frameworks/yui/stylesheets/yui/modules/_base.sass", "frameworks/yui/stylesheets/yui/modules/_fonts.sass", "frameworks/yui/stylesheets/yui/modules/_grids.sass", "frameworks/yui/templates/project/manifest.rb", "frameworks/yui/templates/project/screen.sass", "frameworks/yui.rb", "lib/compass/actions.rb", "lib/compass/commands/base.rb", "lib/compass/commands/create_project.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/compiler.rb", "lib/compass/configuration.rb", "lib/compass/core_ext.rb", "lib/compass/errors.rb", "lib/compass/exec.rb", "lib/compass/frameworks.rb", "lib/compass/installers/base.rb", "lib/compass/installers/manifest.rb", "lib/compass/installers/rails.rb", "lib/compass/installers/stand_alone.rb", "lib/compass/installers.rb", "lib/compass/logger.rb", "lib/compass/merb.rb", "lib/compass/test_case.rb", "lib/compass/validate/COPYRIGHT.html", "lib/compass/validate/css-validator-javadoc.jar", "lib/compass/validate/css-validator.jar", "lib/compass/validate/jigsaw.jar", "lib/compass/validate/JIGSAW_COPYRIGHT", "lib/compass/validate/README.html", "lib/compass/validate/xerces.jar", "lib/compass/validate/XERCES_COPYING.txt", "lib/compass/validate.rb", "lib/compass/validator.rb", "lib/compass/version.rb", "lib/compass.rb", "lib/sass_extensions.rb", "Manifest", "Rakefile", "README.markdown", "test/command_line_test.rb", "test/compass_test.rb", "test/fixtures/stylesheets/blueprint/css/typography.css", "test/fixtures/stylesheets/blueprint/sass/ie.sass", "test/fixtures/stylesheets/blueprint/sass/print.sass", "test/fixtures/stylesheets/blueprint/sass/screen.sass", "test/fixtures/stylesheets/blueprint/sass/typography.sass", "test/fixtures/stylesheets/compass/css/layout.css", "test/fixtures/stylesheets/compass/css/print.css", "test/fixtures/stylesheets/compass/css/reset.css", "test/fixtures/stylesheets/compass/css/utilities.css", "test/fixtures/stylesheets/compass/sass/layout.sass", "test/fixtures/stylesheets/compass/sass/print.sass", "test/fixtures/stylesheets/compass/sass/reset.sass", "test/fixtures/stylesheets/compass/sass/utilities.sass", "test/fixtures/stylesheets/yui/css/mixins.css", "test/fixtures/stylesheets/yui/sass/base.sass", "test/fixtures/stylesheets/yui/sass/fonts.sass", "test/fixtures/stylesheets/yui/sass/grids.sass", "test/fixtures/stylesheets/yui/sass/mixins.sass", "test/sass_extensions_test.rb", "test/test_helper.rb", "VERSION"]
13
+ s.files = ["bin/compass", "compass.gemspec", "examples/blueprint_default/index.html", "examples/blueprint_default/parts/elements.html", "examples/blueprint_default/parts/forms.html", "examples/blueprint_default/parts/grid.html", "examples/blueprint_default/parts/test-small.jpg", "examples/blueprint_default/parts/test.jpg", "examples/blueprint_default/parts/valid.png", "examples/blueprint_default/stylesheets/ie.sass", "examples/blueprint_default/stylesheets/images/grid.png", "examples/blueprint_default/stylesheets/print.sass", "examples/blueprint_default/stylesheets/screen.sass", "examples/blueprint_plugins/index.html", "examples/blueprint_plugins/parts/fancy_type.html", "examples/blueprint_plugins/parts/test-small.jpg", "examples/blueprint_plugins/parts/test.jpg", "examples/blueprint_plugins/parts/valid.png", "examples/blueprint_plugins/stylesheets/ie.sass", "examples/blueprint_plugins/stylesheets/images/grid.png", "examples/blueprint_plugins/stylesheets/print.sass", "examples/blueprint_plugins/stylesheets/screen.sass", "examples/blueprint_scoped/stylesheets/ie.sass", "examples/blueprint_scoped/stylesheets/print.sass", "examples/blueprint_scoped/stylesheets/screen.sass", "examples/blueprint_scoped_form/stylesheets/ie.sass", "examples/blueprint_scoped_form/stylesheets/print.sass", "examples/blueprint_scoped_form/stylesheets/screen.sass", "examples/blueprint_semantic/index.html", "examples/blueprint_semantic/parts/fancy_type.html", "examples/blueprint_semantic/parts/liquid.html", "examples/blueprint_semantic/parts/test-small.jpg", "examples/blueprint_semantic/parts/test.jpg", "examples/blueprint_semantic/parts/valid.png", "examples/blueprint_semantic/stylesheets/ie.sass", "examples/blueprint_semantic/stylesheets/images/grid.png", "examples/blueprint_semantic/stylesheets/liquid.sass", "examples/blueprint_semantic/stylesheets/print.sass", "examples/blueprint_semantic/stylesheets/screen.sass", "examples/compass/compass.html", "examples/compass/sticky_footer.html.haml", "examples/compass/stylesheets/compass.sass", "examples/compass/stylesheets/images/blue_arrow.gif", "examples/compass/stylesheets/sticky_footer.sass", "examples/compass/stylesheets/utilities.sass", "examples/compass/utilities.html.haml", "examples/yui/divisions.html.haml", "examples/yui/index.html.haml", "examples/yui/stylesheets/screen.sass", "examples/yui/sub_divisions.html.haml", "examples/yui/templates.html.haml", "examples/yui/test.jpg", "examples/yui/typography.html.haml", "frameworks/blueprint/lib/blueprint/constants.rb", "frameworks/blueprint/lib/blueprint/grid_builder.rb", "frameworks/blueprint/stylesheets/_blueprint.sass", "frameworks/blueprint/stylesheets/blueprint/_ie.sass", "frameworks/blueprint/stylesheets/blueprint/_print.sass", "frameworks/blueprint/stylesheets/blueprint/_screen.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_form.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass", "frameworks/blueprint/templates/project/grid.png", "frameworks/blueprint/templates/project/ie.sass", "frameworks/blueprint/templates/project/manifest.rb", "frameworks/blueprint/templates/project/print.sass", "frameworks/blueprint/templates/project/screen.sass", "frameworks/blueprint.rb", "frameworks/compass/stylesheets/_compass.sass", "frameworks/compass/stylesheets/compass/_layout.sass", "frameworks/compass/stylesheets/compass/_reset.sass", "frameworks/compass/stylesheets/compass/_utilities.sass", "frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass", "frameworks/compass/stylesheets/compass/utilities/_general.sass", "frameworks/compass/stylesheets/compass/utilities/_links.sass", "frameworks/compass/stylesheets/compass/utilities/_lists.sass", "frameworks/compass/stylesheets/compass/utilities/_print.sass", "frameworks/compass/stylesheets/compass/utilities/_tables.sass", "frameworks/compass/stylesheets/compass/utilities/_text.sass", "frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass", "frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass", "frameworks/compass/stylesheets/compass/utilities/general/_reset.sass", "frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass", "frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass", "frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass", "frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass", "frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass", "frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass", "frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass", "frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass", "frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass", "frameworks/compass/templates/project/ie.sass", "frameworks/compass/templates/project/manifest.rb", "frameworks/compass/templates/project/print.sass", "frameworks/compass/templates/project/screen.sass", "frameworks/compass.rb", "frameworks/yui/COPYRIGHT", "frameworks/yui/stylesheets/_yui.sass", "frameworks/yui/stylesheets/yui/modules/_base.sass", "frameworks/yui/stylesheets/yui/modules/_fonts.sass", "frameworks/yui/stylesheets/yui/modules/_grids.sass", "frameworks/yui/templates/project/manifest.rb", "frameworks/yui/templates/project/screen.sass", "frameworks/yui.rb", "lib/compass/actions.rb", "lib/compass/commands/base.rb", "lib/compass/commands/create_project.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/compiler.rb", "lib/compass/configuration.rb", "lib/compass/core_ext.rb", "lib/compass/errors.rb", "lib/compass/exec.rb", "lib/compass/frameworks.rb", "lib/compass/installers/base.rb", "lib/compass/installers/manifest.rb", "lib/compass/installers/rails.rb", "lib/compass/installers/stand_alone.rb", "lib/compass/installers.rb", "lib/compass/logger.rb", "lib/compass/merb.rb", "lib/compass/test_case.rb", "lib/compass/validate/COPYRIGHT.html", "lib/compass/validate/css-validator-javadoc.jar", "lib/compass/validate/css-validator.jar", "lib/compass/validate/jigsaw.jar", "lib/compass/validate/JIGSAW_COPYRIGHT", "lib/compass/validate/README.html", "lib/compass/validate/xerces.jar", "lib/compass/validate/XERCES_COPYING.txt", "lib/compass/validate.rb", "lib/compass/validator.rb", "lib/compass/version.rb", "lib/compass.rb", "lib/sass_extensions.rb", "Manifest", "Rakefile", "README.markdown", "test/command_line_test.rb", "test/compass_test.rb", "test/fixtures/stylesheets/blueprint/css/typography.css", "test/fixtures/stylesheets/blueprint/sass/ie.sass", "test/fixtures/stylesheets/blueprint/sass/print.sass", "test/fixtures/stylesheets/blueprint/sass/screen.sass", "test/fixtures/stylesheets/blueprint/sass/typography.sass", "test/fixtures/stylesheets/compass/css/layout.css", "test/fixtures/stylesheets/compass/css/print.css", "test/fixtures/stylesheets/compass/css/reset.css", "test/fixtures/stylesheets/compass/css/utilities.css", "test/fixtures/stylesheets/compass/sass/layout.sass", "test/fixtures/stylesheets/compass/sass/print.sass", "test/fixtures/stylesheets/compass/sass/reset.sass", "test/fixtures/stylesheets/compass/sass/utilities.sass", "test/fixtures/stylesheets/yui/css/mixins.css", "test/fixtures/stylesheets/yui/sass/base.sass", "test/fixtures/stylesheets/yui/sass/fonts.sass", "test/fixtures/stylesheets/yui/sass/grids.sass", "test/fixtures/stylesheets/yui/sass/mixins.sass", "test/sass_extensions_test.rb", "test/test_helper.rb", "VERSION", "test/configuration_test.rb"]
14
14
  s.homepage = %q{http://github.com/chriseppstein/compass}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass", "--main", "README.markdown"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{compass}
18
18
  s.rubygems_version = %q{1.2.0}
19
19
  s.summary = %q{Sass-Based CSS Meta-Framework.}
20
- s.test_files = ["test/command_line_test.rb", "test/compass_test.rb", "test/sass_extensions_test.rb", "test/test_helper.rb"]
20
+ s.test_files = ["test/command_line_test.rb", "test/compass_test.rb", "test/configuration_test.rb", "test/sass_extensions_test.rb", "test/test_helper.rb"]
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -3,25 +3,54 @@ require 'singleton'
3
3
  module Compass
4
4
  class Configuration
5
5
  include Singleton
6
- attr_accessor :project_path, :css_dir, :sass_dir, :images_dir, :javascripts_dir
6
+ attr_accessor :project_path, :css_dir, :sass_dir, :images_dir, :javascripts_dir, :required_libraries
7
+
8
+ def initialize
9
+ self.required_libraries = []
10
+ end
7
11
 
8
12
  # parses a manifest file which is a ruby script
9
13
  # evaluated in a Manifest instance context
10
14
  def parse(config_file)
11
15
  open(config_file) do |f|
12
- eval(f.read, instance_binding, config_file)
16
+ parse_string(f.read, config_file)
17
+ end
18
+ end
19
+
20
+ def parse_string(contents, filename)
21
+ eval(contents, binding, filename)
22
+ [:css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |prop|
23
+ value = eval(prop.to_s, binding) rescue nil
24
+ self.send("#{prop}=", value) if value
13
25
  end
14
26
  end
15
27
 
28
+ def serialize
29
+ contents = ""
30
+ required_libraries.each do |lib|
31
+ contents << %Q{require '#{lib}'\n}
32
+ end
33
+ contents << "\n" if required_libraries.any?
34
+ [:css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |prop|
35
+ value = send(prop)
36
+ contents << %Q(#{prop} = "#{value}"\n) if value
37
+ end
38
+ contents
39
+ end
40
+
41
+ # Support for testing.
16
42
  def reset!
17
43
  [:project_path, :css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |attr|
18
44
  send("#{attr}=", nil)
19
45
  end
46
+ self.required_libraries = []
20
47
  end
21
48
 
22
- def instance_binding
23
- binding
49
+ def require(lib)
50
+ required_libraries << lib
51
+ super
24
52
  end
53
+
25
54
  end
26
55
 
27
56
  module ConfigHelpers
@@ -45,6 +74,17 @@ module Compass
45
74
  def configure_sass_plugin!
46
75
  Sass::Plugin.options.merge!(sass_plugin_configuration)
47
76
  end
77
+
78
+ def sass_engine_options
79
+ load_paths = []
80
+ if configuration.project_path && configuration.sass_dir
81
+ load_paths << File.join(configuration.project_path, configuration.sass_dir)
82
+ end
83
+ Compass::Frameworks::ALL.each do |framework|
84
+ load_paths << framework.stylesheets_directory
85
+ end
86
+ {:load_paths => load_paths}
87
+ end
48
88
  end
49
89
 
50
90
  extend ConfigHelpers
@@ -0,0 +1,28 @@
1
+ require File.dirname(__FILE__)+'/test_helper'
2
+ require 'compass'
3
+
4
+ class ConfigurationTest < Test::Unit::TestCase
5
+ def test_parse_and_serialize
6
+ contents = <<-CONFIG
7
+ require 'compass'
8
+ require 'sass'
9
+
10
+ css_dir = "css"
11
+ sass_dir = "sass"
12
+ images_dir = "img"
13
+ javascripts_dir = "js"
14
+ CONFIG
15
+
16
+ Compass.configuration.parse_string(contents, "test_parse")
17
+
18
+ assert_equal 'sass', Compass.configuration.sass_dir
19
+ assert_equal 'css', Compass.configuration.css_dir
20
+ assert_equal 'img', Compass.configuration.images_dir
21
+ assert_equal 'js', Compass.configuration.javascripts_dir
22
+
23
+ expected_lines = contents.split("\n").map{|l|l.strip}
24
+ actual_lines = Compass.configuration.serialize.split("\n").map{|l|l.strip}
25
+ assert_equal expected_lines, actual_lines
26
+ end
27
+
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chriseppstein-compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Eppstein
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-08 00:00:00 -08:00
12
+ date: 2009-02-12 00:00:00 -08:00
13
13
  default_executable: compass
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -249,6 +249,7 @@ files:
249
249
  - test/sass_extensions_test.rb
250
250
  - test/test_helper.rb
251
251
  - VERSION
252
+ - test/configuration_test.rb
252
253
  has_rdoc: false
253
254
  homepage: http://github.com/chriseppstein/compass
254
255
  post_install_message:
@@ -283,5 +284,6 @@ summary: Sass-Based CSS Meta-Framework.
283
284
  test_files:
284
285
  - test/command_line_test.rb
285
286
  - test/compass_test.rb
287
+ - test/configuration_test.rb
286
288
  - test/sass_extensions_test.rb
287
289
  - test/test_helper.rb