compass-edge 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (312) hide show
  1. data/CHANGELOG.markdown +528 -0
  2. data/LICENSE.markdown +29 -0
  3. data/README.markdown +46 -0
  4. data/REVISION +1 -0
  5. data/Rakefile +131 -0
  6. data/VERSION.yml +4 -0
  7. data/bin/compass +26 -0
  8. data/deps.rip +1 -0
  9. data/examples/README.markdown +4 -0
  10. data/examples/blueprint_default/config.rb +7 -0
  11. data/examples/blueprint_default/images/grid.png +0 -0
  12. data/examples/blueprint_default/index.html.haml +85 -0
  13. data/examples/blueprint_default/parts/elements.html.haml +282 -0
  14. data/examples/blueprint_default/parts/forms.html.haml +190 -0
  15. data/examples/blueprint_default/parts/grid.html.haml +274 -0
  16. data/examples/blueprint_default/parts/test-small.jpg +0 -0
  17. data/examples/blueprint_default/parts/test.jpg +0 -0
  18. data/examples/blueprint_default/parts/valid.png +0 -0
  19. data/examples/blueprint_default/src/ie.sass +3 -0
  20. data/examples/blueprint_default/src/images/grid.png +0 -0
  21. data/examples/blueprint_default/src/print.sass +3 -0
  22. data/examples/blueprint_default/src/screen.sass +8 -0
  23. data/examples/blueprint_plugins/config.rb +8 -0
  24. data/examples/blueprint_plugins/images/buttons/cross.png +0 -0
  25. data/examples/blueprint_plugins/images/buttons/key.png +0 -0
  26. data/examples/blueprint_plugins/images/buttons/tick.png +0 -0
  27. data/examples/blueprint_plugins/images/grid.png +0 -0
  28. data/examples/blueprint_plugins/images/link_icons/doc.png +0 -0
  29. data/examples/blueprint_plugins/images/link_icons/email.png +0 -0
  30. data/examples/blueprint_plugins/images/link_icons/external.png +0 -0
  31. data/examples/blueprint_plugins/images/link_icons/feed.png +0 -0
  32. data/examples/blueprint_plugins/images/link_icons/im.png +0 -0
  33. data/examples/blueprint_plugins/images/link_icons/pdf.png +0 -0
  34. data/examples/blueprint_plugins/images/link_icons/visited.png +0 -0
  35. data/examples/blueprint_plugins/images/link_icons/xls.png +0 -0
  36. data/examples/blueprint_plugins/images/test-small.jpg +0 -0
  37. data/examples/blueprint_plugins/images/test.jpg +0 -0
  38. data/examples/blueprint_plugins/images/valid.png +0 -0
  39. data/examples/blueprint_plugins/index.html.haml +96 -0
  40. data/examples/blueprint_plugins/plugins/buttons.html.haml +67 -0
  41. data/examples/blueprint_plugins/plugins/fancy_type.html.haml +100 -0
  42. data/examples/blueprint_plugins/plugins/link_icons.html.haml +61 -0
  43. data/examples/blueprint_plugins/plugins/rtl.html.haml +100 -0
  44. data/examples/blueprint_plugins/src/buttons.sass +49 -0
  45. data/examples/blueprint_plugins/src/ie.sass +3 -0
  46. data/examples/blueprint_plugins/src/images/grid.png +0 -0
  47. data/examples/blueprint_plugins/src/link_icons.sass +13 -0
  48. data/examples/blueprint_plugins/src/print.sass +3 -0
  49. data/examples/blueprint_plugins/src/rtl_screen.sass +13 -0
  50. data/examples/blueprint_plugins/src/screen.sass +11 -0
  51. data/examples/blueprint_scoped/images/grid.png +0 -0
  52. data/examples/blueprint_scoped/src/ie.sass +4 -0
  53. data/examples/blueprint_scoped/src/print.sass +4 -0
  54. data/examples/blueprint_scoped/src/screen.sass +5 -0
  55. data/examples/blueprint_scoped_form/images/grid.png +0 -0
  56. data/examples/blueprint_scoped_form/src/ie.sass +3 -0
  57. data/examples/blueprint_scoped_form/src/print.sass +3 -0
  58. data/examples/blueprint_scoped_form/src/screen.sass +10 -0
  59. data/examples/blueprint_semantic/config.rb +7 -0
  60. data/examples/blueprint_semantic/images/grid.png +0 -0
  61. data/examples/blueprint_semantic/index.html.haml +86 -0
  62. data/examples/blueprint_semantic/parts/fancy_type.html.haml +100 -0
  63. data/examples/blueprint_semantic/parts/liquid.html.haml +100 -0
  64. data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
  65. data/examples/blueprint_semantic/parts/test.jpg +0 -0
  66. data/examples/blueprint_semantic/parts/valid.png +0 -0
  67. data/examples/blueprint_semantic/src/ie.sass +3 -0
  68. data/examples/blueprint_semantic/src/images/grid.png +0 -0
  69. data/examples/blueprint_semantic/src/liquid.sass +69 -0
  70. data/examples/blueprint_semantic/src/print.sass +3 -0
  71. data/examples/blueprint_semantic/src/screen.sass +70 -0
  72. data/examples/compass/compass.html.haml +39 -0
  73. data/examples/compass/config.rb +7 -0
  74. data/examples/compass/images/blue_arrow.gif +0 -0
  75. data/examples/compass/src/compass.sass +47 -0
  76. data/examples/compass/src/images/blue_arrow.gif +0 -0
  77. data/examples/compass/src/sticky_footer.sass +11 -0
  78. data/examples/compass/src/utilities.sass +108 -0
  79. data/examples/compass/sticky_footer.html.haml +14 -0
  80. data/examples/compass/utilities.html.haml +189 -0
  81. data/examples/downloader.rb +57 -0
  82. data/examples/logo/logo.html.haml +40 -0
  83. data/examples/logo/src/ie.sass +6 -0
  84. data/examples/logo/src/print.sass +6 -0
  85. data/examples/logo/src/screen.sass +29 -0
  86. data/examples/ninesixty/bootstrap.rb +4 -0
  87. data/examples/ninesixty/config.rb +9 -0
  88. data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
  89. data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
  90. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
  91. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
  92. data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
  93. data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
  94. data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
  95. data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
  96. data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
  97. data/examples/ninesixty/src/grid.sass +16 -0
  98. data/examples/ninesixty/src/text.sass +10 -0
  99. data/examples/yui/bootstrap.rb +3 -0
  100. data/examples/yui/divisions.html.haml +179 -0
  101. data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
  102. data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  103. data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  104. data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  105. data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  106. data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
  107. data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
  108. data/examples/yui/index.html.haml +19 -0
  109. data/examples/yui/src/screen.sass +13 -0
  110. data/examples/yui/sub_divisions.html.haml +169 -0
  111. data/examples/yui/templates.html.haml +54 -0
  112. data/examples/yui/test.jpg +0 -0
  113. data/examples/yui/typography.html.haml +132 -0
  114. data/lib/compass.rb +22 -0
  115. data/lib/compass/actions.rb +116 -0
  116. data/lib/compass/app_integration.rb +3 -0
  117. data/lib/compass/app_integration/merb.rb +1 -0
  118. data/lib/compass/app_integration/merb/runtime.rb +63 -0
  119. data/lib/compass/app_integration/rails.rb +8 -0
  120. data/lib/compass/app_integration/rails/action_controller.rb +15 -0
  121. data/lib/compass/app_integration/rails/configuration_defaults.rb +29 -0
  122. data/lib/compass/app_integration/rails/installer.rb +127 -0
  123. data/lib/compass/app_integration/rails/runtime.rb +14 -0
  124. data/lib/compass/app_integration/rails/sass_plugin.rb +5 -0
  125. data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +80 -0
  126. data/lib/compass/app_integration/rails/urls.rb +14 -0
  127. data/lib/compass/app_integration/stand_alone.rb +3 -0
  128. data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +24 -0
  129. data/lib/compass/app_integration/stand_alone/installer.rb +71 -0
  130. data/lib/compass/commands.rb +11 -0
  131. data/lib/compass/commands/base.rb +36 -0
  132. data/lib/compass/commands/create_project.rb +113 -0
  133. data/lib/compass/commands/generate_grid_background.rb +91 -0
  134. data/lib/compass/commands/help.rb +62 -0
  135. data/lib/compass/commands/installer_command.rb +34 -0
  136. data/lib/compass/commands/list_frameworks.rb +16 -0
  137. data/lib/compass/commands/print_version.rb +91 -0
  138. data/lib/compass/commands/project_base.rb +92 -0
  139. data/lib/compass/commands/registry.rb +22 -0
  140. data/lib/compass/commands/stamp_pattern.rb +86 -0
  141. data/lib/compass/commands/update_project.rb +38 -0
  142. data/lib/compass/commands/validate_project.rb +21 -0
  143. data/lib/compass/commands/watch_project.rb +69 -0
  144. data/lib/compass/commands/write_configuration.rb +32 -0
  145. data/lib/compass/compiler.rb +54 -0
  146. data/lib/compass/configuration.rb +38 -0
  147. data/lib/compass/configuration/adapters.rb +59 -0
  148. data/lib/compass/configuration/comments.rb +22 -0
  149. data/lib/compass/configuration/data.rb +103 -0
  150. data/lib/compass/configuration/defaults.rb +107 -0
  151. data/lib/compass/configuration/helpers.rb +83 -0
  152. data/lib/compass/configuration/inheritance.rb +170 -0
  153. data/lib/compass/configuration/serialization.rb +86 -0
  154. data/lib/compass/core_ext.rb +14 -0
  155. data/lib/compass/dependencies.rb +6 -0
  156. data/lib/compass/errors.rb +7 -0
  157. data/lib/compass/exec.rb +15 -0
  158. data/lib/compass/exec/command_option_parser.rb +23 -0
  159. data/lib/compass/exec/global_options_parser.rb +37 -0
  160. data/lib/compass/exec/helpers.rb +28 -0
  161. data/lib/compass/exec/project_options_parser.rb +42 -0
  162. data/lib/compass/exec/sub_command_ui.rb +45 -0
  163. data/lib/compass/exec/switch_ui.rb +166 -0
  164. data/lib/compass/frameworks.rb +53 -0
  165. data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
  166. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +99 -0
  167. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +90 -0
  168. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +3 -0
  169. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +29 -0
  170. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -0
  171. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -0
  172. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
  173. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -0
  174. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -0
  175. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -0
  176. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
  177. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -0
  178. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +141 -0
  179. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -0
  180. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +122 -0
  181. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -0
  182. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +160 -0
  183. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
  184. data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +49 -0
  185. data/lib/compass/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
  186. data/lib/compass/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
  187. data/lib/compass/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
  188. data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +5 -0
  189. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
  190. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
  191. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
  192. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
  193. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
  194. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
  195. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
  196. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
  197. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
  198. data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +10 -0
  199. data/lib/compass/frameworks/blueprint/templates/project/grid.png +0 -0
  200. data/lib/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
  201. data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +8 -0
  202. data/lib/compass/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
  203. data/lib/compass/frameworks/blueprint/templates/project/print.sass +8 -0
  204. data/lib/compass/frameworks/blueprint/templates/project/screen.sass +47 -0
  205. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +13 -0
  206. data/lib/compass/frameworks/compass/stylesheets/_compass.sass +1 -0
  207. data/lib/compass/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
  208. data/lib/compass/frameworks/compass/stylesheets/compass/_misc.sass +24 -0
  209. data/lib/compass/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
  210. data/lib/compass/frameworks/compass/stylesheets/compass/_utilities.sass +7 -0
  211. data/lib/compass/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +19 -0
  212. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_css3.sass +6 -0
  213. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_general.sass +5 -0
  214. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
  215. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
  216. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_print.sass +18 -0
  217. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
  218. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
  219. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
  220. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_border_radius.sass +47 -0
  221. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_shadow.sass +12 -0
  222. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_sizing.sass +13 -0
  223. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_columns.sass +37 -0
  224. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_inline_block.sass +7 -0
  225. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_opacity.sass +18 -0
  226. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +24 -0
  227. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_float.sass +17 -0
  228. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +6 -0
  229. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +134 -0
  230. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  231. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  232. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
  233. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
  234. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +7 -0
  235. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
  236. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +52 -0
  237. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
  238. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +52 -0
  239. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
  240. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
  241. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
  242. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.sass +13 -0
  243. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
  244. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +17 -0
  245. data/lib/compass/frameworks/compass/templates/ellipsis/ellipsis.sass +6 -0
  246. data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +2 -0
  247. data/lib/compass/frameworks/compass/templates/ellipsis/xml/ellipsis.xml +14 -0
  248. data/lib/compass/frameworks/compass/templates/extension/manifest.rb +6 -0
  249. data/lib/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
  250. data/lib/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
  251. data/lib/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
  252. data/lib/compass/frameworks/compass/templates/project/ie.sass +6 -0
  253. data/lib/compass/frameworks/compass/templates/project/manifest.rb +3 -0
  254. data/lib/compass/frameworks/compass/templates/project/print.sass +6 -0
  255. data/lib/compass/frameworks/compass/templates/project/screen.sass +13 -0
  256. data/lib/compass/grid_builder.rb +76 -0
  257. data/lib/compass/installers.rb +3 -0
  258. data/lib/compass/installers/base.rb +186 -0
  259. data/lib/compass/installers/manifest.rb +79 -0
  260. data/lib/compass/installers/template_context.rb +44 -0
  261. data/lib/compass/logger.rb +42 -0
  262. data/lib/compass/sass_extensions.rb +5 -0
  263. data/lib/compass/sass_extensions/functions.rb +19 -0
  264. data/lib/compass/sass_extensions/functions/display.rb +22 -0
  265. data/lib/compass/sass_extensions/functions/enumerate.rb +6 -0
  266. data/lib/compass/sass_extensions/functions/inline_image.rb +35 -0
  267. data/lib/compass/sass_extensions/functions/selectors.rb +42 -0
  268. data/lib/compass/sass_extensions/functions/urls.rb +105 -0
  269. data/lib/compass/sass_extensions/monkey_patches.rb +3 -0
  270. data/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +23 -0
  271. data/lib/compass/test_case.rb +38 -0
  272. data/lib/compass/validator.rb +10 -0
  273. data/lib/compass/version.rb +57 -0
  274. data/lib/vendor/fssm.rb +28 -0
  275. data/lib/vendor/fssm/backends/fsevents.rb +78 -0
  276. data/lib/vendor/fssm/backends/polling.rb +24 -0
  277. data/lib/vendor/fssm/ext.rb +7 -0
  278. data/lib/vendor/fssm/monitor.rb +21 -0
  279. data/lib/vendor/fssm/path.rb +88 -0
  280. data/lib/vendor/fssm/state.rb +46 -0
  281. data/lib/vendor/fssm/support.rb +26 -0
  282. data/test/command_line_helper.rb +97 -0
  283. data/test/command_line_test.rb +67 -0
  284. data/test/compass_test.rb +132 -0
  285. data/test/configuration_test.rb +123 -0
  286. data/test/fixtures/stylesheets/blueprint/config.rb +9 -0
  287. data/test/fixtures/stylesheets/blueprint/css/typography.css +158 -0
  288. data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
  289. data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
  290. data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
  291. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
  292. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
  293. data/test/fixtures/stylesheets/compass/config.rb +9 -0
  294. data/test/fixtures/stylesheets/compass/css/layout.css +15 -0
  295. data/test/fixtures/stylesheets/compass/css/print.css +18 -0
  296. data/test/fixtures/stylesheets/compass/css/reset.css +60 -0
  297. data/test/fixtures/stylesheets/compass/css/utilities.css +17 -0
  298. data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
  299. data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
  300. data/test/fixtures/stylesheets/compass/sass/reset.sass +10 -0
  301. data/test/fixtures/stylesheets/compass/sass/utilities.sass +6 -0
  302. data/test/fixtures/stylesheets/image_urls/config.rb +17 -0
  303. data/test/fixtures/stylesheets/image_urls/css/screen.css +3 -0
  304. data/test/fixtures/stylesheets/image_urls/images/grid.png +0 -0
  305. data/test/fixtures/stylesheets/image_urls/sass/screen.sass +6 -0
  306. data/test/io_helper.rb +19 -0
  307. data/test/rails_integration_test.rb +84 -0
  308. data/test/sass_extensions_test.rb +31 -0
  309. data/test/test_case_helper.rb +13 -0
  310. data/test/test_helper.rb +27 -0
  311. data/test/test_rails_helper.rb +20 -0
  312. metadata +404 -0
