compass-sass37 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.markdown +1 -0
- data/Rakefile +237 -0
- data/VERSION +1 -0
- data/VERSION_NAME +1 -0
- data/bin/compass +45 -0
- data/features/command_line.feature +195 -0
- data/features/extensions.feature +27 -0
- data/features/step_definitions/command_line_steps.rb +268 -0
- data/features/step_definitions/extension_steps.rb +24 -0
- data/lib/compass/actions.rb +116 -0
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +32 -0
- data/lib/compass/app_integration/stand_alone/installer.rb +83 -0
- data/lib/compass/app_integration/stand_alone.rb +22 -0
- data/lib/compass/app_integration.rb +39 -0
- data/lib/compass/commands/base.rb +44 -0
- data/lib/compass/commands/clean_project.rb +79 -0
- data/lib/compass/commands/create_project.rb +131 -0
- data/lib/compass/commands/default.rb +50 -0
- data/lib/compass/commands/extension_command.rb +60 -0
- data/lib/compass/commands/help.rb +85 -0
- data/lib/compass/commands/imports.rb +35 -0
- data/lib/compass/commands/installer_command.rb +32 -0
- data/lib/compass/commands/interactive.rb +61 -0
- data/lib/compass/commands/list_frameworks.rb +39 -0
- data/lib/compass/commands/print_version.rb +88 -0
- data/lib/compass/commands/project_base.rb +103 -0
- data/lib/compass/commands/project_stats.rb +178 -0
- data/lib/compass/commands/project_structure.rb +93 -0
- data/lib/compass/commands/registry.rb +40 -0
- data/lib/compass/commands/sprite.rb +89 -0
- data/lib/compass/commands/stamp_pattern.rb +90 -0
- data/lib/compass/commands/unpack_extension.rb +120 -0
- data/lib/compass/commands/update_project.rb +148 -0
- data/lib/compass/commands/validate_project.rb +77 -0
- data/lib/compass/commands/watch_project.rb +117 -0
- data/lib/compass/commands/write_configuration.rb +125 -0
- data/lib/compass/commands.rb +14 -0
- data/lib/compass/compiler.rb +249 -0
- data/lib/compass/configuration/comments.rb +62 -0
- data/lib/compass/configuration/file_data.rb +21 -0
- data/lib/compass/configuration/helpers.rb +113 -0
- data/lib/compass/configuration/serialization.rb +95 -0
- data/lib/compass/dependencies.rb +12 -0
- data/lib/compass/deprecation.rb +19 -0
- data/lib/compass/errors.rb +9 -0
- data/lib/compass/exec/command_option_parser.rb +23 -0
- data/lib/compass/exec/global_options_parser.rb +59 -0
- data/lib/compass/exec/helpers.rb +21 -0
- data/lib/compass/exec/project_options_parser.rb +74 -0
- data/lib/compass/exec/sub_command_ui.rb +51 -0
- data/lib/compass/exec.rb +23 -0
- data/lib/compass/generated_version.rb +4 -0
- data/lib/compass/installers/bare_installer.rb +58 -0
- data/lib/compass/installers/base.rb +187 -0
- data/lib/compass/installers/manifest.rb +161 -0
- data/lib/compass/installers/manifest_installer.rb +61 -0
- data/lib/compass/installers/template_context.rb +44 -0
- data/lib/compass/installers.rb +3 -0
- data/lib/compass/logger.rb +140 -0
- data/lib/compass/quick_cache.rb +15 -0
- data/lib/compass/rails.rb +2 -0
- data/lib/compass/sass_compiler.rb +152 -0
- data/lib/compass/sass_extensions/functions/sprites.rb +305 -0
- data/lib/compass/sass_extensions/functions.rb +15 -0
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +35 -0
- data/lib/compass/sass_extensions/sprites/engines.rb +25 -0
- data/lib/compass/sass_extensions/sprites/image.rb +162 -0
- data/lib/compass/sass_extensions/sprites/image_methods.rb +52 -0
- data/lib/compass/sass_extensions/sprites/image_row.rb +47 -0
- data/lib/compass/sass_extensions/sprites/images.rb +29 -0
- data/lib/compass/sass_extensions/sprites/layout/diagonal.rb +42 -0
- data/lib/compass/sass_extensions/sprites/layout/horizontal.rb +66 -0
- data/lib/compass/sass_extensions/sprites/layout/smart.rb +33 -0
- data/lib/compass/sass_extensions/sprites/layout/vertical.rb +68 -0
- data/lib/compass/sass_extensions/sprites/layout.rb +39 -0
- data/lib/compass/sass_extensions/sprites/layout_methods.rb +53 -0
- data/lib/compass/sass_extensions/sprites/row_fitter.rb +92 -0
- data/lib/compass/sass_extensions/sprites/sprite_map.rb +93 -0
- data/lib/compass/sass_extensions/sprites/sprite_methods.rb +136 -0
- data/lib/compass/sass_extensions/sprites.rb +21 -0
- data/lib/compass/sass_extensions.rb +9 -0
- data/lib/compass/sprite_importer/binding.rb +11 -0
- data/lib/compass/sprite_importer/content.erb +87 -0
- data/lib/compass/sprite_importer.rb +117 -0
- data/lib/compass/stats.rb +99 -0
- data/lib/compass/test_case.rb +38 -0
- data/lib/compass/validator.rb +16 -0
- data/lib/compass/version.rb +42 -0
- data/lib/compass.rb +39 -0
- data/test/fixtures/extensions/only_stylesheets/compass_init.rb +1 -0
- data/test/fixtures/extensions/only_stylesheets/scss/only_stylesheets/foo.scss +3 -0
- data/test/fixtures/fonts/bgrove.base64.txt +1 -0
- data/test/fixtures/fonts/bgrove.ttf +0 -0
- data/test/fixtures/sprites/public/images/bad_extensions/ten-by-ten.gif +0 -0
- data/test/fixtures/sprites/public/images/bad_extensions/twenty-by-twenty.jpg +0 -0
- data/test/fixtures/sprites/public/images/bool/false.png +0 -0
- data/test/fixtures/sprites/public/images/bool/true.png +0 -0
- data/test/fixtures/sprites/public/images/colors/blue.png +0 -0
- data/test/fixtures/sprites/public/images/colors/yellow.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_active.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_focus.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_hover.png +0 -0
- data/test/fixtures/sprites/public/images/focus/ten-by-ten_target.png +0 -0
- data/test/fixtures/sprites/public/images/image_row/large.png +0 -0
- data/test/fixtures/sprites/public/images/image_row/large_square.png +0 -0
- data/test/fixtures/sprites/public/images/image_row/medium.png +0 -0
- data/test/fixtures/sprites/public/images/image_row/small.png +0 -0
- data/test/fixtures/sprites/public/images/image_row/tall.png +0 -0
- data/test/fixtures/sprites/public/images/ko/default_background.png +0 -0
- data/test/fixtures/sprites/public/images/ko/starbg26x27.png +0 -0
- data/test/fixtures/sprites/public/images/nested/squares/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/numeric/200.png +0 -0
- data/test/fixtures/sprites/public/images/prefix/20-by-20.png +0 -0
- data/test/fixtures/sprites/public/images/prefix/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/repeat_x/five.png +0 -0
- data/test/fixtures/sprites/public/images/repeat_x/four.png +0 -0
- data/test/fixtures/sprites/public/images/repeat_x/one.png +0 -0
- data/test/fixtures/sprites/public/images/repeat_x/three.png +0 -0
- data/test/fixtures/sprites/public/images/repeat_x/two.png +0 -0
- data/test/fixtures/sprites/public/images/selectors/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/selectors/ten-by-ten_active.png +0 -0
- data/test/fixtures/sprites/public/images/selectors/ten-by-ten_hover.png +0 -0
- data/test/fixtures/sprites/public/images/selectors/ten-by-ten_target.png +0 -0
- data/test/fixtures/sprites/public/images/squares/ten-by-ten.png +0 -0
- data/test/fixtures/sprites/public/images/squares/twenty-by-twenty.png +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/config.rb +32 -0
- data/test/fixtures/stylesheets/busted_font_urls/css/screen.css +9 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/feed.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/grid.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/sub/dk.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/sass/screen.sass +14 -0
- data/test/fixtures/stylesheets/busted_image_urls/config.rb +29 -0
- data/test/fixtures/stylesheets/busted_image_urls/css/screen.css +9 -0
- data/test/fixtures/stylesheets/busted_image_urls/images/feed.png +0 -0
- data/test/fixtures/stylesheets/busted_image_urls/images/flags/dk.png +0 -0
- data/test/fixtures/stylesheets/busted_image_urls/images/grid.png +0 -0
- data/test/fixtures/stylesheets/busted_image_urls/sass/screen.sass +14 -0
- data/test/fixtures/stylesheets/compass/100x150.jpg +0 -0
- data/test/fixtures/stylesheets/compass/config.rb +18 -0
- data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +22 -0
- data/test/fixtures/stylesheets/compass/css/animation.css +22 -0
- data/test/fixtures/stylesheets/compass/css/appearance.css +3 -0
- data/test/fixtures/stylesheets/compass/css/background-clip.css +11 -0
- data/test/fixtures/stylesheets/compass/css/background-origin.css +11 -0
- data/test/fixtures/stylesheets/compass/css/background-size.css +17 -0
- data/test/fixtures/stylesheets/compass/css/border_radius.css +14 -0
- data/test/fixtures/stylesheets/compass/css/box-sizing.css +14 -0
- data/test/fixtures/stylesheets/compass/css/box.css +103 -0
- data/test/fixtures/stylesheets/compass/css/box_shadow.css +24 -0
- data/test/fixtures/stylesheets/compass/css/brightness.css +14 -0
- data/test/fixtures/stylesheets/compass/css/browser-support.css +335 -0
- data/test/fixtures/stylesheets/compass/css/color.css +18 -0
- data/test/fixtures/stylesheets/compass/css/columns.css +134 -0
- data/test/fixtures/stylesheets/compass/css/filters.css +53 -0
- data/test/fixtures/stylesheets/compass/css/flexbox.css +94 -0
- data/test/fixtures/stylesheets/compass/css/fonts.css +8 -0
- data/test/fixtures/stylesheets/compass/css/force-wrap.css +9 -0
- data/test/fixtures/stylesheets/compass/css/gradients.css +222 -0
- data/test/fixtures/stylesheets/compass/css/grid_background.css +79 -0
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +16 -0
- data/test/fixtures/stylesheets/compass/css/image_size.css +15 -0
- data/test/fixtures/stylesheets/compass/css/images.css +8 -0
- data/test/fixtures/stylesheets/compass/css/layout.css +16 -0
- data/test/fixtures/stylesheets/compass/css/legacy_clearfix.css +26 -0
- data/test/fixtures/stylesheets/compass/css/lists.css +145 -0
- data/test/fixtures/stylesheets/compass/css/opacity.css +7 -0
- data/test/fixtures/stylesheets/compass/css/print.css +11 -0
- data/test/fixtures/stylesheets/compass/css/regions.css +9 -0
- data/test/fixtures/stylesheets/compass/css/replacement.css +66 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +59 -0
- data/test/fixtures/stylesheets/compass/css/selection.css +50 -0
- data/test/fixtures/stylesheets/compass/css/sprites_with_explicit_separator.css +19 -0
- data/test/fixtures/stylesheets/compass/css/stretching.css +66 -0
- data/test/fixtures/stylesheets/compass/css/support.css +116 -0
- data/test/fixtures/stylesheets/compass/css/text_shadow.css +29 -0
- data/test/fixtures/stylesheets/compass/css/transform.css +341 -0
- data/test/fixtures/stylesheets/compass/css/transition.css +116 -0
- data/test/fixtures/stylesheets/compass/css/typography/links/hover-link.css +4 -0
- data/test/fixtures/stylesheets/compass/css/units.css +34 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +52 -0
- data/test/fixtures/stylesheets/compass/css/utilities.css +71 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +42 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css +53 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css +52 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css +67 -0
- data/test/fixtures/stylesheets/compass/images/100x150.gif +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.jpeg +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.jpg +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.png +0 -0
- data/test/fixtures/stylesheets/compass/images/4x6.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ad.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ae.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/af.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ag.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ai.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/al.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/am.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/an.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ao.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ar.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/as.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/at.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/au.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/aw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ax.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/az.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ba.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bb.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bd.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/be.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bi.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bj.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/br.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bs.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/by.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/bz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ca.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/catalonia.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cd.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ch.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ci.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ck.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/co.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cs.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cx.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cy.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/cz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/de.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/dj.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/dk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/dm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/do.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/dz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ec.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ee.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/eg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/eh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/england.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/er.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/es.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/et.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/europeanunion.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fam.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fi.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fj.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/fr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ga.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gb.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gd.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ge.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gi.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gp.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gq.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gs.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/gy.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/hk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/hm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/hn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/hr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ht.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/hu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/id-2.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ie.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/il.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/in.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/io.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/iq.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ir.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/is.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/it.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/jm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/jo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/jp.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ke.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ki.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/km.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kp.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ky.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/kz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/la.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lb.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/li.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ls.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/lv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ly.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ma.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/md.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/me.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ml.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mp.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mq.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ms.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mx.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/my.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/mz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/na.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ne.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ng.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ni.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/no.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/np.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/nz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/om.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pa.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pe.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ph.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ps.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/pw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/py.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/qa.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/re.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ro.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/rs.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ru.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/rw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sa.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sb.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/scotland.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sd.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/se.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sh.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/si.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sj.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/so.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/st.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sy.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/sz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/td.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/th.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tj.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tk.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tl.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/to.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tr.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tv.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/tz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ua.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ug.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/um.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/us.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/uy.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/uz.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/va.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/vc.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ve.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/vg.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/vi.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/vn.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/vu.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/wales.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/wf.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ws.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/ye.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/yt.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/za.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/zm.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag/zw.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag-s5b4f509715.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_active.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_focus.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_hover.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states/foo_target.png +0 -0
- data/test/fixtures/stylesheets/compass/images/flag_states-sc42d7bf926.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +17 -0
- data/test/fixtures/stylesheets/compass/sass/animation.scss +13 -0
- data/test/fixtures/stylesheets/compass/sass/appearance.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/background-clip.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/background-origin.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/background-size.scss +7 -0
- data/test/fixtures/stylesheets/compass/sass/border_radius.scss +5 -0
- data/test/fixtures/stylesheets/compass/sass/box-sizing.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/box.sass +50 -0
- data/test/fixtures/stylesheets/compass/sass/box_shadow.scss +7 -0
- data/test/fixtures/stylesheets/compass/sass/brightness.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/browser-support.scss +30 -0
- data/test/fixtures/stylesheets/compass/sass/color.scss +25 -0
- data/test/fixtures/stylesheets/compass/sass/columns.scss +29 -0
- data/test/fixtures/stylesheets/compass/sass/filters.scss +25 -0
- data/test/fixtures/stylesheets/compass/sass/flexbox.scss +88 -0
- data/test/fixtures/stylesheets/compass/sass/fonts.sass +8 -0
- data/test/fixtures/stylesheets/compass/sass/force-wrap.scss +3 -0
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +128 -0
- data/test/fixtures/stylesheets/compass/sass/grid_background.scss +34 -0
- data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/image_size.sass +15 -0
- data/test/fixtures/stylesheets/compass/sass/images.scss +9 -0
- data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
- data/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss +14 -0
- data/test/fixtures/stylesheets/compass/sass/lists.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/opacity.scss +9 -0
- data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
- data/test/fixtures/stylesheets/compass/sass/regions.scss +4 -0
- data/test/fixtures/stylesheets/compass/sass/replacement.scss +22 -0
- data/test/fixtures/stylesheets/compass/sass/reset.sass +12 -0
- data/test/fixtures/stylesheets/compass/sass/selection.scss +41 -0
- data/test/fixtures/stylesheets/compass/sass/sprites_with_explicit_separator.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/stretching.sass +34 -0
- data/test/fixtures/stylesheets/compass/sass/support.scss +174 -0
- data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/transform.scss +87 -0
- data/test/fixtures/stylesheets/compass/sass/transition.scss +21 -0
- data/test/fixtures/stylesheets/compass/sass/typography/links/hover-link.scss +3 -0
- data/test/fixtures/stylesheets/compass/sass/units.scss +50 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +28 -0
- data/test/fixtures/stylesheets/compass/sass/utilities.scss +33 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +60 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_ems.scss +52 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_px.scss +50 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_rems.scss +50 -0
- data/test/fixtures/stylesheets/envtest/config.rb +9 -0
- data/test/fixtures/stylesheets/envtest/css/env.css +10 -0
- data/test/fixtures/stylesheets/envtest/sass/env.scss +19 -0
- data/test/fixtures/stylesheets/error/config.rb +10 -0
- data/test/fixtures/stylesheets/error/sass/screen.sass +2 -0
- data/test/fixtures/stylesheets/image_urls/config.rb +19 -0
- data/test/fixtures/stylesheets/image_urls/css/screen.css +5 -0
- data/test/fixtures/stylesheets/image_urls/images/grid.png +0 -0
- data/test/fixtures/stylesheets/image_urls/sass/screen.sass +8 -0
- data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
- data/test/fixtures/stylesheets/relative/config.rb +10 -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 +5 -0
- data/test/fixtures/stylesheets/relative/sass/print.sass +3 -0
- data/test/fixtures/stylesheets/relative/sass/screen.sass +2 -0
- data/test/fixtures/stylesheets/sourcemaps/config.rb +10 -0
- data/test/fixtures/stylesheets/sourcemaps/css/another_simple.css +2 -0
- data/test/fixtures/stylesheets/sourcemaps/css/another_simple.css.map +7 -0
- data/test/fixtures/stylesheets/sourcemaps/css/simple.css +2 -0
- data/test/fixtures/stylesheets/sourcemaps/css/simple.css.map +7 -0
- data/test/fixtures/stylesheets/sourcemaps/css/with_libraries.css +2 -0
- data/test/fixtures/stylesheets/sourcemaps/css/with_libraries.css.map +7 -0
- data/test/fixtures/stylesheets/sourcemaps/sass/another_simple.scss +3 -0
- data/test/fixtures/stylesheets/sourcemaps/sass/simple.sass +2 -0
- data/test/fixtures/stylesheets/sourcemaps/sass/with_libraries.scss +5 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/config.rb +25 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/ie.scss +5 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/print.scss +3 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/screen.scss +6 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/ie.css +5 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/print.css +3 -0
- data/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/screen.css +68 -0
- data/test/fixtures/stylesheets/valid/config.rb +9 -0
- data/test/fixtures/stylesheets/valid/sass/another_simple.scss +3 -0
- data/test/fixtures/stylesheets/valid/sass/simple.sass +2 -0
- data/test/fixtures/stylesheets/with_sass_globbing/config.rb +26 -0
- data/test/fixtures/stylesheets/with_sass_globbing/css/screen.css +19 -0
- data/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_1.scss +3 -0
- data/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_2.scss +3 -0
- data/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_3.scss +4 -0
- data/test/fixtures/stylesheets/with_sass_globbing/sass/screen.scss +3 -0
- data/test/helpers/command_line.rb +114 -0
- data/test/helpers/diff.rb +49 -0
- data/test/helpers/io.rb +36 -0
- data/test/helpers/rails.rb +55 -0
- data/test/helpers/test_case.rb +62 -0
- data/test/integrations/compass_test.rb +259 -0
- data/test/integrations/sprites_test.rb +1123 -0
- data/test/test_helper.rb +67 -0
- data/test/units/actions_test.rb +24 -0
- data/test/units/caniuse_test.rb +194 -0
- data/test/units/command_line_test.rb +60 -0
- data/test/units/compass_util_test.rb +11 -0
- data/test/units/compiler_test.rb +16 -0
- data/test/units/configuration_test.rb +618 -0
- data/test/units/regressions_test.rb +35 -0
- data/test/units/sass_extensions_test.rb +232 -0
- data/test/units/sass_extenstions/gradients_test.rb +30 -0
- data/test/units/sprites/engine_test.rb +48 -0
- data/test/units/sprites/image_row_test.rb +58 -0
- data/test/units/sprites/image_test.rb +116 -0
- data/test/units/sprites/images_test.rb +46 -0
- data/test/units/sprites/importer_test.rb +91 -0
- data/test/units/sprites/layout_test.rb +180 -0
- data/test/units/sprites/row_fitter_test.rb +66 -0
- data/test/units/sprites/sprite_command_test.rb +55 -0
- data/test/units/sprites/sprite_map_test.rb +169 -0
- metadata +1175 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../../test')))
|
|
2
|
+
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
require 'test_helper'
|
|
5
|
+
|
|
6
|
+
require 'compass/exec'
|
|
7
|
+
include Compass::TestCaseHelper
|
|
8
|
+
include Compass::CommandLineHelper
|
|
9
|
+
include Compass::IoHelper
|
|
10
|
+
|
|
11
|
+
Before do
|
|
12
|
+
Compass.reset_configuration!
|
|
13
|
+
@cleanup_directories = []
|
|
14
|
+
@original_working_directory = Dir.pwd
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
After do
|
|
18
|
+
Dir.chdir @original_working_directory
|
|
19
|
+
@cleanup_directories.each do |dir|
|
|
20
|
+
FileUtils.rm_rf dir
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
Given "ruby supports fork" do
|
|
25
|
+
if RUBY_PLATFORM == "java"
|
|
26
|
+
pending
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Given Preconditions
|
|
31
|
+
Given %r{^I am using the existing project in ([^\s]+)$} do |project|
|
|
32
|
+
tmp_project = "tmp_#{File.basename(project)}"
|
|
33
|
+
@cleanup_directories << tmp_project
|
|
34
|
+
FileUtils.cp_r project, tmp_project
|
|
35
|
+
Dir.chdir tmp_project
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
Given %r{^I am in the parent directory$} do
|
|
39
|
+
Dir.chdir ".."
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Given /^I should clean up the directory: (\w+)$/ do |directory|
|
|
43
|
+
@cleanup_directories << directory
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
Given %r{^the project has a file named "([^"]*)" containing:$} do |arg1, string|
|
|
47
|
+
File.open(arg1, "w") do |f|
|
|
48
|
+
f << string
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# When Actions are performed
|
|
54
|
+
When /^I create a project using: compass create ([^\s]+) ?(.+)?$/ do |dir, args|
|
|
55
|
+
@cleanup_directories << dir
|
|
56
|
+
compass 'create', dir, *(args || '').split
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
When /^I initialize a project using: compass init ?(.+)?$/ do |args|
|
|
60
|
+
compass 'init', *(args || '').split
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
When /^I run: compass ([^\s]+) ?(.+)?$/ do |command, args|
|
|
64
|
+
compass command, *(args || '').split
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
When /^I run in a separate process: compass ([^\s]+) ?(.+)?$/ do |command, args|
|
|
68
|
+
unless @other_process = fork
|
|
69
|
+
@last_result = ''
|
|
70
|
+
@last_error = ''
|
|
71
|
+
Signal.trap("HUP") do
|
|
72
|
+
open('/tmp/last_result.compass_test.txt', 'w') do |file|
|
|
73
|
+
file.puts $stdout.string
|
|
74
|
+
end
|
|
75
|
+
open('/tmp/last_error.compass_test.txt', 'w') do |file|
|
|
76
|
+
file.puts $stderr.string
|
|
77
|
+
end
|
|
78
|
+
exit!
|
|
79
|
+
end
|
|
80
|
+
# this command will run forever
|
|
81
|
+
# we kill it with a HUP signal from the parent process.
|
|
82
|
+
args = (args || '').split
|
|
83
|
+
args << { :wait => 5 }
|
|
84
|
+
compass command, *args
|
|
85
|
+
exit!
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
When /^I shutdown the other process$/ do
|
|
90
|
+
Process.kill("HUP", @other_process)
|
|
91
|
+
Process.wait
|
|
92
|
+
@last_result = File.read('/tmp/last_result.compass_test.txt')
|
|
93
|
+
@last_error = File.read('/tmp/last_error.compass_test.txt')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
When /^I touch ([^\s]+)$/ do |filename|
|
|
97
|
+
FileUtils.touch filename
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
When /^I wait ([\d.]+) seconds?$/ do |count|
|
|
101
|
+
sleep count.to_f
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
When /^I add some sass to ([^\s]+)$/ do |filename|
|
|
105
|
+
open(filename, "w+") do |file|
|
|
106
|
+
file.puts ".added .some .arbitrary"
|
|
107
|
+
file.puts " sass: code"
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Then postconditions
|
|
112
|
+
Then /^a directory ([^ ]+) is (not )?created$/ do |directory, negated|
|
|
113
|
+
File.directory?(directory).should == !negated
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
Then /an? \w+ file ([^ ]+) is (not )?removed/ do |filename, negated|
|
|
117
|
+
File.exist?(filename).should == !!negated
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
Then /an? \w+ file ([^ ]+) is (not )?created/ do |filename, negated|
|
|
121
|
+
File.exist?(filename).should == !negated
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
Then "the following files are reported removed:" do |table|
|
|
125
|
+
table.rows.each do |css_file|
|
|
126
|
+
#need to find a better way but this works for now
|
|
127
|
+
step %Q{a css file #{css_file.first} is reported removed}
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
Then "the following files are removed:" do |table|
|
|
132
|
+
table.rows.each do |css_file|
|
|
133
|
+
step %Q{a css file #{css_file.first} is removed}
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
Then /an? \w+ file ([^ ]+) is reported removed/ do |filename|
|
|
138
|
+
@last_result.should =~ /delete.*#{Regexp.escape(filename)}/
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
Then /an? \w+ file ([^ ]+) is reported written/ do |filename|
|
|
142
|
+
@last_result.should =~ /write.*#{Regexp.escape(filename)}/
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
Then /a \w+ file ([^ ]+) is (?:reported )?compiled/ do |filename|
|
|
146
|
+
@last_result.should =~ /compile.*#{Regexp.escape(filename)}/
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
Then /a \w+ file ([^ ]+) is reported unchanged/ do |filename|
|
|
150
|
+
@last_result.should =~ /unchanged.*#{Regexp.escape(filename)}/
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
Then /a \w+ file ([^ ]+) is reported identical/ do |filename|
|
|
154
|
+
@last_result.should =~ /identical.*#{Regexp.escape(filename)}/
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
Then /a \w+ file ([^ ]+) is reported overwritten/ do |filename|
|
|
158
|
+
@last_result.should =~ /overwrite.*#{Regexp.escape(filename)}/
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
Then /a \w+ file ([^ ]+) is not mentioned/ do |filename|
|
|
162
|
+
@last_result.should_not =~ /#{Regexp.escape(filename)}/
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
Then /I am told how to link to ([^ ]+) for media "([^"]+)"/ do |stylesheet, media|
|
|
166
|
+
@last_result.should =~ %r{<link href="#{stylesheet}" media="#{media}" rel="stylesheet" type="text/css" />}
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
Then /I am told how to conditionally link "([^"]+)" to ([^ ]+) for media "([^"]+)"/ do |condition, stylesheet, media|
|
|
170
|
+
@last_result.should =~ %r{<!--\[if #{condition}\]>\s+<link href="#{stylesheet}" media="#{media}" rel="stylesheet" type="text/css" />\s+<!\[endif\]-->}mi
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
Then /^an error message is printed out: (.+)$/ do |error_message|
|
|
174
|
+
@last_error.should =~ Regexp.new(Regexp.escape(error_message))
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
Then /^the command exits with a non\-zero error code$/ do
|
|
178
|
+
@last_exit_code.should_not == 0
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
Then /^the command exits normally$/ do
|
|
182
|
+
@last_exit_code.should == 0
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
Then /^I am congratulated$/ do
|
|
186
|
+
@last_result.should =~ /Congratulations!/
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
Then /^I am told that I can place stylesheets in the ([^\s]+) subdirectory$/ do |subdir|
|
|
190
|
+
@last_result.should =~ /You may now add sass stylesheets to the #{subdir} subdirectory of your project./
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
Then /^I am told how to compile my sass stylesheets$/ do
|
|
194
|
+
@last_result.should =~ /You must compile your sass stylesheets into CSS when they change.\nThis can be done in one of the following ways:/
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
Then /^I should be shown a list of "([^"]+)" commands$/ do |kind|
|
|
198
|
+
@last_result.should =~ /^#{kind.capitalize} Commands:$/
|
|
199
|
+
@last_command_list = []
|
|
200
|
+
found = false
|
|
201
|
+
indent = nil
|
|
202
|
+
@last_result.split("\n").each do |line|
|
|
203
|
+
if line =~ /^#{kind.capitalize} Commands:$/
|
|
204
|
+
found = true
|
|
205
|
+
elsif found && line =~ /^\s+/
|
|
206
|
+
@last_command_list << line
|
|
207
|
+
elsif found && line =~ /^$|^\w/
|
|
208
|
+
break
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
Then /^the list of commands should describe the ([^ ]+) command$/ do |command|
|
|
215
|
+
@last_result.should =~ /^\s+\* #{command}\s+- [A-Z].+$/
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
Then /^the following configuration properties are set in ([^ ]+):$/ do |config_file, table|
|
|
219
|
+
|
|
220
|
+
config = Compass::Configuration::FileData.new_from_file(config_file)
|
|
221
|
+
table.hashes.each do |hash|
|
|
222
|
+
config.send(hash['property']).should == hash['value']
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
Then /^my css is validated$/ do
|
|
227
|
+
if @last_error =~ /The Compass CSS Validator could not be loaded/
|
|
228
|
+
pending "Missing Dependency: sudo gem install compass-validator"
|
|
229
|
+
else
|
|
230
|
+
@last_result.should =~ /files? validated/
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
Then /^I am informed that my css is valid.$/ do
|
|
235
|
+
@last_result.should =~ /Result: Valid/
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
Then /^I am told statistics for each file:$/ do |table|
|
|
239
|
+
# table is a Cucumber::Ast::Table
|
|
240
|
+
table.raw.each do |row|
|
|
241
|
+
re = Regexp.new row.join(' *\| *')
|
|
242
|
+
@last_result.should =~ re
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
Then /^I should see the following "([^"]+)" commands:$/ do |kind, table|
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
step %Q{I should be shown a list of "#{kind}" commands}
|
|
250
|
+
|
|
251
|
+
commands = @last_command_list.map{|c| c =~ /^\s+\* ([^ ]+)\s+- [A-Z].+$/; [$1]}
|
|
252
|
+
table.diff!(commands)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
Then /^the image ([^ ]+) has a size of (\d+)x(\d+)$/ do |file, width, height|
|
|
257
|
+
# see http://snippets.dzone.com/posts/show/805
|
|
258
|
+
size = File.open(file, "rb") {|io| io.read}[0x10..0x18].unpack('NN')
|
|
259
|
+
size.should == [width.to_i, height.to_i]
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
Then /^I should see the following lines of output:$/ do |table|
|
|
263
|
+
table.diff!([['compass']])
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
Then /^I should see the following output: (.+)$/ do |expected|
|
|
267
|
+
(@last_result.strip + @last_error.strip).should == expected.gsub(/\$PROJECT_PATH/,Dir.pwd).strip
|
|
268
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Given /^the "([^\"]*)" directory exists$/ do |directory|
|
|
2
|
+
directory.gsub!('~', ENV["HOME"]) if directory.include?('~/')
|
|
3
|
+
FileUtils.mkdir_p directory
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
Given /^and I have a fake extension at (.*)$/ do |directory|
|
|
7
|
+
directory.gsub!('~', ENV["HOME"]) if directory.include?('~/')
|
|
8
|
+
FileUtils.mkdir_p File.join(directory, 'stylesheets')
|
|
9
|
+
FileUtils.mkdir_p File.join(directory, 'templates/project')
|
|
10
|
+
open(File.join(directory, 'templates/project/manifest.rb'),"w") do |f|
|
|
11
|
+
f.puts %Q{
|
|
12
|
+
description "This is a fake extension"
|
|
13
|
+
|
|
14
|
+
help "this is the fake help"
|
|
15
|
+
|
|
16
|
+
welcome_message "this is a fake welcome"
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
Then /^the list of frameworks includes "([^\"]*)"$/ do |framework|
|
|
22
|
+
@last_result.split("\n").map{|f| f.gsub(/(^\s+[*-]\s+)|(\s+$)/,'')}.should include(framework)
|
|
23
|
+
end
|
|
24
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module Actions
|
|
3
|
+
|
|
4
|
+
attr_writer :logger
|
|
5
|
+
|
|
6
|
+
def logger
|
|
7
|
+
@logger ||= ::Compass::Logger.new
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# copy/process a template in the compass template directory to the project directory.
|
|
11
|
+
def copy(from, to, options = nil, binary = false)
|
|
12
|
+
options ||= self.options if self.respond_to?(:options)
|
|
13
|
+
if binary
|
|
14
|
+
contents = File.new(from,"rb").read
|
|
15
|
+
else
|
|
16
|
+
contents = File.new(from).read
|
|
17
|
+
end
|
|
18
|
+
write_file to, contents, options, binary
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# create a directory and all the directories necessary to reach it.
|
|
22
|
+
def directory(dir, options = nil)
|
|
23
|
+
options ||= self.options if self.respond_to?(:options)
|
|
24
|
+
options ||= {}
|
|
25
|
+
if File.exist?(dir) && File.directory?(dir)
|
|
26
|
+
# do nothing
|
|
27
|
+
elsif File.exist?(dir)
|
|
28
|
+
msg = "#{basename(dir)} already exists and is not a directory."
|
|
29
|
+
raise Compass::FilesystemConflict.new(msg)
|
|
30
|
+
else
|
|
31
|
+
log_action :directory, separate("#{basename(dir)}/"), options
|
|
32
|
+
FileUtils.mkdir_p(dir)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Write a file given the file contents as a string
|
|
37
|
+
def write_file(file_name, contents, options = nil, binary = false)
|
|
38
|
+
options ||= self.options if self.respond_to?(:options)
|
|
39
|
+
skip_write = false
|
|
40
|
+
contents = process_erb(contents, options[:erb]) if options[:erb]
|
|
41
|
+
if File.exist?(file_name)
|
|
42
|
+
existing_contents = IO.read(file_name)
|
|
43
|
+
if existing_contents == contents
|
|
44
|
+
log_action :identical, basename(file_name), options
|
|
45
|
+
skip_write = true
|
|
46
|
+
elsif options[:force]
|
|
47
|
+
log_action :overwrite, basename(file_name), options
|
|
48
|
+
else
|
|
49
|
+
msg = "File #{basename(file_name)} already exists. Run with --force to force overwrite."
|
|
50
|
+
raise Compass::FilesystemConflict.new(msg)
|
|
51
|
+
end
|
|
52
|
+
else
|
|
53
|
+
log_action :create, basename(file_name), options
|
|
54
|
+
end
|
|
55
|
+
if skip_write
|
|
56
|
+
FileUtils.touch file_name
|
|
57
|
+
else
|
|
58
|
+
mode = "w"
|
|
59
|
+
mode << "b" if binary
|
|
60
|
+
open(file_name, mode) do |file|
|
|
61
|
+
file.write(contents)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def process_erb(contents, ctx = nil)
|
|
67
|
+
ctx = Object.new.instance_eval("binding") unless ctx.is_a? Binding
|
|
68
|
+
ERB.new(contents).result(ctx)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def remove(file_name)
|
|
72
|
+
file_name ||= ''
|
|
73
|
+
if File.directory?(file_name)
|
|
74
|
+
FileUtils.rm_rf file_name
|
|
75
|
+
log_action :remove, basename(file_name)+"/", options
|
|
76
|
+
elsif File.exist?(file_name)
|
|
77
|
+
File.unlink file_name
|
|
78
|
+
log_action :remove, basename(file_name), options
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def basename(file)
|
|
83
|
+
relativize(file) {|f| File.basename(file)}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def relativize(path)
|
|
87
|
+
path = File.expand_path(path)
|
|
88
|
+
if path.index(working_path+File::SEPARATOR) == 0
|
|
89
|
+
path[(working_path+File::SEPARATOR).length..-1]
|
|
90
|
+
elsif block_given?
|
|
91
|
+
yield path
|
|
92
|
+
else
|
|
93
|
+
path
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Write paths like we're on unix and then fix it
|
|
98
|
+
def separate(path)
|
|
99
|
+
path.gsub(%r{/}, File::SEPARATOR)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Removes the trailing separator, if any, from a path.
|
|
103
|
+
def strip_trailing_separator(path)
|
|
104
|
+
(path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def log_action(action, file, options)
|
|
108
|
+
quiet = !!options[:quiet]
|
|
109
|
+
quiet = false if options[:loud] && options[:loud] == true
|
|
110
|
+
quiet = false if options[:loud] && options[:loud].is_a?(Array) && options[:loud].include?(action)
|
|
111
|
+
unless quiet
|
|
112
|
+
logger.record(action, file, options[:extra].to_s)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module AppIntegration
|
|
3
|
+
module StandAlone
|
|
4
|
+
module ConfigurationDefaults
|
|
5
|
+
def default_project_type
|
|
6
|
+
:stand_alone
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def sass_dir_without_default
|
|
10
|
+
"sass"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def javascripts_dir_without_default
|
|
14
|
+
"javascripts"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def css_dir_without_default
|
|
18
|
+
"stylesheets"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def images_dir_without_default
|
|
22
|
+
"images"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def default_cache_dir
|
|
26
|
+
".sass-cache"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module Installers
|
|
3
|
+
class Base
|
|
4
|
+
end
|
|
5
|
+
class ManifestInstaller < Base
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
module AppIntegration
|
|
10
|
+
module StandAlone
|
|
11
|
+
class Installer < Compass::Installers::ManifestInstaller
|
|
12
|
+
|
|
13
|
+
def init
|
|
14
|
+
directory targetize("")
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def write_configuration_files(config_file = nil)
|
|
19
|
+
config_file ||= targetize('config.rb')
|
|
20
|
+
write_file config_file, config_contents
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def config_files_exist?
|
|
24
|
+
File.exist? targetize('config.rb')
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def config_contents
|
|
28
|
+
project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
|
|
29
|
+
Compass.configuration.serialize
|
|
30
|
+
ensure
|
|
31
|
+
Compass.configuration.project_path = project_path
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def prepare
|
|
35
|
+
write_configuration_files unless config_files_exist? || !@manifest.generate_config?
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def completed_configuration
|
|
39
|
+
nil
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def finalize(options = {})
|
|
43
|
+
if options[:create] && !manifest.welcome_message_options[:replace]
|
|
44
|
+
puts <<-NEXTSTEPS
|
|
45
|
+
|
|
46
|
+
*********************************************************************
|
|
47
|
+
Congratulations! Your compass project has been created.
|
|
48
|
+
|
|
49
|
+
You may now add and edit sass stylesheets in the #{Compass.configuration.sass_dir} subdirectory of your project.
|
|
50
|
+
|
|
51
|
+
Sass files beginning with an underscore are called partials and won't be
|
|
52
|
+
compiled to CSS, but they can be imported into other sass stylesheets.
|
|
53
|
+
|
|
54
|
+
You can configure your project by editing the config.rb configuration file.
|
|
55
|
+
|
|
56
|
+
You must compile your sass stylesheets into CSS when they change.
|
|
57
|
+
This can be done in one of the following ways:
|
|
58
|
+
1. To compile on demand:
|
|
59
|
+
compass compile [path/to/project]
|
|
60
|
+
2. To monitor your project for changes and automatically recompile:
|
|
61
|
+
compass watch [path/to/project]
|
|
62
|
+
|
|
63
|
+
More Resources:
|
|
64
|
+
* Website: http://compass-style.org/
|
|
65
|
+
* Sass: http://sass-lang.com
|
|
66
|
+
* Community: http://groups.google.com/group/compass-users/
|
|
67
|
+
|
|
68
|
+
NEXTSTEPS
|
|
69
|
+
end
|
|
70
|
+
puts manifest.welcome_message if manifest.welcome_message
|
|
71
|
+
if manifest.has_stylesheet? && !manifest.welcome_message_options[:replace]
|
|
72
|
+
puts "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:"
|
|
73
|
+
puts stylesheet_links
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def compilation_required?
|
|
78
|
+
@manifest.compile?
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
%w(configuration_defaults installer).each do |lib|
|
|
2
|
+
require "compass/app_integration/stand_alone/#{lib}"
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
module Compass
|
|
6
|
+
module AppIntegration
|
|
7
|
+
module StandAlone
|
|
8
|
+
|
|
9
|
+
extend self
|
|
10
|
+
|
|
11
|
+
def installer(*args)
|
|
12
|
+
Installer.new(*args)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def configuration
|
|
16
|
+
Compass::Configuration::Data.new('stand_alone').
|
|
17
|
+
extend(ConfigurationDefaults)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require "compass/app_integration/stand_alone"
|
|
2
|
+
|
|
3
|
+
module Compass
|
|
4
|
+
module AppIntegration
|
|
5
|
+
module Helpers
|
|
6
|
+
#attr_accessor :project_types
|
|
7
|
+
DEAFULT_PROJECT_TYPES = {
|
|
8
|
+
:stand_alone => "Compass::AppIntegration::StandAlone"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
def init
|
|
12
|
+
@project_types ||= DEAFULT_PROJECT_TYPES.dup
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_types
|
|
16
|
+
@project_types
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def default?
|
|
20
|
+
@project_types.keys === DEAFULT_PROJECT_TYPES.keys
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def lookup(type)
|
|
24
|
+
unless @project_types[type].nil?
|
|
25
|
+
eval @project_types[type]
|
|
26
|
+
else
|
|
27
|
+
raise Compass::Error, "No application integration exists for #{type}"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def register(type, klass)
|
|
32
|
+
@project_types[type] = klass
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
extend Helpers
|
|
37
|
+
init
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module Commands
|
|
3
|
+
class Base
|
|
4
|
+
def self.register(command_name)
|
|
5
|
+
Compass::Commands[command_name] = self
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
include Actions
|
|
9
|
+
|
|
10
|
+
attr_accessor :working_path, :options
|
|
11
|
+
|
|
12
|
+
def initialize(working_path, options)
|
|
13
|
+
self.working_path = working_path.to_s
|
|
14
|
+
self.options = options
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def execute
|
|
18
|
+
perform
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def perform
|
|
22
|
+
raise StandardError.new("Not Implemented")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def successful?
|
|
26
|
+
!@failed
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def failed!
|
|
30
|
+
@failed = true
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
protected
|
|
34
|
+
|
|
35
|
+
def framework
|
|
36
|
+
unless Compass::Frameworks[options[:framework]]
|
|
37
|
+
raise Compass::Error.new("No such framework: #{options[:framework].inspect}")
|
|
38
|
+
end
|
|
39
|
+
Compass::Frameworks[options[:framework]]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|