classiccms 0.3.0 → 0.3.1

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 (369) hide show
  1. data/lib/classiccms/application.rb +2 -3
  2. data/lib/classiccms/cli.rb +6 -0
  3. data/lib/classiccms/scaffold/Gemfile +4 -0
  4. data/lib/classiccms/{mongoid.yml → scaffold/config/mongoid.yml} +3 -4
  5. data/lib/classiccms/scaffold/spec/models/article_spec.rb +8 -0
  6. data/lib/classiccms/scaffold/spec/spec_helper.rb +24 -0
  7. data/lib/classiccms/version.rb +1 -1
  8. data/spec/cli_spec.rb +8 -0
  9. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/build/v8/libv8.a +0 -0
  10. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/build/v8/libv8preparser.a +0 -0
  11. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-debug.h +395 -0
  12. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-preparser.h +117 -0
  13. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-profiler.h +505 -0
  14. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-testing.h +104 -0
  15. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8.h +4124 -0
  16. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8stdint.h +53 -0
  17. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/version.rb +6 -0
  18. data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8.rb +15 -0
  19. data/vendor/bundle/gems/sass-3.1.19/.yardopts +11 -0
  20. data/vendor/bundle/gems/sass-3.1.19/CONTRIBUTING +3 -0
  21. data/vendor/bundle/gems/sass-3.1.19/MIT-LICENSE +20 -0
  22. data/vendor/bundle/gems/sass-3.1.19/README.md +200 -0
  23. data/vendor/bundle/gems/sass-3.1.19/REVISION +1 -0
  24. data/vendor/bundle/gems/sass-3.1.19/Rakefile +339 -0
  25. data/vendor/bundle/gems/sass-3.1.19/VERSION +1 -0
  26. data/vendor/bundle/gems/sass-3.1.19/VERSION_NAME +1 -0
  27. data/vendor/bundle/gems/sass-3.1.19/bin/sass +8 -0
  28. data/vendor/bundle/gems/sass-3.1.19/bin/sass-convert +7 -0
  29. data/vendor/bundle/gems/sass-3.1.19/bin/scss +8 -0
  30. data/vendor/bundle/gems/sass-3.1.19/extra/update_watch.rb +13 -0
  31. data/vendor/bundle/gems/sass-3.1.19/init.rb +18 -0
  32. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/base.rb +86 -0
  33. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/chain.rb +33 -0
  34. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/filesystem.rb +61 -0
  35. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/memory.rb +47 -0
  36. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/null.rb +25 -0
  37. data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores.rb +15 -0
  38. data/vendor/bundle/gems/sass-3.1.19/lib/sass/callbacks.rb +66 -0
  39. data/vendor/bundle/gems/sass-3.1.19/lib/sass/css.rb +390 -0
  40. data/vendor/bundle/gems/sass-3.1.19/lib/sass/engine.rb +880 -0
  41. data/vendor/bundle/gems/sass-3.1.19/lib/sass/environment.rb +180 -0
  42. data/vendor/bundle/gems/sass-3.1.19/lib/sass/error.rb +201 -0
  43. data/vendor/bundle/gems/sass-3.1.19/lib/sass/exec.rb +682 -0
  44. data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers/base.rb +139 -0
  45. data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers/filesystem.rb +149 -0
  46. data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers.rb +22 -0
  47. data/vendor/bundle/gems/sass-3.1.19/lib/sass/less.rb +382 -0
  48. data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger/base.rb +32 -0
  49. data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger/log_level.rb +49 -0
  50. data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger.rb +15 -0
  51. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/compiler.rb +384 -0
  52. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/configuration.rb +123 -0
  53. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/generic.rb +15 -0
  54. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/merb.rb +48 -0
  55. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/rack.rb +60 -0
  56. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/rails.rb +47 -0
  57. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/staleness_checker.rb +183 -0
  58. data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin.rb +132 -0
  59. data/vendor/bundle/gems/sass-3.1.19/lib/sass/railtie.rb +9 -0
  60. data/vendor/bundle/gems/sass-3.1.19/lib/sass/repl.rb +57 -0
  61. data/vendor/bundle/gems/sass-3.1.19/lib/sass/root.rb +7 -0
  62. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/bool.rb +18 -0
  63. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/color.rb +475 -0
  64. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/css_lexer.rb +29 -0
  65. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/css_parser.rb +31 -0
  66. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/funcall.rb +175 -0
  67. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/functions.rb +1381 -0
  68. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/interpolation.rb +79 -0
  69. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/lexer.rb +337 -0
  70. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/list.rb +84 -0
  71. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/literal.rb +230 -0
  72. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/node.rb +99 -0
  73. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/number.rb +452 -0
  74. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/operation.rb +107 -0
  75. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/parser.rb +474 -0
  76. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/string.rb +51 -0
  77. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/string_interpolation.rb +103 -0
  78. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/unary_operation.rb +64 -0
  79. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/variable.rb +58 -0
  80. data/vendor/bundle/gems/sass-3.1.19/lib/sass/script.rb +39 -0
  81. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/css_parser.rb +46 -0
  82. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/parser.rb +1055 -0
  83. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/rx.rb +137 -0
  84. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/sass_parser.rb +11 -0
  85. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/script_lexer.rb +15 -0
  86. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/script_parser.rb +25 -0
  87. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/static_parser.rb +40 -0
  88. data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss.rb +17 -0
  89. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/abstract_sequence.rb +71 -0
  90. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/comma_sequence.rb +86 -0
  91. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/sequence.rb +296 -0
  92. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/simple.rb +119 -0
  93. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/simple_sequence.rb +154 -0
  94. data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector.rb +373 -0
  95. data/vendor/bundle/gems/sass-3.1.19/lib/sass/shared.rb +76 -0
  96. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/charset_node.rb +22 -0
  97. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/comment_node.rb +90 -0
  98. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/debug_node.rb +18 -0
  99. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/directive_node.rb +28 -0
  100. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/each_node.rb +24 -0
  101. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/extend_node.rb +29 -0
  102. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/for_node.rb +36 -0
  103. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/function_node.rb +27 -0
  104. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/if_node.rb +52 -0
  105. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/import_node.rb +68 -0
  106. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/media_node.rb +32 -0
  107. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/mixin_def_node.rb +27 -0
  108. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/mixin_node.rb +32 -0
  109. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/node.rb +188 -0
  110. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/prop_node.rb +148 -0
  111. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/return_node.rb +18 -0
  112. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/root_node.rb +28 -0
  113. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/rule_node.rb +127 -0
  114. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/variable_node.rb +30 -0
  115. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb +75 -0
  116. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/check_nesting.rb +127 -0
  117. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/convert.rb +262 -0
  118. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/cssize.rb +206 -0
  119. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/deep_copy.rb +87 -0
  120. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/extend.rb +42 -0
  121. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb +357 -0
  122. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/set_options.rb +97 -0
  123. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/to_css.rb +219 -0
  124. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/warn_node.rb +18 -0
  125. data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/while_node.rb +18 -0
  126. data/vendor/bundle/gems/sass-3.1.19/lib/sass/util/multibyte_string_scanner.rb +134 -0
  127. data/vendor/bundle/gems/sass-3.1.19/lib/sass/util/subset_map.rb +101 -0
  128. data/vendor/bundle/gems/sass-3.1.19/lib/sass/util.rb +800 -0
  129. data/vendor/bundle/gems/sass-3.1.19/lib/sass/version.rb +112 -0
  130. data/vendor/bundle/gems/sass-3.1.19/lib/sass.rb +73 -0
  131. data/vendor/bundle/gems/sass-3.1.19/rails/init.rb +1 -0
  132. data/vendor/bundle/gems/sass-3.1.19/test/Gemfile +4 -0
  133. data/vendor/bundle/gems/sass-3.1.19/test/sass/cache_test.rb +89 -0
  134. data/vendor/bundle/gems/sass-3.1.19/test/sass/callbacks_test.rb +61 -0
  135. data/vendor/bundle/gems/sass-3.1.19/test/sass/conversion_test.rb +1245 -0
  136. data/vendor/bundle/gems/sass-3.1.19/test/sass/css2sass_test.rb +397 -0
  137. data/vendor/bundle/gems/sass-3.1.19/test/sass/data/hsl-rgb.txt +319 -0
  138. data/vendor/bundle/gems/sass-3.1.19/test/sass/engine_test.rb +2730 -0
  139. data/vendor/bundle/gems/sass-3.1.19/test/sass/extend_test.rb +1663 -0
  140. data/vendor/bundle/gems/sass-3.1.19/test/sass/fixtures/test_staleness_check_across_importers.css +1 -0
  141. data/vendor/bundle/gems/sass-3.1.19/test/sass/fixtures/test_staleness_check_across_importers.scss +1 -0
  142. data/vendor/bundle/gems/sass-3.1.19/test/sass/functions_test.rb +1047 -0
  143. data/vendor/bundle/gems/sass-3.1.19/test/sass/importer_test.rb +192 -0
  144. data/vendor/bundle/gems/sass-3.1.19/test/sass/less_conversion_test.rb +653 -0
  145. data/vendor/bundle/gems/sass-3.1.19/test/sass/logger_test.rb +58 -0
  146. data/vendor/bundle/gems/sass-3.1.19/test/sass/mock_importer.rb +49 -0
  147. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more1.css +9 -0
  148. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more1_with_line_comments.css +26 -0
  149. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more_import.css +29 -0
  150. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/_more_partial.sass +2 -0
  151. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/more1.sass +23 -0
  152. data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/more_import.sass +11 -0
  153. data/vendor/bundle/gems/sass-3.1.19/test/sass/plugin_test.rb +496 -0
  154. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/alt.css +4 -0
  155. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/basic.css +9 -0
  156. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/compact.css +5 -0
  157. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/complex.css +86 -0
  158. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/compressed.css +1 -0
  159. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/expanded.css +19 -0
  160. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/if.css +3 -0
  161. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import.css +31 -0
  162. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset.css +5 -0
  163. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset_1_8.css +5 -0
  164. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset_ibm866.css +5 -0
  165. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/line_numbers.css +49 -0
  166. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/mixins.css +95 -0
  167. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/multiline.css +24 -0
  168. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/nested.css +22 -0
  169. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/options.css +1 -0
  170. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/parent_ref.css +13 -0
  171. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/script.css +16 -0
  172. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/scss_import.css +31 -0
  173. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/scss_importee.css +2 -0
  174. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  175. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/subdir/subdir.css +3 -0
  176. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/units.css +11 -0
  177. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/warn.css +0 -0
  178. data/vendor/bundle/gems/sass-3.1.19/test/sass/results/warn_imported.css +0 -0
  179. data/vendor/bundle/gems/sass-3.1.19/test/sass/script_conversion_test.rb +285 -0
  180. data/vendor/bundle/gems/sass-3.1.19/test/sass/script_test.rb +519 -0
  181. data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/css_test.rb +975 -0
  182. data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/rx_test.rb +156 -0
  183. data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/scss_test.rb +1308 -0
  184. data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/test_helper.rb +37 -0
  185. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_double_import_loop2.sass +1 -0
  186. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_imported_charset_ibm866.sass +4 -0
  187. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_imported_charset_utf8.sass +4 -0
  188. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_partial.sass +2 -0
  189. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/alt.sass +16 -0
  190. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/basic.sass +23 -0
  191. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork1.sass +2 -0
  192. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork2.sass +2 -0
  193. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork3.sass +2 -0
  194. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork4.sass +2 -0
  195. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork5.sass +3 -0
  196. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/compact.sass +17 -0
  197. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/complex.sass +305 -0
  198. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/compressed.sass +15 -0
  199. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/double_import_loop1.sass +1 -0
  200. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/expanded.sass +17 -0
  201. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/if.sass +11 -0
  202. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import.sass +12 -0
  203. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset.sass +9 -0
  204. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset_1_8.sass +6 -0
  205. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset_ibm866.sass +11 -0
  206. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/importee.less +2 -0
  207. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/importee.sass +19 -0
  208. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/line_numbers.sass +13 -0
  209. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/mixin_bork.sass +5 -0
  210. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/mixins.sass +76 -0
  211. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/multiline.sass +20 -0
  212. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested.sass +25 -0
  213. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork1.sass +2 -0
  214. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork2.sass +2 -0
  215. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork3.sass +2 -0
  216. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork4.sass +2 -0
  217. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork5.sass +2 -0
  218. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_import.sass +2 -0
  219. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_mixin_bork.sass +6 -0
  220. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/options.sass +2 -0
  221. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/parent_ref.sass +25 -0
  222. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/script.sass +101 -0
  223. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/scss_import.scss +11 -0
  224. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/scss_importee.scss +1 -0
  225. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/single_import_loop.sass +1 -0
  226. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  227. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  228. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/subdir.sass +6 -0
  229. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/units.sass +11 -0
  230. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/warn.sass +3 -0
  231. data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/warn_imported.sass +4 -0
  232. data/vendor/bundle/gems/sass-3.1.19/test/sass/test_helper.rb +8 -0
  233. data/vendor/bundle/gems/sass-3.1.19/test/sass/util/multibyte_string_scanner_test.rb +147 -0
  234. data/vendor/bundle/gems/sass-3.1.19/test/sass/util/subset_map_test.rb +91 -0
  235. data/vendor/bundle/gems/sass-3.1.19/test/sass/util_test.rb +282 -0
  236. data/vendor/bundle/gems/sass-3.1.19/test/test_helper.rb +70 -0
  237. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/CHANGELOG.md +90 -0
  238. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Gemfile +35 -0
  239. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Guardfile +8 -0
  240. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/LICENSE +20 -0
  241. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/README.md +312 -0
  242. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Rakefile +47 -0
  243. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Vagrantfile +96 -0
  244. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapter.rb +167 -0
  245. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/darwin.rb +84 -0
  246. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/linux.rb +110 -0
  247. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/polling.rb +66 -0
  248. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/windows.rb +81 -0
  249. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/directory_record.rb +317 -0
  250. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/listener.rb +203 -0
  251. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/multi_listener.rb +121 -0
  252. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/turnstile.rb +28 -0
  253. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/version.rb +3 -0
  254. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen.rb +38 -0
  255. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/listen.gemspec +26 -0
  256. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapter_spec.rb +142 -0
  257. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/darwin_spec.rb +31 -0
  258. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/linux_spec.rb +41 -0
  259. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/polling_spec.rb +68 -0
  260. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/windows_spec.rb +24 -0
  261. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/directory_record_spec.rb +1034 -0
  262. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/listener_spec.rb +155 -0
  263. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/multi_listener_spec.rb +156 -0
  264. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/turnstile_spec.rb +56 -0
  265. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen_spec.rb +73 -0
  266. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/spec_helper.rb +16 -0
  267. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/adapter_helper.rb +716 -0
  268. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/directory_record_helper.rb +55 -0
  269. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/fixtures_helper.rb +29 -0
  270. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/listeners_helper.rb +144 -0
  271. data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/platform_helper.rb +11 -0
  272. data/vendor/bundle/gems/therubyracer-0.10.1/.gitignore +13 -0
  273. data/vendor/bundle/gems/therubyracer-0.10.1/.gitmodules +3 -0
  274. data/vendor/bundle/gems/therubyracer-0.10.1/.travis.yml +9 -0
  275. data/vendor/bundle/gems/therubyracer-0.10.1/.yardopts +1 -0
  276. data/vendor/bundle/gems/therubyracer-0.10.1/Changelog.md +196 -0
  277. data/vendor/bundle/gems/therubyracer-0.10.1/Gemfile +1 -0
  278. data/vendor/bundle/gems/therubyracer-0.10.1/README.md +167 -0
  279. data/vendor/bundle/gems/therubyracer-0.10.1/Rakefile +23 -0
  280. data/vendor/bundle/gems/therubyracer-0.10.1/bin/therubyracer +11 -0
  281. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/Makefile +213 -0
  282. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/extconf.rb +26 -0
  283. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/gem_make.out +156 -0
  284. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/rr.cpp +189 -0
  285. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/rr.h +41 -0
  286. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8.cpp +48 -0
  287. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_array.cpp +48 -0
  288. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_array.h +8 -0
  289. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_callbacks.cpp +81 -0
  290. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_callbacks.h +8 -0
  291. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_context.cpp +92 -0
  292. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_context.h +6 -0
  293. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_date.cpp +34 -0
  294. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_date.h +6 -0
  295. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_debug.cpp +17 -0
  296. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_debug.h +6 -0
  297. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_exception.cpp +133 -0
  298. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_exception.h +11 -0
  299. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_external.cpp +70 -0
  300. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_external.h +8 -0
  301. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_function.cpp +69 -0
  302. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_function.h +11 -0
  303. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_handle.cpp +186 -0
  304. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_handle.h +48 -0
  305. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_locker.cpp +139 -0
  306. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_locker.h +6 -0
  307. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_message.cpp +67 -0
  308. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_message.h +10 -0
  309. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_object.cpp +122 -0
  310. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_object.h +10 -0
  311. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_script.cpp +36 -0
  312. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_script.h +8 -0
  313. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_string.cpp +52 -0
  314. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_string.h +9 -0
  315. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_template.cpp +344 -0
  316. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_template.h +8 -0
  317. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_try_catch.cpp +70 -0
  318. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_try_catch.h +5 -0
  319. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_v8.cpp +35 -0
  320. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_v8.h +6 -0
  321. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_value.cpp +175 -0
  322. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_value.h +10 -0
  323. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_weakref.cpp +61 -0
  324. data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_weakref.h +29 -0
  325. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/access.rb +87 -0
  326. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/array.rb +17 -0
  327. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/c/locker.rb +18 -0
  328. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/cli.rb +133 -0
  329. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/context.rb +111 -0
  330. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/error.rb +130 -0
  331. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/function.rb +44 -0
  332. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/object.rb +69 -0
  333. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/caller.rb +37 -0
  334. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/constructor.rb +98 -0
  335. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/function.rb +63 -0
  336. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/interceptors.rb +152 -0
  337. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/proxies.rb +151 -0
  338. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/templates.rb +73 -0
  339. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal.rb +86 -0
  340. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/stack.rb +66 -0
  341. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/tap.rb +9 -0
  342. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/version.rb +3 -0
  343. data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8.rb +23 -0
  344. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/array_spec.rb +15 -0
  345. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/cxt_spec.rb +57 -0
  346. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb +27 -0
  347. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/func_spec.rb +64 -0
  348. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/object_spec.rb +10 -0
  349. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/string_spec.rb +11 -0
  350. data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/try_catch_spec.rb +60 -0
  351. data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/.gitignore +1 -0
  352. data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/README.txt +8 -0
  353. data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/jsapi_spec.rb +922 -0
  354. data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/loadme.js +1 -0
  355. data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs_helper.rb +3 -0
  356. data/vendor/bundle/gems/therubyracer-0.10.1/spec/spec_helper.rb +9 -0
  357. data/vendor/bundle/gems/therubyracer-0.10.1/spec/v8/error_spec.rb +131 -0
  358. data/vendor/bundle/gems/therubyracer-0.10.1/spec/v8/portal/proxies_spec.rb +106 -0
  359. data/vendor/bundle/gems/therubyracer-0.10.1/specmem/handle_memspec.rb +41 -0
  360. data/vendor/bundle/gems/therubyracer-0.10.1/specmem/object_memspec.rb +14 -0
  361. data/vendor/bundle/gems/therubyracer-0.10.1/specmem/proxies_memspec.rb +49 -0
  362. data/vendor/bundle/gems/therubyracer-0.10.1/specmem/spec_helper.rb +24 -0
  363. data/vendor/bundle/gems/therubyracer-0.10.1/specthread/spec_helper.rb +2 -0
  364. data/vendor/bundle/gems/therubyracer-0.10.1/specthread/threading_spec.rb +13 -0
  365. data/vendor/bundle/gems/therubyracer-0.10.1/thefrontside.png +0 -0
  366. data/vendor/bundle/gems/therubyracer-0.10.1/therubyracer.gemspec +29 -0
  367. data/vendor/bundle/specifications/libv8-3.3.10.4-x86_64-darwin-11.gemspec +33 -0
  368. data/vendor/bundle/specifications/sass-3.1.19.gemspec +35 -0
  369. metadata +365 -3
