bsherman-compass 0.5.2

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 (155) hide show
  1. data/Manifest +178 -0
  2. data/README.markdown +17 -0
  3. data/Rakefile +98 -0
  4. data/VERSION +1 -0
  5. data/bin/compass +8 -0
  6. data/compass.gemspec +37 -0
  7. data/examples/blueprint_default/index.html +73 -0
  8. data/examples/blueprint_default/parts/elements.html +246 -0
  9. data/examples/blueprint_default/parts/forms.html +100 -0
  10. data/examples/blueprint_default/parts/grid.html +206 -0
  11. data/examples/blueprint_default/parts/test-small.jpg +0 -0
  12. data/examples/blueprint_default/parts/test.jpg +0 -0
  13. data/examples/blueprint_default/parts/valid.png +0 -0
  14. data/examples/blueprint_plugins/index.html +60 -0
  15. data/examples/blueprint_plugins/parts/fancy_type.html +84 -0
  16. data/examples/blueprint_plugins/parts/test-small.jpg +0 -0
  17. data/examples/blueprint_plugins/parts/test.jpg +0 -0
  18. data/examples/blueprint_plugins/parts/valid.png +0 -0
  19. data/examples/blueprint_semantic/index.html +68 -0
  20. data/examples/blueprint_semantic/parts/fancy_type.html +84 -0
  21. data/examples/blueprint_semantic/parts/liquid.html +84 -0
  22. data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
  23. data/examples/blueprint_semantic/parts/test.jpg +0 -0
  24. data/examples/blueprint_semantic/parts/valid.png +0 -0
  25. data/examples/compass/compass.html +19 -0
  26. data/examples/compass/sticky_footer.html.haml +14 -0
  27. data/examples/compass/utilities.html.haml +141 -0
  28. data/examples/yui/divisions.html.haml +179 -0
  29. data/examples/yui/index.html.haml +19 -0
  30. data/examples/yui/sub_divisions.html.haml +169 -0
  31. data/examples/yui/templates.html.haml +54 -0
  32. data/examples/yui/test.jpg +0 -0
  33. data/examples/yui/typography.html.haml +132 -0
  34. data/frameworks/blueprint.rb +2 -0
  35. data/frameworks/blueprint/lib/blueprint/constants.rb +17 -0
  36. data/frameworks/blueprint/lib/blueprint/grid_builder.rb +54 -0
  37. data/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
  38. data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +49 -0
  39. data/frameworks/blueprint/stylesheets/blueprint/_print.sass +82 -0
  40. data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +15 -0
  41. data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +30 -0
  42. data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
  43. data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +81 -0
  44. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +43 -0
  45. data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +141 -0
  46. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
  47. data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +137 -0
  48. data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +46 -0
  49. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +154 -0
  50. data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
  51. data/frameworks/blueprint/templates/project/grid.png +0 -0
  52. data/frameworks/blueprint/templates/project/ie.sass +3 -0
  53. data/frameworks/blueprint/templates/project/manifest.rb +5 -0
  54. data/frameworks/blueprint/templates/project/print.sass +3 -0
  55. data/frameworks/blueprint/templates/project/screen.sass +8 -0
  56. data/frameworks/compass.rb +2 -0
  57. data/frameworks/compass/stylesheets/_compass.sass +1 -0
  58. data/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
  59. data/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
  60. data/frameworks/compass/stylesheets/compass/_utilities.sass +5 -0
  61. data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +17 -0
  62. data/frameworks/compass/stylesheets/compass/utilities/_general.sass +4 -0
  63. data/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
  64. data/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
  65. data/frameworks/compass/stylesheets/compass/utilities/_print.sass +24 -0
  66. data/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
  67. data/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
  68. data/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +11 -0
  69. data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +6 -0
  70. data/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +56 -0
  71. data/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  72. data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  73. data/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
  74. data/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
  75. data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +5 -0
  76. data/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
  77. data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +20 -0
  78. data/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
  79. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
  80. data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
  81. data/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
  82. data/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
  83. data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +10 -0
  84. data/frameworks/compass/templates/project/ie.sass +6 -0
  85. data/frameworks/compass/templates/project/manifest.rb +3 -0
  86. data/frameworks/compass/templates/project/print.sass +6 -0
  87. data/frameworks/compass/templates/project/screen.sass +7 -0
  88. data/frameworks/yui.rb +2 -0
  89. data/frameworks/yui/COPYRIGHT +15 -0
  90. data/frameworks/yui/stylesheets/_yui.sass +7 -0
  91. data/frameworks/yui/stylesheets/yui/modules/_base.sass +60 -0
  92. data/frameworks/yui/stylesheets/yui/modules/_fonts.sass +38 -0
  93. data/frameworks/yui/stylesheets/yui/modules/_grids.sass +341 -0
  94. data/frameworks/yui/templates/project/manifest.rb +1 -0
  95. data/frameworks/yui/templates/project/screen.sass +4 -0
  96. data/lib/compass.rb +39 -0
  97. data/lib/compass/actions.rb +92 -0
  98. data/lib/compass/commands/base.rb +29 -0
  99. data/lib/compass/commands/create_project.rb +41 -0
  100. data/lib/compass/commands/list_frameworks.rb +16 -0
  101. data/lib/compass/commands/print_version.rb +23 -0
  102. data/lib/compass/commands/project_base.rb +82 -0
  103. data/lib/compass/commands/update_project.rb +25 -0
  104. data/lib/compass/commands/watch_project.rb +53 -0
  105. data/lib/compass/commands/write_configuration.rb +37 -0
  106. data/lib/compass/compiler.rb +40 -0
  107. data/lib/compass/configuration.rb +167 -0
  108. data/lib/compass/core_ext.rb +12 -0
  109. data/lib/compass/errors.rb +7 -0
  110. data/lib/compass/exec.rb +184 -0
  111. data/lib/compass/frameworks.rb +29 -0
  112. data/lib/compass/installers.rb +5 -0
  113. data/lib/compass/installers/base.rb +135 -0
  114. data/lib/compass/installers/manifest.rb +57 -0
  115. data/lib/compass/installers/rails.rb +118 -0
  116. data/lib/compass/installers/stand_alone.rb +76 -0
  117. data/lib/compass/logger.rb +34 -0
  118. data/lib/compass/merb.rb +43 -0
  119. data/lib/compass/test_case.rb +37 -0
  120. data/lib/compass/validate.rb +13 -0
  121. data/lib/compass/validate/COPYRIGHT.html +93 -0
  122. data/lib/compass/validate/JIGSAW_COPYRIGHT +64 -0
  123. data/lib/compass/validate/README.html +83 -0
  124. data/lib/compass/validate/XERCES_COPYING.txt +56 -0
  125. data/lib/compass/validate/css-validator-javadoc.jar +0 -0
  126. data/lib/compass/validate/css-validator.jar +0 -0
  127. data/lib/compass/validate/jigsaw.jar +0 -0
  128. data/lib/compass/validate/xerces.jar +0 -0
  129. data/lib/compass/validator.rb +59 -0
  130. data/lib/compass/version.rb +66 -0
  131. data/lib/sass_extensions.rb +13 -0
  132. data/test/command_line_test.rb +147 -0
  133. data/test/compass_test.rb +148 -0
  134. data/test/configuration_test.rb +29 -0
  135. data/test/fixtures/stylesheets/blueprint/css/typography.css +159 -0
  136. data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
  137. data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
  138. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
  139. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
  140. data/test/fixtures/stylesheets/compass/css/layout.css +14 -0
  141. data/test/fixtures/stylesheets/compass/css/print.css +19 -0
  142. data/test/fixtures/stylesheets/compass/css/reset.css +66 -0
  143. data/test/fixtures/stylesheets/compass/css/utilities.css +23 -0
  144. data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
  145. data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
  146. data/test/fixtures/stylesheets/compass/sass/reset.sass +1 -0
  147. data/test/fixtures/stylesheets/compass/sass/utilities.sass +5 -0
  148. data/test/fixtures/stylesheets/yui/css/mixins.css +16 -0
  149. data/test/fixtures/stylesheets/yui/sass/base.sass +3 -0
  150. data/test/fixtures/stylesheets/yui/sass/fonts.sass +3 -0
  151. data/test/fixtures/stylesheets/yui/sass/grids.sass +3 -0
  152. data/test/fixtures/stylesheets/yui/sass/mixins.sass +16 -0
  153. data/test/sass_extensions_test.rb +26 -0
  154. data/test/test_helper.rb +47 -0
  155. metadata +295 -0
