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,324 +1,43 @@
1
- require 'singleton'
2
-
3
1
  module Compass
4
- class Configuration
5
- include Singleton
2
+ module Configuration
3
+
4
+ def self.attributes_for_directory(dir_name, http_dir_name = dir_name)
5
+ [
6
+ "#{dir_name}_dir",
7
+ "#{dir_name}_path",
8
+ ("http_#{http_dir_name}_dir" if http_dir_name),
9
+ ("http_#{http_dir_name}_path" if http_dir_name)
10
+ ].compact.map{|a| a.to_sym}
11
+ end
6
12
 
7
13
  ATTRIBUTES = [
14
+ # What kind of project?
8
15
  :project_type,
16
+ # Where is the project?
9
17
  :project_path,
10
18
  :http_path,
11
- :css_dir,
12
- :sass_dir,
13
- :images_dir,
14
- :javascripts_dir,
19
+ # Where are the various bits of the project
20
+ attributes_for_directory(:css, :stylesheets),
21
+ attributes_for_directory(:sass, nil),
22
+ attributes_for_directory(:images),
23
+ attributes_for_directory(:javascripts),
24
+ attributes_for_directory(:fonts),
25
+ attributes_for_directory(:extensions, nil),
26
+ # Compilation options
15
27
  :output_style,
16
28
  :environment,
17
29
  :relative_assets,
18
- :http_images_path,
19
- :http_stylesheets_path,
20
- :http_javascripts_path,
21
30
  :additional_import_paths,
22
- :sass_options
23
- ]
24
-
25
- attr_accessor *ATTRIBUTES
26
-
27
- attr_accessor :required_libraries
28
-
29
- def initialize
30
- self.required_libraries = []
31
- end
32
-
33
- # parses a manifest file which is a ruby script
34
- # evaluated in a Manifest instance context
35
- def parse(config_file)
36
- open(config_file) do |f|
37
- parse_string(f.read, config_file)
38
- end
39
- end
40
-
41
- def parse_string(contents, filename)
42
- bind = binding
43
- eval(contents, bind, filename)
44
- ATTRIBUTES.each do |prop|
45
- value = eval(prop.to_s, bind) rescue nil
46
- self.send("#{prop}=", value) if value
47
- end
48
- if @added_import_paths
49
- self.additional_import_paths ||= []
50
- self.additional_import_paths += @added_import_paths
51
- end
52
- issue_deprecation_warnings
53
- end
54
-
55
- def set_all(options)
56
- ATTRIBUTES.each do |a|
57
- self.send("#{a}=", options[a]) if options.has_key?(a)
58
- end
59
- end
60
-
61
- def set_maybe(options)
62
- ATTRIBUTES.each do |a|
63
- self.send("#{a}=", options[a]) if options[a]
64
- end
65
- end
66
-
67
- def default_all(options)
68
- ATTRIBUTES.each do |a|
69
- set_default_unless_set(a, options[a])
70
- end
71
- end
72
-
73
- def set_default_unless_set(attribute, value)
74
- self.send("#{attribute}=", value) unless self.send(attribute)
75
- end
76
-
77
- def set_defaults!
78
- ATTRIBUTES.each do |a|
79
- set_default_unless_set(a, default_for(a))
80
- end
81
- end
82
-
83
- def default_for(attribute)
84
- method = "default_#{attribute}".to_sym
85
- self.send(method) if respond_to?(method)
86
- end
87
-
88
- def default_sass_dir
89
- "src"
90
- end
91
-
92
- def default_css_dir
93
- "stylesheets"
94
- end
95
-
96
- def default_images_dir
97
- "images"
98
- end
99
-
100
- def default_http_path
101
- "/"
102
- end
103
-
104
- def comment_for_http_path
105
- "# Set this to the root of your project when deployed:\n"
106
- end
107
-
108
- def relative_assets?
109
- # the http_images_path is deprecated, but here for backwards compatibility.
110
- relative_assets || http_images_path == :relative
111
- end
112
-
113
- def comment_for_relative_assets
114
- unless relative_assets
115
- %q{# To enable relative paths to assets via compass helper functions. Uncomment:
116
- # relative_assets = true
117
- }
118
- else
119
- ""
120
- end
121
- end
122
-
123
- def default_output_style
124
- if environment == :development
125
- :expanded
126
- else
127
- :compact
128
- end
129
- end
130
-
131
- def default_line_comments
132
- environment == :development
133
- end
134
-
135
- def sass_path
136
- if project_path && sass_dir
137
- File.join(project_path, sass_dir)
138
- end
139
- end
140
-
141
- def css_path
142
- if project_path && css_dir
143
- File.join(project_path, css_dir)
144
- end
145
- end
146
-
147
- def root_relative(path)
148
- hp = http_path || default_http_path
149
- hp = hp[0..-2] if hp[-1..-1] == "/"
150
- "#{hp}/#{path}"
151
- end
152
-
153
- def add_import_path(*paths)
154
- # The @added_import_paths variable works around an issue where
155
- # the additional_import_paths gets overwritten during parse
156
- @added_import_paths ||= []
157
- @added_import_paths += paths
158
- self.additional_import_paths ||= []
159
- self.additional_import_paths += paths
160
- end
161
-
162
- # When called with a block, defines the asset host url to be used.
163
- # The block must return a string that starts with a protocol (E.g. http).
164
- # The block will be passed the root-relative url of the asset.
165
- # When called without a block, returns the block that was previously set.
166
- def asset_host(&block)
167
- if block_given?
168
- @asset_host = block
169
- else
170
- @asset_host
171
- end
172
- end
173
-
174
- # When called with a block, defines the cache buster strategy to be used.
175
- # The block must return nil or a string that can be appended to a url as a query parameter.
176
- # The returned string must not include the starting '?'.
177
- # The block will be passed the root-relative url of the asset.
178
- # If the block accepts two arguments, it will also be passed a File object
179
- # that points to the asset on disk -- which may or may not exist.
180
- # When called without a block, returns the block that was previously set.
181
- def asset_cache_buster(&block)
182
- if block_given?
183
- @asset_cache_buster = block
184
- else
185
- @asset_cache_buster
186
- end
187
- end
188
-
189
-
190
- def serialize
191
- if asset_cache_buster
192
- raise Compass::Error, "Cannot serialize a configuration with asset_cache_buster set."
193
- end
194
- if asset_host
195
- raise Compass::Error, "Cannot serialize a configuration with asset_host set."
196
- end
197
- contents = ""
198
- required_libraries.each do |lib|
199
- contents << %Q{require '#{lib}'\n}
200
- end
201
- contents << "# Require any additional compass plugins here.\n"
202
- contents << "\n" if required_libraries.any?
203
- ATTRIBUTES.each do |prop|
204
- value = send(prop)
205
- if respond_to?("comment_for_#{prop}")
206
- contents << send("comment_for_#{prop}")
207
- end
208
- if block_given? && (to_emit = yield(prop, value))
209
- contents << to_emit
210
- else
211
- contents << Configuration.serialize_property(prop, value) unless value.nil?
212
- end
213
- end
214
- contents
215
- end
216
-
217
- def self.serialize_property(prop, value)
218
- %Q(#{prop} = #{value.inspect}\n)
219
- end
220
-
221
- def to_compiler_arguments(additional_options)
222
- [project_path, sass_path, css_path, to_sass_engine_options.merge(additional_options)]
223
- end
224
-
225
- def to_sass_plugin_options
226
- locations = {}
227
- locations[sass_path] = css_path if sass_path && css_path
228
- Compass::Frameworks::ALL.each do |framework|
229
- locations[framework.stylesheets_directory] = css_path || css_dir || "."
230
- end
231
- resolve_additional_import_paths.each do |additional_path|
232
- locations[additional_path] = File.join(css_path || css_dir || ".", File.basename(additional_path))
233
- end
234
- plugin_opts = {:template_location => locations}
235
- plugin_opts[:style] = output_style if output_style
236
- plugin_opts[:line_comments] = default_line_comments if environment
237
- plugin_opts.merge!(sass_options || {})
238
- plugin_opts
239
- end
240
-
241
- def resolve_additional_import_paths
242
- (additional_import_paths || []).map do |path|
243
- if project_path && !absolute_path?(path)
244
- File.join(project_path, path)
245
- else
246
- path
247
- end
248
- end
249
- end
250
-
251
- def to_sass_engine_options
252
- engine_opts = {:load_paths => sass_load_paths}
253
- engine_opts[:style] = output_style if output_style
254
- engine_opts[:line_comments] = default_line_comments if environment
255
- engine_opts.merge!(sass_options || {})
256
- end
31
+ :sass_options,
32
+ :asset_host,
33
+ :asset_cache_buster,
34
+ :line_comments,
35
+ :color_output
36
+ ].flatten
257
37
 
