classiccms 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/classiccms/application.rb +2 -3
- data/lib/classiccms/cli.rb +6 -0
- data/lib/classiccms/scaffold/Gemfile +4 -0
- data/lib/classiccms/{mongoid.yml → scaffold/config/mongoid.yml} +3 -4
- data/lib/classiccms/scaffold/spec/models/article_spec.rb +8 -0
- data/lib/classiccms/scaffold/spec/spec_helper.rb +24 -0
- data/lib/classiccms/version.rb +1 -1
- data/spec/cli_spec.rb +8 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/build/v8/libv8.a +0 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/build/v8/libv8preparser.a +0 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-debug.h +395 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-preparser.h +117 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-profiler.h +505 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8-testing.h +104 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8.h +4124 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/v8/include/v8stdint.h +53 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8/version.rb +6 -0
- data/vendor/bundle/gems/libv8-3.3.10.4-x86_64-darwin-11/lib/libv8.rb +15 -0
- data/vendor/bundle/gems/sass-3.1.19/.yardopts +11 -0
- data/vendor/bundle/gems/sass-3.1.19/CONTRIBUTING +3 -0
- data/vendor/bundle/gems/sass-3.1.19/MIT-LICENSE +20 -0
- data/vendor/bundle/gems/sass-3.1.19/README.md +200 -0
- data/vendor/bundle/gems/sass-3.1.19/REVISION +1 -0
- data/vendor/bundle/gems/sass-3.1.19/Rakefile +339 -0
- data/vendor/bundle/gems/sass-3.1.19/VERSION +1 -0
- data/vendor/bundle/gems/sass-3.1.19/VERSION_NAME +1 -0
- data/vendor/bundle/gems/sass-3.1.19/bin/sass +8 -0
- data/vendor/bundle/gems/sass-3.1.19/bin/sass-convert +7 -0
- data/vendor/bundle/gems/sass-3.1.19/bin/scss +8 -0
- data/vendor/bundle/gems/sass-3.1.19/extra/update_watch.rb +13 -0
- data/vendor/bundle/gems/sass-3.1.19/init.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/base.rb +86 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/chain.rb +33 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/filesystem.rb +61 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/memory.rb +47 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores/null.rb +25 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/cache_stores.rb +15 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/callbacks.rb +66 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/css.rb +390 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/engine.rb +880 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/environment.rb +180 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/error.rb +201 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/exec.rb +682 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers/base.rb +139 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers/filesystem.rb +149 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/importers.rb +22 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/less.rb +382 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger/base.rb +32 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger/log_level.rb +49 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/logger.rb +15 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/compiler.rb +384 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/configuration.rb +123 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/generic.rb +15 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/merb.rb +48 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/rack.rb +60 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/rails.rb +47 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin/staleness_checker.rb +183 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/plugin.rb +132 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/railtie.rb +9 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/repl.rb +57 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/root.rb +7 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/bool.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/color.rb +475 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/css_lexer.rb +29 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/css_parser.rb +31 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/funcall.rb +175 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/functions.rb +1381 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/interpolation.rb +79 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/lexer.rb +337 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/list.rb +84 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/literal.rb +230 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/node.rb +99 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/number.rb +452 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/operation.rb +107 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/parser.rb +474 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/string.rb +51 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/string_interpolation.rb +103 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/unary_operation.rb +64 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script/variable.rb +58 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/script.rb +39 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/css_parser.rb +46 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/parser.rb +1055 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/rx.rb +137 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/sass_parser.rb +11 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/script_lexer.rb +15 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/script_parser.rb +25 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss/static_parser.rb +40 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/scss.rb +17 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/abstract_sequence.rb +71 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/comma_sequence.rb +86 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/sequence.rb +296 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/simple.rb +119 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector/simple_sequence.rb +154 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/selector.rb +373 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/shared.rb +76 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/charset_node.rb +22 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/comment_node.rb +90 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/debug_node.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/directive_node.rb +28 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/each_node.rb +24 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/extend_node.rb +29 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/for_node.rb +36 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/function_node.rb +27 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/if_node.rb +52 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/import_node.rb +68 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/media_node.rb +32 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/mixin_def_node.rb +27 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/mixin_node.rb +32 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/node.rb +188 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/prop_node.rb +148 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/return_node.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/root_node.rb +28 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/rule_node.rb +127 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/variable_node.rb +30 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/base.rb +75 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/check_nesting.rb +127 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/convert.rb +262 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/cssize.rb +206 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/deep_copy.rb +87 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/extend.rb +42 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/perform.rb +357 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/set_options.rb +97 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/visitors/to_css.rb +219 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/warn_node.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/tree/while_node.rb +18 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/util/multibyte_string_scanner.rb +134 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/util/subset_map.rb +101 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/util.rb +800 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass/version.rb +112 -0
- data/vendor/bundle/gems/sass-3.1.19/lib/sass.rb +73 -0
- data/vendor/bundle/gems/sass-3.1.19/rails/init.rb +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/Gemfile +4 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/cache_test.rb +89 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/callbacks_test.rb +61 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/conversion_test.rb +1245 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/css2sass_test.rb +397 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/data/hsl-rgb.txt +319 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/engine_test.rb +2730 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/extend_test.rb +1663 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/fixtures/test_staleness_check_across_importers.css +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/fixtures/test_staleness_check_across_importers.scss +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/functions_test.rb +1047 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/importer_test.rb +192 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/less_conversion_test.rb +653 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/logger_test.rb +58 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/mock_importer.rb +49 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more1.css +9 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more1_with_line_comments.css +26 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_results/more_import.css +29 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/_more_partial.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/more1.sass +23 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/more_templates/more_import.sass +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/plugin_test.rb +496 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/alt.css +4 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/basic.css +9 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/compact.css +5 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/complex.css +86 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/compressed.css +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/expanded.css +19 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/if.css +3 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import.css +31 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset.css +5 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset_1_8.css +5 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/import_charset_ibm866.css +5 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/line_numbers.css +49 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/mixins.css +95 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/multiline.css +24 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/nested.css +22 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/options.css +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/parent_ref.css +13 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/script.css +16 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/scss_import.css +31 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/scss_importee.css +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/subdir/subdir.css +3 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/units.css +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/warn.css +0 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/results/warn_imported.css +0 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/script_conversion_test.rb +285 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/script_test.rb +519 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/css_test.rb +975 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/rx_test.rb +156 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/scss_test.rb +1308 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/scss/test_helper.rb +37 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_double_import_loop2.sass +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_imported_charset_ibm866.sass +4 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_imported_charset_utf8.sass +4 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/_partial.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/alt.sass +16 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/basic.sass +23 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork1.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork2.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork3.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork4.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/bork5.sass +3 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/compact.sass +17 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/complex.sass +305 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/compressed.sass +15 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/double_import_loop1.sass +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/expanded.sass +17 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/if.sass +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import.sass +12 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset.sass +9 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset_1_8.sass +6 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/import_charset_ibm866.sass +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/importee.less +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/importee.sass +19 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/line_numbers.sass +13 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/mixin_bork.sass +5 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/mixins.sass +76 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/multiline.sass +20 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested.sass +25 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork1.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork2.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork3.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork4.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_bork5.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_import.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/nested_mixin_bork.sass +6 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/options.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/parent_ref.sass +25 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/script.sass +101 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/scss_import.scss +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/scss_importee.scss +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/single_import_loop.sass +1 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/subdir/subdir.sass +6 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/units.sass +11 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/warn.sass +3 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/templates/warn_imported.sass +4 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/test_helper.rb +8 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/util/multibyte_string_scanner_test.rb +147 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/util/subset_map_test.rb +91 -0
- data/vendor/bundle/gems/sass-3.1.19/test/sass/util_test.rb +282 -0
- data/vendor/bundle/gems/sass-3.1.19/test/test_helper.rb +70 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/CHANGELOG.md +90 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Gemfile +35 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Guardfile +8 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/LICENSE +20 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/README.md +312 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Rakefile +47 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/Vagrantfile +96 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapter.rb +167 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/darwin.rb +84 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/linux.rb +110 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/polling.rb +66 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/adapters/windows.rb +81 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/directory_record.rb +317 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/listener.rb +203 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/multi_listener.rb +121 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/turnstile.rb +28 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen/version.rb +3 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/lib/listen.rb +38 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/listen.gemspec +26 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapter_spec.rb +142 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/darwin_spec.rb +31 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/linux_spec.rb +41 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/polling_spec.rb +68 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/adapters/windows_spec.rb +24 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/directory_record_spec.rb +1034 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/listener_spec.rb +155 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/multi_listener_spec.rb +156 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen/turnstile_spec.rb +56 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/listen_spec.rb +73 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/spec_helper.rb +16 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/adapter_helper.rb +716 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/directory_record_helper.rb +55 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/fixtures_helper.rb +29 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/listeners_helper.rb +144 -0
- data/vendor/bundle/gems/sass-3.1.19/vendor/listen/spec/support/platform_helper.rb +11 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/.gitignore +13 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/.gitmodules +3 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/.travis.yml +9 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/.yardopts +1 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/Changelog.md +196 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/Gemfile +1 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/README.md +167 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/Rakefile +23 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/bin/therubyracer +11 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/Makefile +213 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/extconf.rb +26 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/gem_make.out +156 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/rr.cpp +189 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/rr.h +41 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8.cpp +48 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_array.cpp +48 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_array.h +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_callbacks.cpp +81 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_callbacks.h +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_context.cpp +92 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_context.h +6 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_date.cpp +34 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_date.h +6 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_debug.cpp +17 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_debug.h +6 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_exception.cpp +133 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_exception.h +11 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_external.cpp +70 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_external.h +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_function.cpp +69 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_function.h +11 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_handle.cpp +186 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_handle.h +48 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_locker.cpp +139 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_locker.h +6 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_message.cpp +67 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_message.h +10 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_object.cpp +122 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_object.h +10 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_script.cpp +36 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_script.h +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_string.cpp +52 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_string.h +9 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_template.cpp +344 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_template.h +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_try_catch.cpp +70 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_try_catch.h +5 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_v8.cpp +35 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_v8.h +6 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_value.cpp +175 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_value.h +10 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_weakref.cpp +61 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/ext/v8/v8_weakref.h +29 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/access.rb +87 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/array.rb +17 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/c/locker.rb +18 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/cli.rb +133 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/context.rb +111 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/error.rb +130 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/function.rb +44 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/object.rb +69 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/caller.rb +37 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/constructor.rb +98 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/function.rb +63 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/interceptors.rb +152 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/proxies.rb +151 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal/templates.rb +73 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/portal.rb +86 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/stack.rb +66 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/tap.rb +9 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8/version.rb +3 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/lib/v8.rb +23 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/array_spec.rb +15 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/cxt_spec.rb +57 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb +27 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/func_spec.rb +64 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/object_spec.rb +10 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/string_spec.rb +11 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/ext/try_catch_spec.rb +60 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/.gitignore +1 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/README.txt +8 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/jsapi_spec.rb +922 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs/loadme.js +1 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/redjs_helper.rb +3 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/spec_helper.rb +9 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/v8/error_spec.rb +131 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/spec/v8/portal/proxies_spec.rb +106 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specmem/handle_memspec.rb +41 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specmem/object_memspec.rb +14 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specmem/proxies_memspec.rb +49 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specmem/spec_helper.rb +24 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specthread/spec_helper.rb +2 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/specthread/threading_spec.rb +13 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/thefrontside.png +0 -0
- data/vendor/bundle/gems/therubyracer-0.10.1/therubyracer.gemspec +29 -0
- data/vendor/bundle/specifications/libv8-3.3.10.4-x86_64-darwin-11.gemspec +33 -0
- data/vendor/bundle/specifications/sass-3.1.19.gemspec +35 -0
- metadata +365 -3
@@ -0,0 +1,282 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
3
|
+
require 'pathname'
|
4
|
+
|
5
|
+
class UtilTest < Test::Unit::TestCase
|
6
|
+
include Sass::Util
|
7
|
+
|
8
|
+
def test_scope
|
9
|
+
assert(File.exist?(scope("Rakefile")))
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_to_hash
|
13
|
+
assert_equal({
|
14
|
+
:foo => 1,
|
15
|
+
:bar => 2,
|
16
|
+
:baz => 3
|
17
|
+
}, to_hash([[:foo, 1], [:bar, 2], [:baz, 3]]))
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_map_keys
|
21
|
+
assert_equal({
|
22
|
+
"foo" => 1,
|
23
|
+
"bar" => 2,
|
24
|
+
"baz" => 3
|
25
|
+
}, map_keys({:foo => 1, :bar => 2, :baz => 3}) {|k| k.to_s})
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_map_vals
|
29
|
+
assert_equal({
|
30
|
+
:foo => "1",
|
31
|
+
:bar => "2",
|
32
|
+
:baz => "3"
|
33
|
+
}, map_vals({:foo => 1, :bar => 2, :baz => 3}) {|k| k.to_s})
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_map_hash
|
37
|
+
assert_equal({
|
38
|
+
"foo" => "1",
|
39
|
+
"bar" => "2",
|
40
|
+
"baz" => "3"
|
41
|
+
}, map_hash({:foo => 1, :bar => 2, :baz => 3}) {|k, v| [k.to_s, v.to_s]})
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_powerset
|
45
|
+
return unless Set[Set[]] == Set[Set[]] # There's a bug in Ruby 1.8.6 that breaks nested set equality
|
46
|
+
assert_equal([[].to_set].to_set,
|
47
|
+
powerset([]))
|
48
|
+
assert_equal([[].to_set, [1].to_set].to_set,
|
49
|
+
powerset([1]))
|
50
|
+
assert_equal([[].to_set, [1].to_set, [2].to_set, [1, 2].to_set].to_set,
|
51
|
+
powerset([1, 2]))
|
52
|
+
assert_equal([[].to_set, [1].to_set, [2].to_set, [3].to_set,
|
53
|
+
[1, 2].to_set, [2, 3].to_set, [1, 3].to_set, [1, 2, 3].to_set].to_set,
|
54
|
+
powerset([1, 2, 3]))
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_restrict
|
58
|
+
assert_equal(0.5, restrict(0.5, 0..1))
|
59
|
+
assert_equal(1, restrict(2, 0..1))
|
60
|
+
assert_equal(1.3, restrict(2, 0..1.3))
|
61
|
+
assert_equal(0, restrict(-1, 0..1))
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_merge_adjacent_strings
|
65
|
+
assert_equal(["foo bar baz", :bang, "biz bop", 12],
|
66
|
+
merge_adjacent_strings(["foo ", "bar ", "baz", :bang, "biz", " bop", 12]))
|
67
|
+
str = "foo"
|
68
|
+
assert_equal(["foo foo foo", :bang, "foo foo", 12],
|
69
|
+
merge_adjacent_strings([str, " ", str, " ", str, :bang, str, " ", str, 12]))
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_intersperse
|
73
|
+
assert_equal(["foo", " ", "bar", " ", "baz"],
|
74
|
+
intersperse(%w[foo bar baz], " "))
|
75
|
+
assert_equal([], intersperse([], " "))
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_substitute
|
79
|
+
assert_equal(["foo", "bar", "baz", 3, 4],
|
80
|
+
substitute([1, 2, 3, 4], [1, 2], ["foo", "bar", "baz"]))
|
81
|
+
assert_equal([1, "foo", "bar", "baz", 4],
|
82
|
+
substitute([1, 2, 3, 4], [2, 3], ["foo", "bar", "baz"]))
|
83
|
+
assert_equal([1, 2, "foo", "bar", "baz"],
|
84
|
+
substitute([1, 2, 3, 4], [3, 4], ["foo", "bar", "baz"]))
|
85
|
+
|
86
|
+
assert_equal([1, "foo", "bar", "baz", 2, 3, 4],
|
87
|
+
substitute([1, 2, 2, 2, 3, 4], [2, 2], ["foo", "bar", "baz"]))
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_strip_string_array
|
91
|
+
assert_equal(["foo ", " bar ", " baz"],
|
92
|
+
strip_string_array([" foo ", " bar ", " baz "]))
|
93
|
+
assert_equal([:foo, " bar ", " baz"],
|
94
|
+
strip_string_array([:foo, " bar ", " baz "]))
|
95
|
+
assert_equal(["foo ", " bar ", :baz],
|
96
|
+
strip_string_array([" foo ", " bar ", :baz]))
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_paths
|
100
|
+
assert_equal([[1, 3, 5], [2, 3, 5], [1, 4, 5], [2, 4, 5]],
|
101
|
+
paths([[1, 2], [3, 4], [5]]))
|
102
|
+
assert_equal([[]], paths([]))
|
103
|
+
assert_equal([[1, 2, 3]], paths([[1], [2], [3]]))
|
104
|
+
end
|
105
|
+
|
106
|
+
def test_lcs
|
107
|
+
assert_equal([1, 2, 3], lcs([1, 2, 3], [1, 2, 3]))
|
108
|
+
assert_equal([], lcs([], [1, 2, 3]))
|
109
|
+
assert_equal([], lcs([1, 2, 3], []))
|
110
|
+
assert_equal([1, 2, 3], lcs([5, 1, 4, 2, 3, 17], [0, 0, 1, 2, 6, 3]))
|
111
|
+
|
112
|
+
assert_equal([1], lcs([1, 2, 3, 4], [4, 3, 2, 1]))
|
113
|
+
assert_equal([1, 2], lcs([1, 2, 3, 4], [3, 4, 1, 2]))
|
114
|
+
end
|
115
|
+
|
116
|
+
def test_lcs_with_block
|
117
|
+
assert_equal(["1", "2", "3"],
|
118
|
+
lcs([1, 4, 2, 5, 3], [1, 2, 3]) {|a, b| a == b && a.to_s})
|
119
|
+
assert_equal([-4, 2, 8],
|
120
|
+
lcs([-5, 3, 2, 8], [-4, 1, 8]) {|a, b| (a - b).abs <= 1 && [a, b].max})
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_subsequence
|
124
|
+
assert(subsequence?([1, 2, 3], [1, 2, 3]))
|
125
|
+
assert(subsequence?([1, 2, 3], [1, :a, 2, :b, 3]))
|
126
|
+
assert(subsequence?([1, 2, 3], [:a, 1, :b, :c, 2, :d, 3, :e, :f]))
|
127
|
+
|
128
|
+
assert(!subsequence?([1, 2, 3], [1, 2]))
|
129
|
+
assert(!subsequence?([1, 2, 3], [1, 3, 2]))
|
130
|
+
assert(!subsequence?([1, 2, 3], [3, 2, 1]))
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_silence_warnings
|
134
|
+
old_stderr, $stderr = $stderr, StringIO.new
|
135
|
+
warn "Out"
|
136
|
+
assert_equal("Out\n", $stderr.string)
|
137
|
+
silence_warnings {warn "In"}
|
138
|
+
assert_equal("Out\n", $stderr.string)
|
139
|
+
ensure
|
140
|
+
$stderr = old_stderr
|
141
|
+
end
|
142
|
+
|
143
|
+
def test_sass_warn
|
144
|
+
assert_warning("Foo!") {sass_warn "Foo!"}
|
145
|
+
end
|
146
|
+
|
147
|
+
def test_silence_sass_warnings
|
148
|
+
old_stderr, $stderr = $stderr, StringIO.new
|
149
|
+
silence_sass_warnings {warn "Out"}
|
150
|
+
assert_equal("Out\n", $stderr.string)
|
151
|
+
silence_sass_warnings {sass_warn "In"}
|
152
|
+
assert_equal("Out\n", $stderr.string)
|
153
|
+
ensure
|
154
|
+
$stderr = old_stderr
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_has
|
158
|
+
assert(has?(:instance_method, String, :chomp!))
|
159
|
+
assert(has?(:private_instance_method, Sass::Engine, :parse_interp))
|
160
|
+
end
|
161
|
+
|
162
|
+
def test_enum_with_index
|
163
|
+
assert_equal(%w[foo0 bar1 baz2],
|
164
|
+
enum_with_index(%w[foo bar baz]).map {|s, i| "#{s}#{i}"})
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_enum_cons
|
168
|
+
assert_equal(%w[foobar barbaz],
|
169
|
+
enum_cons(%w[foo bar baz], 2).map {|s1, s2| "#{s1}#{s2}"})
|
170
|
+
end
|
171
|
+
|
172
|
+
def test_extract
|
173
|
+
arr = [1, 2, 3, 4, 5]
|
174
|
+
assert_equal([1, 3, 5], extract!(arr) {|e| e % 2 == 1})
|
175
|
+
assert_equal([2, 4], arr)
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_ord
|
179
|
+
assert_equal(102, ord("f"))
|
180
|
+
assert_equal(98, ord("bar"))
|
181
|
+
end
|
182
|
+
|
183
|
+
def test_flatten
|
184
|
+
assert_equal([1, 2, 3], flatten([1, 2, 3], 0))
|
185
|
+
assert_equal([1, 2, 3], flatten([1, 2, 3], 1))
|
186
|
+
assert_equal([1, 2, 3], flatten([1, 2, 3], 2))
|
187
|
+
|
188
|
+
assert_equal([[1, 2], 3], flatten([[1, 2], 3], 0))
|
189
|
+
assert_equal([1, 2, 3], flatten([[1, 2], 3], 1))
|
190
|
+
assert_equal([1, 2, 3], flatten([[1, 2], 3], 2))
|
191
|
+
|
192
|
+
assert_equal([[[1], 2], [3], 4], flatten([[[1], 2], [3], 4], 0))
|
193
|
+
assert_equal([[1], 2, 3, 4], flatten([[[1], 2], [3], 4], 1))
|
194
|
+
assert_equal([1, 2, 3, 4], flatten([[[1], 2], [3], 4], 2))
|
195
|
+
end
|
196
|
+
|
197
|
+
def test_set_hash
|
198
|
+
assert(set_hash(Set[1, 2, 3]) == set_hash(Set[3, 2, 1]))
|
199
|
+
assert(set_hash(Set[1, 2, 3]) == set_hash(Set[1, 2, 3]))
|
200
|
+
|
201
|
+
s1 = Set[]
|
202
|
+
s1 << 1
|
203
|
+
s1 << 2
|
204
|
+
s1 << 3
|
205
|
+
s2 = Set[]
|
206
|
+
s2 << 3
|
207
|
+
s2 << 2
|
208
|
+
s2 << 1
|
209
|
+
assert(set_hash(s1) == set_hash(s2))
|
210
|
+
end
|
211
|
+
|
212
|
+
def test_set_eql
|
213
|
+
assert(set_eql?(Set[1, 2, 3], Set[3, 2, 1]))
|
214
|
+
assert(set_eql?(Set[1, 2, 3], Set[1, 2, 3]))
|
215
|
+
|
216
|
+
s1 = Set[]
|
217
|
+
s1 << 1
|
218
|
+
s1 << 2
|
219
|
+
s1 << 3
|
220
|
+
s2 = Set[]
|
221
|
+
s2 << 3
|
222
|
+
s2 << 2
|
223
|
+
s2 << 1
|
224
|
+
assert(set_eql?(s1, s2))
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_extract_and_inject_values
|
228
|
+
test = lambda {|arr| assert_equal(arr, with_extracted_values(arr) {|str| str})}
|
229
|
+
|
230
|
+
test[['foo bar']]
|
231
|
+
test[['foo {12} bar']]
|
232
|
+
test[['foo {{12} bar']]
|
233
|
+
test[['foo {{1', 12, '2} bar']]
|
234
|
+
test[['foo 1', 2, '{3', 4, 5, 6, '{7}', 8]]
|
235
|
+
test[['foo 1', [2, 3, 4], ' bar']]
|
236
|
+
test[['foo ', 1, "\n bar\n", [2, 3, 4], "\n baz"]]
|
237
|
+
end
|
238
|
+
|
239
|
+
def test_caller_info
|
240
|
+
assert_equal(["/tmp/foo.rb", 12, "fizzle"], caller_info("/tmp/foo.rb:12: in `fizzle'"))
|
241
|
+
assert_equal(["/tmp/foo.rb", 12, nil], caller_info("/tmp/foo.rb:12"))
|
242
|
+
assert_equal(["(sass)", 12, "blah"], caller_info("(sass):12: in `blah'"))
|
243
|
+
assert_equal(["", 12, "boop"], caller_info(":12: in `boop'"))
|
244
|
+
assert_equal(["/tmp/foo.rb", -12, "fizzle"], caller_info("/tmp/foo.rb:-12: in `fizzle'"))
|
245
|
+
assert_equal(["/tmp/foo.rb", 12, "fizzle"], caller_info("/tmp/foo.rb:12: in `fizzle {}'"))
|
246
|
+
end
|
247
|
+
|
248
|
+
def test_version_gt
|
249
|
+
assert_version_gt("2.0.0", "1.0.0")
|
250
|
+
assert_version_gt("1.1.0", "1.0.0")
|
251
|
+
assert_version_gt("1.0.1", "1.0.0")
|
252
|
+
assert_version_gt("1.0.0", "1.0.0.rc")
|
253
|
+
assert_version_gt("1.0.0.1", "1.0.0.rc")
|
254
|
+
assert_version_gt("1.0.0.rc", "0.9.9")
|
255
|
+
assert_version_gt("1.0.0.beta", "1.0.0.alpha")
|
256
|
+
|
257
|
+
assert_version_eq("1.0.0", "1.0.0")
|
258
|
+
assert_version_eq("1.0.0", "1.0.0.0")
|
259
|
+
end
|
260
|
+
|
261
|
+
def assert_version_gt(v1, v2)
|
262
|
+
#assert(version_gt(v1, v2), "Expected #{v1} > #{v2}")
|
263
|
+
assert(!version_gt(v2, v1), "Expected #{v2} < #{v1}")
|
264
|
+
end
|
265
|
+
|
266
|
+
def assert_version_eq(v1, v2)
|
267
|
+
assert(!version_gt(v1, v2), "Expected #{v1} = #{v2}")
|
268
|
+
assert(!version_gt(v2, v1), "Expected #{v2} = #{v1}")
|
269
|
+
end
|
270
|
+
|
271
|
+
class FooBar
|
272
|
+
def foo
|
273
|
+
Sass::Util.abstract(self)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
def test_abstract
|
278
|
+
assert_raise_message(NotImplementedError,
|
279
|
+
"UtilTest::FooBar must implement #foo") {FooBar.new.foo}
|
280
|
+
end
|
281
|
+
|
282
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
lib_dir = File.dirname(__FILE__) + '/../lib'
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'fileutils'
|
5
|
+
$:.unshift lib_dir unless $:.include?(lib_dir)
|
6
|
+
require 'sass'
|
7
|
+
require 'mathn' if ENV['MATHN'] == 'true'
|
8
|
+
|
9
|
+
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
|
10
|
+
|
11
|
+
module Sass::Script::Functions
|
12
|
+
def option(name)
|
13
|
+
Sass::Script::String.new(@options[name.value.to_sym].to_s)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
def munge_filename(opts = {})
|
19
|
+
return if opts.has_key?(:filename)
|
20
|
+
opts[:filename] = filename_for_test(opts[:syntax] || :sass)
|
21
|
+
end
|
22
|
+
|
23
|
+
def filename_for_test(syntax = :sass)
|
24
|
+
test_name = caller.
|
25
|
+
map {|c| Sass::Util.caller_info(c)[2]}.
|
26
|
+
compact.
|
27
|
+
map {|c| c.sub(/^(block|rescue) in /, '')}.
|
28
|
+
find {|c| c =~ /^test_/}
|
29
|
+
"#{test_name}_inline.#{syntax}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def clean_up_sassc
|
33
|
+
path = File.dirname(__FILE__) + "/../.sass-cache"
|
34
|
+
FileUtils.rm_r(path) if File.exist?(path)
|
35
|
+
end
|
36
|
+
|
37
|
+
def assert_warning(message)
|
38
|
+
the_real_stderr, $stderr = $stderr, StringIO.new
|
39
|
+
yield
|
40
|
+
|
41
|
+
if message.is_a?(Regexp)
|
42
|
+
assert_match message, $stderr.string.strip
|
43
|
+
else
|
44
|
+
assert_equal message.strip, $stderr.string.strip
|
45
|
+
end
|
46
|
+
ensure
|
47
|
+
$stderr = the_real_stderr
|
48
|
+
end
|
49
|
+
|
50
|
+
def silence_warnings(&block)
|
51
|
+
Sass::Util.silence_warnings(&block)
|
52
|
+
end
|
53
|
+
|
54
|
+
def assert_raise_message(klass, message)
|
55
|
+
yield
|
56
|
+
rescue Exception => e
|
57
|
+
assert_instance_of(klass, e)
|
58
|
+
assert_equal(message, e.message)
|
59
|
+
else
|
60
|
+
flunk "Expected exception #{klass}, none raised"
|
61
|
+
end
|
62
|
+
|
63
|
+
def assert_raise_line(line)
|
64
|
+
yield
|
65
|
+
rescue Sass::SyntaxError => e
|
66
|
+
assert_equal(line, e.sass_line)
|
67
|
+
else
|
68
|
+
flunk "Expected exception on line #{line}, none raised"
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
## 0.4.2 - May 1, 2012
|
2
|
+
|
3
|
+
### Bug fixes
|
4
|
+
|
5
|
+
- [#21](https://github.com/guard/listen/issues/21): Issues when listening to changes in relative paths. (reported by [@akerbos][], fixed by [@Maher4Ever][])
|
6
|
+
- [#27](https://github.com/guard/listen/issues/27): Wrong reports for files modifications. (reported by [@cobychapple][], fixed by [@Maher4Ever][])
|
7
|
+
- Fix segmentation fault when profiling on Windows. ([@Maher4Ever][])
|
8
|
+
- Fix redundant watchers on Windows. ([@Maher4Ever][])
|
9
|
+
|
10
|
+
### Improvements
|
11
|
+
|
12
|
+
- [#17](https://github.com/guard/listen/issues/17): Use regexp-patterns with the `ignore` method instead of supplying paths. (reported by [@fny][], added by [@Maher4Ever][])
|
13
|
+
- Speed improvement when listening to changes in directories with ignored paths. ([@Maher4Ever][])
|
14
|
+
- Added `.rbx` and `.svn` to ignored directories. ([@Maher4Ever][])
|
15
|
+
|
16
|
+
## 0.4.1 - April 15, 2012
|
17
|
+
|
18
|
+
### Bug fixes
|
19
|
+
|
20
|
+
- [#18]((https://github.com/guard/listen/issues/18): Listener crashes when removing directories with nested paths. (reported by [@daemonza][], fixed by [@Maher4Ever][])
|
21
|
+
|
22
|
+
## 0.4.0 - April 9, 2012
|
23
|
+
|
24
|
+
### New features
|
25
|
+
|
26
|
+
- Add `wait_for_callback` method to all adapters. ([@Maher4Ever][])
|
27
|
+
- Add `Listen::MultiListener` class to listen to multiple directories at once. ([@Maher4Ever][])
|
28
|
+
- Allow passing multiple directories to the `Listen.to` method. ([@Maher4Ever][])
|
29
|
+
- Add `blocking` option to `Listen#start` which can be used to disable blocking the current thread upon starting. ([@Maher4Ever][])
|
30
|
+
- Use absolute-paths in callbacks by default instead of relative-paths. ([@Maher4Ever][])
|
31
|
+
- Add `relative_paths` option to `Listen::Listener` to retain the old functionality. ([@Maher4Ever][])
|
32
|
+
|
33
|
+
### Improvements
|
34
|
+
|
35
|
+
- Encapsulate thread spawning in the linux-adapter. ([@Maher4Ever][])
|
36
|
+
- Encapsulate thread spawning in the darwin-adapter. ([@Maher4Ever][] with [@scottdavis][] help)
|
37
|
+
- Encapsulate thread spawning in the windows-adapter. ([@Maher4Ever][])
|
38
|
+
- Fix linux-adapter bug where Listen would report file-modification events on the parent-directory. ([@Maher4Ever][])
|
39
|
+
|
40
|
+
### Removals
|
41
|
+
|
42
|
+
- Remove `wait_until_listening` as adapters doesn't need to run inside threads anymore ([@Maher4Ever][])
|
43
|
+
|
44
|
+
## 0.3.3 - March 6, 2012
|
45
|
+
|
46
|
+
### Improvements
|
47
|
+
|
48
|
+
- Improve pause/unpause. ([@thibaudgg][])
|
49
|
+
|
50
|
+
## 0.3.2 - March 4, 2012
|
51
|
+
|
52
|
+
### New features
|
53
|
+
|
54
|
+
- Add pause/unpause listener's methods. ([@thibaudgg][])
|
55
|
+
|
56
|
+
## 0.3.1 - February 22, 2012
|
57
|
+
|
58
|
+
### Bug fix
|
59
|
+
|
60
|
+
- [#9](https://github.com/guard/listen/issues/9): Ignore doesn't seem to work. (reported by [@markiz][], fixed by [@thibaudgg][])
|
61
|
+
|
62
|
+
## 0.3.0 - February 21, 2012
|
63
|
+
|
64
|
+
### New features
|
65
|
+
|
66
|
+
- Add automatic fallback to polling if system adapter doesn't work (like a DropBox folder). ([@thibaudgg][])
|
67
|
+
- Add latency and force_polling options. ([@Maher4Ever][])
|
68
|
+
|
69
|
+
## 0.2.0 - February 13, 2012
|
70
|
+
|
71
|
+
### New features
|
72
|
+
|
73
|
+
- Add checksum comparaison support for detecting consecutive file modifications made during the same second. ([@thibaudgg][])
|
74
|
+
- Add rb-fchange support. ([@thibaudgg][])
|
75
|
+
- Add rb-inotify support. ([@thibaudgg][] with [@Maher4Ever][] help)
|
76
|
+
- Add rb-fsevent support. ([@thibaudgg][])
|
77
|
+
- Add non-recursive diff with multiple directories support. ([@thibaudgg][])
|
78
|
+
- Ignore .DS_Store by default. ([@thibaudgg][])
|
79
|
+
|
80
|
+
## 0.1.0 - January 28, 2012
|
81
|
+
|
82
|
+
- First version with only a polling adapter and basic features set (ignore & filter). ([@thibaudgg][])
|
83
|
+
|
84
|
+
[@markiz]: https://github.com/markiz
|
85
|
+
[@thibaudgg]: https://github.com/thibaudgg
|
86
|
+
[@Maher4Ever]: https://github.com/Maher4Ever
|
87
|
+
[@daemonza]: https://github.com/daemonza
|
88
|
+
[@akerbos]: https://github.com/akerbos
|
89
|
+
[@fny]: https://github.com/fny
|
90
|
+
[@cobychapple]: https://github.com/cobychapple
|
@@ -0,0 +1,35 @@
|
|
1
|
+
source :rubygems
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'rake'
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
platform :ruby do
|
9
|
+
gem 'rb-readline'
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'rbconfig'
|
13
|
+
case RbConfig::CONFIG['target_os']
|
14
|
+
when /darwin/i
|
15
|
+
# gem 'ruby_gntp', '~> 0.3.4', :require => false
|
16
|
+
gem 'growl', :require => false
|
17
|
+
when /linux/i
|
18
|
+
gem 'libnotify', '~> 0.7.1', :require => false
|
19
|
+
when /mswin|mingw/i
|
20
|
+
gem 'win32console', :require => false
|
21
|
+
gem 'rb-notifu', '>= 0.0.4', :require => false
|
22
|
+
end
|
23
|
+
|
24
|
+
gem 'guard', '~> 1.0.0'
|
25
|
+
gem 'guard-rspec', '~> 0.7.0'
|
26
|
+
gem 'yard'
|
27
|
+
gem 'redcarpet'
|
28
|
+
gem 'pry'
|
29
|
+
|
30
|
+
gem 'vagrant'
|
31
|
+
end
|
32
|
+
|
33
|
+
group :test do
|
34
|
+
gem 'rspec', '~> 2.9.0'
|
35
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
guard :rspec, :all_on_start => false, :all_after_pass => false, :cli => '--fail-fast --format doc' do
|
2
|
+
watch(%r{^spec/.+_spec\.rb$})
|
3
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
4
|
+
watch('spec/support/adapter_helper.rb') { "spec/listen/adapters" }
|
5
|
+
watch('spec/support/listener_helper.rb') { "spec/listen/listener_spec.rb" }
|
6
|
+
watch('spec/support/fixtures_helper.rb') { "spec" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 Thibaud Guillaume-Gentil
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|