@@ -0,0 +1,37 @@
1
+ module Compass
2
+ # Write your unit test like this if you want to make sure all your stylesheets compile.
3
+ #
4
+ # require 'compass/test_case'
5
+ # class StylesheetsTest < Compass::TestCase
6
+ # def test_stylesheets
7
+ # my_sass_files.each do |sass_file|
8
+ # assert_compiles(sass_file) do |result|
9
+ # assert_not_blank result
10
+ # end
11
+ # end
12
+ # end
13
+ # protected
14
+ # def my_sass_files
15
+ # Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "../..", "app/stylesheets/**/[^_]*.sass")))
16
+ # end
17
+ # end
18
+ class TestCase < Test::Unit::TestCase
19
+ def setup
20
+ @last_compile = nil
21
+ end
22
+
23
+ def compile(stylesheet)
24
+ input = open(stylesheet)
25
+ template = input.read()
26
+ input.close()
27
+ @last_compile = ::Sass::Engine.new(template,
28
+ ::Sass::Plugin.engine_options(:style => :compact, :filename => stylesheet)).render
29
+ yield @last_compile if block_given?
30
+ end
31
+
32
+ def assert_compiles(stylesheet, &block)
33
+ compile(stylesheet, &block)
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+ require File.join(File.dirname(__FILE__), 'compass', 'validator')
3
+
4
+ # This script will validate the core Compass files.
5
+ #
6
+ # The files are not completely valid. This has to do
7
+ # with a small number of CSS hacks needed to ensure
8
+ # consistent rendering across browsers.
9
+ #
10
+ # To add your own CSS files for validation, see
11
+ # /lib/compass/validator.rb
12
+
13
+ Compass::Validator.new.validate
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang='en' lang='en'>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6
+ <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/base.css" />
7
+ <title>W3C IPR SOFTWARE NOTICE</title>
8
+ </head>
9
+ <body>
10
+ <h1>W3C<sup>&reg;</sup> SOFTWARE NOTICE AND LICENSE</h1>
11
+
12
+ <h3>Copyright &copy; 1997-2002 <a href="http://www.w3.org/">World
13
+ Wide Web Consortium</a>, (<a
14
+ href="http://www.lcs.mit.edu/">Massachusetts Institute of
15
+ Technology</a>, <a href="http://www.inria.fr/">Institut National de
16
+ Recherche en Informatique et en Automatique</a>, <a
17
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
18
+ Reserved. http://www.w3.org/Consortium/Legal/</h3>
19
+
20
+ <p>This W3C work (including software, documents, or other related
21
+ items) is being provided by the copyright holders under the
22
+ following license. By obtaining, using and/or copying this work,
23
+ you (the licensee) agree that you have read, understood, and will
24
+ comply with the following terms and conditions:</p>
25
+
26
+ <p>Permission to use, copy, modify, and distribute this software
27
+ and its documentation, with or without modification,&nbsp; for any
28
+ purpose and without fee or royalty is hereby granted, provided that
29
+ you include the following on ALL copies of the software and
30
+ documentation or portions thereof, including modifications, that
31
+ you make:</p>
32
+
33
+ <ol>
34
+ <li>The full text of this NOTICE in a location viewable to users of
35
+ the redistributed or derivative work.</li>
36
+
37
+ <li>Any pre-existing intellectual property disclaimers, notices, or
38
+ terms and conditions. If none exist, a short notice of the
39
+ following form (hypertext is preferred, text is permitted) should
40
+ be used within the body of any redistributed or derivative code:
41
+ "Copyright &copy; [$date-of-software] <a
42
+ href="http://www.w3.org/">World Wide Web Consortium</a>, (<a
43
+ href="http://www.lcs.mit.edu/">Massachusetts Institute of
44
+ Technology</a>, <a href="http://www.inria.fr/">Institut National de
45
+ Recherche en Informatique et en Automatique</a>, <a
46
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
47
+ Reserved. http://www.w3.org/Consortium/Legal/"</li>
48
+
49
+ <li>Notice of any changes or modifications to the W3C files,
50
+ including the date changes were made. (We recommend you provide
51
+ URIs to the location from which the code is derived.)</li>
52
+ </ol>
53
+
54
+ <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
55
+ COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
56
+ IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
57
+ MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
58
+ USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
59
+ PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
60
+
61
+ <p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
62
+ SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
63
+ SOFTWARE OR DOCUMENTATION.</p>
64
+
65
+ <p>The name and trademarks of copyright holders may NOT be used in
66
+ advertising or publicity pertaining to the software without
67
+ specific, written prior permission. Title to copyright in this
68
+ software and any associated documentation will at all times remain
69
+ with copyright holders.</p>
70
+
71
+ <p>____________________________________</p>
72
+
73
+ <p>This formulation of W3C's notice and license became active on
74
+ August 14 1998 so as to improve compatibility with GPL. This
75
+ version ensures that W3C software licensing terms are no more
76
+ restrictive than GPL and consequently W3C software may be
77
+ distributed in GPL packages. See the <a
78
+ href="copyright-software-19980519.html">older formulation</a> for
79
+ the policy prior to this date. Please see our <a
80
+ href="IPR-FAQ.html">Copyright FAQ</a> for common questions about
81
+ using materials from our site, including specific terms and
82
+ conditions for packages like libwww, Amaya, and Jigsaw. Other
83
+ questions about this notice can be directed to <a
84
+ href="mailto:site-policy@w3.org">site-policy@w3.org</a>.<br />
85
+ &nbsp;</p>
86
+
87
+ <p>&nbsp;</p>
88
+
89
+ <address><a href="http://www.w3.org/Help/Webmaster.html">webmaster</a><br />
90
+ (last updated $Date: 2004/05/29 04:04:36 $)</address>
91
+
92
+ </body>
93
+ </html>
@@ -0,0 +1,64 @@
1
+ W3C IPR SOFTWARE NOTICE
2
+
3
+ Copyright � 1995-1998 World Wide Web Consortium, (Massachusetts Institute of
4
+ Technology, Institut National de Recherche en Informatique et en
5
+ Automatique, Keio University). All Rights Reserved.
6
+ http://www.w3.org/Consortium/Legal/
7
+
8
+ This W3C work (including software, documents, or other related items) is
9
+ being provided by the copyright holders under the following license. By
10
+ obtaining, using and/or copying this work, you (the licensee) agree that you
11
+ have read, understood, and will comply with the following terms and
12
+ conditions:
13
+
14
+ Permission to use, copy, and modify this software and its documentation,
15
+ with or without modification, for any purpose and without fee or royalty is
16
+ hereby granted, provided that you include the following on ALL copies of the
17
+ software and documentation or portions thereof, including modifications,
18
+ that you make:
19
+
20
+ 1. The full text of this NOTICE in a location viewable to users of the
21
+ redistributed or derivative work.
22
+ 2. Any pre-existing intellectual property disclaimers, notices, or terms
23
+ and conditions. If none exist, a short notice of the following form
24
+ (hypertext is preferred, text is permitted) should be used within the
25
+ body of any redistributed or derivative code: "Copyright � World Wide
26
+ Web Consortium, (Massachusetts Institute of Technology, Institut
27
+ National de Recherche en Informatique et en Automatique, Keio
28
+ University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
29
+ 3. Notice of any changes or modifications to the W3C files, including the
30
+ date changes were made. (We recommend you provide URIs to the location
31
+ from which the code is derived).
32
+
33
+ In addition, creators of derivitive works must include the full text of this
34
+ NOTICE in a location viewable to users of the derivitive work.
35
+
36
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
37
+ MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
38
+ LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
39
+ PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
40
+ ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
41
+
42
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
43
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
44
+ DOCUMENTATION.
45
+
46
+ The name and trademarks of copyright holders may NOT be used in advertising
47
+ or publicity pertaining to the software without specific, written prior
48
+ permission. Title to copyright in this software and any associated
49
+ documentation will at all times remain with copyright holders.
50
+
51
+ ____________________________________
52
+
53
+ This formulation of W3C's notice and license became active on August 14
54
+ 1998. See the older formulation for the policy prior to this date. Please
55
+ see our Copyright FAQ for common questions about using materials from our
56
+ site, including specific terms and conditions for packages like libwww,
57
+ Amaya, and Jigsaw. Other questions about this notice can be directed to
58
+ site-policy@w3.org .
59
+
60
+
61
+
62
+
63
+ webmaster
64
+ (last updated 14-Aug-1998)
@@ -0,0 +1,83 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>CSS Validator Binary Distribution - Illumit</title>
5
+ <link title="RSS Feed" type="application/rss+xml" rel="alternate" href="http://www.illumit.com/site.rss" />
6
+ </head>
7
+ <body>
8
+ <h1>CSS Validator Binary Distribution</h1>
9
+ <p>This a binary distribution of <a href="http://jigsaw.w3.org/css-validator">W3C CSS Validator</a>.
10
+ It was built from the <a href="http://dev.w3.org/cvsweb/2002/css-validator">source</a> on June 25, 2006.
11
+ No modifications were made.</p>
12
+
13
+ <p>This distribution is provided <a href="#asis">as is</a> to make testing a large number of CSS files easier.</p>
14
+
15
+
16
+ <h2>Requirements</h2>
17
+ <p>A Java 2 Virtual Machine is required to use the validator.
18
+ You can download one from <a href="http://java.sun.com/">Sun</a> if you do not have one installed.</p>
19
+
20
+ <h2>Usage</h2>
21
+ <h2>Summary</h2>
22
+ <p><code>java -jar <samp>~/css-validator/</samp>css-validator.jar [-options] files URLs</code></p>
23
+ <h2>Sample</h2>
24
+ <pre>
25
+ java -jar ~/css-validator/css-validator.jar f1.css http://illumit.com/
26
+ </pre>
27
+ <h2>Options</h2>
28
+ <dl>
29
+ <dt>-e</dt><dd>Show errors only.</dd>
30
+ <dt>-html</dt><dd>Output HTML.</dd>
31
+ <dt>-css1 | -css2 | -css21 | -css3 | -svg | -svgbasic | -svgtiny</dt>
32
+ <dd>Specify CSS version. CSS2 is the default.</dd>
33
+ </dl>
34
+
35
+ <h2>Support</h2>
36
+
37
+ <p>If you have questions about how this distribution is built or packaged,
38
+ <a href="mailto:contact@illumit.com">mailto:contact@illumit.com</a>.</p>
39
+
40
+ <p>Use the CSS Validator <a href="http://jigsaw.w3.org/css-validator/Email">Feedback</a>
41
+ page if you have any questions or problems with the validator itself.</p>
42
+
43
+ <p class="Footnote">Updates are announced on via
44
+ <a class="RSSLink" rel="alternate" type="application/rss+xml" href="http://www.illumit.com/site.rss">RSS</a></p>
45
+
46
+ <!--
47
+ <h2>Contents</h2>
48
+ <ul>
49
+ <li><a href="css-validator.jar">css-validator.jar</a> Executable JAR package</li>
50
+ <li><a href="COPYRIGHT.html">COPYRIGHT.html</a> CSS Validator Copyright Notice</li>
51
+ <li><a href="css-validator-javadoc.jar">css-validator-javadoc.jar</a> CSS Validator API Docs</li>
52
+ <li>Required libraries:<ul>
53
+ <li><a href="jigsaw.jar">jigsaw.jar</a> and <a href="JIGSAW_COPYRIGHT">JIGSAW_COPYRIGHT</a></li>
54
+ <li><a href="xerces.jar">xerces.jar</a> and <a href="XERCES_COPYING.txt">XERCES_COPYING.txt</a></li>
55
+ </ul>
56
+ </li>
57
+ </ul>
58
+ -->
59
+
60
+ <h2>Download</h2>
61
+
62
+ <p>Download the css validator binary distribution <a href="css-validator.zip">css-validator.zip</a>. Extract the files (OS X and *ix users can use unzip).</p>
63
+
64
+
65
+ <h2><a name="asis">License Agreement</a></h2>
66
+
67
+ <p>This is a binary distribution of <a href="http://jigsaw.w3.org/css-validator">W3C CSS Validator</a> Version 2.0
68
+ It was built from the <a href="http://dev.w3.org/cvsweb/2002/css-validator">source</a> on June 25, 2006.
69
+ No modifications were made to the source.</p>
70
+
71
+ <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
72
+ ILLUMIT L.L.C AND THE COPYRIGHT HOLDERS (W3C) MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
73
+ IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
74
+ MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
75
+ USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
76
+ PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
77
+
78
+ <p>ILLUMIT L.L.C AND THE COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
79
+ SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
80
+ SOFTWARE OR DOCUMENTATION.</p>
81
+
82
+ </body>
83
+ </html>
@@ -0,0 +1,56 @@
1
+ /*
2
+ * The Apache Software License, Version 1.1
3
+ *
4
+ *
5
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
6
+ * reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ *
12
+ * 1. Redistributions of source code must retain the above copyright
13
+ * notice, this list of conditions and the following disclaimer.
14
+ *
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in
17
+ * the documentation and/or other materials provided with the
18
+ * distribution.
19
+ *
20
+ * 3. The end-user documentation included with the redistribution,
21
+ * if any, must include the following acknowledgment:
22
+ * "This product includes software developed by the
23
+ * Apache Software Foundation (http://www.apache.org/)."
24
+ * Alternately, this acknowledgment may appear in the software itself,
25
+ * if and wherever such third-party acknowledgments normally appear.
26
+ *
27
+ * 4. The names "Xerces" and "Apache Software Foundation" must
28
+ * not be used to endorse or promote products derived from this
29
+ * software without prior written permission. For written
30
+ * permission, please contact apache@apache.org.
31
+ *
32
+ * 5. Products derived from this software may not be called "Apache",
33
+ * nor may "Apache" appear in their name, without prior written
34
+ * permission of the Apache Software Foundation.
35
+ *
36
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47
+ * SUCH DAMAGE.
48
+ * ====================================================================
49
+ *
50
+ * This software consists of voluntary contributions made by many
51
+ * individuals on behalf of the Apache Software Foundation and was
52
+ * originally based on software copyright (c) 1999, International
53
+ * Business Machines, Inc., http://www.ibm.com. For more
54
+ * information on the Apache Software Foundation, please see
55
+ * <http://www.apache.org/>.
56
+ */
Binary file
Binary file
@@ -0,0 +1,59 @@
1
+ require File.join(File.dirname(__FILE__), 'core_ext')
2
+ require File.join(File.dirname(__FILE__), 'constants')
3
+
4
+ module Compass
5
+ # Validates generated CSS against the W3 using Java
6
+ class Validator
7
+ VALIDATOR_FILE = File.join(File.dirname(__FILE__), 'validate', 'css-validator.jar')
8
+ attr_reader :error_count
9
+
10
+ def initialize
11
+ @error_count = 0
12
+ end
13
+
14
+ # Validates all three CSS files
15
+ def validate
16
+ java_path = `which java`.rstrip
17
+ raise "You do not have a Java installed, but it is required." if java_path.blank?
18
+
19
+ output_header
20
+
21
+ Dir.new(Compass::Constants::BLUEPRINT_ROOT_PATH).each do |file_name|
22
+ puts "#{file_name}"
23
+ if file_name =~ /\.css$/
24
+ css_file = File.join(Compass::Constants::BLUEPRINT_ROOT_PATH, file_name)
25
+ @error_count += 1 if !validate_css_file(java_path, css_file)
26
+ end
27
+ end
28
+
29
+ output_footer
30
+ end
31
+
32
+ private
33
+ def validate_css_file(java_path, css_file)
34
+ puts "\n\n Testing #{css_file}"
35
+ puts " Output ============================================================\n\n"
36
+ system("#{java_path} -jar '#{VALIDATOR_FILE}' -e '#{css_file}'")
37
+ end
38
+
39
+ def output_header
40
+ puts "\n\n"
41
+ puts " ************************************************************"
42
+ puts " **"
43
+ puts " ** Compass CSS Validator"
44
+ puts " ** Validates output CSS files"
45
+ puts " **"
46
+ puts " ************************************************************"
47
+ end
48
+
49
+ def output_footer
50
+ puts "\n\n"
51
+ puts " ************************************************************"
52
+ puts " **"
53
+ puts " ** Done!"
54
+ puts " ** Your CSS files are#{" not" if error_count > 0} valid.#{" You had #{error_count} error(s) within your files" if error_count > 0}"
55
+ puts " **"
56
+ puts " ************************************************************"
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,66 @@
1
+ module Compass
2
+ module Version
3
+ # Returns a hash representing the version.
4
+ # The :major, :minor, and :teeny keys have their respective numbers.
5
+ # The :string key contains a human-readable string representation of the version.
6
+ # If checked out from Git,
7
+ # the :rev key will have the revision hash.
8
+ #
9
+ # This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum
10
+ attr_writer :version
11
+ def version
12
+ return @version if defined?(@version)
13
+
14
+ read_version_file
15
+ parse_version
16
+
17
+ if r = revision
18
+ @version[:rev] = r
19
+ @version[:string] << " [#{r[0...7]}]"
20
+ end
21
+
22
+ @version
23
+ end
24
+
25
+ protected
26
+
27
+ def scope(file) # :nodoc:
28
+ File.join(File.dirname(__FILE__), '..', '..', file)
29
+ end
30
+
31
+ def read_version_file
32
+ @version = {
33
+ :string => File.read(scope('VERSION')).strip
34
+ }
35
+ end
36
+
37
+ def parse_version
38
+ dotted_string, @version[:label] = @version[:string].split(/-/, 2)
39
+ numbers = dotted_string.split('.').map { |n| n.to_i }
40
+ [:major, :minor, :teeny].zip(numbers).each do |attr, value|
41
+ @version[attr] = value
42
+ end
43
+ end
44
+
45
+ def revision
46
+ revision_from_git || revision_from_file
47
+ end
48
+
49
+ def revision_from_file
50
+ if File.exists?(scope('REVISION'))
51
+ rev = File.read(scope('REVISION')).strip
52
+ rev = nil if rev !~ /[a-f0-9]+/
53
+ end
54
+ end
55
+
56
+ def revision_from_git
57
+ if File.exists?(scope('.git/HEAD'))
58
+ rev = File.read(scope('.git/HEAD')).strip
59
+ if rev =~ /^ref: (.*)$/
60
+ rev = File.read(scope(".git/#{$1}")).strip
61
+ end
62
+ end
63
+ end
64
+
65
+ end
66
+ end