258
- def sass_load_paths
259
- load_paths = []
260
- load_paths << sass_path if sass_path
261
- Compass::Frameworks::ALL.each do |framework|
262
- load_paths << framework.stylesheets_directory if File.exists?(framework.stylesheets_directory)
263
- end
264
- load_paths += resolve_additional_import_paths
265
- load_paths
266
- end
267
-
268
- # Support for testing.
269
- def reset!
270
- ATTRIBUTES.each do |attr|
271
- send("#{attr}=", nil)
272
- end
273
- @asset_cache_buster = nil
274
- @asset_host = nil
275
- @added_import_paths = nil
276
- self.required_libraries = []
277
- end
278
-
279
- def issue_deprecation_warnings
280
- if http_images_path == :relative
281
- puts "DEPRECATION WARNING: Please set relative_assets = true to enable relative paths."
282
- end
283
- end
284
-
285
- def require(lib)
286
- required_libraries << lib
287
- super
288
- end
289
-
290
- def absolute_path?(path)
291
- # This is only going to work on unix, gonna need a better implementation.
292
- path.index(File::SEPARATOR) == 0
293
- end
294
- end
295
-
296
- module ConfigHelpers
297
- def configuration
298
- if block_given?
299
- yield Configuration.instance
300
- end
301
- Configuration.instance
302
- end
303
-
304
- def sass_plugin_configuration
305
- configuration.to_sass_plugin_options
306
- end
307
-
308
- def configure_sass_plugin!
309
- @sass_plugin_configured = true
310
- Sass::Plugin.options.merge!(sass_plugin_configuration)
311
- end
312
-
313
- def sass_plugin_configured?
314
- @sass_plugin_configured
315
- end
316
-
317
- def sass_engine_options
318
- configuration.to_sass_engine_options
319
- end
320
38
  end