@@ -0,0 +1,49 @@
1
+ class MockImporter < Sass::Importers::Base
2
+ def initialize(name = "mock")
3
+ @name = name
4
+ @imports = Hash.new({})
5
+ end
6
+
7
+ def find_relative(uri, base, options)
8
+ nil
9
+ end
10
+
11
+ def find(uri, options)
12
+ contents = @imports[uri][:contents]
13
+ return unless contents
14
+ options[:syntax] = @imports[uri][:syntax]
15
+ options[:filename] = uri
16
+ options[:importer] = self
17
+ @imports[uri][:engine] = Sass::Engine.new(contents, options)
18
+ end
19
+
20
+ def mtime(uri, options)
21
+ @imports[uri][:mtime]
22
+ end
23
+
24
+ def key(uri, options)
25
+ ["mock", uri]
26
+ end
27
+
28
+ def to_s
29
+ @name
30
+ end
31
+
32
+ # Methods for testing
33
+
34
+ def add_import(uri, contents, syntax = :scss, mtime = Time.now - 10)
35
+ @imports[uri] = {
36
+ :contents => contents,
37
+ :mtime => mtime,
38
+ :syntax => syntax
39
+ }
40
+ end
41
+
42
+ def touch(uri)
43
+ @imports[uri][:mtime] = Time.now
44
+ end
45
+
46
+ def engine(uri)
47
+ @imports[uri][:engine]
48
+ end
49
+ end
@@ -0,0 +1,9 @@
1
+ body { font: Arial; background: blue; }
2
+
3
+ #page { width: 700px; height: 100; }
4
+ #page #header { height: 300px; }
5
+ #page #header h1 { font-size: 50px; color: blue; }
6
+
7
+ #content.user.show #container.top #column.left { width: 100px; }
8
+ #content.user.show #container.top #column.right { width: 600px; }
9
+ #content.user.show #container.bottom { background: brown; }
@@ -0,0 +1,26 @@
1
+ /* line 3, ../more_templates/more1.sass */
2
+ body {
3
+ font: Arial;
4
+ background: blue; }
5
+
6
+ /* line 7, ../more_templates/more1.sass */
7
+ #page {
8
+ width: 700px;
9
+ height: 100; }
10
+ /* line 10, ../more_templates/more1.sass */
11
+ #page #header {
12
+ height: 300px; }
13
+ /* line 12, ../more_templates/more1.sass */
14
+ #page #header h1 {
15
+ font-size: 50px;
16
+ color: blue; }
17
+
18
+ /* line 18, ../more_templates/more1.sass */
19
+ #content.user.show #container.top #column.left {
20
+ width: 100px; }
21
+ /* line 20, ../more_templates/more1.sass */
22
+ #content.user.show #container.top #column.right {
23
+ width: 600px; }
24
+ /* line 22, ../more_templates/more1.sass */
25
+ #content.user.show #container.bottom {
26
+ background: brown; }
@@ -0,0 +1,29 @@
1
+ @import url(basic.css);
2
+ @import url(../results/complex.css);
3
+ imported { otherconst: hello; myconst: goodbye; pre-mixin: here; }
4
+
5
+ body { font: Arial; background: blue; }
6
+
7
+ #page { width: 700px; height: 100; }
8
+ #page #header { height: 300px; }
9
+ #page #header h1 { font-size: 50px; color: blue; }
10
+
11
+ #content.user.show #container.top #column.left { width: 100px; }
12
+ #content.user.show #container.top #column.right { width: 600px; }
13
+ #content.user.show #container.bottom { background: brown; }
14
+
15
+ midrule { inthe: middle; }
16
+
17
+ body { font: Arial; background: blue; }
18
+
19
+ #page { width: 700px; height: 100; }
20
+ #page #header { height: 300px; }
21
+ #page #header h1 { font-size: 50px; color: blue; }
22
+
23
+ #content.user.show #container.top #column.left { width: 100px; }
24
+ #content.user.show #container.top #column.right { width: 600px; }
25
+ #content.user.show #container.bottom { background: brown; }
26
+
27
+ #foo { background-color: #bbaaff; }
28
+
29
+ nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
@@ -0,0 +1,2 @@
1
+ #foo
2
+ :background-color #baf
@@ -0,0 +1,23 @@
1
+
2
+
3
+ body
4
+ :font Arial
5
+ :background blue
6
+
7
+ #page
8
+ :width 700px
9
+ :height 100
10
+ #header
11
+ :height 300px
12
+ h1
13
+ :font-size 50px
14
+ :color blue
15
+
16
+ #content.user.show
17
+ #container.top
18
+ #column.left
19
+ :width 100px
20
+ #column.right
21
+ :width 600px
22
+ #container.bottom
23
+ :background brown
@@ -0,0 +1,11 @@
1
+ $preconst: hello
2
+
3
+ =premixin
4
+ pre-mixin: here
5
+
6
+ @import importee, basic, basic.css, ../results/complex.css, more_partial
7
+
8
+ nonimported
9
+ :myconst $preconst
10
+ :otherconst $postconst
11
+ +postmixin
@@ -0,0 +1,496 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../test_helper'
3
+ require File.dirname(__FILE__) + '/test_helper'
4
+ require 'sass/plugin'
5
+ require 'fileutils'
6
+
7
+ class SassPluginTest < Test::Unit::TestCase
8
+ @@templates = %w{
9
+ complex script parent_ref import scss_import alt
10
+ subdir/subdir subdir/nested_subdir/nested_subdir
11
+ options
12
+ }
13
+ @@templates += %w[import_charset import_charset_ibm866] unless Sass::Util.ruby1_8?
14
+ @@templates << 'import_charset_1_8' if Sass::Util.ruby1_8?
15
+
16
+ @@cache_store = Sass::CacheStores::Memory.new
17
+
18
+ def setup
19
+ FileUtils.mkdir_p tempfile_loc
20
+ FileUtils.mkdir_p tempfile_loc(nil,"more_")
21
+ set_plugin_opts
22
+ check_for_updates!
23
+ reset_mtimes
24
+ end
25
+
26
+ def teardown
27
+ clean_up_sassc
28
+ Sass::Plugin.reset!
29
+ FileUtils.rm_r tempfile_loc
30
+ FileUtils.rm_r tempfile_loc(nil,"more_")
31
+ end
32
+
33
+ @@templates.each do |name|
34
+ define_method("test_template_renders_correctly (#{name})") do
35
+ assert_renders_correctly(name)
36
+ end
37
+ end
38
+
39
+ def test_no_update
40
+ File.delete(tempfile_loc('basic'))
41
+ assert_needs_update 'basic'
42
+ check_for_updates!
43
+ assert_stylesheet_updated 'basic'
44
+ end
45
+
46
+ def test_update_needed_when_modified
47
+ touch 'basic'
48
+ assert_needs_update 'basic'
49
+ check_for_updates!
50
+ assert_stylesheet_updated 'basic'
51
+ end
52
+
53
+ def test_update_needed_when_dependency_modified
54
+ touch 'basic'
55
+ assert_needs_update 'import'
56
+ check_for_updates!
57
+ assert_stylesheet_updated 'basic'
58
+ assert_stylesheet_updated 'import'
59
+ end
60
+
61
+ def test_update_needed_when_scss_dependency_modified
62
+ touch 'scss_importee'
63
+ assert_needs_update 'import'
64
+ check_for_updates!
65
+ assert_stylesheet_updated 'scss_importee'
66
+ assert_stylesheet_updated 'import'
67
+ end
68
+
69
+ def test_scss_update_needed_when_dependency_modified
70
+ touch 'basic'
71
+ assert_needs_update 'scss_import'
72
+ check_for_updates!
73
+ assert_stylesheet_updated 'basic'
74
+ assert_stylesheet_updated 'scss_import'
75
+ end
76
+
77
+ def test_update_needed_when_nested_import_dependency_modified
78
+ touch 'basic'
79
+ assert_needs_update 'nested_import'
80
+ check_for_updates!
81
+ assert_stylesheet_updated 'basic'
82
+ assert_stylesheet_updated 'scss_import'
83
+ end
84
+
85
+ def test_no_updates_when_always_check_and_always_update_both_false
86
+ Sass::Plugin.options[:always_update] = false
87
+ Sass::Plugin.options[:always_check] = false
88
+
89
+ touch 'basic'
90
+ assert_needs_update 'basic'
91
+ check_for_updates!
92
+
93
+ # Check it's still stale
94
+ assert_needs_update 'basic'
95
+ end
96
+
97
+ def test_full_exception_handling
98
+ File.delete(tempfile_loc('bork1'))
99
+ check_for_updates!
100
+ File.open(tempfile_loc('bork1')) do |file|
101
+ assert_equal(<<CSS.strip, file.read.split("\n")[0...6].join("\n"))
102
+ /*
103
+ Syntax error: Undefined variable: "$bork".
104
+ on line 2 of #{template_loc('bork1')}
105
+
106
+ 1: bork
107
+ 2: :bork $bork
108
+ CSS
109
+ end
110
+ File.delete(tempfile_loc('bork1'))
111
+ end
112
+
113
+ def test_single_level_import_loop
114
+ File.delete(tempfile_loc('single_import_loop'))
115
+ check_for_updates!
116
+ File.open(tempfile_loc('single_import_loop')) do |file|
117
+ assert_equal(<<CSS.strip, file.read.split("\n")[0...2].join("\n"))
118
+ /*
119
+ Sass::SyntaxError: An @import loop has been found: #{template_loc('single_import_loop')} imports itself
120
+ CSS
121
+ end
122
+ end
123
+
124
+ def test_double_level_import_loop
125
+ File.delete(tempfile_loc('double_import_loop1'))
126
+ check_for_updates!
127
+ File.open(tempfile_loc('double_import_loop1')) do |file|
128
+ assert_equal(<<CSS.strip, file.read.split("\n")[0...4].join("\n"))
129
+ /*
130
+ Sass::SyntaxError: An @import loop has been found:
131
+ #{template_loc('double_import_loop1')} imports #{template_loc('_double_import_loop2')}
132
+ #{template_loc('_double_import_loop2')} imports #{template_loc('double_import_loop1')}
133
+ CSS
134
+ end
135
+ end
136
+
137
+ def test_nonfull_exception_handling
138
+ old_full_exception = Sass::Plugin.options[:full_exception]
139
+ Sass::Plugin.options[:full_exception] = false
140
+
141
+ File.delete(tempfile_loc('bork1'))
142
+ assert_raise(Sass::SyntaxError) {check_for_updates!}
143
+ ensure
144
+ Sass::Plugin.options[:full_exception] = old_full_exception
145
+ end
146
+
147
+ def test_two_template_directories
148
+ set_plugin_opts :template_location => {
149
+ template_loc => tempfile_loc,
150
+ template_loc(nil,'more_') => tempfile_loc(nil,'more_')
151
+ }
152
+ check_for_updates!
153
+ ['more1', 'more_import'].each { |name| assert_renders_correctly(name, :prefix => 'more_') }
154
+ end
155
+
156
+ def test_two_template_directories_with_line_annotations
157
+ set_plugin_opts :line_comments => true,
158
+ :style => :nested,
159
+ :template_location => {
160
+ template_loc => tempfile_loc,
161
+ template_loc(nil,'more_') => tempfile_loc(nil,'more_')
162
+ }
163
+ check_for_updates!
164
+ assert_renders_correctly('more1_with_line_comments', 'more1', :prefix => 'more_')
165
+ end
166
+
167
+ def test_doesnt_render_partials
168
+ assert !File.exists?(tempfile_loc('_partial'))
169
+ end
170
+
171
+ def test_template_location_array
172
+ assert_equal [[template_loc, tempfile_loc]], Sass::Plugin.template_location_array
173
+ end
174
+
175
+ def test_add_template_location
176
+ Sass::Plugin.add_template_location(template_loc(nil, "more_"), tempfile_loc(nil, "more_"))
177
+ assert_equal(
178
+ [[template_loc, tempfile_loc], [template_loc(nil, "more_"), tempfile_loc(nil, "more_")]],
179
+ Sass::Plugin.template_location_array)
180
+
181
+ touch 'more1', 'more_'
182
+ touch 'basic'
183
+ assert_needs_update "more1", "more_"
184
+ assert_needs_update "basic"
185
+ check_for_updates!
186
+ assert_doesnt_need_update "more1", "more_"
187
+ assert_doesnt_need_update "basic"
188
+ end
189
+
190
+ def test_remove_template_location
191
+ Sass::Plugin.add_template_location(template_loc(nil, "more_"), tempfile_loc(nil, "more_"))
192
+ Sass::Plugin.remove_template_location(template_loc, tempfile_loc)
193
+ assert_equal(
194
+ [[template_loc(nil, "more_"), tempfile_loc(nil, "more_")]],
195
+ Sass::Plugin.template_location_array)
196
+
197
+ touch 'more1', 'more_'
198
+ touch 'basic'
199
+ assert_needs_update "more1", "more_"
200
+ assert_needs_update "basic"
201
+ check_for_updates!
202
+ assert_doesnt_need_update "more1", "more_"
203
+ assert_needs_update "basic"
204
+ end
205
+
206
+ # Callbacks
207
+
208
+ def test_updating_stylesheets_callback
209
+ # Should run even when there's nothing to update
210
+ Sass::Plugin.options[:template_location] = nil
211
+ assert_callback :updating_stylesheets, []
212
+ end
213
+
214
+ def test_updating_stylesheets_callback_with_individual_files
215
+ files = [[template_loc("basic"), tempfile_loc("basic")]]
216
+ assert_callback(:updating_stylesheets, files) {Sass::Util.silence_sass_warnings{Sass::Plugin.update_stylesheets(files)}}
217
+ end
218
+
219
+ def test_updating_stylesheets_callback_with_never_update
220
+ Sass::Plugin.options[:never_update] = true
221
+ assert_no_callback :updating_stylesheets
222
+ end
223
+
224
+ def test_updated_stylesheet_callback_for_updated_template
225
+ Sass::Plugin.options[:always_update] = false
226
+ touch 'basic'
227
+ assert_no_callback :updated_stylesheet, template_loc("complex"), tempfile_loc("complex") do
228
+ assert_callbacks(
229
+ [:updated_stylesheet, template_loc("basic"), tempfile_loc("basic")],
230
+ [:updated_stylesheet, template_loc("import"), tempfile_loc("import")])
231
+ end
232
+ end
233
+
234
+ def test_updated_stylesheet_callback_for_fresh_template
235
+ Sass::Plugin.options[:always_update] = false
236
+ assert_no_callback :updated_stylesheet
237
+ end
238
+
239
+ def test_updated_stylesheet_callback_for_error_template
240
+ Sass::Plugin.options[:always_update] = false
241
+ touch 'bork1'
242
+ assert_no_callback :updated_stylesheet
243
+ end
244
+
245
+ def test_not_updating_stylesheet_callback_for_fresh_template
246
+ Sass::Plugin.options[:always_update] = false
247
+ assert_callback :not_updating_stylesheet, template_loc("basic"), tempfile_loc("basic")
248
+ end
249
+
250
+ def test_not_updating_stylesheet_callback_for_updated_template
251
+ Sass::Plugin.options[:always_update] = false
252
+ assert_callback :not_updating_stylesheet, template_loc("complex"), tempfile_loc("complex") do
253
+ assert_no_callbacks(
254
+ [:updated_stylesheet, template_loc("basic"), tempfile_loc("basic")],
255
+ [:updated_stylesheet, template_loc("import"), tempfile_loc("import")])
256
+ end
257
+ end
258
+
259
+ def test_not_updating_stylesheet_callback_with_never_update
260
+ Sass::Plugin.options[:never_update] = true
261
+ assert_no_callback :not_updating_stylesheet
262
+ end
263
+
264
+ def test_not_updating_stylesheet_callback_for_partial
265
+ Sass::Plugin.options[:always_update] = false
266
+ assert_no_callback :not_updating_stylesheet, template_loc("_partial"), tempfile_loc("_partial")
267
+ end
268
+
269
+ def test_not_updating_stylesheet_callback_for_error
270
+ Sass::Plugin.options[:always_update] = false
271
+ touch 'bork1'
272
+ assert_no_callback :not_updating_stylesheet, template_loc("bork1"), tempfile_loc("bork1")
273
+ end
274
+
275
+ def test_compilation_error_callback
276
+ Sass::Plugin.options[:always_update] = false
277
+ touch 'bork1'
278
+ assert_callback(:compilation_error,
279
+ lambda {|e| e.message == 'Undefined variable: "$bork".'},
280
+ template_loc("bork1"), tempfile_loc("bork1"))
281
+ end
282
+
283
+ def test_compilation_error_callback_for_file_access
284
+ Sass::Plugin.options[:always_update] = false
285
+ assert_callback(:compilation_error,
286
+ lambda {|e| e.is_a?(Errno::ENOENT)},
287
+ template_loc("nonexistent"), tempfile_loc("nonexistent")) do
288
+ Sass::Plugin.update_stylesheets([[template_loc("nonexistent"), tempfile_loc("nonexistent")]])
289
+ end
290
+ end
291
+
292
+ def test_creating_directory_callback
293
+ Sass::Plugin.options[:always_update] = false
294
+ dir = File.join(tempfile_loc, "subdir", "nested_subdir")
295
+ FileUtils.rm_r dir
296
+ assert_callback :creating_directory, dir
297
+ end
298
+
299
+ ## Regression
300
+
301
+ def test_cached_dependencies_update
302
+ FileUtils.mv(template_loc("basic"), template_loc("basic", "more_"))
303
+ set_plugin_opts :load_paths => [template_loc(nil, "more_")]
304
+
305
+ touch 'basic', 'more_'
306
+ assert_needs_update "import"
307
+ check_for_updates!
308
+ assert_renders_correctly("import")
309
+ ensure
310
+ FileUtils.mv(template_loc("basic", "more_"), template_loc("basic"))
311
+ end
312
+
313
+ def test_cached_relative_import
314
+ old_always_update = Sass::Plugin.options[:always_update]
315
+ Sass::Plugin.options[:always_update] = true
316
+ check_for_updates!
317
+ assert_renders_correctly('subdir/subdir')
318
+ ensure
319
+ Sass::Plugin.options[:always_update] = old_always_update
320
+ end
321
+
322
+ def test_cached_if
323
+ set_plugin_opts :cache_store => Sass::CacheStores::Filesystem.new(tempfile_loc + '/cache')
324
+ check_for_updates!
325
+ assert_renders_correctly 'if'
326
+ check_for_updates!
327
+ assert_renders_correctly 'if'
328
+ ensure
329
+ set_plugin_opts :cache_store => @@cache_store
330
+ end
331
+
332
+ private
333
+
334
+ def assert_renders_correctly(*arguments)
335
+ options = arguments.last.is_a?(Hash) ? arguments.pop : {}
336
+ prefix = options[:prefix]
337
+ result_name = arguments.shift
338
+ tempfile_name = arguments.shift || result_name
339
+
340
+ expected_str = File.read(result_loc(result_name, prefix))
341
+ actual_str = File.read(tempfile_loc(tempfile_name, prefix))
342
+ unless Sass::Util.ruby1_8?
343
+ expected_str = expected_str.force_encoding('IBM866') if result_name == 'import_charset_ibm866'
344
+ actual_str = actual_str.force_encoding('IBM866') if tempfile_name == 'import_charset_ibm866'
345
+ end
346
+ expected_lines = expected_str.split("\n")
347
+ actual_lines = actual_str.split("\n")
348
+
349
+ if actual_lines.first == "/*" && expected_lines.first != "/*"
350
+ assert(false, actual_lines[0..Sass::Util.enum_with_index(actual_lines).find {|l, i| l == "*/"}.last].join("\n"))
351
+ end
352
+
353
+ expected_lines.zip(actual_lines).each_with_index do |pair, line|
354
+ message = "template: #{result_name}\nline: #{line + 1}"
355
+ assert_equal(pair.first, pair.last, message)
356
+ end
357
+ if expected_lines.size < actual_lines.size
358
+ assert(false, "#{actual_lines.size - expected_lines.size} Trailing lines found in #{tempfile_name}.css: #{actual_lines[expected_lines.size..-1].join('\n')}")
359
+ end
360
+ end
361
+
362
+ def assert_stylesheet_updated(name)
363
+ assert_doesnt_need_update name
364
+
365
+ # Make sure it isn't an exception
366
+ expected_lines = File.read(result_loc(name)).split("\n")
367
+ actual_lines = File.read(tempfile_loc(name)).split("\n")
368
+ if actual_lines.first == "/*" && expected_lines.first != "/*"
369
+ assert(false, actual_lines[0..actual_lines.enum_with_index.find {|l, i| l == "*/"}.last].join("\n"))
370
+ end
371
+ end
372
+
373
+ def assert_callback(name, *expected_args)
374
+ run = false
375
+ received_args = nil
376
+ Sass::Plugin.send("on_#{name}") do |*args|
377
+ received_args = args
378
+ run ||= expected_args.zip(received_args).all? do |ea, ra|
379
+ ea.respond_to?(:call) ? ea.call(ra) : ea == ra
380
+ end
381
+ end
382
+
383
+ if block_given?
384
+ yield
385
+ else
386
+ check_for_updates!
387
+ end
388
+
389
+ assert run, "Expected #{name} callback to be run with arguments:\n #{expected_args.inspect}\nHowever, it got:\n #{received_args.inspect}"
390
+ end
391
+
392
+ def assert_no_callback(name, *unexpected_args)
393
+ Sass::Plugin.send("on_#{name}") do |*a|
394
+ next unless unexpected_args.empty? || a == unexpected_args
395
+
396
+ msg = "Expected #{name} callback not to be run"
397
+ if !unexpected_args.empty?
398
+ msg << " with arguments #{unexpected_args.inspect}"
399
+ elsif !a.empty?
400
+ msg << ",\n was run with arguments #{a.inspect}"
401
+ end
402
+
403
+ flunk msg
404
+ end
405
+
406
+ if block_given?
407
+ yield
408
+ else
409
+ check_for_updates!
410
+ end
411
+ end
412
+
413
+ def assert_callbacks(*args)
414
+ return check_for_updates! if args.empty?
415
+ assert_callback(*args.pop) {assert_callbacks(*args)}
416
+ end
417
+
418
+ def assert_no_callbacks(*args)
419
+ return check_for_updates! if args.empty?
420
+ assert_no_callback(*args.pop) {assert_no_callbacks(*args)}
421
+ end
422
+
423
+ def check_for_updates!
424
+ Sass::Util.silence_sass_warnings do
425
+ Sass::Plugin.check_for_updates
426
+ end
427
+ end
428
+
429
+ def assert_needs_update(*args)
430
+ assert(Sass::Plugin::StalenessChecker.stylesheet_needs_update?(tempfile_loc(*args), template_loc(*args)),
431
+ "Expected #{template_loc(*args)} to need an update.")
432
+ end
433
+
434
+ def assert_doesnt_need_update(*args)
435
+ assert(!Sass::Plugin::StalenessChecker.stylesheet_needs_update?(tempfile_loc(*args), template_loc(*args)),
436
+ "Expected #{template_loc(*args)} not to need an update.")
437
+ end
438
+
439
+ def touch(*args)
440
+ FileUtils.touch(template_loc(*args))
441
+ end
442
+
443
+ def reset_mtimes
444
+ Sass::Plugin::StalenessChecker.dependencies_cache = {}
445
+ atime = Time.now
446
+ mtime = Time.now - 5
447
+ Dir["{#{template_loc},#{tempfile_loc}}/**/*.{css,sass,scss}"].each {|f| File.utime(atime, mtime, f)}
448
+ end
449
+
450
+ def template_loc(name = nil, prefix = nil)
451
+ if name
452
+ scss = absolutize "#{prefix}templates/#{name}.scss"
453
+ File.exists?(scss) ? scss : absolutize("#{prefix}templates/#{name}.sass")
454
+ else
455
+ absolutize "#{prefix}templates"
456
+ end
457
+ end
458
+
459
+ def tempfile_loc(name = nil, prefix = nil)
460
+ if name
461
+ absolutize "#{prefix}tmp/#{name}.css"
462
+ else
463
+ absolutize "#{prefix}tmp"
464
+ end
465
+ end
466
+
467
+ def result_loc(name = nil, prefix = nil)
468
+ if name
469
+ absolutize "#{prefix}results/#{name}.css"
470
+ else
471
+ absolutize "#{prefix}results"
472
+ end
473
+ end
474
+
475
+ def set_plugin_opts(overrides = {})
476
+ Sass::Plugin.options.merge!(
477
+ :template_location => template_loc,
478
+ :css_location => tempfile_loc,
479
+ :style => :compact,
480
+ :always_update => true,
481
+ :never_update => false,
482
+ :full_exception => true,
483
+ :cache_store => @@cache_store
484
+ )
485
+ Sass::Plugin.options.merge!(overrides)
486
+ end
487
+ end
488
+
489
+ class Sass::Engine
490
+ alias_method :old_render, :render
491
+
492
+ def render
493
+ raise "bork bork bork!" if @template[0] == "{bork now!}"
494
+ old_render
495
+ end
496
+ end
@@ -0,0 +1,4 @@
1
+ h1 { float: left; width: 274px; height: 75px; margin: 0; background-repeat: no-repeat; background-image: none; }
2
+ h1 a:hover, h1 a:visited { color: green; }
3
+ h1 b:hover { color: red; background-color: green; }
4
+ h1 const { nosp: 3; sp: 3; }
@@ -0,0 +1,9 @@
1
+ body { font: Arial; background: blue; }
2
+
3
+ #page { width: 700px; height: 100; }
4
+ #page #header { height: 300px; }
5
+ #page #header h1 { font-size: 50px; color: blue; }
6
+
7
+ #content.user.show #container.top #column.left { width: 100px; }
8
+ #content.user.show #container.top #column.right { width: 600px; }
9
+ #content.user.show #container.bottom { background: brown; }
@@ -0,0 +1,5 @@
1
+ #main { width: 15em; color: blue; }
2
+ #main p { border-style: dotted; /* Nested comment More nested stuff */ border-width: 2px; }
3
+ #main .cool { width: 100px; }
4
+
5
+ #left { font-size: 2em; font-weight: bold; float: left; }