compass 0.8.17 → 0.10.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +165 -0
- data/README.markdown +15 -3
- data/Rakefile +46 -7
- data/VERSION.yml +3 -2
- data/bin/compass +22 -4
- data/examples/blueprint_default/index.html.haml +3 -3
- data/examples/blueprint_default/parts/forms.html.haml +2 -0
- data/examples/blueprint_default/src/screen.sass +1 -1
- data/examples/blueprint_plugins/index.html.haml +6 -6
- data/examples/blueprint_plugins/src/buttons.sass +2 -2
- data/examples/blueprint_plugins/src/link_icons.sass +1 -1
- data/examples/blueprint_plugins/src/rtl_screen.sass +3 -3
- data/examples/blueprint_plugins/src/screen.sass +2 -2
- data/examples/blueprint_scoped/src/ie.sass +2 -1
- data/examples/blueprint_scoped/src/print.sass +2 -1
- data/examples/blueprint_scoped/src/screen.sass +2 -1
- data/examples/blueprint_semantic/parts/fancy_type.html.haml +1 -1
- data/examples/blueprint_semantic/src/liquid.sass +5 -6
- data/examples/blueprint_semantic/src/screen.sass +4 -5
- data/examples/compass/bootstrap.rb +3 -0
- data/{frameworks → examples/compass/extensions}/yui/stylesheets/_yui.sass +0 -0
- data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
- data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_fonts.sass +8 -1
- data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_grids.sass +174 -130
- data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_reset.sass +0 -0
- data/{frameworks → examples/compass/extensions}/yui/templates/project/manifest.rb +0 -0
- data/{frameworks → examples/compass/extensions}/yui/templates/project/screen.sass +0 -0
- data/examples/compass/src/utilities.sass +2 -2
- data/examples/css3/config.rb +6 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +7 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +5 -0
- data/examples/css3/images/fresh-peas.jpg +0 -0
- data/examples/css3/index.html.haml +55 -0
- data/examples/css3/src/_base.sass +14 -0
- data/examples/css3/src/fancy-fonts.sass +7 -0
- data/examples/css3/src/gradient.sass +10 -0
- data/examples/css3/src/main.sass +80 -0
- data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
- data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
- data/examples/downloader.rb +57 -0
- data/examples/ninesixty/bootstrap.rb +4 -0
- data/examples/ninesixty/config.rb +9 -0
- data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
- data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
- data/examples/ninesixty/src/grid.sass +16 -0
- data/examples/ninesixty/src/text.sass +10 -0
- data/examples/susy/bootstrap.rb +3 -0
- data/examples/susy/config.rb +9 -0
- data/examples/susy/extensions/susy/LICENSE.txt +28 -0
- data/examples/susy/extensions/susy/README.mkdn +235 -0
- data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +35 -0
- data/examples/susy/extensions/susy/docs/tutorial/build.sh +141 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +100 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +98 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +147 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +19 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +147 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +48 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +14 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +63 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +1450 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +100 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +91 -0
- data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +301 -0
- data/examples/susy/extensions/susy/lib/susy.rb +2 -0
- data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +5 -0
- data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +79 -0
- data/examples/susy/extensions/susy/sass/susy/_grid.sass +128 -0
- data/examples/susy/extensions/susy/sass/susy/_reset.sass +7 -0
- data/examples/susy/extensions/susy/sass/susy/_susy.sass +23 -0
- data/examples/susy/extensions/susy/sass/susy/_text.sass +15 -0
- data/examples/susy/extensions/susy/sass/susy/_utils.sass +81 -0
- data/examples/susy/extensions/susy/templates/project/_base.sass +62 -0
- data/examples/susy/extensions/susy/templates/project/_defaults.sass +147 -0
- data/examples/susy/extensions/susy/templates/project/ie.sass +9 -0
- data/examples/susy/extensions/susy/templates/project/manifest.rb +5 -0
- data/examples/susy/extensions/susy/templates/project/print.sass +7 -0
- data/examples/susy/extensions/susy/templates/project/screen.sass +44 -0
- data/examples/susy/src/_base.sass +62 -0
- data/examples/susy/src/_defaults.sass +148 -0
- data/examples/susy/src/screen.sass +114 -0
- data/examples/yui/bootstrap.rb +3 -0
- data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
- data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
- data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
- data/features/command_line.feature +226 -0
- data/features/extensions.feature +20 -0
- data/features/step_definitions/command_line_steps.rb +223 -0
- data/features/step_definitions/extension_steps.rb +13 -0
- data/lib/compass.rb +6 -7
- data/lib/compass/actions.rb +7 -1
- data/lib/compass/app_integration.rb +23 -4
- data/lib/compass/app_integration/merb.rb +1 -43
- data/lib/compass/app_integration/merb/runtime.rb +63 -0
- data/lib/compass/app_integration/rails.rb +24 -10
- data/lib/compass/app_integration/rails/configuration_defaults.rb +45 -0
- data/lib/compass/app_integration/rails/installer.rb +127 -0
- data/lib/compass/app_integration/rails/runtime.rb +14 -0
- data/lib/compass/app_integration/stand_alone.rb +22 -0
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +28 -0
- data/lib/compass/app_integration/stand_alone/installer.rb +83 -0
- data/lib/compass/commands.rb +11 -0
- data/lib/compass/commands/base.rb +4 -1
- data/lib/compass/commands/create_project.rb +108 -5
- data/lib/compass/commands/generate_grid_background.rb +73 -6
- data/lib/compass/commands/help.rb +89 -0
- data/lib/compass/commands/installer_command.rb +20 -13
- data/lib/compass/commands/interactive.rb +61 -0
- data/lib/compass/commands/list_frameworks.rb +2 -2
- data/lib/compass/commands/print_version.rb +72 -4
- data/lib/compass/commands/project_base.rb +14 -34
- data/lib/compass/commands/project_stats.rb +162 -0
- data/lib/compass/commands/registry.rb +22 -0
- data/lib/compass/commands/stamp_pattern.rb +56 -3
- data/lib/compass/commands/update_project.rb +60 -6
- data/lib/compass/commands/validate_project.rb +62 -6
- data/lib/compass/commands/watch_project.rb +12 -5
- data/lib/compass/commands/write_configuration.rb +89 -4
- data/lib/compass/compiler.rb +13 -4
- data/lib/compass/configuration.rb +29 -310
- data/lib/compass/configuration/adapters.rb +59 -0
- data/lib/compass/configuration/comments.rb +22 -0
- data/lib/compass/configuration/data.rb +106 -0
- data/lib/compass/configuration/defaults.rb +138 -0
- data/lib/compass/configuration/helpers.rb +120 -0
- data/lib/compass/configuration/inheritance.rb +170 -0
- data/lib/compass/configuration/serialization.rb +86 -0
- data/lib/compass/dependencies.rb +4 -8
- data/lib/compass/errors.rb +4 -1
- data/lib/compass/exec.rb +11 -246
- data/lib/compass/exec/command_option_parser.rb +23 -0
- data/lib/compass/exec/global_options_parser.rb +37 -0
- data/lib/compass/exec/helpers.rb +28 -0
- data/lib/compass/exec/project_options_parser.rb +46 -0
- data/lib/compass/exec/sub_command_ui.rb +45 -0
- data/lib/compass/exec/switch_ui.rb +166 -0
- data/lib/compass/frameworks.rb +70 -7
- data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +31 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_buttons.sass +27 -27
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_colors.sass +0 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_debug.sass +2 -2
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_fancy_type.sass +19 -19
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +56 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_grid.sass +34 -33
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +99 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +58 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_link_icons.sass +9 -9
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_liquid.sass +29 -29
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +87 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_reset.sass +20 -18
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +123 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_scaffolding.sass +6 -4
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +162 -0
- data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_utilities.sass +15 -15
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +3 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +2 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +2 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons.sass +4 -4
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/key.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +17 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons.sass +1 -1
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +23 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/grid.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
- data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +32 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/partials/_base.sass +0 -0
- data/lib/compass/frameworks/blueprint/templates/project/print.sass +8 -0
- data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/screen.sass +3 -2
- data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +21 -0
- data/lib/compass/frameworks/compass/stylesheets/_compass.sass +2 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +14 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_layout.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_misc.sass +12 -12
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_reset.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_utilities.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +16 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +14 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_border_radius.sass +47 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +20 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_sizing.sass +13 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_columns.sass +37 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +31 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +40 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_inline_block.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_opacity.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +15 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +62 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +57 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/layout/_sticky_footer.sass +9 -7
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_general.sass +0 -1
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_links.sass +1 -1
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_lists.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_print.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_tables.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_text.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_clearfix.sass +7 -7
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_float.sass +2 -2
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_hacks.sass +2 -2
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_reset.sass +28 -28
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/links/_hover_link.sass +2 -2
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/links/_link_colors.sass +6 -6
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +7 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_bullets.sass +6 -6
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +6 -6
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_inline_list.sass +9 -9
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +52 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_ellipsis.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_nowrap.sass +1 -1
- data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_replacement.sass +6 -6
- data/{frameworks → lib/compass/frameworks}/compass/templates/ellipsis/ellipsis.sass +0 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +27 -0
- data/{frameworks → lib/compass/frameworks}/compass/templates/ellipsis/xml/ellipsis.xml +0 -0
- data/lib/compass/frameworks/compass/templates/extension/manifest.rb +20 -0
- data/lib/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
- data/lib/compass/frameworks/compass/templates/project/USAGE.markdown +32 -0
- data/{frameworks → lib/compass/frameworks}/compass/templates/project/ie.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/templates/project/manifest.rb +1 -0
- data/{frameworks → lib/compass/frameworks}/compass/templates/project/print.sass +0 -0
- data/{frameworks → lib/compass/frameworks}/compass/templates/project/screen.sass +0 -0
- data/lib/compass/grid_builder.rb +15 -11
- data/lib/compass/installers.rb +3 -5
- data/lib/compass/installers/bare_installer.rb +58 -0
- data/lib/compass/installers/base.rb +40 -51
- data/lib/compass/installers/manifest.rb +55 -2
- data/lib/compass/installers/manifest_installer.rb +59 -0
- data/lib/compass/installers/template_context.rb +44 -0
- data/lib/compass/logger.rb +28 -2
- data/lib/compass/sass_extensions.rb +2 -2
- data/lib/compass/sass_extensions/functions.rb +4 -2
- data/lib/compass/sass_extensions/functions/color_stop.rb +10 -0
- data/lib/compass/sass_extensions/functions/font_files.rb +11 -0
- data/lib/compass/sass_extensions/functions/inline_image.rb +22 -1
- data/lib/compass/sass_extensions/functions/selectors.rb +4 -1
- data/lib/compass/sass_extensions/functions/urls.rb +22 -2
- data/lib/compass/sass_extensions/monkey_patches.rb +3 -3
- data/lib/compass/sass_extensions/monkey_patches/traversal.rb +23 -0
- data/lib/compass/stats.rb +92 -0
- data/lib/compass/validator.rb +2 -3
- data/lib/vendor/fssm/state.rb +1 -1
- data/test/command_line_helper.rb +19 -16
- data/test/command_line_test.rb +5 -4
- data/test/compass_test.rb +16 -15
- data/test/configuration_test.rb +24 -19
- data/test/fixtures/stylesheets/blueprint/css/typography.css +5 -3
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
- data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
- data/test/fixtures/stylesheets/compass/css/layout.css +2 -0
- data/test/fixtures/stylesheets/compass/css/print.css +2 -8
- data/test/fixtures/stylesheets/compass/css/reset.css +3 -3
- data/test/fixtures/stylesheets/image_urls/css/screen.css +2 -0
- data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
- data/test/fixtures/stylesheets/relative/config.rb +9 -0
- data/test/fixtures/stylesheets/relative/css/ie.css +1 -0
- data/test/fixtures/stylesheets/relative/css/print.css +1 -0
- data/test/fixtures/stylesheets/relative/css/screen.css +1 -0
- data/test/fixtures/stylesheets/relative/sass/ie.sass +6 -0
- data/test/fixtures/stylesheets/relative/sass/print.sass +6 -0
- data/test/fixtures/stylesheets/relative/sass/screen.sass +3 -0
- data/test/io_helper.rb +36 -0
- data/test/rails_helper.rb +40 -0
- data/test/rails_integration_test.rb +7 -44
- data/test/sass_extensions_test.rb +2 -2
- data/test/test_helper.rb +9 -2
- metadata +257 -110
- data/frameworks/blueprint.rb +0 -2
- data/frameworks/blueprint/stylesheets/_blueprint.sass +0 -3
- data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +0 -93
- data/frameworks/blueprint/stylesheets/blueprint/_print.sass +0 -83
- data/frameworks/blueprint/stylesheets/blueprint/_reset.sass +0 -3
- data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +0 -15
- data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +0 -55
- data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +0 -58
- data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +0 -104
- data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +0 -155
- data/frameworks/blueprint/templates/buttons/manifest.rb +0 -5
- data/frameworks/blueprint/templates/link_icons/manifest.rb +0 -10
- data/frameworks/blueprint/templates/project/ie.sass +0 -15
- data/frameworks/blueprint/templates/project/manifest.rb +0 -6
- data/frameworks/blueprint/templates/project/print.sass +0 -3
- data/frameworks/compass.rb +0 -2
- data/frameworks/compass/stylesheets/_compass.sass +0 -1
- data/frameworks/compass/stylesheets/compass/utilities/_print.sass +0 -24
- data/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +0 -1
- data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +0 -6
- data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +0 -19
- data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +0 -5
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +0 -12
- data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +0 -20
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +0 -27
- data/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +0 -9
- data/frameworks/compass/templates/ellipsis/manifest.rb +0 -2
- data/frameworks/yui.rb +0 -2
- data/frameworks/yui/stylesheets/yui/modules/_base.sass +0 -60
- data/lib/compass/installers/rails.rb +0 -135
- data/lib/compass/installers/stand_alone.rb +0 -60
- data/test/fixtures/stylesheets/yui/config.rb +0 -9
- data/test/fixtures/stylesheets/yui/css/mixins.css +0 -13
- data/test/fixtures/stylesheets/yui/sass/base.sass +0 -3
- data/test/fixtures/stylesheets/yui/sass/fonts.sass +0 -3
- data/test/fixtures/stylesheets/yui/sass/grids.sass +0 -3
- data/test/fixtures/stylesheets/yui/sass/mixins.sass +0 -16
data/lib/compass/dependencies.rb
CHANGED
data/lib/compass/errors.rb
CHANGED
data/lib/compass/exec.rb
CHANGED
@@ -1,251 +1,16 @@
|
|
1
|
-
require
|
1
|
+
require 'compass/dependencies'
|
2
2
|
require 'optparse'
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require 'compass/logger'
|
4
|
+
require 'compass/errors'
|
5
|
+
require 'compass/actions'
|
6
|
+
require 'compass/installers'
|
7
|
+
require 'compass/commands'
|
6
8
|
|
7
|
-
module Compass
|
8
|
-
module Exec
|
9
|
-
|
10
|
-
def report_error(e, options)
|
11
|
-
$stderr.puts "#{e.class} on line #{get_line e} of #{get_file e}: #{e.message}"
|
12
|
-
if options[:trace]
|
13
|
-
e.backtrace[1..-1].each { |t| $stderr.puts " #{t}" }
|
14
|
-
else
|
15
|
-
$stderr.puts "Run with --trace to see the full backtrace"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def get_file(exception)
|
20
|
-
exception.backtrace[0].split(/:/, 2)[0]
|
21
|
-
end
|
22
|
-
|
23
|
-
def get_line(exception)
|
24
|
-
exception.backtrace[0].scan(/:(\d+)/)[0]
|
25
|
-
end
|
26
|
-
module_function :report_error, :get_file, :get_line
|
27
|
-
|
28
|
-
class Compass
|
29
|
-
|
30
|
-
attr_accessor :args, :options, :opts
|
31
|
-
|
32
|
-
def initialize(args)
|
33
|
-
self.args = args
|
34
|
-
self.options = {}
|
35
|
-
parse!
|
36
|
-
end
|
37
|
-
|
38
|
-
def run!
|
39
|
-
begin
|
40
|
-
perform!
|
41
|
-
rescue Exception => e
|
42
|
-
raise e if e.is_a? SystemExit
|
43
|
-
if e.is_a?(::Compass::Error) || e.is_a?(OptionParser::ParseError)
|
44
|
-
$stderr.puts e.message
|
45
|
-
else
|
46
|
-
::Compass::Exec.report_error(e, @options)
|
47
|
-
end
|
48
|
-
return 1
|
49
|
-
end
|
50
|
-
return 0
|
51
|
-
end
|
52
|
-
|
53
|
-
protected
|
54
|
-
|
55
|
-
def perform!
|
56
|
-
if options[:command]
|
57
|
-
do_command(options[:command])
|
58
|
-
else
|
59
|
-
puts self.opts
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def parse!
|
64
|
-
self.opts = OptionParser.new(&method(:set_opts))
|
65
|
-
self.opts.parse!(self.args)
|
66
|
-
if self.args.size > 0
|
67
|
-
self.options[:project_name] = trim_trailing_separator(self.args.shift)
|
68
|
-
end
|
69
|
-
self.options[:command] ||= self.options[:project_name] ? :create_project : :update_project
|
70
|
-
self.options[:framework] ||= :compass
|
71
|
-
self.options[:project_type] ||= :stand_alone
|
72
|
-
end
|
73
|
-
|
74
|
-
def trim_trailing_separator(path)
|
75
|
-
path[-1..-1] == File::SEPARATOR ? path[0..-2] : path
|
76
|
-
end
|
77
|
-
|
78
|
-
def set_opts(opts)
|
79
|
-
opts.banner = <<END
|
80
|
-
Usage: compass [options] [project]
|
81
|
-
|
82
|
-
Description:
|
83
|
-
The compass command line tool will help you create and manage the stylesheets for your project.
|
84
|
-
|
85
|
-
To get started on a stand-alone project based on blueprint:
|
86
|
-
|
87
|
-
compass -f blueprint my_compass_project
|
88
|
-
|
89
|
-
When you change any sass files, you must recompile your project using --update or --watch.
|
90
|
-
END
|
91
|
-
opts.separator ''
|
92
|
-
opts.separator 'Mode Options(only specify one):'
|
93
|
-
|
94
|
-
opts.on('-i', '--install', :NONE, "Create a new compass project.",
|
95
|
-
" The default mode when a project is provided.") do
|
96
|
-
self.options[:command] = :create_project
|
97
|
-
end
|
98
|
-
|
99
|
-
opts.on('-u', '--update', :NONE, 'Update the current project.',
|
100
|
-
' This is the default when no project is provided.') do
|
101
|
-
self.options[:command] = :update_project
|
102
|
-
end
|
103
|
-
|
104
|
-
opts.on('-w', '--watch', :NONE, 'Monitor the current project for changes and update') do
|
105
|
-
self.options[:command] = :watch_project
|
106
|
-
self.options[:quiet] = true
|
107
|
-
end
|
108
|
-
|
109
|
-
opts.on('-p', '--pattern PATTERN', 'Stamp out a pattern into the current project.',
|
110
|
-
' Must be used with -f.') do |pattern|
|
111
|
-
self.options[:command] = :stamp_pattern
|
112
|
-
self.options[:pattern] = pattern
|
113
|
-
end
|
114
|
-
|
115
|
-
opts.on('--write-configuration', "Write the current configuration to the configuration file.") do
|
116
|
-
self.options[:command] = :write_configuration
|
117
|
-
end
|
118
|
-
|
119
|
-
opts.on('--list-frameworks', "List compass frameworks available to use.") do
|
120
|
-
self.options[:command] = :list_frameworks
|
121
|
-
end
|
122
|
-
|
123
|
-
opts.on('--validate', :NONE, 'Validate your project\'s compiled css. Requires Java.') do
|
124
|
-
self.options[:command] = :validate_project
|
125
|
-
end
|
126
|
-
|
127
|
-
opts.on('--grid-img [DIMENSIONS]', 'Generate a background image to test grid alignment.',
|
128
|
-
' Dimension is given as <column_width>+<gutter_width>.',
|
129
|
-
' Defaults to 30+10.') do |dimensions|
|
130
|
-
self.options[:grid_dimensions] = dimensions || "30+10"
|
131
|
-
unless self.options[:grid_dimensions] =~ /^\d+\+\d+$/
|
132
|
-
puts "Please enter your dimensions as <column_width>+<gutter_width>. E.g. 20+5 or 30+10."
|
133
|
-
exit
|
134
|
-
end
|
135
|
-
self.options[:command] = :generate_grid_background
|
136
|
-
end
|
137
|
-
|
138
|
-
opts.separator ''
|
139
|
-
opts.separator 'Install/Pattern Options:'
|
140
|
-
|
141
|
-
opts.on('-f FRAMEWORK', '--framework FRAMEWORK', 'Use the specified framework. Only one may be specified.') do |framework|
|
142
|
-
self.options[:framework] = framework
|
143
|
-
end
|
144
|
-
|
145
|
-
opts.on('-n', '--pattern-name NAME', 'The name to use when stamping a pattern.',
|
146
|
-
' Must be used in combination with -p.') do |name|
|
147
|
-
self.options[:pattern_name] = name
|
148
|
-
end
|
149
|
-
|
150
|
-
opts.on('--rails', "Sets the project type to a rails project.") do
|
151
|
-
self.options[:project_type] = :rails
|
152
|
-
end
|
153
|
-
|
154
|
-
opts.separator ''
|
155
|
-
opts.separator 'Configuration Options:'
|
156
|
-
|
157
|
-
opts.on('-c', '--config CONFIG_FILE', 'Specify the location of the configuration file explicitly.') do |configuration_file|
|
158
|
-
self.options[:configuration_file] = configuration_file
|
159
|
-
end
|
160
|
-
|
161
|
-
opts.on('--sass-dir SRC_DIR', "The source directory where you keep your sass stylesheets.") do |sass_dir|
|
162
|
-
self.options[:sass_dir] = sass_dir
|
163
|
-
end
|
164
|
-
|
165
|
-
opts.on('--css-dir CSS_DIR', "The target directory where you keep your css stylesheets.") do |css_dir|
|
166
|
-
self.options[:css_dir] = css_dir
|
167
|
-
end
|
168
|
-
|
169
|
-
opts.on('--images-dir IMAGES_DIR', "The directory where you keep your images.") do |images_dir|
|
170
|
-
self.options[:images_dir] = images_dir
|
171
|
-
end
|
172
|
-
|
173
|
-
opts.on('--javascripts-dir JS_DIR', "The directory where you keep your javascripts.") do |javascripts_dir|
|
174
|
-
self.options[:javascripts_dir] = javascripts_dir
|
175
|
-
end
|
176
|
-
|
177
|
-
opts.on('-e ENV', '--environment ENV', [:development, :production], 'Use sensible defaults for your current environment.',
|
178
|
-
' One of: development, production (default)') do |env|
|
179
|
-
self.options[:environment] = env
|
180
|
-
end
|
181
|
-
|
182
|
-
opts.on('-s STYLE', '--output-style STYLE', [:nested, :expanded, :compact, :compressed], 'Select a CSS output mode.',
|
183
|
-
' One of: nested, expanded, compact, compressed') do |style|
|
184
|
-
self.options[:output_style] = style
|
185
|
-
end
|
186
|
-
|
187
|
-
opts.on('--relative-assets', :NONE, 'Make compass asset helpers generate relative urls to assets.') do
|
188
|
-
self.options[:relative_assets] = true
|
189
|
-
end
|
190
|
-
|
191
|
-
opts.separator ''
|
192
|
-
opts.separator 'General Options:'
|
193
|
-
|
194
|
-
opts.on('-r LIBRARY', '--require LIBRARY', "Require the given ruby LIBRARY before running commands.",
|
195
|
-
" This is used to access compass plugins without having a",
|
196
|
-
" project configuration file.") do |library|
|
197
|
-
::Compass.configuration.require library
|
198
|
-
end
|
199
|
-
|
200
|
-
opts.on('-q', '--quiet', :NONE, 'Quiet mode.') do
|
201
|
-
self.options[:quiet] = true
|
202
|
-
end
|
203
|
-
|
204
|
-
opts.on('--dry-run', :NONE, 'Dry Run. Tells you what it plans to do.') do
|
205
|
-
self.options[:dry_run] = true
|
206
|
-
end
|
207
|
-
|
208
|
-
opts.on('--trace', :NONE, 'Show a full stacktrace on error') do
|
209
|
-
self.options[:trace] = true
|
210
|
-
end
|
211
|
-
|
212
|
-
opts.on('--force', :NONE, 'Force. Allows some failing commands to succeed instead.') do
|
213
|
-
self.options[:force] = true
|
214
|
-
end
|
215
|
-
|
216
|
-
opts.on('--imports', :NONE, 'Emit an imports suitable for passing to the sass command-line.',
|
217
|
-
' Example: sass `compass --imports`',
|
218
|
-
' Note: Compass\'s Sass extensions will not be available.') do
|
219
|
-
print ::Compass::Frameworks::ALL.map{|f| "-I #{f.stylesheets_directory}"}.join(' ')
|
220
|
-
exit
|
221
|
-
end
|
222
|
-
|
223
|
-
opts.on('--install-dir', :NONE, 'Emit the location where compass is installed.') do
|
224
|
-
puts ::Compass.base_directory
|
225
|
-
exit
|
226
|
-
end
|
227
|
-
|
228
|
-
opts.on_tail("-?", "-h", "--help", "Show this message") do
|
229
|
-
puts opts
|
230
|
-
exit
|
231
|
-
end
|
232
|
-
|
233
|
-
opts.on_tail("-v", "--version", "Print version") do
|
234
|
-
self.options[:command] = :print_version
|
235
|
-
end
|
236
|
-
|
237
|
-
end
|
238
|
-
|
239
|
-
def do_command(command)
|
240
|
-
command_class_name = command.to_s.split(/_/).map{|p| p.capitalize}.join('')
|
241
|
-
command_class = eval("::Compass::Commands::#{command_class_name}")
|
242
|
-
command_class.new(Dir.getwd, options).execute
|
243
|
-
end
|
244
|
-
|
245
|
-
end
|
246
|
-
end
|
9
|
+
module Compass::Exec
|
247
10
|
end
|
248
11
|
|
249
|
-
|
250
|
-
|
12
|
+
%w(helpers switch_ui sub_command_ui
|
13
|
+
global_options_parser project_options_parser
|
14
|
+
command_option_parser).each do |lib|
|
15
|
+
require "compass/exec/#{lib}"
|
251
16
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Compass::Exec
|
2
|
+
class CommandOptionParser
|
3
|
+
attr_accessor :options, :arguments, :opts
|
4
|
+
def initialize(arguments)
|
5
|
+
self.arguments = arguments
|
6
|
+
self.options = {}
|
7
|
+
end
|
8
|
+
def parse!
|
9
|
+
opts.parse!(arguments)
|
10
|
+
end
|
11
|
+
def opts
|
12
|
+
OptionParser.new do |opts|
|
13
|
+
self.set_options(opts)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
def set_options(opts)
|
17
|
+
|
18
|
+
end
|
19
|
+
def to_s
|
20
|
+
opts.to_s
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Compass::Exec::GlobalOptionsParser
|
2
|
+
def set_options(opts)
|
3
|
+
super
|
4
|
+
set_global_options(opts)
|
5
|
+
end
|
6
|
+
def set_global_options(opts)
|
7
|
+
opts.on('-r LIBRARY', '--require LIBRARY',
|
8
|
+
"Require the given ruby LIBRARY before running commands.",
|
9
|
+
" This is used to access compass plugins without having a",
|
10
|
+
" project configuration file.") do |library|
|
11
|
+
::Compass.configuration.require library
|
12
|
+
end
|
13
|
+
|
14
|
+
opts.on('-q', '--quiet', :NONE, 'Quiet mode.') do
|
15
|
+
self.options[:quiet] = true
|
16
|
+
end
|
17
|
+
|
18
|
+
opts.on('--trace', :NONE, 'Show a full stacktrace on error') do
|
19
|
+
self.options[:trace] = true
|
20
|
+
end
|
21
|
+
|
22
|
+
opts.on('--force', :NONE, 'Allows some failing commands to succeed instead.') do
|
23
|
+
self.options[:force] = true
|
24
|
+
end
|
25
|
+
|
26
|
+
opts.on('--dry-run', :NONE, 'Dry Run. Tells you what it plans to do.') do
|
27
|
+
self.options[:dry_run] = true
|
28
|
+
end
|
29
|
+
|
30
|
+
opts.on_tail("-?", "-h", "--help", "Show this message") do
|
31
|
+
puts opts
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Compass::Exec
|
2
|
+
module Helpers
|
3
|
+
extend self
|
4
|
+
def select_appropriate_command_line_ui(arguments)
|
5
|
+
if Compass::Commands.command_exists? arguments.first
|
6
|
+
SubCommandUI
|
7
|
+
else
|
8
|
+
SwitchUI
|
9
|
+
end
|
10
|
+
end
|
11
|
+
def report_error(e, options)
|
12
|
+
$stderr.puts "#{e.class} on line #{get_line e} of #{get_file e}: #{e.message}"
|
13
|
+
if options[:trace]
|
14
|
+
e.backtrace[1..-1].each { |t| $stderr.puts " #{t}" }
|
15
|
+
else
|
16
|
+
$stderr.puts "Run with --trace to see the full backtrace"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_file(exception)
|
21
|
+
exception.backtrace[0].split(/:/, 2)[0]
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_line(exception)
|
25
|
+
exception.backtrace[0].scan(/:(\d+)/)[0]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Compass::Exec::ProjectOptionsParser
|
2
|
+
def set_options(opts)
|
3
|
+
super
|
4
|
+
set_project_options(opts)
|
5
|
+
end
|
6
|
+
def set_project_options(opts)
|
7
|
+
opts.on('-c', '--config CONFIG_FILE', 'Specify the location of the configuration file explicitly.') do |configuration_file|
|
8
|
+
self.options[:configuration_file] = configuration_file
|
9
|
+
end
|
10
|
+
|
11
|
+
opts.on('--app APP', 'Tell compass what kind of application it is integrating with. E.g. rails') do |project_type|
|
12
|
+
self.options[:project_type] = project_type.to_sym
|
13
|
+
end
|
14
|
+
|
15
|
+
opts.on('--sass-dir SRC_DIR', "The source directory where you keep your sass stylesheets.") do |sass_dir|
|
16
|
+
self.options[:sass_dir] = sass_dir
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on('--css-dir CSS_DIR', "The target directory where you keep your css stylesheets.") do |css_dir|
|
20
|
+
self.options[:css_dir] = css_dir
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on('--images-dir IMAGES_DIR', "The directory where you keep your images.") do |images_dir|
|
24
|
+
self.options[:images_dir] = images_dir
|
25
|
+
end
|
26
|
+
|
27
|
+
opts.on('--javascripts-dir JS_DIR', "The directory where you keep your javascripts.") do |javascripts_dir|
|
28
|
+
self.options[:javascripts_dir] = javascripts_dir
|
29
|
+
end
|
30
|
+
|
31
|
+
opts.on('-e ENV', '--environment ENV', [:development, :production], 'Use sensible defaults for your current environment.',
|
32
|
+
' One of: development, production (default)') do |env|
|
33
|
+
self.options[:environment] = env
|
34
|
+
end
|
35
|
+
|
36
|
+
opts.on('-s STYLE', '--output-style STYLE', [:nested, :expanded, :compact, :compressed], 'Select a CSS output mode.',
|
37
|
+
' One of: nested, expanded, compact, compressed') do |style|
|
38
|
+
self.options[:output_style] = style
|
39
|
+
end
|
40
|
+
|
41
|
+
opts.on('--relative-assets', :NONE, 'Make compass asset helpers generate relative urls to assets.') do
|
42
|
+
self.options[:relative_assets] = true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'compass/exec/global_options_parser'
|
2
|
+
require 'compass/exec/project_options_parser'
|
3
|
+
|
4
|
+
module Compass::Exec
|
5
|
+
class SubCommandUI
|
6
|
+
|
7
|
+
attr_accessor :args
|
8
|
+
|
9
|
+
def initialize(args)
|
10
|
+
self.args = args
|
11
|
+
end
|
12
|
+
|
13
|
+
def run!
|
14
|
+
begin
|
15
|
+
perform!
|
16
|
+
rescue Exception => e
|
17
|
+
raise e if e.is_a? SystemExit
|
18
|
+
if e.is_a?(::Compass::Error) || e.is_a?(OptionParser::ParseError)
|
19
|
+
$stderr.puts e.message
|
20
|
+
else
|
21
|
+
::Compass::Exec::Helpers.report_error(e, @options || {})
|
22
|
+
end
|
23
|
+
return 1
|
24
|
+
end
|
25
|
+
return 0
|
26
|
+
end
|
27
|
+
|
28
|
+
protected
|
29
|
+
|
30
|
+
def perform!
|
31
|
+
$command = args.shift
|
32
|
+
command_class = Compass::Commands[$command]
|
33
|
+
@options = if command_class.respond_to?("parse_#{$command}!")
|
34
|
+
command_class.send("parse_#{$command}!", args)
|
35
|
+
else
|
36
|
+
command_class.parse!(args)
|
37
|
+
end
|
38
|
+
command_class.new(Dir.getwd, @options).execute
|
39
|
+
rescue OptionParser::ParseError => e
|
40
|
+
puts "Error: #{e.message}"
|
41
|
+
puts command_class.usage
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|