compass 0.8.17 → 0.10.0.pre1

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.
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
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), 'installers', 'manifest')
2
- require File.join(File.dirname(__FILE__), 'installers', 'base')
3
- require File.join(File.dirname(__FILE__), 'installers', 'stand_alone')
4
- require File.join(File.dirname(__FILE__), 'installers', 'rails')
5
-
1
+ %w(manifest template_context base manifest_installer bare_installer).each do |f|
2
+ require "compass/installers/#{f}"
3
+ end
@@ -0,0 +1,58 @@
1
+ module Compass
2
+ module Installers
3
+
4
+ class BareInstaller < Base
5
+ def completed_configuration
6
+ nil
7
+ end
8
+
9
+ def init
10
+ directory targetize("")
11
+ directory targetize(Compass.configuration.sass_dir)
12
+ end
13
+
14
+ def prepare
15
+ end
16
+
17
+ def install
18
+ config_file ||= targetize('config.rb')
19
+ write_file config_file, config_contents
20
+ end
21
+
22
+ def config_contents
23
+ project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
24
+ Compass.configuration.serialize
25
+ ensure
26
+ Compass.configuration.project_path = project_path
27
+ end
28
+
29
+ def finalize(options = {})
30
+ puts <<-NEXTSTEPS
31
+
32
+ *********************************************************************
33
+ Congratulations! Your compass project has been created.
34
+
35
+ You may now add sass stylesheets to the #{Compass.configuration.sass_dir} subdirectory of your project.
36
+
37
+ Sass files beginning with an underscore are called partials and won't be
38
+ compiled to CSS, but they can be imported into other sass stylesheets.
39
+
40
+ You can configure your project by editing the config.rb configuration file.
41
+
42
+ You must compile your sass stylesheets into CSS when they change.
43
+ This can be done in one of the following ways:
44
+ 1. To compile on demand:
45
+ compass compile [path/to/project]
46
+ 2. To monitor your project for changes and automatically recompile:
47
+ compass watch [path/to/project]
48
+
49
+ More Resources:
50
+ * Wiki: http://wiki.github.com/chriseppstein/compass
51
+ * Sass: http://sass-lang.com
52
+ * Community: http://groups.google.com/group/compass-users/
53
+ NEXTSTEPS
54
+ end
55
+
56
+ end
57
+ end
58
+ end
@@ -7,40 +7,21 @@ module Compass
7
7
 
8
8
  attr_accessor :template_path, :target_path, :working_path
9
9
  attr_accessor :options
10
- attr_accessor :manifest
11
10
 
12
11
  def initialize(template_path, target_path, options = {})
13
12
  @template_path = template_path
14
13
  @target_path = target_path
15
14
  @working_path = Dir.getwd
16
15
  @options = options
17
- @manifest = Manifest.new(manifest_file) if template_path
18
16
  self.logger = options[:logger]
19
17
  end
20
18
 
21
- def manifest_file
22
- @manifest_file ||= File.join(template_path, "manifest.rb")
23
- end
24
-
25
- [:css_dir, :sass_dir, :images_dir, :javascripts_dir].each do |dir|
19
+ [:css_dir, :sass_dir, :images_dir, :javascripts_dir, :http_stylesheets_path, :fonts_dir].each do |dir|
26
20
  define_method dir do
27
21
  Compass.configuration.send(dir)
28
22
  end
29
- end
30
-
31
- # Initializes the project to work with compass
32
- def init
33
- dirs = manifest.map do |entry|
34
- File.dirname(send("install_location_for_#{entry.type}", entry.to, entry.options))
35
- end
36
-
37
- if manifest.has_stylesheet?
38
- dirs << sass_dir
39
- dirs << css_dir
40
- end
41
-
42
- dirs.uniq.sort.each do |dir|
43
- directory targetize(dir)
23
+ define_method "#{dir}_without_default" do
24
+ Compass.configuration.send("#{dir}_without_default")
44
25
  end
45
26
  end
46
27
 
@@ -50,7 +31,7 @@ module Compass
50
31
  def run(options = {})
51
32
  prepare
52
33
  install
53
- finalize unless options[:skip_finalization]
34
+ finalize(options) unless options[:skip_finalization]
54
35
  end
55
36
 
56
37
  # The default prepare method -- it is a no-op.
@@ -58,25 +39,14 @@ module Compass
58
39
  def prepare
59
40
  end
60
41
 
61
- def configure_option_with_default(opt)
62
- value = options[opt]
63
- value ||= begin
64
- default_method = "default_#{opt}".to_sym
65
- send(default_method) if respond_to?(default_method)
66
- end
67
- send("#{opt}=", value)
68
- end
69
-
70
- # The default install method. Calls install_<type> methods in the order specified by the manifest.
42
+ # The install method override this to install
71
43
  def install
72
- manifest.each do |entry|
73
- send("install_#{entry.type}", entry.from, entry.to, entry.options)
74
- end
44
+ raise "Not Yet Implemented"
75
45
  end
76
46
 
