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.
Files changed (349) hide show
  1. data/CHANGELOG.markdown +165 -0
  2. data/README.markdown +15 -3
  3. data/Rakefile +46 -7
  4. data/VERSION.yml +3 -2
  5. data/bin/compass +22 -4
  6. data/examples/blueprint_default/index.html.haml +3 -3
  7. data/examples/blueprint_default/parts/forms.html.haml +2 -0
  8. data/examples/blueprint_default/src/screen.sass +1 -1
  9. data/examples/blueprint_plugins/index.html.haml +6 -6
  10. data/examples/blueprint_plugins/src/buttons.sass +2 -2
  11. data/examples/blueprint_plugins/src/link_icons.sass +1 -1
  12. data/examples/blueprint_plugins/src/rtl_screen.sass +3 -3
  13. data/examples/blueprint_plugins/src/screen.sass +2 -2
  14. data/examples/blueprint_scoped/src/ie.sass +2 -1
  15. data/examples/blueprint_scoped/src/print.sass +2 -1
  16. data/examples/blueprint_scoped/src/screen.sass +2 -1
  17. data/examples/blueprint_semantic/parts/fancy_type.html.haml +1 -1
  18. data/examples/blueprint_semantic/src/liquid.sass +5 -6
  19. data/examples/blueprint_semantic/src/screen.sass +4 -5
  20. data/examples/compass/bootstrap.rb +3 -0
  21. data/{frameworks → examples/compass/extensions}/yui/stylesheets/_yui.sass +0 -0
  22. data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  23. data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_fonts.sass +8 -1
  24. data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_grids.sass +174 -130
  25. data/{frameworks → examples/compass/extensions}/yui/stylesheets/yui/modules/_reset.sass +0 -0
  26. data/{frameworks → examples/compass/extensions}/yui/templates/project/manifest.rb +0 -0
  27. data/{frameworks → examples/compass/extensions}/yui/templates/project/screen.sass +0 -0
  28. data/examples/compass/src/utilities.sass +2 -2
  29. data/examples/css3/config.rb +6 -0
  30. data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
  31. data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
  32. data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +7 -0
  33. data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +5 -0
  34. data/examples/css3/images/fresh-peas.jpg +0 -0
  35. data/examples/css3/index.html.haml +55 -0
  36. data/examples/css3/src/_base.sass +14 -0
  37. data/examples/css3/src/fancy-fonts.sass +7 -0
  38. data/examples/css3/src/gradient.sass +10 -0
  39. data/examples/css3/src/main.sass +80 -0
  40. data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
  41. data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
  42. data/examples/downloader.rb +57 -0
  43. data/examples/ninesixty/bootstrap.rb +4 -0
  44. data/examples/ninesixty/config.rb +9 -0
  45. data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
  46. data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
  47. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
  48. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
  49. data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
  50. data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
  51. data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
  52. data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
  53. data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
  54. data/examples/ninesixty/src/grid.sass +16 -0
  55. data/examples/ninesixty/src/text.sass +10 -0
  56. data/examples/susy/bootstrap.rb +3 -0
  57. data/examples/susy/config.rb +9 -0
  58. data/examples/susy/extensions/susy/LICENSE.txt +28 -0
  59. data/examples/susy/extensions/susy/README.mkdn +235 -0
  60. data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +35 -0
  61. data/examples/susy/extensions/susy/docs/tutorial/build.sh +141 -0
  62. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +100 -0
  63. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +98 -0
  64. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +147 -0
  65. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +19 -0
  66. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +147 -0
  67. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +48 -0
  68. data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +14 -0
  69. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
  70. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
  71. data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +63 -0
  72. data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +1450 -0
  73. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +100 -0
  74. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +91 -0
  75. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
  76. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
  77. data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +301 -0
  78. data/examples/susy/extensions/susy/lib/susy.rb +2 -0
  79. data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +5 -0
  80. data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +79 -0
  81. data/examples/susy/extensions/susy/sass/susy/_grid.sass +128 -0
  82. data/examples/susy/extensions/susy/sass/susy/_reset.sass +7 -0
  83. data/examples/susy/extensions/susy/sass/susy/_susy.sass +23 -0
  84. data/examples/susy/extensions/susy/sass/susy/_text.sass +15 -0
  85. data/examples/susy/extensions/susy/sass/susy/_utils.sass +81 -0
  86. data/examples/susy/extensions/susy/templates/project/_base.sass +62 -0
  87. data/examples/susy/extensions/susy/templates/project/_defaults.sass +147 -0
  88. data/examples/susy/extensions/susy/templates/project/ie.sass +9 -0
  89. data/examples/susy/extensions/susy/templates/project/manifest.rb +5 -0
  90. data/examples/susy/extensions/susy/templates/project/print.sass +7 -0
  91. data/examples/susy/extensions/susy/templates/project/screen.sass +44 -0
  92. data/examples/susy/src/_base.sass +62 -0
  93. data/examples/susy/src/_defaults.sass +148 -0
  94. data/examples/susy/src/screen.sass +114 -0
  95. data/examples/yui/bootstrap.rb +3 -0
  96. data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
  97. data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  98. data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  99. data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  100. data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  101. data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
  102. data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
  103. data/features/command_line.feature +226 -0
  104. data/features/extensions.feature +20 -0
  105. data/features/step_definitions/command_line_steps.rb +223 -0
  106. data/features/step_definitions/extension_steps.rb +13 -0
  107. data/lib/compass.rb +6 -7
  108. data/lib/compass/actions.rb +7 -1
  109. data/lib/compass/app_integration.rb +23 -4
  110. data/lib/compass/app_integration/merb.rb +1 -43
  111. data/lib/compass/app_integration/merb/runtime.rb +63 -0
  112. data/lib/compass/app_integration/rails.rb +24 -10
  113. data/lib/compass/app_integration/rails/configuration_defaults.rb +45 -0
  114. data/lib/compass/app_integration/rails/installer.rb +127 -0
  115. data/lib/compass/app_integration/rails/runtime.rb +14 -0
  116. data/lib/compass/app_integration/stand_alone.rb +22 -0
  117. data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +28 -0
  118. data/lib/compass/app_integration/stand_alone/installer.rb +83 -0
  119. data/lib/compass/commands.rb +11 -0
  120. data/lib/compass/commands/base.rb +4 -1
  121. data/lib/compass/commands/create_project.rb +108 -5
  122. data/lib/compass/commands/generate_grid_background.rb +73 -6
  123. data/lib/compass/commands/help.rb +89 -0
  124. data/lib/compass/commands/installer_command.rb +20 -13
  125. data/lib/compass/commands/interactive.rb +61 -0
  126. data/lib/compass/commands/list_frameworks.rb +2 -2
  127. data/lib/compass/commands/print_version.rb +72 -4
  128. data/lib/compass/commands/project_base.rb +14 -34
  129. data/lib/compass/commands/project_stats.rb +162 -0
  130. data/lib/compass/commands/registry.rb +22 -0
  131. data/lib/compass/commands/stamp_pattern.rb +56 -3
  132. data/lib/compass/commands/update_project.rb +60 -6
  133. data/lib/compass/commands/validate_project.rb +62 -6
  134. data/lib/compass/commands/watch_project.rb +12 -5
  135. data/lib/compass/commands/write_configuration.rb +89 -4
  136. data/lib/compass/compiler.rb +13 -4
  137. data/lib/compass/configuration.rb +29 -310
  138. data/lib/compass/configuration/adapters.rb +59 -0
  139. data/lib/compass/configuration/comments.rb +22 -0
  140. data/lib/compass/configuration/data.rb +106 -0
  141. data/lib/compass/configuration/defaults.rb +138 -0
  142. data/lib/compass/configuration/helpers.rb +120 -0
  143. data/lib/compass/configuration/inheritance.rb +170 -0
  144. data/lib/compass/configuration/serialization.rb +86 -0
  145. data/lib/compass/dependencies.rb +4 -8
  146. data/lib/compass/errors.rb +4 -1
  147. data/lib/compass/exec.rb +11 -246
  148. data/lib/compass/exec/command_option_parser.rb +23 -0
  149. data/lib/compass/exec/global_options_parser.rb +37 -0
  150. data/lib/compass/exec/helpers.rb +28 -0
  151. data/lib/compass/exec/project_options_parser.rb +46 -0
  152. data/lib/compass/exec/sub_command_ui.rb +45 -0
  153. data/lib/compass/exec/switch_ui.rb +166 -0
  154. data/lib/compass/frameworks.rb +70 -7
  155. data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +31 -0
  156. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_buttons.sass +27 -27
  157. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_colors.sass +0 -0
  158. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_debug.sass +2 -2
  159. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_fancy_type.sass +19 -19
  160. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +56 -0
  161. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_grid.sass +34 -33
  162. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +99 -0
  163. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +58 -0
  164. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_link_icons.sass +9 -9
  165. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_liquid.sass +29 -29
  166. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +87 -0
  167. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_reset.sass +20 -18
  168. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +123 -0
  169. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_scaffolding.sass +6 -4
  170. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +2 -0
  171. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +162 -0
  172. data/{frameworks/blueprint/stylesheets/blueprint/modules → lib/compass/frameworks/blueprint/stylesheets/blueprint}/_utilities.sass +15 -15
  173. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +2 -0
  174. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +2 -0
  175. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +2 -0
  176. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +2 -0
  177. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +2 -0
  178. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +2 -0
  179. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +2 -0
  180. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +2 -0
  181. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +3 -0
  182. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +2 -0
  183. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +2 -0
  184. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +2 -0
  185. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +2 -0
  186. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +2 -0
  187. data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons.sass +4 -4
  188. data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/cross.png +0 -0
  189. data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/key.png +0 -0
  190. data/{frameworks → lib/compass/frameworks}/blueprint/templates/buttons/buttons/tick.png +0 -0
  191. data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +17 -0
  192. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons.sass +1 -1
  193. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/doc.png +0 -0
  194. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/email.png +0 -0
  195. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/external.png +0 -0
  196. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/feed.png +0 -0
  197. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/im.png +0 -0
  198. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
  199. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/visited.png +0 -0
  200. data/{frameworks → lib/compass/frameworks}/blueprint/templates/link_icons/link_icons/xls.png +0 -0
  201. data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +23 -0
  202. data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/grid.png +0 -0
  203. data/lib/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
  204. data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +32 -0
  205. data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/partials/_base.sass +0 -0
  206. data/lib/compass/frameworks/blueprint/templates/project/print.sass +8 -0
  207. data/{frameworks → lib/compass/frameworks}/blueprint/templates/project/screen.sass +3 -2
  208. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +21 -0
  209. data/lib/compass/frameworks/compass/stylesheets/_compass.sass +2 -0
  210. data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +14 -0
  211. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_layout.sass +0 -0
  212. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_misc.sass +12 -12
  213. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_reset.sass +0 -0
  214. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/_utilities.sass +0 -0
  215. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +16 -0
  216. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +18 -0
  217. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +14 -0
  218. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_border_radius.sass +47 -0
  219. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +20 -0
  220. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_sizing.sass +13 -0
  221. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_columns.sass +37 -0
  222. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +31 -0
  223. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +40 -0
  224. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_inline_block.sass +7 -0
  225. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_opacity.sass +18 -0
  226. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +15 -0
  227. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +62 -0
  228. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +57 -0
  229. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/layout/_sticky_footer.sass +9 -7
  230. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_general.sass +0 -1
  231. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_links.sass +1 -1
  232. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_lists.sass +0 -0
  233. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_print.sass +18 -0
  234. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
  235. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_tables.sass +0 -0
  236. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/_text.sass +0 -0
  237. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_clearfix.sass +7 -7
  238. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_float.sass +2 -2
  239. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_hacks.sass +2 -2
  240. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_reset.sass +28 -28
  241. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  242. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  243. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/links/_hover_link.sass +2 -2
  244. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/links/_link_colors.sass +6 -6
  245. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +7 -0
  246. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_bullets.sass +6 -6
  247. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +6 -6
  248. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/lists/_inline_list.sass +9 -9
  249. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +52 -0
  250. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
  251. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
  252. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
  253. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_ellipsis.sass +0 -0
  254. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_nowrap.sass +1 -1
  255. data/{frameworks → lib/compass/frameworks}/compass/stylesheets/compass/utilities/text/_replacement.sass +6 -6
  256. data/{frameworks → lib/compass/frameworks}/compass/templates/ellipsis/ellipsis.sass +0 -0
  257. data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +27 -0
  258. data/{frameworks → lib/compass/frameworks}/compass/templates/ellipsis/xml/ellipsis.xml +0 -0
  259. data/lib/compass/frameworks/compass/templates/extension/manifest.rb +20 -0
  260. data/lib/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
  261. data/lib/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
  262. data/lib/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
  263. data/lib/compass/frameworks/compass/templates/project/USAGE.markdown +32 -0
  264. data/{frameworks → lib/compass/frameworks}/compass/templates/project/ie.sass +0 -0
  265. data/{frameworks → lib/compass/frameworks}/compass/templates/project/manifest.rb +1 -0
  266. data/{frameworks → lib/compass/frameworks}/compass/templates/project/print.sass +0 -0
  267. data/{frameworks → lib/compass/frameworks}/compass/templates/project/screen.sass +0 -0
  268. data/lib/compass/grid_builder.rb +15 -11
  269. data/lib/compass/installers.rb +3 -5
  270. data/lib/compass/installers/bare_installer.rb +58 -0
  271. data/lib/compass/installers/base.rb +40 -51
  272. data/lib/compass/installers/manifest.rb +55 -2
  273. data/lib/compass/installers/manifest_installer.rb +59 -0
  274. data/lib/compass/installers/template_context.rb +44 -0
  275. data/lib/compass/logger.rb +28 -2
  276. data/lib/compass/sass_extensions.rb +2 -2
  277. data/lib/compass/sass_extensions/functions.rb +4 -2
  278. data/lib/compass/sass_extensions/functions/color_stop.rb +10 -0
  279. data/lib/compass/sass_extensions/functions/font_files.rb +11 -0
  280. data/lib/compass/sass_extensions/functions/inline_image.rb +22 -1
  281. data/lib/compass/sass_extensions/functions/selectors.rb +4 -1
  282. data/lib/compass/sass_extensions/functions/urls.rb +22 -2
  283. data/lib/compass/sass_extensions/monkey_patches.rb +3 -3
  284. data/lib/compass/sass_extensions/monkey_patches/traversal.rb +23 -0
  285. data/lib/compass/stats.rb +92 -0
  286. data/lib/compass/validator.rb +2 -3
  287. data/lib/vendor/fssm/state.rb +1 -1
  288. data/test/command_line_helper.rb +19 -16
  289. data/test/command_line_test.rb +5 -4
  290. data/test/compass_test.rb +16 -15
  291. data/test/configuration_test.rb +24 -19
  292. data/test/fixtures/stylesheets/blueprint/css/typography.css +5 -3
  293. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
  294. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
  295. data/test/fixtures/stylesheets/compass/css/layout.css +2 -0
  296. data/test/fixtures/stylesheets/compass/css/print.css +2 -8
  297. data/test/fixtures/stylesheets/compass/css/reset.css +3 -3
  298. data/test/fixtures/stylesheets/image_urls/css/screen.css +2 -0
  299. data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
  300. data/test/fixtures/stylesheets/relative/config.rb +9 -0
  301. data/test/fixtures/stylesheets/relative/css/ie.css +1 -0
  302. data/test/fixtures/stylesheets/relative/css/print.css +1 -0
  303. data/test/fixtures/stylesheets/relative/css/screen.css +1 -0
  304. data/test/fixtures/stylesheets/relative/sass/ie.sass +6 -0
  305. data/test/fixtures/stylesheets/relative/sass/print.sass +6 -0
  306. data/test/fixtures/stylesheets/relative/sass/screen.sass +3 -0
  307. data/test/io_helper.rb +36 -0
  308. data/test/rails_helper.rb +40 -0
  309. data/test/rails_integration_test.rb +7 -44
  310. data/test/sass_extensions_test.rb +2 -2
  311. data/test/test_helper.rb +9 -2
  312. metadata +257 -110
  313. data/frameworks/blueprint.rb +0 -2
  314. data/frameworks/blueprint/stylesheets/_blueprint.sass +0 -3
  315. data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +0 -93
  316. data/frameworks/blueprint/stylesheets/blueprint/_print.sass +0 -83
  317. data/frameworks/blueprint/stylesheets/blueprint/_reset.sass +0 -3
  318. data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +0 -15
  319. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +0 -55
  320. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +0 -58
  321. data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +0 -104
  322. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +0 -155
  323. data/frameworks/blueprint/templates/buttons/manifest.rb +0 -5
  324. data/frameworks/blueprint/templates/link_icons/manifest.rb +0 -10
  325. data/frameworks/blueprint/templates/project/ie.sass +0 -15
  326. data/frameworks/blueprint/templates/project/manifest.rb +0 -6
  327. data/frameworks/blueprint/templates/project/print.sass +0 -3
  328. data/frameworks/compass.rb +0 -2
  329. data/frameworks/compass/stylesheets/_compass.sass +0 -1
  330. data/frameworks/compass/stylesheets/compass/utilities/_print.sass +0 -24
  331. data/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +0 -1
  332. data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +0 -6
  333. data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +0 -19
  334. data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +0 -5
  335. data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +0 -12
  336. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +0 -20
  337. data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +0 -27
  338. data/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +0 -9
  339. data/frameworks/compass/templates/ellipsis/manifest.rb +0 -2
  340. data/frameworks/yui.rb +0 -2
  341. data/frameworks/yui/stylesheets/yui/modules/_base.sass +0 -60
  342. data/lib/compass/installers/rails.rb +0 -135
  343. data/lib/compass/installers/stand_alone.rb +0 -60
  344. data/test/fixtures/stylesheets/yui/config.rb +0 -9
  345. data/test/fixtures/stylesheets/yui/css/mixins.css +0 -13
  346. data/test/fixtures/stylesheets/yui/sass/base.sass +0 -3
  347. data/test/fixtures/stylesheets/yui/sass/fonts.sass +0 -3
  348. data/test/fixtures/stylesheets/yui/sass/grids.sass +0 -3
  349. data/test/fixtures/stylesheets/yui/sass/mixins.sass +0 -16