39
+ end
321
40
 
322
- extend ConfigHelpers
323
-
41
+ ['adapters', 'comments', 'defaults', 'helpers', 'inheritance', 'serialization', 'data'].each do |lib|
42
+ require "compass/configuration/#{lib}"
324
43
  end
@@ -0,0 +1,59 @@
1
+ module Compass
2
+ module Configuration
3
+ # The adapters module provides methods that make configuration data from a compass project
4
+ # adapt to various consumers of configuration data
5
+ module Adapters
6
+ def to_compiler_arguments(additional_options)
7
+ [project_path, sass_path, css_path, to_sass_engine_options.merge(additional_options)]
8
+ end
9
+
10
+ def to_sass_plugin_options
11
+ locations = {}
12
+ locations[sass_path] = css_path if sass_path && css_path
13
+ Compass::Frameworks::ALL.each do |framework|
14
+ locations[framework.stylesheets_directory] = css_path || css_dir || "."
15
+ end
16
+ resolve_additional_import_paths.each do |additional_path|
17
+ locations[additional_path] = File.join(css_path || css_dir || ".", File.basename(additional_path))
18
+ end
19
+ plugin_opts = {:template_location => locations}
20
+ plugin_opts[:style] = output_style if output_style
21
+ plugin_opts[:line_comments] = line_comments if environment
22
+ plugin_opts.merge!(sass_options || {})
23
+ plugin_opts
24
+ end
25
+
26
+ def resolve_additional_import_paths
27
+ (additional_import_paths || []).map do |path|
28
+ if project_path && !absolute_path?(path)
29
+ File.join(project_path, path)
30
+ else
31
+ path
32
+ end
33
+ end
34
+ end
35
+
36
+ def absolute_path?(path)
37
+ # This is only going to work on unix, gonna need a better implementation.
38
+ path.index(File::SEPARATOR) == 0
39
+ end
40
+
41
+ def to_sass_engine_options
42
+ engine_opts = {:load_paths => sass_load_paths}
43
+ engine_opts[:style] = output_style if output_style
44
+ engine_opts[:line_comments] = line_comments if environment
45
+ engine_opts.merge!(sass_options || {})
46
+ end
47
+
48
+ def sass_load_paths
49
+ load_paths = []
50
+ load_paths << sass_path if sass_path
51
+ Compass::Frameworks::ALL.each do |framework|
52
+ load_paths << framework.stylesheets_directory if File.exists?(framework.stylesheets_directory)
53
+ end
54
+ load_paths += resolve_additional_import_paths
55
+ load_paths
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,22 @@
1
+ module Compass
2
+ module Configuration
3
+ # Comments are emitted into the configuration file when serialized and make it easier to understand for new users.
4
+ module Comments
5
+
6
+ def comment_for_http_path
7
+ "# Set this to the root of your project when deployed:\n"
8
+ end
9
+
10
+ def comment_for_relative_assets
11
+ unless relative_assets
12
+ %q{# To enable relative paths to assets via compass helper functions. Uncomment:
13
+ # relative_assets = true
14
+ }
15
+ else
16
+ ""
17
+ end
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,106 @@
1
+ module Compass
2
+ module Configuration
3
+ # The Compass configuration data storage class manages configuration data that comes from a variety of
4
+ # different sources and aggregates them together into a consistent API
5
+ # Some of the possible sources of configuration data:
6
+ # * Compass default project structure for stand alone projects
7
+ # * App framework specific project structures for rails, etc.
8
+ # * User supplied explicit configuration
9
+ # * Configuration data provided via the command line interface
10
+ #
11
+ # There are two kinds of configuration data that doesn't come from the user:
12
+ #
13
+ # 1. Configuration data that is defaulted as if the user had provided it themselves.
14
+ # This is useful for providing defaults that the user is likely to want to edit
15
+ # but shouldn't have to provide explicitly when getting started
16
+ # 2. Configuration data that is defaulted behind the scenes because _some_ value is
17
+ # required.
18
+ class Data
19
+
20
+ attr_accessor :required_libraries
21
+ attr_reader :name
22
+
23
+ include Compass::Configuration::Inheritance
24
+ include Compass::Configuration::Serialization
25
+ include Compass::Configuration::Adapters
26
+
27
+ inherited_accessor *ATTRIBUTES
28
+
29
+ def initialize(name, attr_hash = nil)
30
+ raise "I need a name!" unless name
31
+ @name = name
32
+ self.required_libraries = []
33
+ set_all(attr_hash) if attr_hash
34
+ self.top_level = self
35
+ end
36
+
37
+ def set_all(attr_hash)
38
+ # assert_valid_keys!(attr_hash)
39
+ attr_hash.each do |a, v|
40
+ if self.respond_to?("#{a}=")
41
+ self.send("#{a}=", v)
42
+ end
43
+ end
44
+ end
45
+
46
+ def add_import_path(*paths)
47
+ # The @added_import_paths variable works around an issue where
48
+ # the additional_import_paths gets overwritten during parse
49
+ @added_import_paths ||= []
50
+ @added_import_paths += paths
51
+ self.additional_import_paths ||= []
52
+ self.additional_import_paths += paths
53
+ end
54
+
55
+ # When called with a block, defines the asset host url to be used.
56
+ # The block must return a string that starts with a protocol (E.g. http).
57
+ # The block will be passed the root-relative url of the asset.
58
+ # When called without a block, returns the block that was previously set.
59
+ def asset_host(&block)
60
+ if block_given?
61
+ @asset_host = block
62
+ else
63
+ @asset_host
64
+ end
65
+ end
66
+
67
+ # When called with a block, defines the cache buster strategy to be used.
68
+ # The block must return nil or a string that can be appended to a url as a query parameter.
69
+ # The returned string must not include the starting '?'.
70
+ # The block will be passed the root-relative url of the asset.
71
+ # If the block accepts two arguments, it will also be passed a File object
72
+ # that points to the asset on disk -- which may or may not exist.
73
+ # When called without a block, returns the block that was previously set.
74
+ def asset_cache_buster(&block)
75
+ if block_given?
76
+ @asset_cache_buster = block
77
+ else
78
+ @asset_cache_buster
79
+ end
80
+ end
81
+
82
+ # Require a compass plugin and capture that it occured so that the configuration serialization works next time.
83
+ def require(lib)
84
+ required_libraries << lib
85
+ super
86
+ end
87
+
88
+ def relative_assets?
89
+ # the http_images_path is deprecated, but here for backwards compatibility.
90
+ relative_assets || http_images_path == :relative
91
+ end
92
+
93
+ private
94
+
95
+ def assert_valid_keys!(attr_hash)
96
+ illegal_attrs = attr_hash.keys - ATTRIBUTES
97
+ if illegal_attrs.size == 1
98
+ raise Error, "#{illegal_attrs.first.inspect} is not a valid configuration attribute."
99
+ elsif illegal_attrs.size > 0
100
+ raise Error, "Illegal configuration attributes: #{illegal_attrs.map{|a| a.inspect}.join(", ")}"
101
+ end
102
+ end
103
+
104
+ end
105
+ end
106
+ end