77
47
  # The default finalize method -- it is a no-op.
78
48
  # This could print out a message or something.
79
- def finalize
49
+ def finalize(options = {})
80
50
  end
81
51
 
82
52
  def compilation_required?
@@ -121,10 +91,39 @@ module Compass
121
91
  "#{javascripts_dir}/#{to}"
122
92
  end
123
93
 
94
+ installer :font do |to|
95
+ "#{fonts_dir}/#{to}"
96
+ end
97
+
124
98
  installer :file do |to|
125
99
  "#{pattern_name_as_dir}#{to}"
126
100
  end
127
101
 
102
+ installer :html do |to|
103
+ "#{pattern_name_as_dir}#{to}"
104
+ end
105
+
106
+ alias install_html_without_haml install_html
107
+ def install_html(from, to, options)
108
+ if to =~ /\.haml$/
109
+ require 'haml'
110
+ to = to[0..-(".haml".length+1)]
111
+ if respond_to?(:install_location_for_html)
112
+ to = install_location_for_html(to, options)
113
+ end
114
+ contents = File.read(templatize(from))
115
+ if options.delete(:erb)
116
+ ctx = TemplateContext.ctx(:to => to, :options => options)
117
+ contents = process_erb(contents, ctx)
118
+ end
119
+ Compass.configure_sass_plugin!
120
+ html = Haml::Engine.new(contents, :filename => templatize(from)).render
121
+ write_file(targetize(to), html, options)
122
+ else
123
+ install_html_without_haml(from, to, options)
124
+ end
125
+ end
126
+
128
127
  # returns an absolute path given a path relative to the current installation target.
129
128
  # Paths can use unix style "/" and will be corrected for the current platform.
130
129
  def targetize(path)
@@ -137,22 +136,12 @@ module Compass
137
136
  strip_trailing_separator File.join(template_path, separate(path))
138
137
  end
139
138
 
139
+ # Emits an HTML fragment that can be used to link to the compiled css files
140
140
  def stylesheet_links
