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,312 @@
1
+ # Listen [![Build Status](https://secure.travis-ci.org/guard/listen.png?branch=master)](http://travis-ci.org/guard/listen)
2
+
3
+ The Listen gem listens to file modifications and notifies you about the changes.
4
+
5
+ ## Features
6
+
7
+ * Works everywhere!
8
+ * Supports watching multiple directories from a single listener.
9
+ * OS-specific adapters for Mac OS X 10.6+, Linux and Windows.
10
+ * Automatic fallback to polling if OS-specific adapter doesn't work.
11
+ * Detects files modification, addidation and removal.
12
+ * Checksum comparaison for modifications made under the same second.
13
+ * Allows supplying regexp-patterns to ignore and filter paths for better results.
14
+ * Tested on all Ruby environments via [travis-ci](http://travis-ci.org/guard/listen).
15
+
16
+ ## Install
17
+
18
+ ``` bash
19
+ gem install listen
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ There are **two ways** to use Listen:
25
+
26
+ 1. Call `Listen.to` with either a single directory or multiple directories, then define the `change` callback in a block.
27
+ 2. Create a `listener` object and use it in an (ARel style) chainable way.
28
+
29
+ Feel free to give your feeback via [Listen issues](https://github.com/guard/listen/issues)
30
+
31
+ ### Block API
32
+
33
+ ``` ruby
34
+ # Listen to a single directory.
35
+ Listen.to('dir/path/to/listen', filter: /\.rb$/, ignore: %r{ignored/path/}) do |modified, added, removed|
36
+ # ...
37
+ end
38
+
39
+ # Listen to multiple directories.
40
+ Listen.to('dir/to/awesome_app', 'dir/to/other_app', filter: /\.rb$/, latency: 0.1) do |modified, added, removed|
41
+ # ...
42
+ end
43
+ ```
44
+
45
+ ### "Object" API
46
+
47
+ ``` ruby
48
+ listener = Listen.to('dir/path/to/listen')
49
+ listener = listener.ignore(%r{^ignored/path/})
50
+ listener = listener.filter(/\.rb$/)
51
+ listener = listener.latency(0.5)
52
+ listener = listener.force_polling(true)
53
+ listener = listener.polling_fallback_message(false)
54
+ listener = listener.change(&callback)
55
+ listener.start # blocks execution!
56
+ ```
57
+
58
+ ### Chainable
59
+
60
+ ``` ruby
61
+ Listen.to('dir/path/to/listen')
62
+ .ignore(%r{^ignored/path/})
63
+ .filter(/\.rb$/)
64
+ .latency(0.5)
65
+ .force_polling(true)
66
+ .polling_fallback_message('custom message')
67
+ .change(&callback)
68
+ .start # blocks execution!
69
+ ```
70
+
71
+ ### Pause/Unpause
72
+
73
+ Listener can also easily be paused/unpaused:
74
+
75
+ ``` ruby
76
+ listener = Listen.to('dir/path/to/listen')
77
+ listener.start(false) # non-blocking mode
78
+ listener.pause # stop listening to changes
79
+ listener.paused? # => true
80
+ listener.unpause
81
+ listener.stop
82
+ ```
83
+
84
+ ## Listening to changes on multiple directories
85
+
86
+ The Listen gem provides the `MultiListener` class to watch multiple directories and
87
+ handle their changes from a single listener:
88
+
89
+ ```ruby
90
+ listener = Listen::MultiListener.new('app/css', 'app/js')
91
+ listener.latency(0.5)
92
+
93
+ # Configure the listener to your needs...
94
+
95
+ listener.start # blocks execution!
96
+ ````
97
+
98
+ For an easier access, the `Listen.to` method can also be used to create a multi-listener:
99
+
100
+ ``` ruby
101
+ listener = Listen.to('app/css', 'app/js')
102
+ .ignore(%r{^vendor/}) # both js/vendor and css/vendor will be ignored
103
+ .change(&assets_callback)
104
+
105
+ listener.start # blocks execution!
106
+ ```
107
+
108
+ ## Changes callback
109
+
110
+ Changes to the listened-to directories gets reported back to the user in a callback.
111
+ The registered callback gets invoked, when there are changes, with **three** parameters:
112
+ `modified_paths`, `added_paths` and `removed_paths` in that particular order.
113
+
114
+ You can register a callback in two ways. The first way is by passing a block when calling
115
+ the `Listen.to` method or when initializing a listener object:
116
+
117
+ ```ruby
118
+ Listen.to('path/to/app') do |modified, added, removed|
119
+ # This block will be called when there are changes.
120
+ end
121
+
122
+ # or ...
123
+
124
+ listener = Listen::Listener.new('path/to/app') do |modified, added, removed|
125
+ # This block will be called when there are changes.
126
+ end
127
+
128
+ ```
129
+
130
+ The second way to register a callback is be calling the `change` method on any
131
+ listener passing it a block:
132
+
133
+ ```ruby
134
+ # Create a callback
135
+ callback = Proc.new do |modified, added, removed|
136
+ # This proc will be called when there are changes.
137
+ end
138
+
139
+ listener = Listen.to('dir')
140
+ listener.change(&callback) # convert the callback to a block and register it
141
+
142
+ listener.start # blocks execution
143
+ ```
144
+
145
+ ### Paths in callbacks
146
+
147
+ Listeners invoke callbacks passing them absolute paths by default:
148
+
149
+ ```ruby
150
+ # Assume someone changes the 'style.css' file in '/home/user/app/css' after creating
151
+ # the listener.
152
+ Listen.to('/home/user/app/css') do |modified, added, removed|
153
+ modified.inspect # => ['/home/user/app/css/style.css']
154
+ end
155
+ ```
156
+
157
+ #### Relative paths in callbacks
158
+
159
+ When creating a listener for a **single** path (more specifically a `Listen::Listener` instance),
160
+ you can pass `:relative_paths => true` as an option to get relative paths in
161
+ your callback:
162
+
163
+ ```ruby
164
+ # Assume someone changes the 'style.css' file in '/home/user/app/css' after creating
165
+ # the listener.
166
+ Listen.to('/home/user/app/css', :relative_paths => true) do |modified, added, removed|
167
+ modified.inspect # => ['style.css']
168
+ end
169
+ ```
170
+
171
+ Passing the `:relative_paths => true` option won't work when listeneing to multiple
172
+ directories:
173
+
174
+ ```ruby
175
+ # Assume someone changes the 'style.css' file in '/home/user/app/css' after creating
176
+ # the listener.
177
+ Listen.to('/home/user/app/css', '/home/user/app/js', :relative_paths => true) do |modified, added, removed|
178
+ modified.inspect # => ['/home/user/app/css/style.css']
179
+ end
180
+ ```
181
+
182
+ ## Options
183
+
184
+ These options can be set through `Listen.to` params or via methods (see the "Object" API)
185
+
186
+ ```ruby
187
+ :filter => /\.rb$/, /\.coffee$/ # Filter files to listen to via a regexps list.
188
+ # default: none
189
+
190
+ :ignore => %r{app/CMake/}, /\.pid$/ # Ignore a list of paths (root directory or sub-dir)
191
+ # default: See DEFAULT_IGNORED_DIRECTORIES and DEFAULT_IGNORED_EXTENSIONS in Listen::DirectoryRecord
192
+
193
+ :latency => 0.5 # Set the delay (**in seconds**) between checking for changes
194
+ # default: 0.1 sec (1.0 sec for polling)
195
+
196
+ :relative_paths => true # Enable the use of relative paths in the callback.
197
+ # default: false
198
+
199
+ :force_polling => true # Force the use of the polling adapter
200
+ # default: none
201
+
202
+ :polling_fallback_message => 'custom message' # Set a custom polling fallback message (or disable it with `false`)
203
+ # default: "WARNING: Listen fallen back to polling, learn more at https://github.com/guard/listen#fallback."
204
+ ```
205
+
206
+ ### The patterns for filtering and ignoring paths
207
+
208
+ Just like the unix convention of beginning absolute paths with the
209
+ directory-separator (forward slash `/` in unix) and with no prefix for relative paths,
210
+ Listen doesn't prefix relative paths (to the watched directory) with a directory-separator.
211
+
212
+ Therefore make sure _NOT_ to prefix your regexp-patterns for filtering or ignoring paths
213
+ with a directory-separator, otherwise they won't work as expected.
214
+
215
+ As an example: to ignore the `build` directory in a C-project, use `%r{build/}`
216
+ and not `%r{/build/}`.
217
+
218
+ ### Non-blocking listening to changes
219
+
220
+ Starting a listener blocks the current thread by default. That means any code after the
221
+ `start` call won't be run until the listener is stopped (which needs to be done from another thread).
222
+
223
+ For advanced usage there is an option to disable this behavior and have the listener start working
224
+ in the background without blocking. To enable non-blocking listening the `start` method of
225
+ the listener (be it `Listener` or `MultiListener`) needs to be called with `false` as a parameter.
226
+
227
+ Here is an example of using a listener in the non-blocking mode:
228
+
229
+ ```ruby
230
+ listener = Listen.to('dir/path/to/listen')
231
+ listener.start(false) # doesn't block execution
232
+
233
+ # Code here will run immediately after starting the listener
234
+
235
+ ```
236
+
237
+ **note**: Using the `Listen.to` helper-method with a callback-block will always
238
+ block execution. See the "Block API" section for an example.
239
+
240
+ ## Listen adapters
241
+
242
+ The Listen gem has a set of adapters to notify it when there are changes.
243
+ There are 3 OS-specific adapters to support Mac, Linux and Windows. These adapters are fast
244
+ as they use some system-calls to implement the notifying function.
245
+
246
+ There is also a polling adapter which is a cross-platform adapter and it will
247
+ work on any system. This adapter is unfortunately slower than the rest of the adapters.
248
+
249
+ The Listen gem will choose the best and working adapter for your machine automatically. If you
250
+ want to force the use of the polling adapter, either use the `:force_polling` option
251
+ while initializing the listener or call the `force_polling` method on your listener
252
+ before starting it.
253
+
254
+ <a name="fallback"/>
255
+ ## Polling fallback
256
+
257
+ When a OS-specific adapter doesn't work the Listen gem automatically falls back to the polling adapter.
258
+ Here are some things you could try to avoid the polling fallback:
259
+
260
+ * [Update your Dropbox client](http://www.dropbox.com/downloading) (if used).
261
+ * Increase latency. (Please [open an issue](https://github.com/guard/listen/issues/new) if you think that default is too low.)
262
+ * Move or rename the listened folder.
263
+ * Update/reboot your OS.
264
+
265
+ If your application keeps using the polling-adapter and you can't figure out why, feel free to [open an issue](https://github.com/guard/listen/issues/new) (and be sure to give all the details).
266
+
267
+ ## Development [![Dependency Status](https://gemnasium.com/guard/listen.png?branch=master)](https://gemnasium.com/guard/listen)
268
+
269
+ * Documentation hosted at [RubyDoc](http://rubydoc.info/github/guard/listen/master/frames).
270
+ * Source hosted at [GitHub](https://github.com/guard/listen).
271
+
272
+ Pull requests are very welcome! Please try to follow these simple rules if applicable:
273
+
274
+ * Please create a topic branch for every separate change you make.
275
+ * Make sure your patches are well tested. All specs run with `rake spec:portability` must pass.
276
+ * Update the [Yard](http://yardoc.org/) documentation.
277
+ * Update the README.
278
+ * Update the CHANGELOG for noteworthy changes.
279
+ * Please **do not change** the version number.
280
+
281
+ For questions please join us in our [Google group](http://groups.google.com/group/guard-dev) or on
282
+ `#guard` (irc.freenode.net).
283
+
284
+ ## Acknowledgment
285
+
286
+ * [Michael Kessler (netzpirat)][] for having written the [initial specs](https://github.com/guard/listen/commit/1e457b13b1bb8a25d2240428ce5ed488bafbed1f).
287
+ * [Travis Tilley (ttilley)][] for this awesome work on [fssm][] & [rb-fsevent][].
288
+ * [Nathan Weizenbaum (nex3)][] for [rb-inotify][], a thorough inotify wrapper.
289
+ * [stereobooster][] for [rb-fchange][], windows support wouldn't exist without him.
290
+ * [Yehuda Katz (wycats)][] for [vigilo][], that has been a great source of inspiration.
291
+
292
+ ## Authors
293
+
294
+ * [Thibaud Guillaume-Gentil][] ([@thibaudgg](http://twitter.com/thibaudgg))
295
+ * [Maher Sallam][] ([@mahersalam](http://twitter.com/mahersalam))
296
+
297
+ ## Contributors
298
+
299
+ [https://github.com/guard/listen/contributors](https://github.com/guard/listen/contributors)
300
+
301
+ [Thibaud Guillaume-Gentil]: https://github.com/thibaudgg
302
+ [Maher Sallam]: https://github.com/Maher4Ever
303
+ [Michael Kessler (netzpirat)]: https://github.com/netzpirat
304
+ [Travis Tilley (ttilley)]: https://github.com/ttilley
305
+ [fssm]: https://github.com/ttilley/fssm
306
+ [rb-fsevent]: https://github.com/thibaudgg/rb-fsevent
307
+ [Nathan Weizenbaum (nex3)]: https://github.com/nex3
308
+ [rb-inotify]: https://github.com/nex3/rb-inotify
309
+ [stereobooster]: https://github.com/stereobooster
310
+ [rb-fchange]: https://github.com/stereobooster/rb-fchange
311
+ [Yehuda Katz (wycats)]: https://github.com/wycats
312
+ [vigilo]: https://github.com/wycats/vigilo
@@ -0,0 +1,47 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task :default => :spec
6
+
7
+ require 'rbconfig'
8
+ namespace(:spec) do
9
+ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/i
10
+ desc "Run all specs on multiple ruby versions (requires pik)"
11
+ task(:portability) do
12
+ %w[187 192 161].each do |version|
13
+ system "cmd /c echo -----------#{version}------------ & " +
14
+ "pik use #{version} & " +
15
+ "bundle install & " +
16
+ "bundle exec rspec spec"
17
+ end
18
+ end
19
+ else
20
+ desc "Run all specs on multiple ruby versions (requires rvm)"
21
+ task(:portability) do
22
+ travis_config_file = File.expand_path("../.travis.yml", __FILE__)
23
+ begin
24
+ travis_options ||= YAML::load_file(travis_config_file)
25
+ rescue => ex
26
+ puts "Travis config file '#{travis_config_file}' could not be found: #{ex.message}"
27
+ return
28
+ end
29
+
30
+ travis_options['rvm'].each do |version|
31
+ system <<-BASH
32
+ bash -c 'source ~/.rvm/scripts/rvm;
33
+ rvm #{version};
34
+ ruby_version_string_size=`ruby -v | wc -m`
35
+ echo;
36
+ for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
37
+ echo;
38
+ echo "`ruby -v`";
39
+ for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
40
+ echo;
41
+ RBXOPT="-Xrbc.db" bundle install;
42
+ RBXOPT="-Xrbc.db" bundle exec rspec spec -f doc 2>&1;'
43
+ BASH
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,96 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant::Config.run do |config|
5
+ # All Vagrant configuration is done here. The most common configuration
6
+ # options are documented and commented below. For a complete reference,
7
+ # please see the online documentation at vagrantup.com.
8
+
9
+ # Every Vagrant virtual environment requires a box to build off of.
10
+ config.vm.box = "lucid32"
11
+
12
+ # The url from where the 'config.vm.box' box will be fetched if it
13
+ # doesn't already exist on the user's system.
14
+ # config.vm.box_url = "http://domain.com/path/to/above.box"
15
+
16
+ # Boot with a GUI so you can see the screen. (Default is headless)
17
+ # config.vm.boot_mode = :gui
18
+
19
+ # Assign this VM to a host-only network IP, allowing you to access it
20
+ # via the IP. Host-only networks can talk to the host machine as well as
21
+ # any other machines on the same network, but cannot be accessed (through this
22
+ # network interface) by any external networks.
23
+ # config.vm.network :hostonly, "33.33.33.10"
24
+
25
+ # Assign this VM to a bridged network, allowing you to connect directly to a
26
+ # network using the host's network device. This makes the VM appear as another
27
+ # physical device on your network.
28
+ # config.vm.network :bridged
29
+
30
+ # Forward a port from the guest to the host, which allows for outside
31
+ # computers to access the VM, whereas host only networking does not.
32
+ # config.vm.forward_port 80, 8080
33
+
34
+ # Share an additional folder to the guest VM. The first argument is
35
+ # an identifier, the second is the path on the guest to mount the
36
+ # folder, and the third is the path on the host to the actual folder.
37
+ # config.vm.share_folder "v-data", "/vagrant_data", "../data"
38
+
39
+ # Enable provisioning with Puppet stand alone. Puppet manifests
40
+ # are contained in a directory path relative to this Vagrantfile.
41
+ # You will need to create the manifests directory and a manifest in
42
+ # the file lucid32.pp in the manifests_path directory.
43
+ #
44
+ # An example Puppet manifest to provision the message of the day:
45
+ #
46
+ # # group { "puppet":
47
+ # # ensure => "present",
48
+ # # }
49
+ # #
50
+ # # File { owner => 0, group => 0, mode => 0644 }
51
+ # #
52
+ # # file { '/etc/motd':
53
+ # # content => "Welcome to your Vagrant-built virtual machine!
54
+ # # Managed by Puppet.\n"
55
+ # # }
56
+ #
57
+ # config.vm.provision :puppet do |puppet|
58
+ # puppet.manifests_path = "manifests"
59
+ # puppet.manifest_file = "lucid32.pp"
60
+ # end
61
+
62
+ # Enable provisioning with chef solo, specifying a cookbooks path (relative
63
+ # to this Vagrantfile), and adding some recipes and/or roles.
64
+ #
65
+ # config.vm.provision :chef_solo do |chef|
66
+ # chef.cookbooks_path = "cookbooks"
67
+ # chef.add_recipe "mysql"
68
+ # chef.add_role "web"
69
+ #
70
+ # # You may also specify custom JSON attributes:
71
+ # chef.json = { :mysql_password => "foo" }
72
+ # end
73
+
74
+ # Enable provisioning with chef server, specifying the chef server URL,
75
+ # and the path to the validation key (relative to this Vagrantfile).
76
+ #
77
+ # The Opscode Platform uses HTTPS. Substitute your organization for
78
+ # ORGNAME in the URL and validation key.
79
+ #
80
+ # If you have your own Chef Server, use the appropriate URL, which may be
81
+ # HTTP instead of HTTPS depending on your configuration. Also change the
82
+ # validation key to validation.pem.
83
+ #
84
+ # config.vm.provision :chef_client do |chef|
85
+ # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
86
+ # chef.validation_key_path = "ORGNAME-validator.pem"
87
+ # end
88
+ #
89
+ # If you're using the Opscode platform, your validator client is
90
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
91
+ #
92
+ # IF you have your own Chef Server, the default validation client name is
93
+ # chef-validator, unless you changed the configuration.
94
+ #
95
+ # chef.validation_client_name = "ORGNAME-validator"
96
+ end
@@ -0,0 +1,167 @@
1
+ require 'rbconfig'
2
+ require 'thread'
3
+ require 'set'
4
+ require 'fileutils'
5
+
6
+ module Listen
7
+ class Adapter
8
+ attr_accessor :directories, :latency, :paused
9
+
10
+ # The default delay between checking for changes.
11
+ DEFAULT_LATENCY = 0.1
12
+
13
+ # The default warning message when falling back to polling adapter.
14
+ POLLING_FALLBACK_MESSAGE = "WARNING: Listen has fallen back to polling, learn more at https://github.com/guard/listen#fallback."
15
+
16
+ # Selects the appropriate adapter implementation for the
17
+ # current OS and initializes it.
18
+ #
19
+ # @param [String, Array<String>] directories the directories to watch
20
+ # @param [Hash] options the adapter options
21
+ # @option options [Boolean] force_polling to force polling or not
22
+ # @option options [String, Boolean] polling_fallback_message to change polling fallback message or remove it
23
+ # @option options [Float] latency the delay between checking for changes in seconds
24
+ #
25
+ # @yield [changed_dirs, options] callback Callback called when a change happens
26
+ # @yieldparam [Array<String>] changed_dirs the changed directories
27
+ # @yieldparam [Hash] options callback options (like :recursive => true)
28
+ #
29
+ # @return [Listen::Adapter] the chosen adapter
30
+ #
31
+ def self.select_and_initialize(directories, options = {}, &callback)
32
+ return Adapters::Polling.new(directories, options, &callback) if options.delete(:force_polling)
33
+
34
+ if Adapters::Darwin.usable_and_works?(directories, options)
35
+ Adapters::Darwin.new(directories, options, &callback)
36
+ elsif Adapters::Linux.usable_and_works?(directories, options)
37
+ Adapters::Linux.new(directories, options, &callback)
38
+ elsif Adapters::Windows.usable_and_works?(directories, options)
39
+ Adapters::Windows.new(directories, options, &callback)
40
+ else
41
+ unless options[:polling_fallback_message] == false
42
+ Kernel.warn(options[:polling_fallback_message] || POLLING_FALLBACK_MESSAGE)
43
+ end
44
+ Adapters::Polling.new(directories, options, &callback)
45
+ end
46
+ end
47
+
48
+ # Initializes the adapter.
49
+ #
50
+ # @param [String, Array<String>] directories the directories to watch
51
+ # @param [Hash] options the adapter options
52
+ # @option options [Float] latency the delay between checking for changes in seconds
53
+ #
54
+ # @yield [changed_dirs, options] callback Callback called when a change happens
55
+ # @yieldparam [Array<String>] changed_dirs the changed directories
56
+ # @yieldparam [Hash] options callback options (like :recursive => true)
57
+ #
58
+ # @return [Listen::Adapter] the adapter
59
+ #
60
+ def initialize(directories, options = {}, &callback)
61
+ @directories = Array(directories)
62
+ @callback = callback
63
+ @latency ||= DEFAULT_LATENCY
64
+ @latency = options[:latency] if options[:latency]
65
+ @paused = false
66
+ @mutex = Mutex.new
67
+ @changed_dirs = Set.new
68
+ @turnstile = Turnstile.new
69
+ end
70
+
71
+ # Starts the adapter.
72
+ #
73
+ # @param [Boolean] blocking whether or not to block the current thread after starting
74
+ #
75
+ def start(blocking = true)
76
+ @stop = false
77
+ end
78
+
79
+ # Stops the adapter.
80
+ #
81
+ def stop
82
+ @stop = true
83
+ @turnstile.signal # ensure no thread is blocked
84
+ end
85
+
86
+ # Returns whether the adapter is statred or not
87
+ #
88
+ # @return [Boolean] whether the adapter is started or not
89
+ #
90
+ def started?
91
+ @stop.nil? ? false : !@stop
92
+ end
93
+
94
+ # Blocks the main thread until the poll thread
95
+ # calls the callback.
96
+ #
97
+ def wait_for_callback
98
+ @turnstile.wait unless @paused
99
+ end
100
+
101
+ # Checks if the adapter is usable and works on the current OS.
102
+ #
103
+ # @param [String, Array<String>] directories the directories to watch
104
+ # @param [Hash] options the adapter options
105
+ # @option options [Float] latency the delay between checking for changes in seconds
106
+ #
107
+ # @return [Boolean] whether usable and work or not
108
+ #
109
+ def self.usable_and_works?(directories, options = {})
110
+ usable? && Array(directories).all? { |d| works?(d, options) }
111
+ end
112
+
113
+ # Runs a tests to determine if the adapter can actually pick up
114
+ # changes in a given directory and returns the result.
115
+ #
116
+ # @note This test takes some time depending the adapter latency.
117
+ #
118
+ # @param [String, Pathname] directory the directory to watch
119
+ # @param [Hash] options the adapter options
120
+ # @option options [Float] latency the delay between checking for changes in seconds
121
+ #
122
+ # @return [Boolean] whether the adapter works or not
123
+ #
124
+ def self.works?(directory, options = {})
125
+ work = false
126
+ test_file = "#{directory}/.listen_test"
127
+ callback = lambda { |changed_dirs, options| work = true }
128
+ adapter = self.new(directory, options, &callback)
129
+ adapter.start(false)
130
+
131
+ FileUtils.touch(test_file)
132
+
133
+ t = Thread.new { sleep(adapter.latency * 5); adapter.stop }
134
+
135
+ adapter.wait_for_callback
136
+ work
137
+ ensure
138
+ Thread.kill(t) if t
139
+ FileUtils.rm(test_file) if File.exists?(test_file)
140
+ adapter.stop if adapter && adapter.started?
141
+ end
142
+
143
+ private
144
+
145
+ # Polls changed directories and reports them back
146
+ # when there are changes.
147
+ #
148
+ # @option [Boolean] recursive whether or not to pass the recursive option to the callback
149
+ #
150
+ def poll_changed_dirs(recursive = false)
151
+ until @stop
152
+ sleep(@latency)
153
+ next if @changed_dirs.empty?
154
+
155
+ changed_dirs = []
156
+
157
+ @mutex.synchronize do
158
+ changed_dirs = @changed_dirs.to_a
159
+ @changed_dirs.clear
160
+ end
161
+
162
+ @callback.call(changed_dirs, recursive ? {:recursive => recursive} : {})
163
+ @turnstile.signal
164
+ end
165
+ end
166
+ end
167
+ end