chriseppstein-compass 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -1,111 +1,104 @@
1
- CHANGELOG
2
- =========
1
+ COMPASS CHANGELOG
2
+ =================
3
3
 
4
4
  0.6.0
5
5
  -----
6
6
 
7
- * New Core Functionality: **Patterns**
8
-
9
- Patterns give a framework or plugin access to the compass installer framework
10
- to install customizable sass, html as well as image and javascript assets.
11
-
12
- A pattern is a folder in the plugin's templates directory. It must
13
- have a manifest file that tells compass what to install and where.
14
- Unlike the project template, a pattern can be stamped out any number of
15
- times.
16
-
17
- It is best for pattern stylesheets to only provide example usage to get
18
- the user started. All the core styles for the pattern should be
19
- distributed as part of the framework's stylesheets as mixins to
20
- facilitate easy upgrades and bug fixing on the part of the pattern's
21
- maintainer.
22
-
23
- Example Usage:
24
- compass --framework blueprint --pattern buttons
25
-
26
- Please read the
27
- [Wiki Page](http://wiki.github.com/chriseppstein/compass/patterns) for more information.
28
-
29
- * New Command-line options:
30
- 1. <code>--validate</code>
31
-
32
- Validate your project's compiled css. Requires java and probably only works on Mac and Unix.
33
- 2. <code>--grid-img [DIMENSIONS]</code>
34
-
35
- Generate a background image to test grid alignment. Dimension is given as
36
- <column_width>+<gutter_width>. Defaults to 30+10.
37
- 3. <code>-p, --pattern PATTERN</code>
38
-
39
- When combined with with the --framework option, will stamp a plugin's pattern named PATTERN.
40
- 4. <code>-n, --pattern-name NAME</code>
41
-
42
- When combined with the --pattern option, the pattern that gets stamped out will
43
- be isolated in subdirectories named NAME.
44
- 5. <code>-c, --write-configuration</code>
45
-
46
- Emit a compass configuration file into the current directory, taking any existing configuration
47
- file and any command line options provided into account. (command line options override
48
- configuration file options).
49
-
50
- * New Sass Functions:
51
- Compass projects can call these sass functions within their sass files, if you find them useful.
52
- 1. <code>enumerate(prefix, start, end)</code>
53
-
54
- Generates selectors with a prefix and a numerical ending
55
- counting from start to end. E.g. enumerate("foo", 1, 3) returns "foo-1, foo-2, foo-3"
56
- 2. <code>image_url(path)</code>
57
-
58
- Uses the compass configuration to convert a path relative to the compass
59
- project directory to a path that is either absolute for serving in an HTTP
60
- context or that is relative to whatever css file the function was being
61
- compiled into. In the future, this function may also tap into the rails
62
- asset host configuration.
63
-
64
- * New Compass Core Mixins
65
- 1. <code>+float-left</code> & <code>+float-right</code>
66
-
67
- In order to include fixes for IE's double-margin bug universally,
68
- floats were implemented as a utility mixins. These are available by importing
69
- compass/utilities/general/float.sass which also imports the clearfix module.
70
- 2. <code>+pie-clearfix</code>
71
-
72
- Implementation of the
73
- [position-is-everything clearfix](http://www.positioniseverything.net/easyclearing.html)
74
- that uses content :after.
75
-
76
- * Blueprint 0.8
77
- The Compass port of Blueprint has been upgraded from 0.7.1 to 0.8.0. The 0.8.0 release
78
- brings many bug fixes and a few backward incompatible changes if you use it's presentational
79
- classnames (you don't do that, do you?). Upgrading to 0.8 is automatic when you upgrade to
80
- compass 0.6.0. The Blueprint team didn't release a detailed changelog for me to point at here.
81
- One of the key features of the release was the inclusion of three new core blueprint plugins
82
- (a.k.a. folders you can copy). These are what prompted the development of the compass patterns
83
- feature and two of them are packaged as patterns:
84
- 1. Buttons
85
-
86
- To install: <code>compass --framework blueprint --pattern buttons</code>
87
-
88
- Then follow your nose.
89
- 2. Link Icons
90
-
91
- To install: <code>compass --framework blueprint --pattern buttons</code>
92
-
93
- Then follow your nose.
94
-
95
- The third plugin was the RTL (right-to-left) plugin. To use this one, simply import it after the import
96
- of the blueprint grid and your mixins will be redefined to work in a left to right manner. Additionally,
97
- it provides +rtl-typography mixin that works in conjunction with +blueprint-typography and should be mixed
98
- in with it.
99
-
100
- Lastly, I've rewrote some of the presentational class name generation code so that it very nearly
101
- matches the blueprint CSS. Please note that they are not 100% the same because we fix some bugs
102
- that are not yet fixed in blueprint-css and we use a different clearfix implementation.
103
-
104
- * Bug Fixes
105
- 1. A Safari bug related to the +clearfix mixin was resolved.
106
- 2. Running the compass command line installer a second time.
107
-
108
- * Bugs Introduced
109
-
110
- Almost definitely. Please let me know if you encounter any problems and I'll get a patch out
111
-
7
+ ### New Core Functionality: **Patterns**
8
+
9
+ Patterns give a framework or plugin access to the compass installer framework
10
+ to install customizable sass, html as well as image and javascript assets.
11
+
12
+ A pattern is a folder in the plugin's templates directory. It must
13
+ have a manifest file that tells compass what to install and where.
14
+ Unlike the project template, a pattern can be stamped out any number of
15
+ times.
16
+
17
+ It is best for pattern stylesheets to only provide example usage to get
18
+ the user started. All the core styles for the pattern should be
19
+ distributed as part of the framework's stylesheets as mixins to
20
+ facilitate easy upgrades and bug fixing on the part of the pattern's
21
+ maintainer.
22
+
23
+ Example Usage:
24
+ compass --framework blueprint --pattern buttons
25
+
26
+ Please read the
27
+ [Wiki Page](http://wiki.github.com/chriseppstein/compass/patterns) for more information.
28
+
29
+ ### New Command-line options:
30
+
31
+ 1. <code>--validate</code><br/>
32
+ Validate your project's compiled css. Requires java and probably only works on Mac and Unix.
33
+ 2. <code>--grid-img [DIMENSIONS]</code><br/>
34
+ Generate a background image to test grid alignment. Dimension is given as
35
+ <column_width>+<gutter_width>. Defaults to 30+10.
36
+ 3. <code>-p, --pattern PATTERN</code><br/>
37
+ When combined with with the --framework option, will stamp a plugin's pattern named PATTERN.
38
+ 4. <code>-n, --pattern-name NAME</code><br/>
39
+ When combined with the --pattern option, the pattern that gets stamped out will
40
+ be isolated in subdirectories named NAME.
41
+ 5. <code>-c, --write-configuration</code><br/>
42
+ Emit a compass configuration file into the current directory, taking any existing configuration
43
+ file and any command line options provided into account. (command line options override
44
+ configuration file options).
45
+
46
+ ### New Sass Functions:
47
+
48
+ Compass projects can call these sass functions within their sass files, if you find them useful.
49
+
50
+ 1. <code>enumerate(prefix, start, end)</code><br/>
51
+ Generates selectors with a prefix and a numerical ending
52
+ counting from start to end. E.g. enumerate("foo", 1, 3) returns "foo-1, foo-2, foo-3"
53
+ 2. <code>image_url(path)</code><br/>
54
+ Uses the compass configuration to convert a path relative to the compass
55
+ project directory to a path that is either absolute for serving in an HTTP
56
+ context or that is relative to whatever css file the function was being
57
+ compiled into. In the future, this function may also tap into the rails
58
+ asset host configuration.
59
+
60
+ ### New Compass Core Mixins
61
+
62
+ 1. <code>+float-left</code> & <code>+float-right</code><br/>
63
+ In order to include fixes for IE's double-margin bug universally,
64
+ floats were implemented as a utility mixins. These are available by importing
65
+ compass/utilities/general/float.sass which also imports the clearfix module.
66
+ 2. <code>+pie-clearfix</code><br/>
67
+ Implementation of the
68
+ [position-is-everything clearfix](http://www.positioniseverything.net/easyclearing.html)
69
+ that uses content :after.
70
+
71
+ ### Blueprint 0.8
72
+
73
+ The Compass port of Blueprint has been upgraded from 0.7.1 to 0.8.0. The 0.8.0 release
74
+ brings many bug fixes and a few backward incompatible changes if you use it's presentational
75
+ classnames (you don't do that, do you?). Upgrading to 0.8 is automatic when you upgrade to
76
+ compass 0.6.0. The Blueprint team didn't release a detailed changelog for me to point at here.
77
+ One of the key features of the release was the inclusion of three new core blueprint plugins
78
+ (a.k.a. folders you can copy). These are what prompted the development of the compass patterns
79
+ feature and two of them are packaged as patterns:
80
+
81
+ 1. Buttons<br/>
82
+ To install: <code>compass --framework blueprint --pattern buttons</code><br/>
83
+ Then follow your nose.
84
+ 2. Link Icons<br/>
85
+ To install: <code>compass --framework blueprint --pattern link\_icons</code><br/>
86
+ Then follow your nose.
87
+
88
+ The third plugin is the RTL (right-to-left) plugin. To use this one, simply import it after the import
89
+ of the blueprint grid and your mixins will be redefined to work in a left to right manner. Additionally,
90
+ it provides +rtl-typography mixin that works in conjunction with +blueprint-typography and should be mixed
91
+ in with it.
92
+
93
+ Lastly, I've rewrote some of the presentational class name generation code so that it very nearly
94
+ matches the blueprint CSS. Please note that they are not 100% the same because we fix some bugs
95
+ that are not yet fixed in blueprint-css and we use a different clearfix implementation.
96
+
97
+ ### Bug Fixes
98
+
99
+ 1. A Safari bug related to the +clearfix mixin was resolved.
100
+ 2. Running the compass command line installer a second time.
101
+
102
+ ### Bugs Introduced
103
+
104
+ Almost definitely. Please let me know if you encounter any problems and I'll get a patch out
data/Manifest CHANGED
@@ -159,6 +159,7 @@ lib/compass/actions.rb
159
159
  lib/compass/commands/base.rb
160
160
  lib/compass/commands/create_project.rb
161
161
  lib/compass/commands/generate_grid_background.rb
162
+ lib/compass/commands/installer_command.rb
162
163
  lib/compass/commands/list_frameworks.rb
163
164
  lib/compass/commands/print_version.rb
164
165
  lib/compass/commands/project_base.rb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
data/compass.gemspec CHANGED
@@ -1,16 +1,16 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{compass}
3
- s.version = "0.6.0"
3
+ s.version = "0.6.1"
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-04-06}
7
+ s.date = %q{2009-04-07}
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
- s.extra_rdoc_files = ["bin/compass", "CHANGELOG.markdown", "lib/compass/actions.rb", "lib/compass/commands/base.rb", "lib/compass/commands/create_project.rb", "lib/compass/commands/generate_grid_background.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/stamp_pattern.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/validate_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/commands/write_configuration.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/grid_builder.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/validator.rb", "lib/compass/version.rb", "lib/compass.rb", "lib/sass_extensions.rb", "README.markdown"]
13
- s.files = ["bin/compass", "CHANGELOG.markdown", "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/src/ie.sass", "examples/blueprint_default/src/images/grid.png", "examples/blueprint_default/src/print.sass", "examples/blueprint_default/src/screen.sass", "examples/blueprint_plugins/config.rb", "examples/blueprint_plugins/images/buttons/cross.png", "examples/blueprint_plugins/images/buttons/key.png", "examples/blueprint_plugins/images/buttons/tick.png", "examples/blueprint_plugins/images/link_icons/doc.png", "examples/blueprint_plugins/images/link_icons/email.png", "examples/blueprint_plugins/images/link_icons/external.png", "examples/blueprint_plugins/images/link_icons/feed.png", "examples/blueprint_plugins/images/link_icons/im.png", "examples/blueprint_plugins/images/link_icons/pdf.png", "examples/blueprint_plugins/images/link_icons/visited.png", "examples/blueprint_plugins/images/link_icons/xls.png", "examples/blueprint_plugins/images/test-small.jpg", "examples/blueprint_plugins/images/test.jpg", "examples/blueprint_plugins/images/valid.png", "examples/blueprint_plugins/index.html", "examples/blueprint_plugins/plugins/buttons.html", "examples/blueprint_plugins/plugins/fancy_type.html", "examples/blueprint_plugins/plugins/link_icons.html", "examples/blueprint_plugins/plugins/rtl.html", "examples/blueprint_plugins/src/buttons.sass", "examples/blueprint_plugins/src/ie.sass", "examples/blueprint_plugins/src/images/grid.png", "examples/blueprint_plugins/src/link_icons.sass", "examples/blueprint_plugins/src/print.sass", "examples/blueprint_plugins/src/rtl_screen.sass", "examples/blueprint_plugins/src/screen.sass", "examples/blueprint_scoped/src/ie.sass", "examples/blueprint_scoped/src/print.sass", "examples/blueprint_scoped/src/screen.sass", "examples/blueprint_scoped_form/src/ie.sass", "examples/blueprint_scoped_form/src/print.sass", "examples/blueprint_scoped_form/src/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/src/ie.sass", "examples/blueprint_semantic/src/images/grid.png", "examples/blueprint_semantic/src/liquid.sass", "examples/blueprint_semantic/src/print.sass", "examples/blueprint_semantic/src/screen.sass", "examples/compass/compass.html", "examples/compass/src/compass.sass", "examples/compass/src/images/blue_arrow.gif", "examples/compass/src/sticky_footer.sass", "examples/compass/src/utilities.sass", "examples/compass/sticky_footer.html.haml", "examples/compass/utilities.html.haml", "examples/logo/logo.html", "examples/logo/src/ie.sass", "examples/logo/src/print.sass", "examples/logo/src/screen.sass", "examples/yui/divisions.html.haml", "examples/yui/index.html.haml", "examples/yui/src/screen.sass", "examples/yui/sub_divisions.html.haml", "examples/yui/templates.html.haml", "examples/yui/test.jpg", "examples/yui/typography.html.haml", "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/_buttons.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/_link_icons.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_rtl.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/buttons/buttons/cross.png", "frameworks/blueprint/templates/buttons/buttons/key.png", "frameworks/blueprint/templates/buttons/buttons/tick.png", "frameworks/blueprint/templates/buttons/buttons.sass", "frameworks/blueprint/templates/buttons/manifest.rb", "frameworks/blueprint/templates/link_icons/link_icons/doc.png", "frameworks/blueprint/templates/link_icons/link_icons/email.png", "frameworks/blueprint/templates/link_icons/link_icons/external.png", "frameworks/blueprint/templates/link_icons/link_icons/feed.png", "frameworks/blueprint/templates/link_icons/link_icons/im.png", "frameworks/blueprint/templates/link_icons/link_icons/pdf.png", "frameworks/blueprint/templates/link_icons/link_icons/visited.png", "frameworks/blueprint/templates/link_icons/link_icons/xls.png", "frameworks/blueprint/templates/link_icons/link_icons.sass", "frameworks/blueprint/templates/link_icons/manifest.rb", "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/_misc.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/_float.sass", "frameworks/compass/stylesheets/compass/utilities/general/_hacks.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/tables/_borders.sass", "frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.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/generate_grid_background.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/stamp_pattern.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/validate_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/commands/write_configuration.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/grid_builder.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/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/configuration_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"]
12
+ s.extra_rdoc_files = ["bin/compass", "CHANGELOG.markdown", "lib/compass/actions.rb", "lib/compass/commands/base.rb", "lib/compass/commands/create_project.rb", "lib/compass/commands/generate_grid_background.rb", "lib/compass/commands/installer_command.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/stamp_pattern.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/validate_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/commands/write_configuration.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/grid_builder.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/validator.rb", "lib/compass/version.rb", "lib/compass.rb", "lib/sass_extensions.rb", "README.markdown"]
13
+ s.files = ["bin/compass", "CHANGELOG.markdown", "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/src/ie.sass", "examples/blueprint_default/src/images/grid.png", "examples/blueprint_default/src/print.sass", "examples/blueprint_default/src/screen.sass", "examples/blueprint_plugins/config.rb", "examples/blueprint_plugins/images/buttons/cross.png", "examples/blueprint_plugins/images/buttons/key.png", "examples/blueprint_plugins/images/buttons/tick.png", "examples/blueprint_plugins/images/link_icons/doc.png", "examples/blueprint_plugins/images/link_icons/email.png", "examples/blueprint_plugins/images/link_icons/external.png", "examples/blueprint_plugins/images/link_icons/feed.png", "examples/blueprint_plugins/images/link_icons/im.png", "examples/blueprint_plugins/images/link_icons/pdf.png", "examples/blueprint_plugins/images/link_icons/visited.png", "examples/blueprint_plugins/images/link_icons/xls.png", "examples/blueprint_plugins/images/test-small.jpg", "examples/blueprint_plugins/images/test.jpg", "examples/blueprint_plugins/images/valid.png", "examples/blueprint_plugins/index.html", "examples/blueprint_plugins/plugins/buttons.html", "examples/blueprint_plugins/plugins/fancy_type.html", "examples/blueprint_plugins/plugins/link_icons.html", "examples/blueprint_plugins/plugins/rtl.html", "examples/blueprint_plugins/src/buttons.sass", "examples/blueprint_plugins/src/ie.sass", "examples/blueprint_plugins/src/images/grid.png", "examples/blueprint_plugins/src/link_icons.sass", "examples/blueprint_plugins/src/print.sass", "examples/blueprint_plugins/src/rtl_screen.sass", "examples/blueprint_plugins/src/screen.sass", "examples/blueprint_scoped/src/ie.sass", "examples/blueprint_scoped/src/print.sass", "examples/blueprint_scoped/src/screen.sass", "examples/blueprint_scoped_form/src/ie.sass", "examples/blueprint_scoped_form/src/print.sass", "examples/blueprint_scoped_form/src/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/src/ie.sass", "examples/blueprint_semantic/src/images/grid.png", "examples/blueprint_semantic/src/liquid.sass", "examples/blueprint_semantic/src/print.sass", "examples/blueprint_semantic/src/screen.sass", "examples/compass/compass.html", "examples/compass/src/compass.sass", "examples/compass/src/images/blue_arrow.gif", "examples/compass/src/sticky_footer.sass", "examples/compass/src/utilities.sass", "examples/compass/sticky_footer.html.haml", "examples/compass/utilities.html.haml", "examples/logo/logo.html", "examples/logo/src/ie.sass", "examples/logo/src/print.sass", "examples/logo/src/screen.sass", "examples/yui/divisions.html.haml", "examples/yui/index.html.haml", "examples/yui/src/screen.sass", "examples/yui/sub_divisions.html.haml", "examples/yui/templates.html.haml", "examples/yui/test.jpg", "examples/yui/typography.html.haml", "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/_buttons.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/_link_icons.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass", "frameworks/blueprint/stylesheets/blueprint/modules/_rtl.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/buttons/buttons/cross.png", "frameworks/blueprint/templates/buttons/buttons/key.png", "frameworks/blueprint/templates/buttons/buttons/tick.png", "frameworks/blueprint/templates/buttons/buttons.sass", "frameworks/blueprint/templates/buttons/manifest.rb", "frameworks/blueprint/templates/link_icons/link_icons/doc.png", "frameworks/blueprint/templates/link_icons/link_icons/email.png", "frameworks/blueprint/templates/link_icons/link_icons/external.png", "frameworks/blueprint/templates/link_icons/link_icons/feed.png", "frameworks/blueprint/templates/link_icons/link_icons/im.png", "frameworks/blueprint/templates/link_icons/link_icons/pdf.png", "frameworks/blueprint/templates/link_icons/link_icons/visited.png", "frameworks/blueprint/templates/link_icons/link_icons/xls.png", "frameworks/blueprint/templates/link_icons/link_icons.sass", "frameworks/blueprint/templates/link_icons/manifest.rb", "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/_misc.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/_float.sass", "frameworks/compass/stylesheets/compass/utilities/general/_hacks.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/tables/_borders.sass", "frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.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/generate_grid_background.rb", "lib/compass/commands/installer_command.rb", "lib/compass/commands/list_frameworks.rb", "lib/compass/commands/print_version.rb", "lib/compass/commands/project_base.rb", "lib/compass/commands/stamp_pattern.rb", "lib/compass/commands/update_project.rb", "lib/compass/commands/validate_project.rb", "lib/compass/commands/watch_project.rb", "lib/compass/commands/write_configuration.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/grid_builder.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/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/configuration_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"]
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"]
@@ -11,6 +11,10 @@ module Compass
11
11
  self.options = options
12
12
  end
13
13
 
14
+ def execute
15
+ perform
16
+ end
17
+
14
18
  def perform
15
19
  raise StandardError.new("Not Implemented")
16
20
  end
@@ -1,7 +1,6 @@
1
1
  require 'fileutils'
2
2
  require File.join(File.dirname(__FILE__), 'stamp_pattern')
3
3
  require File.join(File.dirname(__FILE__), 'update_project')
4
- require File.join(Compass.lib_directory, 'compass', 'installers')
5
4
 
6
5
  module Compass
7
6
  module Commands
@@ -0,0 +1,31 @@
1
+ require File.join(Compass.lib_directory, 'compass', 'installers')
2
+
3
+ module Compass
4
+ module Commands
5
+ module InstallerCommand
6
+ include Compass::Installers
7
+
8
+ def configure!
9
+ read_project_configuration
10
+ Compass.configuration.set_maybe(options)
11
+ Compass.configuration.default_all(installer.configuration_defaults)
12
+ Compass.configuration.set_defaults!
13
+ end
14
+
15
+ def installer
16
+ @installer ||= case options[:project_type]
17
+ when :stand_alone
18
+ StandAloneInstaller.new *installer_args
19
+ when :rails
20
+ RailsInstaller.new *installer_args
21
+ else
22
+ raise "Unknown project type: #{options[:project_type].inspect}"
23
+ end
24
+ end
25
+
26
+ def installer_args
27
+ [template_directory(options[:pattern]), project_directory, options]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -6,7 +6,7 @@ module Compass
6
6
  self.options = options
7
7
  end
8
8
 
9
- def perform
9
+ def execute
10
10
  Compass::Frameworks::ALL.each do |framework|
11
11
  puts framework.name
12
12
  end
@@ -6,14 +6,14 @@ module Compass
6
6
  self.options = options
7
7
  end
8
8
 
9
- def perform
9
+ def execute
10
10
  if options[:quiet]
11
11
  # The quiet option may make scripting easier
12
12
  puts ::Compass.version[:string]
13
13
  else
14
14
  lines = []
15
15
  lines << "Compass #{::Compass.version[:string]}"
16
- lines << "Copyright (c) 2008 Chris Eppstein"
16
+ lines << "Copyright (c) 2008-2009 Chris Eppstein"
17
17
  lines << "Released under the MIT License."
18
18
  puts lines.join("\n")
19
19
  end
@@ -3,6 +3,7 @@ require 'sass'
3
3
  require 'fileutils'
4
4
  require 'pathname'
5
5
  require File.join(File.dirname(__FILE__), 'base')
6
+ require File.join(File.dirname(__FILE__), 'installer_command')
6
7
 
7
8
  module Compass
8
9
  module Commands
@@ -13,13 +14,21 @@ module Compass
13
14
  super(working_path, options)
14
15
  self.project_name = determine_project_name(working_path, options)
15
16
  Compass.configuration.project_path = determine_project_directory(working_path, options)
17
+ end
18
+
19
+ def execute
20
+ configure!
21
+ super
22
+ end
23
+
24
+ protected
25
+
26
+ def configure!
16
27
  read_project_configuration
17
28
  Compass.configuration.set_maybe(options)
18
29
  Compass.configuration.set_defaults!
19
30
  end
20
31
 
21
- protected
22
-
23
32
  def projectize(path)
24
33
  File.join(project_directory, separate(path))
25
34
  end
@@ -42,13 +51,19 @@ module Compass
42
51
 
43
52
  # Read the configuration file for this project
44
53
  def read_project_configuration
45
- if File.exists?(projectize('config.rb'))
46
- Compass.configuration.parse(projectize('config.rb'))
47
- elsif File.exists?(projectize('src/config.rb'))
48
- Compass.configuration.parse(projectize('src/config.rb'))
54
+ if file = detect_configuration_file
55
+ Compass.configuration.parse(file)
49
56
  end
50
57
  end
51
58
 
59
+ # TODO: Deprecate the src/config.rb location.
60
+ KNOWN_CONFIG_LOCATIONS = ["config/compass.config", "config.rb", "src/config.rb"]
61
+
62
+ # Finds the configuration file, if it exists in a known location.
63
+ def detect_configuration_file
64
+ KNOWN_CONFIG_LOCATIONS.map{|f| projectize(f)}.detect{|f| File.exists?(f)}
65
+ end
66
+
52
67
  def assert_project_directory_exists!
53
68
  if File.exists?(project_directory) && !File.directory?(project_directory)
54
69
  raise Compass::FilesystemConflict.new("#{project_directory} is not a directory.")
@@ -1,29 +1,17 @@
1
1
  require 'fileutils'
2
2
  require File.join(File.dirname(__FILE__), 'base')
3
3
  require File.join(File.dirname(__FILE__), 'update_project')
4
- require File.join(Compass.lib_directory, 'compass', 'installers')
5
4
 
6
5
  module Compass
7
6
  module Commands
8
7
  class StampPattern < ProjectBase
9
8
 
10
- include Compass::Installers
11
-
12
- attr_accessor :installer
9
+ include InstallerCommand
13
10
 
14
11
  def initialize(working_path, options)
15
12
  super(working_path, options)
16
- installer_args = [template_directory(options[:pattern]), project_directory, self.options]
17
- @installer = case options[:project_type]
18
- when :stand_alone
19
- StandAloneInstaller.new *installer_args
20
- when :rails
21
- RailsInstaller.new *installer_args
22
- else
23
- raise "Unknown project type: #{project_type}"
24
- end
25
13
  end
26
-
14
+
27
15
  # all commands must implement perform
28
16
  def perform
29
17
  installer.init
@@ -4,31 +4,17 @@ module Compass
4
4
  module Commands
5
5
  class WriteConfiguration < ProjectBase
6
6
 
7
+ include InstallerCommand
8
+
7
9
  def initialize(working_path, options)
8
10
  super
9
11
  assert_project_directory_exists!
10
12
  end
11
13
 
12
14
  def perform
13
- config_file = projectize("config.rb")
14
- if File.exists?(config_file)
15
- if options[:force]
16
- logger.record(:overwrite, config_file)
17
- else
18
- message = "#{config_file} already exists. Run with --force to overwrite."
19
- raise Compass::FilesystemConflict.new(message)
20
- end
21
- else
22
- logger.record(:create, basename(config_file))
23
- end
24
- project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
25
- open(config_file,'w') do |config|
26
- config.puts Compass.configuration.serialize
27
- end
28
- Compass.configuration.project_path = project_path
15
+ installer.write_configuration_files
29
16
  end
30
17
 
31
-
32
18
  end
33
19
  end
34
20
  end
@@ -120,12 +120,16 @@ module Compass
120
120
  if block_given? && (to_emit = yield(prop, value))
121
121
  contents << to_emit
122
122
  else
123
- contents << %Q(#{prop} = #{value.inspect}\n) unless value.nil?
123
+ contents << Configuration.serialize_property(prop, value) unless value.nil?
124
124
  end
125
125
  end
126
126
  contents
127
127
  end
128
128
 
129
+ def self.serialize_property(prop, value)
130
+ %Q(#{prop} = #{value.inspect}\n)
131
+ end
132
+
129
133
  def to_sass_plugin_options
130
134
  if project_path && sass_dir && css_dir
131
135
  proj_sass_path = File.join(project_path, sass_dir)
data/lib/compass/exec.rb CHANGED
@@ -194,7 +194,7 @@ END
194
194
  def do_command(command)
195
195
  command_class_name = command.to_s.split(/_/).map{|p| p.capitalize}.join('')
196
196
  command_class = eval("::Compass::Commands::#{command_class_name}")
197
- command_class.new(Dir.getwd, options).perform
197
+ command_class.new(Dir.getwd, options).execute
198
198
  end
199
199
 
200
200
  end
@@ -8,7 +8,6 @@ module Compass
8
8
  attr_accessor :template_path, :target_path, :working_path
9
9
  attr_accessor :options
10
10
  attr_accessor :manifest
11
- attr_accessor :css_dir, :sass_dir, :images_dir, :javascripts_dir
12
11
 
13
12
  def initialize(template_path, target_path, options = {})
14
13
  @template_path = template_path
@@ -17,13 +16,18 @@ module Compass
17
16
  @options = options
18
17
  @manifest = Manifest.new(manifest_file)
19
18
  self.logger = options[:logger]
20
- configure
21
19
  end
22
20
 
23
21
  def manifest_file
24
22
  @manifest_file ||= File.join(template_path, "manifest.rb")
25
23
  end
26
24
 
25
+ [:css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |dir|
26
+ define_method dir do
27
+ Compass.configuration.send(dir)
28
+ end
29
+ end
30
+
27
31
  # Initializes the project to work with compass
28
32
  def init
29
33
  dirs = manifest.map do |entry|
@@ -49,20 +53,6 @@ module Compass
49
53
  finalize unless options[:skip_finalization]
50
54
  end
51
55
 
52
- # The default configure method -- it sets up directories from the options
53
- # and corresponding default_* methods for those not found in the options hash.
54
- # It can be overridden it or augmented for reading config files,
55
- # prompting the user for more information, etc.
56
- def configure
57
- unless @configured
58
- [:css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |opt|
59
- configure_option_with_default opt
60
- end
61
- end
62
- ensure
63
- @configured = true
64
- end
65
-
66
56
  # The default prepare method -- it is a no-op.
67
57
  # Generally you would create required directories, etc.
68
58
  def prepare
@@ -3,29 +3,27 @@ module Compass
3
3
 
4
4
  class RailsInstaller < Base
5
5
 
6
- def configure
7
- configuration_file = targetize('config/compass.config')
8
- if File.exists?(configuration_file)
9
- open(configuration_file) do |config|
10
- eval(config.read, nil, configuration_file)
11
- end
12
- end
13
- Compass.configuration.set_maybe(options)
6
+ def configuration_defaults
7
+ {
8
+ :sass_dir => (sass_dir || prompt_sass_dir),
9
+ :css_dir => (css_dir || prompt_css_dir),
10
+ :images_dir => default_images_dir,
11
+ :javascripts_dir => default_javascripts_dir
12
+ }
13
+ end
14
+
15
+ def write_configuration_files
16
+ write_file targetize('config/compass.config'), config_contents
17
+ write_file targetize('config/initializers/compass.rb'), initializer_contents
14
18
  end
15
19
 
16
- def init
17
- set_sass_dir unless sass_dir
18
- set_css_dir unless css_dir
19
- super
20
+ def config_files_exist?
21
+ File.exists?(targetize('config/compass.config')) &&
22
+ File.exists?(targetize('config/initializers/compass.rb'))
20
23
  end
21
24
 
22
25
  def prepare
23
- write_file(targetize('config/compass.config'), Compass.configuration.serialize do |prop, value|
24
- if prop == :project_path
25
- "project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n"
26
- end
27
- end)
28
- write_file targetize('config/initializers/compass.rb'), initializer_contents
26
+ write_configuration_files unless config_files_exist?
29
27
  end
30
28
 
31
29
  def finalize(options = {})
@@ -36,42 +34,32 @@ Congratulations! Your rails project has been configured to use Compass.
36
34
  Sass will automatically compile your stylesheets during the next
37
35
  page request and keep them up to date when they change.
38
36
  Make sure you restart your server!
39
-
40
- Next add these lines to the head of your layouts:
41
-
42
37
  NEXTSTEPS
43
38
  end
39
+ puts "\nNext add these lines to the head of your layouts:\n\n"
44
40
  puts stylesheet_links
45
41
  puts "\n(You are using haml, aren't you?)"
46
42
  end
47
43
 
48
- def sass_dir
49
- Compass.configuration.sass_dir
44
+ def default_images_dir
45
+ separate("public/images")
50
46
  end
51
47
 
52
- def css_dir
53
- Compass.configuration.css_dir
48
+ def default_javascripts_dir
49
+ separate("public/javascripts")
54
50
  end
55
51
 
56
- def images_dir
57
- separate "public/images"
58
- end
59
-
60
- def javascripts_dir
61
- separate "public/javascripts"
62
- end
63
-
64
- def set_sass_dir
52
+ def prompt_sass_dir
65
53
  recommended_location = separate('app/stylesheets')
66
54
  default_location = separate('public/stylesheets/sass')
67
55
  print %Q{Compass recommends that you keep your stylesheets in #{recommended_location}
68
56
  instead of the Sass default location of #{default_location}.
69
57
  Is this OK? (Y/n) }
70
58
  answer = gets.downcase[0]
71
- Compass.configuration.sass_dir = answer == ?n ? default_location : recommended_location
59
+ answer == ?n ? default_location : recommended_location
72
60
  end
73
61
 
74
- def set_css_dir
62
+ def prompt_css_dir
75
63
  recommended_location = separate("public/stylesheets/compiled")
76
64
  default_location = separate("public/stylesheets")
77
65
  puts
@@ -80,7 +68,15 @@ instead the Sass default of #{default_location}/.
80
68
  However, if you're exclusively using Sass, then #{default_location}/ is recommended.
81
69
  Emit compiled stylesheets to #{recommended_location}/? (Y/n) }
82
70
  answer = gets.downcase[0]
83
- Compass.configuration.css_dir = answer == ?n ? default_location : recommended_location
71
+ answer == ?n ? default_location : recommended_location
72
+ end
73
+
74
+ def config_contents
75
+ Compass.configuration.serialize do |prop, value|
76
+ if prop == :project_path
77
+ "project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n"
78
+ end
79
+ end
84
80
  end
85
81
 
86
82
  def initializer_contents
@@ -3,46 +3,33 @@ module Compass
3
3
 
4
4
  class StandAloneInstaller < Base
5
5
 
6
- def configure
7
- if File.exists?(config_file)
8
- Compass.configuration.parse(config_file)
9
- elsif File.exists?(old_config_file)
10
- Compass.configuration.parse(old_config_file)
11
- end
12
- super
13
- end
14
-
15
6
  def init
16
7
  directory targetize("")
17
8
  super
18
9
  end
19
10
 
20
- def prepare
21
- end
22
-
23
- def default_css_dir
24
- Compass.configuration.css_dir || "stylesheets"
11
+ def write_configuration_files
12
+ write_file targetize('config.rb'), config_contents
25
13
  end
26
14
 
27
- def default_sass_dir
28
- Compass.configuration.sass_dir ||"src"
15
+ def config_files_exist?
16
+ File.exists? targetize('config.rb')
29
17
  end
30
18
 
31
- def default_images_dir
32
- Compass.configuration.images_dir || "images"
19
+ def config_contents
20
+ project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
21
+ Compass.configuration.serialize
22
+ ensure
23
+ Compass.configuration.project_path = project_path
33
24
  end
34
25
 
35
- def default_javascripts_dir
36
- Compass.configuration.javascripts_dir || "javascripts"
37
- end
38
-
39
- # Read the configuration file for this project
40
- def config_file
41
- @config_file ||= targetize('config.rb')
26
+ def prepare
27
+ write_configuration_files unless config_files_exist?
42
28
  end
43
29
 
44
- def old_config_file
45
- @old_config_file ||= targetize('src/config.rb')
30
+ # We want to rely on the defaults provided by Configuration
31
+ def configuration_defaults
32
+ {}
46
33
  end
47
34
 
48
35
  def finalize(options = {})
@@ -11,6 +11,20 @@ class CommandLineTest < Test::Unit::TestCase
11
11
  Compass.configuration.reset!
12
12
  end
13
13
 
14
+ def test_print_version
15
+ compass "-vq"
16
+ assert_match /\d+\.\d+\.\d+( [0-9a-f]+)?/, @last_result
17
+ end
18
+
19
+ def test_list_frameworks
20
+ compass "--list-frameworks"
21
+ assert_equal(<<-FRAMEWORKS, @last_result)
22
+ blueprint
23
+ compass
24
+ yui
25
+ FRAMEWORKS
26
+ end
27
+
14
28
  def test_basic_install
15
29
  within_tmp_directory do
16
30
  compass "basic"
@@ -12,6 +12,8 @@ class ConfigurationTest < Test::Unit::TestCase
12
12
  sass_dir = "sass"
13
13
  images_dir = "img"
14
14
  javascripts_dir = "js"
15
+ # To enable relative image paths using the images_url() function:
16
+ # http_images_path = :relative
15
17
  CONFIG
16
18
 
17
19
  Compass.configuration.parse_string(contents, "test_parse")
@@ -1,6 +1,6 @@
1
1
  body {
2
2
  line-height: 1.5;
3
- font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
3
+ font-family: Helvetica Neue, Arial, Helvetica, sans-serif;
4
4
  color: #333333;
5
5
  font-size: 75%; }
6
6
 
@@ -31,8 +31,7 @@ h4 {
31
31
  color: #222222;
32
32
  font-size: 1.2em;
33
33
  line-height: 1.25;
34
- margin-bottom: 1.25em;
35
- height: 1.25em; }
34
+ margin-bottom: 1.25em; }
36
35
 
37
36
  h5 {
38
37
  font-weight: normal;
@@ -52,15 +51,16 @@ h2 img, h3 img, h4 img, h5 img, h6 img {
52
51
 
53
52
  p {
54
53
  margin: 0 0 1.5em; }
55
- p img {
54
+ p img.left {
56
55
  display: inline;
57
56
  float: left;
58
57
  margin: 1.5em 1.5em 1.5em 0;
59
58
  padding: 0; }
60
- p img.right {
61
- display: inline;
62
- float: right;
63
- margin: 1.5em 0 1.5em 1.5em; }
59
+ p img.right {
60
+ display: inline;
61
+ float: right;
62
+ margin: 1.5em 0 1.5em 1.5em;
63
+ padding: 0; }
64
64
 
65
65
  a {
66
66
  text-decoration: underline;
@@ -102,13 +102,11 @@ address {
102
102
  del {
103
103
  color: #666; }
104
104
 
105
- pre, code {
105
+ pre {
106
106
  margin: 1.5em 0;
107
- white-space: pre;
108
- font: 1em 'andale mono', 'lucida console', monospace;
109
- line-height: 1.5; }
107
+ white-space: pre; }
110
108
 
111
- tt {
109
+ pre, code, tt {
112
110
  font: 1em 'andale mono', 'lucida console', monospace;
113
111
  line-height: 1.5; }
114
112
 
@@ -136,15 +134,16 @@ table {
136
134
  width: 100%; }
137
135
 
138
136
  th {
139
- font-weight: bold;
140
- background: #C3D9FF;
141
- padding: 4px 10px 4px 5px; }
137
+ font-weight: bold; }
138
+
139
+ thead th {
140
+ background: #c3d9ff; }
142
141
 
143
- td {
142
+ th, td, caption {
144
143
  padding: 4px 10px 4px 5px; }
145
144
 
146
145
  tr.even td {
147
- background: #E5ECF9; }
146
+ background: #e5ecf9; }
148
147
 
149
148
  tfoot {
150
149
  font-style: italic; }
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.6.0
4
+ version: 0.6.1
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-04-06 00:00:00 -07:00
12
+ date: 2009-04-07 00:00:00 -07:00
13
13
  default_executable: compass
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -45,6 +45,7 @@ extra_rdoc_files:
45
45
  - lib/compass/commands/base.rb
46
46
  - lib/compass/commands/create_project.rb
47
47
  - lib/compass/commands/generate_grid_background.rb
48
+ - lib/compass/commands/installer_command.rb
48
49
  - lib/compass/commands/list_frameworks.rb
49
50
  - lib/compass/commands/print_version.rb
50
51
  - lib/compass/commands/project_base.rb
@@ -243,6 +244,7 @@ files:
243
244
  - lib/compass/commands/base.rb
244
245
  - lib/compass/commands/create_project.rb
245
246
  - lib/compass/commands/generate_grid_background.rb
247
+ - lib/compass/commands/installer_command.rb
246
248
  - lib/compass/commands/list_frameworks.rb
247
249
  - lib/compass/commands/print_version.rb
248
250
  - lib/compass/commands/project_base.rb