141
- html = "<head>\n"
142
- manifest.each_stylesheet do |stylesheet|
143
- # Skip partials.
144
- next if File.basename(stylesheet.from)[0..0] == "_"
145
- media = if stylesheet.options[:media]
146
- %Q{ media="#{stylesheet.options[:media]}"}
147
- end
148
- ss_line = %Q{ <link href="/stylesheets/#{stylesheet.to.sub(/\.sass$/,'.css')}"#{media} rel="stylesheet" type="text/css" />}
149
- if stylesheet.options[:condition]
150
- ss_line = " <!--[if #{stylesheet.options[:condition]}]>\n #{ss_line}\n <![endif]-->"
151
- end
152
- html << ss_line + "\n"
153
- end
154
- html << "</head>"
141
+ ""
155
142
  end
156
143
  end
157
144
  end
158
145
  end
146
+ require 'compass/installers/bare_installer'
147
+ require 'compass/installers/manifest_installer'
@@ -11,8 +11,12 @@ module Compass
11
11
  end
12
12
  end
13
13
 
14
- def initialize(manifest_file = nil)
14
+ attr_reader :options
15
+ def initialize(manifest_file = nil, options = {})
15
16
  @entries = []
17
+ @options = options
18
+ @generate_config = true
19
+ @compile_after_generation = true
16
20
  parse(manifest_file) if manifest_file
17
21
  end
18
22
 
@@ -33,15 +37,64 @@ module Compass
33
37
  type :stylesheet
34
38
  type :image
35
39
  type :javascript
40
+ type :font
36
41
  type :file
42
+ type :html
43
+
44
+ def help(value = nil)
45
+ if value
46
+ @help = value
47
+ else
48
+ @help
49
+ end
50
+ end
51
+
52
+ attr_reader :welcome_message_options
53
+
54
+ def welcome_message(value = nil, options = {})
55
+ if value
56
+ @welcome_message = value
57
+ @welcome_message_options = options
58
+ else
59
+ @welcome_message
60
+ end
61
+ end
62
+
63
+ def welcome_message_options
64
+ @welcome_message_options || {}
65
+ end
66
+
67
+ def description(value = nil)
68
+ if value
69
+ @description = value
70
+ else
71
+ @description
72
+ end
73
+ end
37
74
 
38
75
  # Enumerates over the manifest files
39
76
  def each
40
77
  @entries.each {|e| yield e}
41
78
  end
42
79
 
80
+ def generate_config?
81
+ @generate_config
82
+ end
83
+
84
+ def compile?
85
+ @compile_after_generation
86
+ end
43
87
 
44
88
  protected
89
+
90
+ def no_configuration_file!
91
+ @generate_config = false
92
+ end
93
+
94
+ def skip_compilation!
95
+ @compile_after_generation = false
96
+ end
97
+
45
98
  # parses a manifest file which is a ruby script
46
99
  # evaluated in a Manifest instance context
47
100
  def parse(manifest_file)
@@ -55,4 +108,4 @@ module Compass
55
108
  end
56
109
 
57
110
  end
58
- end
111
+ end
@@ -0,0 +1,59 @@
1
+ module Compass
2
+ module Installers
3
+
4
+ class ManifestInstaller < Base
5
+
6
+ attr_accessor :manifest
7
+
8
+ def initialize(template_path, target_path, options = {})
9
+ super
10
+ @manifest = Manifest.new(manifest_file, options) if template_path
11
+ end
12
+
13
+ def manifest_file
14
+ @manifest_file ||= File.join(template_path, "manifest.rb")
15
+ end
16
+
17
+ # Initializes the project to work with compass
18
+ def init
19
+ dirs = manifest.map do |entry|
20
+ loc = send("install_location_for_#{entry.type}", entry.to, entry.options)
21
+ File.dirname(loc)
22
+ end
23
+
24
+ if manifest.has_stylesheet?
25
+ dirs << sass_dir
26
+ dirs << css_dir
27
+ end
28
+
29
+ dirs.uniq.sort.each do |dir|
30
+ directory targetize(dir)
31
+ end
32
+ end
33
+
34
+ # The default install method. Calls install_<type> methods in the order specified by the manifest.
35
+ def install
36
+ manifest.each do |entry|
37
+ send("install_#{entry.type}", entry.from, entry.to, entry.options)
38
+ end
39
+ end
40
+
41
+ def stylesheet_links
42
+ html = "<head>\n"
43
+ manifest.each_stylesheet do |stylesheet|
44
+ # Skip partials.
45
+ next if File.basename(stylesheet.from)[0..0] == "_"
46
+ media = if stylesheet.options[:media]
47
+ %Q{ media="#{stylesheet.options[:media]}"}
48
+ end
49
+ ss_line = %Q{ <link href="#{http_stylesheets_path}/#{stylesheet.to.sub(/\.sass$/,'.css')}"#{media} rel="stylesheet" type="text/css" />}
50
+ if stylesheet.options[:condition]
51
+ ss_line = " <!--[if #{stylesheet.options[:condition]}]>\n #{ss_line}\n <![endif]-->"
52
+ end
53
+ html << ss_line + "\n"
54
+ end
55
+ html << "</head>"
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,44 @@
1
+ module Compass
2
+ module Installers
3
+ class TemplateContext
4
+
5
+ def self.ctx(*arguments)
6
+ new(*arguments).send(:get_binding)
7
+ end
8
+
9
+ def initialize(template, locals = {})
10
+ @template = template
11
+ @locals = locals
12
+ end
13
+
14
+ def http_stylesheets_path
15
+ config.http_stylesheets_path ||
16
+ config.default_for(:http_stylesheets_path) ||
17
+ config.http_root_relative(config.css_dir)
18
+ end
19
+
20
+ Compass::Configuration::ATTRIBUTES.each do |attribute|
21
+ unless instance_methods.include?(attribute.to_s)
22
+ define_method attribute do
23
+ config.send(attribute) || config.default_for(attribute)
24
+ end
25
+ end
26
+ end
27
+
28
+ def config
29
+ Compass.configuration
30
+ end
31
+
32
+ alias configuration config
33
+
34
+ protected
35
+
36
+ def get_binding
37
+ @locals.each do |k, v|
38
+ eval("#{k} = v")
39
+ end
40
+ binding
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,7 +1,20 @@
1
1
  module Compass
2
2
  class Logger
3
3
 
4
- DEFAULT_ACTIONS = [:directory, :exists, :remove, :create, :overwrite, :compile]
4
+ DEFAULT_ACTIONS = [:directory, :exists, :remove, :create, :overwrite, :compile, :error, :identical]
5
+
6
+ ACTION_COLORS = {
7
+ :error => :red,
8
+ :compile => :green,
9
+ :overwrite => :yellow,
10
+ :create => :green,
11
+ :remove => :yellow,
12
+ :exists => :green,
13
+ :directory => :green,
14
+ :identical => :green
15
+ }
16
+
17
+ COLORS = { :clear => 0, :red => 31, :green => 32, :yellow => 33 }
5
18
 
6
19
  attr_accessor :actions, :options
7
20
 
@@ -13,9 +26,22 @@ module Compass
13
26
 
14
27
  # Record an action that has occurred
15
28
  def record(action, *arguments)
29
+ emit color(ACTION_COLORS[action]) if Compass.configuration.color_output
16
30
  log "#{action_padding(action)}#{action} #{arguments.join(' ')}"
31
+ emit color(:clear) if Compass.configuration.color_output
17
32
  end
18
33
 
34
+ def color(c)
35
+ if c && COLORS.has_key?(c.to_sym)
36
+ "\e[#{COLORS[c.to_sym]}m"
37
+ else
38
+ ""
39
+ end
40
+ end
41
+
42
+ def emit(msg)
43
+ print msg
44
+ end
19
45
  # Emit a log message
20
46
  def log(msg)
21
47
  puts msg
@@ -39,4 +65,4 @@ module Compass
39
65
  def log(msg)
40
66
  end
41
67
  end
42
- end
68
+ end