@@ -0,0 +1 @@
1
+ stylesheet 'screen.sass', :media => "screen, projection"
@@ -0,0 +1,4 @@
1
+ @import yui.sass
2
+ @import compass/reset.sass
3
+
4
+ +yui
@@ -0,0 +1,226 @@
1
+ Feature: Command Line
2
+ In order to manage my stylesheets
3
+ As a user on the command line
4
+ I want to create a new project
5
+
6
+ Scenario: Install a project without a framework
7
+ When I create a project using: compass create my_project
8
+ Then a directory my_project/ is created
9
+ And a configuration file my_project/config.rb is created
10
+ And a sass file my_project/src/screen.sass is created
11
+ And a sass file my_project/src/print.sass is created
12
+ And a sass file my_project/src/ie.sass is created
13
+ And a sass file my_project/src/screen.sass is compiled
14
+ And a sass file my_project/src/print.sass is compiled
15
+ And a sass file my_project/src/ie.sass is compiled
16
+ And a css file my_project/stylesheets/screen.css is created
17
+ And a css file my_project/stylesheets/print.css is created
18
+ And a css file my_project/stylesheets/ie.css is created
19
+ And I am told how to link to /stylesheets/screen.css for media "screen, projection"
20
+ And I am told how to link to /stylesheets/print.css for media "print"
21
+ And I am told how to conditionally link "IE" to /stylesheets/ie.css for media "screen, projection"
22
+
23
+ Scenario: Install a project with blueprint
24
+ When I create a project using: compass create bp_project --using blueprint
25
+ Then a directory bp_project/ is created
26
+ And a configuration file bp_project/config.rb is created
27
+ And a sass file bp_project/src/screen.sass is created
28
+ And a sass file bp_project/src/print.sass is created
29
+ And a sass file bp_project/src/ie.sass is created
30
+ And a sass file bp_project/src/screen.sass is compiled
31
+ And a sass file bp_project/src/print.sass is compiled
32
+ And a sass file bp_project/src/ie.sass is compiled
33
+ And a css file bp_project/stylesheets/screen.css is created
34
+ And a css file bp_project/stylesheets/print.css is created
35
+ And a css file bp_project/stylesheets/ie.css is created
36
+ And an image file bp_project/images/grid.png is created
37
+ And I am told how to link to /stylesheets/screen.css for media "screen, projection"
38
+ And I am told how to link to /stylesheets/print.css for media "print"
39
+ And I am told how to conditionally link "lt IE 8" to /stylesheets/ie.css for media "screen, projection"
40
+
41
+ Scenario: Install a project with specific directories
42
+ When I create a project using: compass create custom_project --using blueprint --sass-dir sass --css-dir css --images-dir assets/imgs
43
+ Then a directory custom_project/ is created
44
+ And a directory custom_project/sass/ is created
45
+ And a directory custom_project/css/ is created
46
+ And a directory custom_project/assets/imgs/ is created
47
+ And a sass file custom_project/sass/screen.sass is created
48
+ And a css file custom_project/css/screen.css is created
49
+ And an image file custom_project/assets/imgs/grid.png is created
50
+
51
+ Scenario: Perform a dry run of creating a project
52
+ When I create a project using: compass create my_project --dry-run
53
+ Then a directory my_project/ is not created
54
+ But a configuration file my_project/config.rb is reported created
55
+ And a sass file my_project/src/screen.sass is reported created
56
+ And a sass file my_project/src/print.sass is reported created
57
+ And a sass file my_project/src/ie.sass is reported created
58
+ And I am told how to link to /stylesheets/screen.css for media "screen, projection"
59
+ And I am told how to link to /stylesheets/print.css for media "print"
60
+ And I am told how to conditionally link "IE" to /stylesheets/ie.css for media "screen, projection"
61
+
62
+ Scenario: Creating a bare project
63
+ When I create a project using: compass create bare_project --bare
64
+ Then a directory bare_project/ is created
65
+ And a configuration file bare_project/config.rb is created
66
+ And a directory bare_project/src/ is created
67
+ And a directory bare_project/stylesheets/ is not created
68
+ And I am congratulated
69
+ And I am told that I can place stylesheets in the src subdirectory
70
+ And I am told how to compile my sass stylesheets
71
+
72
+ Scenario: Creating a bare project with a framework
73
+ When I create a project using: compass create bare_project --using blueprint --bare
74
+ Then an error message is printed out: A bare project cannot be created when a framework is specified.
75
+ And the command exits with a non-zero error code
76
+
77
+ Scenario: Initializing a rails project
78
+ Given I'm in a newly created rails project: my_rails_project
79
+ When I initialize a project using: compass init rails --sass-dir app/stylesheets --css-dir public/stylesheets/compiled
80
+ Then a config file config/compass.rb is reported created
81
+ Then a config file config/compass.rb is created
82
+ And a sass file config/initializers/compass.rb is created
83
+ And a sass file app/stylesheets/screen.sass is created
84
+ And a sass file app/stylesheets/print.sass is created
85
+ And a sass file app/stylesheets/ie.sass is created
86
+
87
+ Scenario: Compiling an existing project.
88
+ Given I am using the existing project in test/fixtures/stylesheets/compass
89
+ When I run: compass compile
90
+ Then a directory tmp/ is created
91
+ And a sass file sass/layout.sass is reported compiled
92
+ And a sass file sass/print.sass is reported compiled
93
+ And a sass file sass/reset.sass is reported compiled
94
+ And a sass file sass/utilities.sass is reported compiled
95
+ And a css file tmp/layout.css is created
96
+ And a css file tmp/print.css is created
97
+ And a css file tmp/reset.css is created
98
+ And a css file tmp/utilities.css is created
99
+
100
+ Scenario: Compiling an existing project with a specified project
101
+ Given I am using the existing project in test/fixtures/stylesheets/compass
102
+ And I am in the parent directory
103
+ When I run: compass compile tmp_compass
104
+ Then a directory tmp_compass/tmp/ is created
105
+ And a sass file tmp_compass/sass/layout.sass is reported compiled
106
+ And a sass file tmp_compass/sass/print.sass is reported compiled
107
+ And a sass file tmp_compass/sass/reset.sass is reported compiled
108
+ And a sass file tmp_compass/sass/utilities.sass is reported compiled
109
+ And a css file tmp_compass/tmp/layout.css is created
110
+ And a css file tmp_compass/tmp/print.css is created
111
+ And a css file tmp_compass/tmp/reset.css is created
112
+ And a css file tmp_compass/tmp/utilities.css is created
113
+
114
+ Scenario: Recompiling a project with no changes
115
+ Given I am using the existing project in test/fixtures/stylesheets/compass
116
+ When I run: compass compile
117
+ And I run: compass compile
118
+ Then a sass file sass/layout.sass is reported unchanged
119
+ And a sass file sass/print.sass is reported unchanged
120
+ And a sass file sass/reset.sass is reported unchanged
121
+ And a sass file sass/utilities.sass is reported unchanged
122
+
123
+ Scenario: Installing a pattern into a project
124
+ Given I am using the existing project in test/fixtures/stylesheets/compass
125
+ When I run: compass install blueprint/buttons
126
+ Then a sass file sass/buttons.sass is created
127
+ And an image file images/buttons/cross.png is created
128
+ And an image file images/buttons/key.png is created
129
+ And an image file images/buttons/tick.png is created
130
+ And a css file tmp/buttons.css is created
131
+
132
+ @now
133
+ Scenario: Basic help
134
+ When I run: compass help
135
+ Then I should see the following "primary" commands:
136
+ | compile |
137
+ | create |
138
+ | init |
139
+ | watch |
140
+ And I should see the following "other" commands:
141
+ | config |
142
+ | grid-img |
143
+ | help |
144
+ | install |
145
+ | interactive |
146
+ | stats |
147
+ | validate |
148
+ | version |
149
+
150
+ Scenario: Recompiling a project with no material changes
151
+ Given I am using the existing project in test/fixtures/stylesheets/compass
152
+ When I run: compass compile
153
+ And I wait 1 second
154
+ And I touch sass/layout.sass
155
+ And I run: compass compile
156
+ Then a sass file sass/layout.sass is reported compiled
157
+ Then a css file tmp/layout.css is reported identical
158
+ And a sass file sass/print.sass is reported unchanged
159
+ And a sass file sass/reset.sass is reported unchanged
160
+ And a sass file sass/utilities.sass is reported unchanged
161
+
162
+ Scenario: Recompiling a project with changes
163
+ Given I am using the existing project in test/fixtures/stylesheets/compass
164
+ When I run: compass compile
165
+ And I wait 1 second
166
+ And I add some sass to sass/layout.sass
167
+ And I run: compass compile
168
+ Then a sass file sass/layout.sass is reported compiled
169
+ And a css file tmp/layout.css is reported overwritten
170
+ And a sass file sass/print.sass is reported unchanged
171
+ And a sass file sass/reset.sass is reported unchanged
172
+ And a sass file sass/utilities.sass is reported unchanged
173
+
174
+ Scenario: Watching a project for changes
175
+ Given I am using the existing project in test/fixtures/stylesheets/compass
176
+ When I run: compass compile
177
+ And I run in a separate process: compass watch
178
+ And I wait 1 second
179
+ And I touch sass/layout.sass
180
+ And I wait 2 seconds
181
+ And I shutdown the other process
182
+ Then a css file tmp/layout.css is reported identical
183
+
184
+ Scenario: Generating a grid image so that I can debug my grid alignments
185
+ Given I am using the existing project in test/fixtures/stylesheets/compass
186
+ When I run: compass grid-img 30+10x24
187
+ Then a png file images/grid.png is created
188
+
189
+ Scenario: Generating a grid image to a specified path with custom dimensions
190
+ Given I am using the existing project in test/fixtures/stylesheets/compass
191
+ When I run: compass grid-img 50+10x24 assets/wide_grid.png
192
+ Then a directory assets is created
193
+ Then a png file assets/wide_grid.png is created
194
+
195
+ Scenario: Generating a grid image with invalid dimensions
196
+ Given I am using the existing project in test/fixtures/stylesheets/compass
197
+ When I run: compass grid-img 50x24 assets/wide_grid.png
198
+ Then a directory assets is not created
199
+ And a png file assets/wide_grid.png is not created
200
+
201
+ Scenario: Generate a compass configuration file
202
+ Given I should clean up the directory: config
203
+ When I run: compass config config/compass.rb --sass-dir sass --css-dir assets/css
204
+ Then a configuration file config/compass.rb is created
205
+ And the following configuration properties are set in config/compass.rb:
206
+ | property | value |
207
+ | sass_dir | sass |
208
+ | css_dir | assets/css |
209
+
210
+ Scenario: Validate the generated CSS
211
+ Given I am using the existing project in test/fixtures/stylesheets/compass
212
+ When I run: compass validate
213
+ Then my css is validated
214
+ And I am informed that my css is valid.
215
+
216
+ Scenario: Get stats for my project
217
+ Given I am using the existing project in test/fixtures/stylesheets/compass
218
+ When I run: compass stats
219
+ Then I am told statistics for each file:
220
+ | Filename | Rules | Properties | Mixins Defs | Mixins Used | CSS Rules | CSS Properties |
221
+ | sass/layout.sass | 0 | 0 | 0 | 1 | 5 | 9 |
222
+ | sass/print.sass | 0 | 0 | 0 | 2 | 61 | 61 |
223
+ | sass/reset.sass | 4 | 1 | 0 | 2 | 191 | 665 |
224
+ | sass/utilities.sass | 2 | 0 | 0 | 2 | 5 | 11 |
225
+ | Total.* | 6 | 1 | 0 | 7 | 262 | 746 |
226
+
@@ -0,0 +1,20 @@
1
+ Feature: Extensions
2
+ In order to have an open source ecosystem for stylesheets
3
+ As a compass user
4
+ I can install extensions that others have created
5
+ And I can create and publish my own extensions
6
+
7
+ Scenario: Extensions directory for stand_alone projects
8
+ Given I am using the existing project in test/fixtures/stylesheets/compass
9
+ And the "extensions" directory exists
10
+ And and I have a fake extension at extensions/testing
11
+ When I run: compass --list-frameworks
12
+ Then the list of frameworks includes "testing"
13
+
14
+ Scenario: Extensions directory for rails projects
15
+ Given I'm in a newly created rails project: my_rails_project
16
+ And the "my_rails_project/vendor/plugins/compass/extensions" directory exists
17
+ And and I have a fake extension at my_rails_project/vendor/plugins/compass/extensions/testing
18
+ When I run: compass --list-frameworks
19
+ Then the list of frameworks includes "testing"
20
+
@@ -0,0 +1,223 @@
1
+ require 'spec/expectations'
2
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../../test')))
3
+
4
+ require 'test_helper'
5
+
6
+ require 'compass/exec'
7
+
8
+ include Compass::CommandLineHelper
9
+ include Compass::IoHelper
10
+ include Compass::RailsHelper
11
+
12
+ Before do
13
+ Compass.reset_configuration!
14
+ @cleanup_directories = []
15
+ @original_working_directory = Dir.pwd
16
+ end
17
+
18
+ After do
19
+ Dir.chdir @original_working_directory
20
+ @cleanup_directories.each do |dir|
21
+ FileUtils.rm_rf dir
22
+ end
23
+ end
24
+
25
+ # Given Preconditions
26
+ Given %r{^I am using the existing project in ([^\s]+)$} do |project|
27
+ tmp_project = "tmp_#{File.basename(project)}"
28
+ @cleanup_directories << tmp_project
29
+ FileUtils.cp_r project, tmp_project
30
+ Dir.chdir tmp_project
31
+ end
32
+
33
+ Given %r{^I am in the parent directory$} do
34
+ Dir.chdir ".."
35
+ end
36
+
37
+ Given /^I'm in a newly created rails project: (.+)$/ do |project_name|
38
+ @cleanup_directories << project_name
39
+ begin
40
+ generate_rails_app project_name
41
+ Dir.chdir project_name
42
+ rescue LoadError
43
+ pending "Missing Ruby-on-rails gems: sudo gem install rails"
44
+ end
45
+ end
46
+
47
+ Given /^I should clean up the directory: (\w+)$/ do |directory|
48
+ @cleanup_directories << directory
49
+ end
50
+
51
+ # When Actions are performed
52
+ When /^I create a project using: compass create ([^\s]+) ?(.+)?$/ do |dir, args|
53
+ @cleanup_directories << dir
54
+ compass 'create', dir, *(args || '').split
55
+ end
56
+
57
+ When /^I initialize a project using: compass init ?(.+)?$/ do |args|
58
+ compass 'init', *(args || '').split
59
+ end
60
+
61
+ When /^I run: compass ([^\s]+) ?(.+)?$/ do |command, args|
62
+ compass command, *(args || '').split
63
+ end
64
+
65
+ When /^I run in a separate process: compass ([^\s]+) ?(.+)?$/ do |command, args|
66
+ unless @other_process = fork
67
+ @last_result = ''
68
+ @last_error = ''
69
+ Signal.trap("HUP") do
70
+ open('/tmp/last_result.compass_test.txt', 'w') do |file|
71
+ file.puts $stdout.string
72
+ end
73
+ open('/tmp/last_error.compass_test.txt', 'w') do |file|
74
+ file.puts @stderr.string
75
+ end
76
+ exit!
77
+ end
78
+ # this command will run forever
79
+ # we kill it with a HUP signal from the parent process.
80
+ args = (args || '').split
81
+ args << { :wait => 5 }
82
+ compass command, *args
83
+ exit!
84
+ end
85
+ end
86
+
87
+ When /^I shutdown the other process$/ do
88
+ Process.kill("HUP", @other_process)
89
+ Process.wait
90
+ @last_result = File.read('/tmp/last_result.compass_test.txt')
91
+ @last_error = File.read('/tmp/last_error.compass_test.txt')
92
+ end
93
+
94
+ When /^I touch ([^\s]+)$/ do |filename|
95
+ FileUtils.touch filename
96
+ end
97
+
98
+ When /^I wait ([\d.]+) seconds?$/ do |count|
99
+ sleep count.to_f
100
+ end
101
+
102
+ When /^I add some sass to ([^\s]+)$/ do |filename|
103
+ open(filename, "w+") do |file|
104
+ file.puts ".added .some .arbitrary"
105
+ file.puts " sass: code"
106
+ end
107
+ end
108
+
109
+ # Then postconditions
110
+ Then /^a directory ([^ ]+) is (not )?created$/ do |directory, negated|
111
+ File.directory?(directory).should == !negated
112
+ end
113
+
114
+ Then /an? \w+ file ([^ ]+) is (not )?created/ do |filename, negated|
115
+ File.exists?(filename).should == !negated
116
+ end
117
+
118
+ Then /an? \w+ file ([^ ]+) is reported created/ do |filename|
119
+ @last_result.should =~ /create #{Regexp.escape(filename)}/
120
+ end
121
+
122
+ Then /a \w+ file ([^ ]+) is (?:reported )?compiled/ do |filename|
123
+ @last_result.should =~ /compile #{Regexp.escape(filename)}/
124
+ end
125
+
126
+ Then /a \w+ file ([^ ]+) is reported unchanged/ do |filename|
127
+ @last_result.should =~ /unchanged #{Regexp.escape(filename)}/
128
+ end
129
+
130
+ Then /a \w+ file ([^ ]+) is reported identical/ do |filename|
131
+ @last_result.should =~ /identical #{Regexp.escape(filename)}/
132
+ end
133
+
134
+ Then /a \w+ file ([^ ]+) is reported overwritten/ do |filename|
135
+ @last_result.should =~ /overwrite #{Regexp.escape(filename)}/
136
+ end
137
+
138
+ Then /I am told how to link to ([^ ]+) for media "([^"]+)"/ do |stylesheet, media|
139
+ @last_result.should =~ %r{<link href="#{stylesheet}" media="#{media}" rel="stylesheet" type="text/css" />}
140
+ end
141
+
142
+ Then /I am told how to conditionally link "([^"]+)" to ([^ ]+) for media "([^"]+)"/ do |condition, stylesheet, media|
143
+ @last_result.should =~ %r{<!--\[if #{condition}\]>\s+<link href="#{stylesheet}" media="#{media}" rel="stylesheet" type="text/css" />\s+<!\[endif\]-->}mi
144
+ end
145
+
146
+ Then /^an error message is printed out: (.+)$/ do |error_message|
147
+ @last_error.should =~ Regexp.new(Regexp.escape(error_message))
148
+ end
149
+
150
+ Then /^the command exits with a non\-zero error code$/ do
151
+ @last_exit_code.should_not == 0
152
+ end
153
+
154
+
155
+ Then /^I am congratulated$/ do
156
+ @last_result.should =~ /Congratulations!/
157
+ end
158
+
159
+ Then /^I am told that I can place stylesheets in the ([^\s]+) subdirectory$/ do |subdir|
160
+ @last_result.should =~ /You may now add sass stylesheets to the #{subdir} subdirectory of your project./
161
+ end
162
+
163
+ Then /^I am told how to compile my sass stylesheets$/ do
164
+ @last_result.should =~ /You must compile your sass stylesheets into CSS when they change.\nThis can be done in one of the following ways:/
165
+ end
166
+
167
+ Then /^I should be shown a list of "([^"]+)" commands$/ do |kind|
168
+ @last_result.should =~ /^#{kind.capitalize} Commands:$/
169
+ @last_command_list = []
170
+ found = false
171
+ indent = nil
172
+ @last_result.split("\n").each do |line|
173
+ if line =~ /^#{kind.capitalize} Commands:$/
174
+ found = true
175
+ elsif found && line =~ /^\s+/
176
+ @last_command_list << line
177
+ elsif found && line =~ /^$|^\w/
178
+ break
179
+ end
180
+ end
181
+
182
+ end
183
+
184
+ Then /^the list of commands should describe the ([^ ]+) command$/ do |command|
185
+ @last_result.should =~ /^\s+\* #{command}\s+- [A-Z].+$/
186
+ end
187
+
188
+ Then /^the following configuration properties are set in ([^ ]+):$/ do |config_file, table|
189
+
190
+ config = Compass::Configuration::Data.new_from_file(config_file)
191
+ table.hashes.each do |hash|
192
+ config.send(hash['property']).should == hash['value']
193
+ end
194
+ end
195
+
196
+ Then /^my css is validated$/ do
197
+ if @last_error =~ /The Compass CSS Validator could not be loaded/
198
+ pending "Missing Dependency: sudo gem install chriseppstein-compass-validator"
199
+ else
200
+ @last_result.should =~ /Compass CSS Validator/
201
+ end
202
+ end
203
+
204
+ Then /^I am informed that my css is valid.$/ do
205
+ @last_result.should =~ /Your CSS files are valid\./
206
+ end
207
+
208
+ Then /^I am told statistics for each file:$/ do |table|
209
+ # table is a Cucumber::Ast::Table
210
+ table.raw.each do |row|
211
+ re = Regexp.new row.join(' *\| *')
212
+ @last_result.should =~ re
213
+ end
214
+ end
215
+
216
+ Then /^I should see the following "([^"]+)" commands:$/ do |kind, table|
217
+
218
+
219
+ Then %Q{I should be shown a list of "#{kind}" commands}
220
+
221
+ commands = @last_command_list.map{|c| c =~ /^\s+\* ([^ ]+)\s+- [A-Z].+$/; [$1]}
222
+ table.diff!(commands)
223
+ end