@@ -0,0 +1,166 @@
1
+ require 'compass/exec/global_options_parser'
2
+ require 'compass/exec/project_options_parser'
3
+
4
+ module Compass::Exec
5
+ class SwitchUI
6
+ include GlobalOptionsParser
7
+ include ProjectOptionsParser
8
+ attr_accessor :args, :options, :opts
9
+
10
+ def initialize(args)
11
+ self.args = args
12
+ self.options = {}
13
+ parse!
14
+ end
15
+
16
+ def run!
17
+ begin
18
+ perform!
19
+ rescue Exception => e
20
+ raise e if e.is_a? SystemExit
21
+ if e.is_a?(::Compass::Error) || e.is_a?(OptionParser::ParseError)
22
+ $stderr.puts e.message
23
+ else
24
+ ::Compass::Exec::Helpers.report_error(e, @options)
25
+ end
26
+ return 1
27
+ end
28
+ return 0
29
+ end
30
+
31
+ protected
32
+
33
+ def perform!
34
+ if options[:command]
35
+ do_command(options[:command])
36
+ else
37
+ puts self.opts
38
+ end
39
+ end
40
+
41
+ def parse!
42
+ self.opts = OptionParser.new(&method(:set_opts))
43
+ self.opts.parse!(self.args)
44
+ if self.args.size > 0
45
+ self.options[:project_name] = trim_trailing_separator(self.args.shift)
46
+ end
47
+ self.options[:command] ||= self.options[:project_name] ? :create_project : :update_project
48
+ self.options[:framework] ||= :compass
49
+ end
50
+
51
+ def trim_trailing_separator(path)
52
+ path[-1..-1] == File::SEPARATOR ? path[0..-2] : path
53
+ end
54
+
55
+ def set_opts(opts)
56
+ opts.banner = <<END
57
+ Usage: compass [options] [project]
58
+
59
+ Description:
60
+ The compass command line tool will help you create and manage the stylesheets for your project.
61
+
62
+ To get started on a stand-alone project based on blueprint:
63
+
64
+ compass -f blueprint my_compass_project
65
+
66
+ When you change any sass files, you must recompile your project using --update or --watch.
67
+ END
68
+ opts.separator ''
69
+ opts.separator 'Mode Options(only specify one):'
70
+
71
+ opts.on('-i', '--install', :NONE, "Create a new compass project.",
72
+ " The default mode when a project is provided.") do
73
+ self.options[:command] = :create_project
74
+ end
75
+
76
+ opts.on('-u', '--update', :NONE, 'Update the current project.',
77
+ ' This is the default when no project is provided.') do
78
+ self.options[:command] = :update_project
79
+ end
80
+
81
+ opts.on('-w', '--watch', :NONE, 'Monitor the current project for changes and update') do
82
+ self.options[:command] = :watch_project
83
+ self.options[:quiet] = true
84
+ end
85
+
86
+ opts.on('-p', '--pattern PATTERN', 'Stamp out a pattern into the current project.',
87
+ ' Must be used with -f.') do |pattern|
88
+ self.options[:command] = :stamp_pattern
89
+ self.options[:pattern] = pattern
90
+ end
91
+
92
+ opts.on('--write-configuration', "Write the current configuration to the configuration file.") do
93
+ self.options[:command] = :write_configuration
94
+ end
95
+
96
+ opts.on('--list-frameworks', "List compass frameworks available to use.") do
97
+ self.options[:command] = :list_frameworks
98
+ end
99
+
100
+ opts.on('--validate', :NONE, 'Validate your project\'s compiled css. Requires Java.') do
101
+ self.options[:command] = :validate_project
102
+ end
103
+
104
+ opts.on('--grid-img [DIMENSIONS]', 'Generate a background image to test grid alignment.',
105
+ ' Dimension is given as <column_width>+<gutter_width>x<height>.',
106
+ ' Defaults to 30+10x20. Height is optional.') do |dimensions|
107
+ self.options[:grid_dimensions] = dimensions || "30+10"
108
+ self.options[:command] = :generate_grid_background
109
+ end
110
+
111
+ opts.separator ''
112
+ opts.separator 'Install/Pattern Options:'
113
+
114
+ opts.on('-f FRAMEWORK', '--framework FRAMEWORK', 'Use the specified framework. Only one may be specified.') do |framework|
115
+ self.options[:framework] = framework
116
+ end
117
+
118
+ opts.on('-n', '--pattern-name NAME', 'The name to use when stamping a pattern.',
119
+ ' Must be used in combination with -p.') do |name|
120
+ self.options[:pattern_name] = name
121
+ end
122
+
123
+ opts.on('--rails', "Sets the app type to a rails project (same as --app rails).") do
124
+ self.options[:project_type] = :rails
125
+ end
126
+
127
+ opts.on('--app APP_TYPE', 'Specify the kind of application to integrate with.') do |project_type|
128
+ self.options[:project_type] = project_type.to_sym
129
+ end
130
+
131
+ opts.separator ''
132
+ opts.separator 'Configuration Options:'
133
+
134
+ set_project_options(opts)
135
+
136
+ opts.separator ''
137
+ opts.separator 'General Options:'
138
+
139
+ set_global_options(opts)
140
+
141
+ opts.on('--imports', :NONE, 'Emit an imports suitable for passing to the sass command-line.',
142
+ ' Example: sass `compass --imports`',
143
+ ' Note: Compass\'s Sass extensions will not be available.') do
144
+ print ::Compass::Frameworks::ALL.map{|f| "-I #{f.stylesheets_directory}"}.join(' ')
145
+ exit
146
+ end
147
+
148
+ opts.on('--install-dir', :NONE, 'Emit the location where compass is installed.') do
149
+ puts ::Compass.base_directory
150
+ exit
151
+ end
152
+
153
+ opts.on_tail("-v", "--version", "Print version") do
154
+ self.options[:command] = :print_version
155
+ end
156
+
157
+ end
158
+
159
+ def do_command(command)
160
+ command_class_name = command.to_s.split(/_/).map{|p| p.capitalize}.join('')
161
+ command_class = eval("::Compass::Commands::#{command_class_name}")
162
+ command_class.new(Dir.getwd, options).execute
163
+ end
164
+
165
+ end
166
+ end
@@ -0,0 +1,53 @@
1
+ module Compass
2
+ module Frameworks
3
+ extend self
4
+
5
+ ALL = []
6
+ DEFAULT_FRAMEWORKS_PATH = File.join(Compass.lib_directory, 'compass', 'frameworks')
7
+
8
+ class Framework
9
+ attr_accessor :name
10
+ attr_accessor :templates_directory, :stylesheets_directory
11
+ def initialize(name, *arguments)
12
+ options = arguments.last.is_a?(Hash) ? arguments.pop : {}
13
+ path = options[:path] || arguments.shift
14
+ @name = name
15
+ @templates_directory = options[:templates_directory] || File.join(path, 'templates')
16
+ @stylesheets_directory = options[:stylesheets_directory] || File.join(path, 'stylesheets')
17
+ end
18
+ end
19
+
20
+ def register(name, *arguments)
21
+ ALL << Framework.new(name, *arguments)
22
+ end
23
+
24
+ def [](name)
25
+ ALL.detect{|f| f.name.to_s == name.to_s}
26
+ end
27
+
28
+ def discover(frameworks_directory)
29
+ frameworks_directory = DEFAULT_FRAMEWORKS_PATH if frameworks_directory == :defaults
30
+ frameworks_directory = Dir.new(frameworks_directory) unless frameworks_directory.is_a?(Dir)
31
+ frameworks_directory.entries.reject{|e| e[0] == ?.}.each do |framework|
32
+ register_directory File.join(frameworks_directory.path, framework)
33
+ end
34
+ end
35
+
36
+ def register_directory(directory)
37
+ loaders = [
38
+ File.join(directory, "compass_init.rb"),
39
+ File.join(directory, 'lib', File.basename(directory)+".rb"),
40
+ File.join(directory, File.basename(directory)+".rb")
41
+ ]
42
+ loader = loaders.detect{|l| File.exists?(l)}
43
+ if loader
44
+ require loader
45
+ else
46
+ register File.basename(directory), directory
47
+ end
48
+ end
49
+
50
+ end
51
+ end
52
+
53
+ Compass::Frameworks.discover(:defaults)
@@ -0,0 +1,3 @@
1
+ @import blueprint/screen.sass
2
+ @import blueprint/print.sass
3
+ @import blueprint/ie.sass
@@ -0,0 +1,99 @@
1
+ // The blueprint IE mixins should be mixed into a stylesheet that gets conditionally included
2
+ // into IE like so:
3
+ // <!--[if lt IE 8]><link rel="stylesheet" href="ie.css"
4
+ // type="text/css" media="screen, projection"><![endif]-->
5
+
6
+
7
+ // Usage examples:
8
+ // As a top-level mixin, apply to any page that includes the stylesheet:
9
+ // +blueprint-ie
10
+ // Scoped by a presentational class:
11
+ // body.blueprint
12
+ // +blueprint-ie(true)
13
+ // Scoped by semantic selectors:
14
+ // body#page-1, body#page-2, body.a-special-page-type
15
+ // +blueprint-ie(true)
16
+ // Deprecated:
17
+ // You can pass the body selector as the first argument when used as a top-level mixin
18
+ // +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
19
+ =blueprint-ie(!body_selector = "body")
20
+ @if !body_selector == true
21
+ +blueprint-ie-body
22
+ +blueprint-ie-defaults
23
+ @else
24
+ #{!body_selector}
25
+ +blueprint-ie-body
26
+ @if !body_selector != "body"
27
+ @debug "[DEPRECATED] To specify a the selector \"#{!body_selector}\" to +blueprint-ie, pass true as the first argument and mix it into #{!body_selector}."
28
+ +blueprint-ie-defaults
29
+ @if !body_selector == "body"
30
+ +blueprint-ie-defaults
31
+
32
+ =blueprint-ie-body
33
+ text-align: center
34
+ +blueprint-ie-hacks
35
+
36
+ =blueprint-ie-hacks
37
+ * html &
38
+ legend
39
+ margin: 0px -8px 16px 0
40
+ padding: 0
41
+ html>&
42
+ p code
43
+ *white-space: normal
44
+
45
+ // Fixes for Blueprint "inline" forms in IE
46
+ =blueprint-inline-form-ie
47
+ div, p
48
+ vertical-align: middle
49
+ label
50
+ position: relative
51
+ top: -0.25em
52
+ input
53
+ &.checkbox, &.radio, &.button, button
54
+ margin: 0.5em 0
55
+
56
+ =blueprint-ie-defaults
57
+ .container
58
+ text-align: left
59
+ ol
60
+ margin-left: 2em
61
+ sup
62
+ vertical-align: text-top
63
+ sub
64
+ vertical-align: text-bottom
65
+ hr
66
+ margin: -8px auto 11px
67
+ img
68
+ -ms-interpolation-mode: bicubic
69
+ fieldset
70
+ padding-top: 0
71
+ input
72
+ &.text
73
+ margin: 0.5em 0
74
+ background-color: #fff
75
+ border: 1px solid #bbb
76
+ &:focus
77
+ border: 1px solid #666
78
+ &.title
79
+ margin: 0.5em 0
80
+ background-color: #fff
81
+ border: 1px solid #bbb
82
+ &:focus
83
+ border: 1px solid #666
84
+ &.checkbox
85
+ position: relative
86
+ top: 0.25em
87
+ &.radio
88
+ position: relative
89
+ top: 0.25em
90
+ &.button
91
+ position: relative
92
+ top: 0.25em
93
+ textarea
94
+ margin: 0.5em 0
95
+ select
96
+ margin: 0.5em 0
97
+ button
98
+ position: relative
99
+ top: 0.25em
@@ -0,0 +1,90 @@
1
+ @import modules/typography.sass
2
+ @import compass/utilities/general/float.sass
3
+
4
+
5
+
6
+ // Usage examples:
7
+ // As a top-level mixin, apply to any page that includes the stylesheet:
8
+ // +blueprint-print
9
+ // Scoped by a presentational class:
10
+ // body.blueprint
11
+ // +blueprint-print(true)
12
+ // Scoped by semantic selectors:
13
+ // body#page-1, body#page-2, body.a-special-page-type
14
+ // +blueprint-print(true)
15
+ // Deprecated:
16
+ // You can pass the body selector as the first argument when used as a top-level mixin
17
+ // +blueprint-print("body#page-1, body#page-2, body.a-special-page-type")
18
+ =blueprint-print(!body_selector = "body")
19
+ @if !body_selector == true
20
+ +blueprint-print-body
21
+ +blueprint-print-defaults
22
+ @else
23
+ #{!body_selector}
24
+ +blueprint-print-body
25
+ @if !body_selector != "body"
26
+ @debug "[DEPRECATED] To specify a the selector \"#{!body_selector}\" to +blueprint-print, pass true as the first argument and mix it into #{!body_selector}."
27
+ +blueprint-print-defaults
28
+ @if !body_selector == "body"
29
+ +blueprint-print-defaults
30
+
31
+ // This style is in blueprint, but I think it's annoying and it doesn't work in all browsers.
32
+ // Feel free to mix it into anchors where you want it.
33
+ =blueprint-show-link-urls
34
+ &:after
35
+ content: " (" attr(href) ")"
36
+ font-size: 90%
37
+
38
+ =blueprint-print-body
39
+ line-height: 1.5
40
+ font-family= !blueprint_font_family
41
+ color: #000
42
+ background: none
43
+ font-size: 10pt
44
+
45
+ =blueprint-print-defaults
46
+ .container
47
+ background: none
48
+ hr
49
+ background: #ccc
50
+ color: #ccc
51
+ width: 100%
52
+ height: 2px
53
+ margin: 2em 0
54
+ padding: 0
55
+ border: none
56
+ &.space
57
+ background: #fff
58
+ color: #fff
59
+ h1, h2, h3, h4, h5, h6
60
+ font-family= !blueprint_font_family
61
+ code
62
+ font:
63
+ size: .9em
64
+ family= !blueprint_fixed_font_family
65
+ img
66
+ +float-left
67
+ margin: 1.5em 1.5em 1.5em 0
68
+ a
69
+ img
70
+ border: none
71
+ &:link,
72
+ &:visited
73
+ background: transparent
74
+ font-weight: 700
75
+ text-decoration: underline
76
+ p img.top
77
+ margin-top: 0
78
+ blockquote
79
+ margin: 1.5em
80
+ padding: 1em
81
+ font-style: italic
82
+ font-size: .9em
83
+ .small
84
+ font-size: .9em
85
+ .large
86
+ font-size: 1.1em
87
+ .quiet
88
+ color: #999
89
+ .hide
90
+ display: none
@@ -0,0 +1,3 @@
1
+ @import modules/reset.sass
2
+
3
+ +blueprint-global-reset
@@ -0,0 +1,29 @@
1
+ @import modules/colors.sass
2
+ @import modules/grid.sass
3
+ @import modules/typography.sass
4
+ @import modules/utilities.sass
5
+ @import modules/form.sass
6
+ @import modules/interaction.sass
7
+ @import modules/debug.sass
8
+
9
+ // Usage examples:
10
+ // As a top-level mixin, apply to any page that includes the stylesheet:
11
+ // +blueprint
12
+ // Scoped by a presentational class:
13
+ // body.blueprint
14
+ // +blueprint(true)
15
+ // Scoped by semantic selectors:
16
+ // body#page-1, body#page-2, body.a-special-page-type
17
+ // +blueprint(true)
18
+ // Deprecated:
19
+ // You can pass the body selector as the first argument when used as a top-level mixin
20
+ // +blueprint("body#page-1, body#page-2, body.a-special-page-type")
21
+ =blueprint(!body_selector = "body")
22
+ @if not (!body_selector == "body" or !body_selector == true)
23
+ @debug "[DEPRECATED] To specify a the selector \"#{!body_selector}\" to +blueprint, pass true as the first argument and mix it into #{!body_selector}."
24
+ +blueprint-typography(!body_selector)
25
+ +blueprint-utilities
26
+ +blueprint-grid
27
+ +blueprint-debug
28
+ +blueprint-interaction
29
+ +blueprint-form