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
@@ -0,0 +1,138 @@
|
|
1
|
+
module Compass
|
2
|
+
module Configuration
|
3
|
+
module Defaults
|
4
|
+
|
5
|
+
def default_project_type
|
6
|
+
:stand_alone
|
7
|
+
end
|
8
|
+
|
9
|
+
def http_path_without_default
|
10
|
+
"/"
|
11
|
+
end
|
12
|
+
|
13
|
+
def default_extensions_dir
|
14
|
+
"extensions"
|
15
|
+
end
|
16
|
+
|
17
|
+
def default_fonts_dir
|
18
|
+
File.join(top_level.css_dir, "fonts")
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_environment
|
22
|
+
:development
|
23
|
+
end
|
24
|
+
|
25
|
+
def default_output_style
|
26
|
+
if top_level.environment == :development
|
27
|
+
:expanded
|
28
|
+
else
|
29
|
+
:compact
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def default_line_comments
|
34
|
+
top_level.environment == :development
|
35
|
+
end
|
36
|
+
|
37
|
+
def default_color_output
|
38
|
+
true
|
39
|
+
end
|
40
|
+
|
41
|
+
def default_sass_path
|
42
|
+
if (pp = top_level.project_path) && (dir = top_level.sass_dir)
|
43
|
+
File.join(pp, dir)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def default_css_path
|
48
|
+
if (pp = top_level.project_path) && (dir = top_level.css_dir)
|
49
|
+
File.join(pp, dir)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def default_images_path
|
54
|
+
if (pp = top_level.project_path) && (dir = top_level.images_dir)
|
55
|
+
File.join(pp, dir)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def default_javascripts_path
|
60
|
+
if (pp = top_level.project_path) && (dir = top_level.javascripts_dir)
|
61
|
+
File.join(pp, dir)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def default_extensions_path
|
66
|
+
if (pp = top_level.project_path) && (dir = top_level.extensions_dir)
|
67
|
+
File.join(pp, dir)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def default_fonts_path
|
72
|
+
if (pp = top_level.project_path) && (dir = top_level.fonts_dir)
|
73
|
+
File.join(pp, dir)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
def default_http_images_dir
|
79
|
+
top_level.images_dir
|
80
|
+
end
|
81
|
+
|
82
|
+
def default_http_images_path
|
83
|
+
http_root_relative top_level.http_images_dir
|
84
|
+
end
|
85
|
+
|
86
|
+
def default_http_stylesheets_dir
|
87
|
+
top_level.css_dir
|
88
|
+
end
|
89
|
+
|
90
|
+
def default_http_stylesheets_path
|
91
|
+
http_root_relative top_level.http_stylesheets_dir
|
92
|
+
end
|
93
|
+
|
94
|
+
def default_http_fonts_dir
|
95
|
+
if fd = top_level.fonts_dir_without_default
|
96
|
+
fd
|
97
|
+
else
|
98
|
+
"#{top_level.http_stylesheets_dir}/fonts"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def default_http_fonts_path
|
103
|
+
http_root_relative top_level.http_fonts_dir
|
104
|
+
end
|
105
|
+
|
106
|
+
def default_http_javascripts_dir
|
107
|
+
top_level.javascripts_dir
|
108
|
+
end
|
109
|
+
|
110
|
+
def default_http_javascripts_path
|
111
|
+
http_root_relative top_level.http_javascripts_dir
|
112
|
+
end
|
113
|
+
|
114
|
+
# helper functions
|
115
|
+
|
116
|
+
def http_join(*segments)
|
117
|
+
segments.map do |segment|
|
118
|
+
next unless segment
|
119
|
+
segment = http_pathify(segment)
|
120
|
+
segment[-1..-1] == "/" ? segment[0..-2] : segment
|
121
|
+
end.join("/")
|
122
|
+
end
|
123
|
+
|
124
|
+
def http_pathify(path)
|
125
|
+
if File::SEPARATOR == "/"
|
126
|
+
path
|
127
|
+
else
|
128
|
+
path.gsub(File::SEPARATOR, "/")
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
def http_root_relative(path)
|
133
|
+
http_join top_level.http_path, path
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
module Compass
|
2
|
+
module Configuration
|
3
|
+
# The helpers are available as methods on the Compass module. E.g. Compass.configuration
|
4
|
+
module Helpers
|
5
|
+
def configuration
|
6
|
+
@configuration ||= default_configuration
|
7
|
+
if block_given?
|
8
|
+
yield @configuration
|
9
|
+
end
|
10
|
+
@configuration
|
11
|
+
end
|
12
|
+
|
13
|
+
def default_configuration
|
14
|
+
Data.new('defaults').extend(Defaults).extend(Comments)
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_configuration(config, filename = nil)
|
18
|
+
return if config.nil?
|
19
|
+
|
20
|
+
|
21
|
+
data = configuration_for(config, filename)
|
22
|
+
|
23
|
+
# puts "New configuration: #{data.name}"
|
24
|
+
# puts caller.join("\n")
|
25
|
+
data.inherit_from!(configuration)
|
26
|
+
data.on_top!
|
27
|
+
@configuration = data
|
28
|
+
end
|
29
|
+
|
30
|
+
def configuration_for(config, filename = nil)
|
31
|
+
if config.is_a?(Compass::Configuration::Data)
|
32
|
+
config
|
33
|
+
elsif config.respond_to?(:read)
|
34
|
+
Compass::Configuration::Data.new_from_string(config.read, filename)
|
35
|
+
elsif config.is_a?(Hash)
|
36
|
+
Compass::Configuration::Data.new(filename, config)
|
37
|
+
elsif config.is_a?(String)
|
38
|
+
Compass::Configuration::Data.new_from_file(config)
|
39
|
+
elsif config.is_a?(Symbol)
|
40
|
+
Compass::AppIntegration.lookup(config).configuration
|
41
|
+
else
|
42
|
+
raise "I don't know what to do with: #{config.inspect}"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Support for testing.
|
47
|
+
def reset_configuration!
|
48
|
+
@configuration = nil
|
49
|
+
end
|
50
|
+
|
51
|
+
def sass_plugin_configuration
|
52
|
+
configuration.to_sass_plugin_options
|
53
|
+
end
|
54
|
+
|
55
|
+
def configure_sass_plugin!
|
56
|
+
@sass_plugin_configured = true
|
57
|
+
Sass::Plugin.options.merge!(sass_plugin_configuration)
|
58
|
+
end
|
59
|
+
|
60
|
+
def sass_plugin_configured?
|
61
|
+
@sass_plugin_configured
|
62
|
+
end
|
63
|
+
|
64
|
+
def sass_engine_options
|
65
|
+
configuration.to_sass_engine_options
|
66
|
+
end
|
67
|
+
|
68
|
+
# Read the configuration file for this project
|
69
|
+
def add_project_configuration(*args)
|
70
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
71
|
+
configuration_file_path = args.shift || detect_configuration_file
|
72
|
+
raise ArgumentError, "Too many arguments" if args.any?
|
73
|
+
if configuration_file_path
|
74
|
+
|
75
|
+
data = configuration_for(configuration_file_path)
|
76
|
+
|
77
|
+
if data.raw_project_type
|
78
|
+
add_configuration(data.raw_project_type.to_sym)
|
79
|
+
elsif options[:project_type]
|
80
|
+
add_configuration(options[:project_type])
|
81
|
+
else
|
82
|
+
add_configuration(:stand_alone)
|
83
|
+
end
|
84
|
+
|
85
|
+
add_configuration(data)
|
86
|
+
else
|
87
|
+
add_configuration(options[:project_type] || configuration.project_type || :stand_alone)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Returns a full path to the relative path to the project directory
|
92
|
+
def projectize(path, project_path = nil)
|
93
|
+
project_path ||= configuration.project_path
|
94
|
+
File.join(project_path, *path.split('/'))
|
95
|
+
end
|
96
|
+
|
97
|
+
def deprojectize(path, project_path = nil)
|
98
|
+
project_path ||= configuration.project_path
|
99
|
+
if path[0..(project_path.size - 1)] == project_path
|
100
|
+
path[(project_path.size + 1)..-1]
|
101
|
+
else
|
102
|
+
path
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# TODO: Deprecate the src/config.rb location.
|
107
|
+
KNOWN_CONFIG_LOCATIONS = ['config/compass.rb', ".compass/config.rb", "config/compass.config", "config.rb", "src/config.rb"]
|
108
|
+
|
109
|
+
# Finds the configuration file, if it exists in a known location.
|
110
|
+
def detect_configuration_file(project_path = nil)
|
111
|
+
possible_files = KNOWN_CONFIG_LOCATIONS.map{|f| projectize(f, project_path) }
|
112
|
+
possible_files.detect{|f| File.exists?(f)}
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
extend Configuration::Helpers
|
119
|
+
|
120
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
module Compass
|
2
|
+
module Configuration
|
3
|
+
# The inheritance module makes it easy for configuration data to inherit from
|
4
|
+
# other instances of configuration data. This makes it easier for external code to layer
|
5
|
+
# bits of configuration from various sources.
|
6
|
+
module Inheritance
|
7
|
+
|
8
|
+
def self.included(base)
|
9
|
+
# inherited_data stores configuration data that this configuration object will
|
10
|
+
# inherit if not provided explicitly.
|
11
|
+
base.send :attr_accessor, :inherited_data, :set_attributes, :top_level
|
12
|
+
|
13
|
+
base.send(:include, InstanceMethods)
|
14
|
+
base.extend(ClassMethods)
|
15
|
+
end
|
16
|
+
|
17
|
+
module ClassMethods
|
18
|
+
def inherited_writer(*attributes)
|
19
|
+
attributes.each do |attribute|
|
20
|
+
line = __LINE__ + 1
|
21
|
+
class_eval %Q{
|
22
|
+
def #{attribute}=(value) # def css_dir=(value)
|
23
|
+
@set_attributes ||= {} # @set_attributes ||= {}
|
24
|
+
@set_attributes[#{attribute.inspect}] = true # @set_attributes[:css_dir] = true
|
25
|
+
@#{attribute} = value # @css_dir = value
|
26
|
+
end # end
|
27
|
+
|
28
|
+
def unset_#{attribute}! # def unset_css_dir!
|
29
|
+
unset!(#{attribute.inspect}) # unset!(:css_dir)
|
30
|
+
end # end
|
31
|
+
|
32
|
+
def #{attribute}_set? # def css_dir_set?
|
33
|
+
set?(#{attribute.inspect}) # set?(:css_dir)
|
34
|
+
end # end
|
35
|
+
}, __FILE__, line
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Defines the default reader to be an inherited_reader that will look at the inherited_data for its
|
40
|
+
# value when not set. The inherited reader calls to a raw reader that acts like a normal attribute
|
41
|
+
# reader but prefixes the attribute name with "raw_".
|
42
|
+
def inherited_reader(*attributes)
|
43
|
+
attributes.each do |attribute|
|
44
|
+
line = __LINE__ + 1
|
45
|
+
class_eval %Q{
|
46
|
+
def raw_#{attribute} # def raw_css_dir
|
47
|
+
@#{attribute} # @css_dir
|
48
|
+
end # end
|
49
|
+
def #{attribute}_without_default # def css_dir_without_default
|
50
|
+
read_without_default(#{attribute.inspect}) # read_without_default(:css_dir)
|
51
|
+
end # end
|
52
|
+
def #{attribute} # def css_dir
|
53
|
+
read(#{attribute.inspect}) # read(:css_dir)
|
54
|
+
end # end
|
55
|
+
}, __FILE__, line
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def inherited_accessor(*attributes)
|
60
|
+
inherited_reader(*attributes)
|
61
|
+
inherited_writer(*attributes)
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
module InstanceMethods
|
68
|
+
|
69
|
+
def on_top!
|
70
|
+
self.set_top_level(self)
|
71
|
+
end
|
72
|
+
|
73
|
+
def set_top_level(new_top)
|
74
|
+
self.top_level = new_top
|
75
|
+
if self.inherited_data.respond_to?(:set_top_level)
|
76
|
+
self.inherited_data.set_top_level(new_top)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def inherit_from!(data)
|
82
|
+
if self.inherited_data
|
83
|
+
self.inherited_data.inherit_from!(data)
|
84
|
+
else
|
85
|
+
self.inherited_data = data
|
86
|
+
end
|
87
|
+
self
|
88
|
+
end
|
89
|
+
|
90
|
+
def unset!(attribute)
|
91
|
+
@set_attributes ||= {}
|
92
|
+
send("#{attribute}=", nil)
|
93
|
+
@set_attributes.delete(attribute)
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
|
97
|
+
def set?(attribute)
|
98
|
+
@set_attributes ||= {}
|
99
|
+
@set_attributes[attribute]
|
100
|
+
end
|
101
|
+
|
102
|
+
def default_for(attribute)
|
103
|
+
method = "default_#{attribute}".to_sym
|
104
|
+
if respond_to?(method)
|
105
|
+
send(method)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# Read an explicitly set value that is either inherited or set on this instance
|
110
|
+
def read_without_default(attribute)
|
111
|
+
if set?(attribute)
|
112
|
+
send("raw_#{attribute}")
|
113
|
+
elsif inherited_data.respond_to?("#{attribute}_without_default")
|
114
|
+
inherited_data.send("#{attribute}_without_default")
|
115
|
+
elsif inherited_data.respond_to?(attribute)
|
116
|
+
inherited_data.send(attribute)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Read a value that is either inherited or set on this instance, if we get to the bottom-most configuration instance,
|
121
|
+
# we ask for the default starting at the top level.
|
122
|
+
def read(attribute)
|
123
|
+
if !(v = send("#{attribute}_without_default")).nil?
|
124
|
+
v
|
125
|
+
else
|
126
|
+
top_level.default_for(attribute)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def method_missing(meth)
|
131
|
+
if inherited_data
|
132
|
+
inherited_data.send(meth)
|
133
|
+
else
|
134
|
+
raise NoMethodError, meth.to_s
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
def respond_to?(meth)
|
139
|
+
if super
|
140
|
+
true
|
141
|
+
elsif inherited_data
|
142
|
+
inherited_data.respond_to?(meth)
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
def debug
|
149
|
+
instances = [self]
|
150
|
+
instances << instances.last.inherited_data while instances.last.inherited_data
|
151
|
+
normalized_attrs = {}
|
152
|
+
ATTRIBUTES.each do |prop|
|
153
|
+
values = []
|
154
|
+
instances.each do |instance|
|
155
|
+
values << {
|
156
|
+
:raw => (instance.send("raw_#{prop}") rescue nil),
|
157
|
+
:value => (instance.send("#{prop}_without_default") rescue nil),
|
158
|
+
:default => (instance.send("default_#{prop}") rescue nil),
|
159
|
+
:resolved => instance.send(prop)
|
160
|
+
}
|
161
|
+
end
|
162
|
+
normalized_attrs[prop] = values
|
163
|
+
end
|
164
|
+
normalized_attrs
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Compass
|
2
|
+
module Configuration
|
3
|
+
# The serialization module manages reading and writing the configuration file(s).
|
4
|
+
module Serialization
|
5
|
+
def self.included(base)
|
6
|
+
base.send(:include, InstanceMethods)
|
7
|
+
base.extend ClassMethods
|
8
|
+
end
|
9
|
+
|
10
|
+
module ClassMethods
|
11
|
+
def new_from_file(config_file)
|
12
|
+
data = Data.new(config_file)
|
13
|
+
data.parse(config_file)
|
14
|
+
data
|
15
|
+
end
|
16
|
+
|
17
|
+
def new_from_string(contents, filename)
|
18
|
+
data = Data.new(filename)
|
19
|
+
data.parse_string(contents, filename)
|
20
|
+
data
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module InstanceMethods
|
25
|
+
# parses a configuration file which is a ruby script
|
26
|
+
def parse(config_file)
|
27
|
+
unless File.readable?(config_file)
|
28
|
+
raise Compass::Error, "Configuration file, #{config_file}, not found or not readable."
|
29
|
+
end
|
30
|
+
open(config_file) do |f|
|
31
|
+
parse_string(f.read, config_file)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def parse_string(contents, filename)
|
36
|
+
bind = binding
|
37
|
+
eval(contents, bind, filename)
|
38
|
+
ATTRIBUTES.each do |prop|
|
39
|
+
value = eval(prop.to_s, bind) rescue nil
|
40
|
+
self.send("#{prop}=", value) if value
|
41
|
+
end
|
42
|
+
if @added_import_paths
|
43
|
+
self.additional_import_paths ||= []
|
44
|
+
self.additional_import_paths += @added_import_paths
|
45
|
+
end
|
46
|
+
issue_deprecation_warnings
|
47
|
+
end
|
48
|
+
|
49
|
+
def serialize
|
50
|
+
contents = ""
|
51
|
+
required_libraries.each do |lib|
|
52
|
+
contents << %Q{require '#{lib}'\n}
|
53
|
+
end
|
54
|
+
contents << "# Require any additional compass plugins here.\n"
|
55
|
+
contents << "\n" if required_libraries.any?
|
56
|
+
ATTRIBUTES.each do |prop|
|
57
|
+
value = send("#{prop}_without_default")
|
58
|
+
if value.is_a?(Proc)
|
59
|
+
$stderr.puts "WARNING: #{prop} is code and cannot be written to a file. You'll need to copy it yourself."
|
60
|
+
end
|
61
|
+
if respond_to?("comment_for_#{prop}")
|
62
|
+
contents << send("comment_for_#{prop}")
|
63
|
+
end
|
64
|
+
if block_given? && (to_emit = yield(prop, value))
|
65
|
+
contents << to_emit
|
66
|
+
else
|
67
|
+
contents << serialize_property(prop, value) unless value.nil?
|
68
|
+
end
|
69
|
+
end
|
70
|
+
contents
|
71
|
+
end
|
72
|
+
|
73
|
+
def serialize_property(prop, value)
|
74
|
+
%Q(#{prop} = #{value.inspect}\n)
|
75
|
+
end
|
76
|
+
|
77
|
+
def issue_deprecation_warnings
|
78
|
+
if http_images_path == :relative
|
79
|
+
$stderr.puts "DEPRECATION WARNING: Please set relative_assets = true to enable relative paths."
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|