brakeman 4.6.1 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of brakeman might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +11 -0
- data/bundle/load.rb +7 -7
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/CHANGELOG.md +122 -4
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/FAQ.md +4 -14
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/Gemfile +19 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/MIT-LICENSE +2 -2
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/README.md +80 -42
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/REFERENCE.md +121 -64
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/TODO +24 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/haml.gemspec +44 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml.rb +2 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/attribute_builder.rb +164 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/attribute_compiler.rb +224 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/attribute_parser.rb +150 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/buffer.rb +25 -132
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/compiler.rb +330 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/engine.rb +34 -41
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/error.rb +65 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/escapable.rb +50 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/exec.rb +38 -20
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/filters.rb +22 -27
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/generator.rb +42 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers.rb +129 -90
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers/action_view_extensions.rb +4 -2
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers/action_view_mods.rb +45 -60
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers/action_view_xss_mods.rb +2 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/helpers/safe_erubi_template.rb +20 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers/safe_erubis_template.rb +5 -1
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/helpers/xss_mods.rb +19 -12
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/options.rb +63 -69
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/parser.rb +292 -228
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/plugin.rb +37 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/railtie.rb +48 -0
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/sass_rails_filter.rb +18 -4
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/template.rb +13 -6
- data/bundle/ruby/2.6.0/gems/{haml-4.0.7 → haml-5.1.2}/lib/haml/template/options.rb +13 -2
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/temple_engine.rb +123 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/temple_line_counter.rb +30 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/util.rb +258 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/version.rb +5 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/yard/default/fulldoc/html/css/common.sass +15 -0
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/yard/default/layout/html/footer.erb +12 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/AUTHORS +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/COPYING +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/Changelog.md +3 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/Gemfile +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/LICENSE +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/README.md +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/TODO +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/appveyor.yml +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/highline.gemspec +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/builtin_styles.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/color_scheme.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/compatibility.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/custom_errors.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/import.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/io_console_compatible.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/list.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/list_renderer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/menu.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/menu/item.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/paginator.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/question.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/question/answer_converter.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/question_asker.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/simulate.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/statement.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/string.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/string_extensions.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/style.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/template_renderer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/terminal.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/terminal/io_console.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/terminal/ncurses.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/terminal/unix_stty.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/version.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{highline-2.0.2 → highline-2.0.3}/lib/highline/wrapper.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby2ruby-2.4.3 → ruby2ruby-2.4.4}/History.rdoc +6 -0
- data/bundle/ruby/2.6.0/gems/{ruby2ruby-2.4.3 → ruby2ruby-2.4.4}/Manifest.txt +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby2ruby-2.4.3 → ruby2ruby-2.4.4}/README.rdoc +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby2ruby-2.4.3 → ruby2ruby-2.4.4}/lib/ruby2ruby.rb +3 -3
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/History.rdoc +38 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/Manifest.txt +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/README.rdoc +3 -3
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/compare/normalize.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/debugging.md +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/rp_extensions.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby20_parser.rb +7045 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1/lib/ruby_parser.yy → ruby_parser-3.14.0/lib/ruby20_parser.y} +390 -397
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby21_parser.rb +7116 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby21_parser.y +399 -254
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby22_parser.rb +7149 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby22_parser.y +400 -255
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby23_parser.rb +7166 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby23_parser.y +400 -255
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby24_parser.rb +7178 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby24_parser.y +404 -257
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby25_parser.rb +7178 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby25_parser.y +404 -257
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby26_parser.rb +7198 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby26_parser.y +410 -261
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby_lexer.rb +424 -432
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby_lexer.rex +0 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby_lexer.rex.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby_parser.rb +27 -27
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby_parser.yy +2732 -0
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/lib/ruby_parser_extras.rb +627 -406
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/tools/munge.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{ruby_parser-3.13.1 → ruby_parser-3.14.0}/tools/ripper.rb +13 -2
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/History.rdoc +13 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/Manifest.txt +1 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/README.rdoc +0 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/lib/pt_testcase.rb +0 -0
- data/bundle/ruby/2.6.0/gems/sexp_processor-4.13.0/lib/sexp.rb +381 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1/lib/sexp.rb → sexp_processor-4.13.0/lib/sexp_matcher.rb} +25 -385
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/lib/strict_sexp.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{sexp_processor-4.12.1 → sexp_processor-4.13.0}/lib/unique.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/CHANGES +5 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/EXPRESSIONS.md +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/Gemfile +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/LICENSE +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/README.md +1 -1
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/engine.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filter.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/string_splitter.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generator.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/map.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/mixins/dispatcher.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/parser.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/static_analyzer.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/templates.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/templates/rails.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/lib/temple/utils.rb +0 -0
- data/bundle/ruby/2.6.0/gems/temple-0.8.2/lib/temple/version.rb +3 -0
- data/bundle/ruby/2.6.0/gems/{temple-0.8.1 → temple-0.8.2}/temple.gemspec +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/COPYING +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt.rb +1 -1
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/asciidoc.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/babel.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/bluecloth.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/builder.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/coffee.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/commonmarker.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/creole.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/csv.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/dummy.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/erb.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/erubi.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/erubis.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/etanni.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/haml.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/kramdown.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/less.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/liquid.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/livescript.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/mapping.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/markaby.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/maruku.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/nokogiri.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/pandoc.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/plain.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/prawn.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/radius.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/rdiscount.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/rdoc.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/redcarpet.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/redcloth.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/rst-pandoc.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/sass.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/sigil.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/string.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/template.rb +7 -12
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/typescript.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/wikicloth.rb +0 -0
- data/bundle/ruby/2.6.0/gems/{tilt-2.0.9 → tilt-2.0.10}/lib/tilt/yajl.rb +0 -0
- data/lib/brakeman/checks/base_check.rb +23 -1
- data/lib/brakeman/checks/check_cookie_serialization.rb +1 -1
- data/lib/brakeman/checks/check_cross_site_scripting.rb +1 -1
- data/lib/brakeman/checks/check_execute.rb +26 -1
- data/lib/brakeman/differ.rb +16 -28
- data/lib/brakeman/parsers/haml_embedded.rb +1 -1
- data/lib/brakeman/parsers/template_parser.rb +3 -1
- data/lib/brakeman/processors/alias_processor.rb +10 -0
- data/lib/brakeman/processors/base_processor.rb +2 -0
- data/lib/brakeman/processors/haml_template_processor.rb +86 -122
- data/lib/brakeman/processors/lib/rails2_config_processor.rb +1 -1
- data/lib/brakeman/processors/template_alias_processor.rb +28 -0
- data/lib/brakeman/tracker/config.rb +33 -92
- data/lib/brakeman/version.rb +1 -1
- metadata +215 -206
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/compiler.rb +0 -540
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/error.rb +0 -61
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/railtie.rb +0 -22
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/template/plugin.rb +0 -41
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/util.rb +0 -377
- data/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/version.rb +0 -3
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.rb +0 -6869
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.y +0 -2431
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby21_parser.rb +0 -6944
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.rb +0 -6968
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.rb +0 -6987
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.rb +0 -6994
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby25_parser.rb +0 -6994
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.rb +0 -7012
- data/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.6.0/gems/tilt-2.0.9/CHANGELOG.md +0 -132
- data/bundle/ruby/2.6.0/gems/tilt-2.0.9/Gemfile +0 -70
- data/bundle/ruby/2.6.0/gems/tilt-2.0.9/HACKING +0 -16
- data/bundle/ruby/2.6.0/gems/tilt-2.0.9/README.md +0 -233
- data/bundle/ruby/2.6.0/gems/tilt-2.0.9/tilt.gemspec +0 -130
@@ -1,132 +0,0 @@
|
|
1
|
-
## master
|
2
|
-
|
3
|
-
## 2.0.9 (2018-11-28)
|
4
|
-
|
5
|
-
* Use new ERB API in Ruby 2.6 (#329, koic)
|
6
|
-
* Support the new sassc gem (#336, jdickey, judofyr)
|
7
|
-
|
8
|
-
## 2.0.8 (2017-07-24)
|
9
|
-
|
10
|
-
* Register .tsx for TypeScript (#315, backus)
|
11
|
-
* Use Haml 5's new API (#312, k0kubun)
|
12
|
-
* Use correct parser options for CommonMarker (#320, rewritten)
|
13
|
-
* Suppress warnings when no locals are used (#304, amatsuda)
|
14
|
-
* Haml: Accept `outvar` (#317, k0kubun)
|
15
|
-
|
16
|
-
## 2.0.7 (2017-03-19)
|
17
|
-
|
18
|
-
* Do not modify BasicObject during template compilation on ruby 2.0+ (#309, jeremyevans)
|
19
|
-
|
20
|
-
## 2.0.6 (2017-01-26)
|
21
|
-
|
22
|
-
* Add support for LiveScript (#286, @Announcement Jacob Francis Powers)
|
23
|
-
* Add support for Sigil (#302, winebarrel)
|
24
|
-
* Add support for Erubi (#308, jeremyevans)
|
25
|
-
* Add support for options in Liquid (#298, #299, laCour)
|
26
|
-
* Always sort locals by strings (#307, jeremyevans)
|
27
|
-
|
28
|
-
* Fix test warnings (#305, amatsuda)
|
29
|
-
* Fix indentation (#293, yui-knk)
|
30
|
-
* Use SVG badges in README (#294, vasinov)
|
31
|
-
* Fix typo and trailing space (#295, #296, karloescota)
|
32
|
-
|
33
|
-
## 2.0.5 (2016-06-02)
|
34
|
-
|
35
|
-
* Add support for reST using Pandoc (#284, mfenner)
|
36
|
-
* Make lazy loading thread-safe; remove warning (judofyr)
|
37
|
-
|
38
|
-
## 2.0.4 (2016-05-16)
|
39
|
-
|
40
|
-
* Fix regression in BuilderTemplate (#283, judofyr)
|
41
|
-
|
42
|
-
## 2.0.3 (2016-05-12)
|
43
|
-
|
44
|
-
* Add Pandoc support (#276, jmuheim)
|
45
|
-
* Add CommonMark support (#282, raphink)
|
46
|
-
* Add TypeScript support (#278, nghitran)
|
47
|
-
* Work with frozen string literal (#274, jeremyevans)
|
48
|
-
* Add MIME type for Babel (#273, SaitoWu)
|
49
|
-
|
50
|
-
## 2.0.2 (2016-01-06)
|
51
|
-
|
52
|
-
* Pass options to Redcarpet (#250, hughbien)
|
53
|
-
* Haml: Improve error message on frozen self (judofyr)
|
54
|
-
* Add basic support for Babel (judofyr)
|
55
|
-
* Add support for .litcoffee (#243, judofyr, mr-vinn)
|
56
|
-
* Document Tilt::Cache (#266, tommay)
|
57
|
-
* Sort local keys for better caching (#257, jeremyevans)
|
58
|
-
* Add more CSV options (#256, Juanmcuello)
|
59
|
-
* Add Prawn template (kematzy)
|
60
|
-
* Improve cache-miss performance in Tilt::Cache (#251, tommay)
|
61
|
-
* Add man page (#241, josephholsten)
|
62
|
-
* Support YAML/JSON data in bin/tilt (#241, josephholsten)
|
63
|
-
|
64
|
-
## 2.0.1 (2014-03-21)
|
65
|
-
|
66
|
-
* Fix Tilt::Mapping bug in Ruby 2.1.0 (9589652c569760298f2647f7a0f9ed4f85129f20)
|
67
|
-
* Fix `tilt --list` (#223, Achrome)
|
68
|
-
* Fix circular require (#221, amarshall)
|
69
|
-
|
70
|
-
## 2.0.0 (2013-11-30)
|
71
|
-
|
72
|
-
* Support Pathname in Template#new (#219, kabturek)
|
73
|
-
* Add Mapping#templates_for (judofyr)
|
74
|
-
* Support old-style #register (judofyr)
|
75
|
-
* Add Handlebars as external template engine (#204, judofyr, jimothyGator)
|
76
|
-
* Add org-ruby as external template engine (#207, judofyr, minad)
|
77
|
-
* Documentation typo (#208, elgalu)
|
78
|
-
|
79
|
-
## 2.0.0.beta1 (2013-07-16)
|
80
|
-
|
81
|
-
* Documentation typo (#202, chip)
|
82
|
-
* Use YARD for documentation (#189, judofyr)
|
83
|
-
* Add Slim as an external template engine (judofyr)
|
84
|
-
* Add Tilt.templates_for (#121, judofyr)
|
85
|
-
* Add Tilt.current_template (#151, judofyr)
|
86
|
-
* Avoid loading all files in tilt.rb (#160, #187, judofyr)
|
87
|
-
* Implement lazily required templates classes (#178, #187, judofyr)
|
88
|
-
* Move #allows_script and default_mime_type to metadata (#187, judofyr)
|
89
|
-
* Introduce Tilt::Mapping (#187, judofyr)
|
90
|
-
* Make template compilation thread-safe (#191, judofyr)
|
91
|
-
|
92
|
-
## 1.4.1 (2013-05-08)
|
93
|
-
|
94
|
-
* Support Arrays in pre/postambles (#193, jbwiv)
|
95
|
-
|
96
|
-
## 1.4.0 (2013-05-01)
|
97
|
-
|
98
|
-
* Better encoding support
|
99
|
-
|
100
|
-
## 1.3.7 (2013-04-09)
|
101
|
-
|
102
|
-
* Erubis: Check for the correct constant (#183, mattwildig)
|
103
|
-
* Don't fail when BasicObject is defined in 1.8 (#182, technobrat, judofyr)
|
104
|
-
|
105
|
-
## 1.3.6 (2013-03-17)
|
106
|
-
|
107
|
-
* Accept Hash that implements #path as options (#180, lawso017)
|
108
|
-
* Changed extension for CsvTemplate from '.csv' to '.rcsv' (#177, alexgb)
|
109
|
-
|
110
|
-
## 1.3.5 (2013-03-06)
|
111
|
-
|
112
|
-
* Fixed extension for PlainTemplate (judofyr)
|
113
|
-
* Improved local variables regexp (#174, razorinc)
|
114
|
-
* Added CHANGELOG.md
|
115
|
-
|
116
|
-
## 1.3.4 (2013-02-28)
|
117
|
-
|
118
|
-
* Support RDoc 4.0 (#168, judofyr)
|
119
|
-
* Add mention of Org-Mode support (#165, aslakknutsen)
|
120
|
-
* Add AsciiDoctorTemplate (#163, #164, aslakknutsen)
|
121
|
-
* Add PlainTextTemplate (nathanaeljones)
|
122
|
-
* Restrict locals to valid variable names (#158, thinkerbot)
|
123
|
-
* ERB: Improve trim mode support (#156, ssimeonov)
|
124
|
-
* Add CSVTemplate (#153, alexgb)
|
125
|
-
* Remove special case for 1.9.1 (#147, guilleiguaran)
|
126
|
-
* Add allows\_script? method to Template (#143, bhollis)
|
127
|
-
* Default to using Redcarpet2 (#139, DAddYE)
|
128
|
-
* Allow File/Tempfile as filenames (#134, jamesotron)
|
129
|
-
* Add EtanniTemplate (#131, manveru)
|
130
|
-
* Support RDoc 3.10 (#112, timfel)
|
131
|
-
* Always compile templates; remove old source evaluator (rtomayko)
|
132
|
-
* Less: Options are now being passed to the parser (#106, cowboyd)
|
@@ -1,70 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'rake'
|
6
|
-
gem 'minitest', '~> 5.0'
|
7
|
-
|
8
|
-
group :development do
|
9
|
-
gem 'yard', '~> 0.9.0'
|
10
|
-
gem 'ronn', '~> 0.7.3'
|
11
|
-
end
|
12
|
-
|
13
|
-
can_execjs = (RUBY_VERSION >= '1.9.3')
|
14
|
-
|
15
|
-
group :primary do
|
16
|
-
gem 'builder'
|
17
|
-
gem 'haml', '>= 4' if RUBY_VERSION >= '2.0.0'
|
18
|
-
gem 'erubis'
|
19
|
-
gem 'markaby'
|
20
|
-
|
21
|
-
if ENV['OLD_SASS']
|
22
|
-
gem 'sass'
|
23
|
-
else
|
24
|
-
gem 'sassc'
|
25
|
-
end
|
26
|
-
|
27
|
-
if can_execjs
|
28
|
-
gem 'less'
|
29
|
-
gem 'coffee-script'
|
30
|
-
gem 'livescript'
|
31
|
-
gem 'babel-transpiler'
|
32
|
-
gem 'typescript-node'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
platform :mri do
|
37
|
-
gem 'duktape', '~> 1.3.0.6' if can_execjs
|
38
|
-
end
|
39
|
-
|
40
|
-
group :secondary do
|
41
|
-
gem 'creole'
|
42
|
-
gem 'kramdown'
|
43
|
-
gem 'rdoc'
|
44
|
-
gem 'radius'
|
45
|
-
gem 'asciidoctor', '>= 0.1.0'
|
46
|
-
gem 'liquid'
|
47
|
-
gem 'maruku'
|
48
|
-
gem 'pandoc-ruby'
|
49
|
-
|
50
|
-
if RUBY_VERSION > '1.9.3'
|
51
|
-
gem 'prawn', '>= 2.0.0'
|
52
|
-
gem 'pdf-reader', '~> 1.3.3'
|
53
|
-
end
|
54
|
-
|
55
|
-
gem 'nokogiri' if RUBY_VERSION > '1.9.2'
|
56
|
-
|
57
|
-
platform :ruby do
|
58
|
-
gem 'wikicloth'
|
59
|
-
gem 'yajl-ruby'
|
60
|
-
gem 'redcarpet' if RUBY_VERSION > '1.8.7'
|
61
|
-
gem 'rdiscount', '>= 2.1.6' if RUBY_VERSION != '1.9.2'
|
62
|
-
gem 'RedCloth'
|
63
|
-
gem 'commonmarker' if RUBY_VERSION > '1.9.3'
|
64
|
-
end
|
65
|
-
|
66
|
-
platform :mri do
|
67
|
-
gem 'bluecloth'
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
Clone:
|
2
|
-
|
3
|
-
git clone git://github.com/rtomayko/tilt.git
|
4
|
-
cd tilt
|
5
|
-
|
6
|
-
Install needed packages under ./vendor and run tests (requires bundler):
|
7
|
-
|
8
|
-
rake
|
9
|
-
|
10
|
-
Run tests under your current gem environment. Do not install anything:
|
11
|
-
|
12
|
-
rake test
|
13
|
-
|
14
|
-
Only install needed packages under ./vendor:
|
15
|
-
|
16
|
-
rake setup
|
@@ -1,233 +0,0 @@
|
|
1
|
-
Tilt [![Build Status](https://secure.travis-ci.org/rtomayko/tilt.svg)](http://travis-ci.org/rtomayko/tilt) [![Inline docs](http://inch-ci.org/github/rtomayko/tilt.svg)](http://inch-ci.org/github/rtomayko/tilt) [![Security](https://hakiri.io/github/rtomayko/tilt/master.svg)](https://hakiri.io/github/rtomayko/tilt/master)
|
2
|
-
====
|
3
|
-
|
4
|
-
**NOTE** The following file documents the current release of Tilt (2.0). See
|
5
|
-
https://github.com/rtomayko/tilt/tree/tilt-1 for documentation for Tilt 1.4.
|
6
|
-
|
7
|
-
Tilt is a thin interface over a bunch of different Ruby template engines in
|
8
|
-
an attempt to make their usage as generic as possible. This is useful for web
|
9
|
-
frameworks, static site generators, and other systems that support multiple
|
10
|
-
template engines but don't want to code for each of them individually.
|
11
|
-
|
12
|
-
The following features are supported for all template engines (assuming the
|
13
|
-
feature is relevant to the engine):
|
14
|
-
|
15
|
-
* Custom template evaluation scopes / bindings
|
16
|
-
* Ability to pass locals to template evaluation
|
17
|
-
* Support for passing a block to template evaluation for "yield"
|
18
|
-
* Backtraces with correct filenames and line numbers
|
19
|
-
* Template file caching and reloading
|
20
|
-
* Fast, method-based template source compilation
|
21
|
-
|
22
|
-
The primary goal is to get all of the things listed above right for all
|
23
|
-
template engines included in the distribution.
|
24
|
-
|
25
|
-
Support for these template engines is included with the package:
|
26
|
-
|
27
|
-
| Engine | File Extensions | Required Libraries | Maintainer |
|
28
|
-
| ----------------------- | ---------------------- | ------------------------------------------ | ----------- |
|
29
|
-
| Asciidoctor | .ad, .adoc, .asciidoc | asciidoctor (>= 0.1.0) | Community |
|
30
|
-
| ERB | .erb, .rhtml | none (included ruby stdlib) | Tilt team |
|
31
|
-
| InterpolatedString | .str | none (included ruby core) | Tilt team |
|
32
|
-
| Erubi | .erb, .rhtml, .erubi | erubi | Community |
|
33
|
-
| Erubis | .erb, .rhtml, .erubis | erubis | Tilt team |
|
34
|
-
| Haml | .haml | haml | Tilt team |
|
35
|
-
| Sass | .sass | haml (< 3.1) or sass (>= 3.1) | Tilt team |
|
36
|
-
| Scss | .scss | haml (< 3.1) or sass (>= 3.1) | Tilt team |
|
37
|
-
| Less CSS | .less | less | Tilt team |
|
38
|
-
| Builder | .builder | builder | Tilt team |
|
39
|
-
| Liquid | .liquid | liquid | Community |
|
40
|
-
| RDiscount | .markdown, .mkd, .md | rdiscount | Community |
|
41
|
-
| Redcarpet | .markdown, .mkd, .md | redcarpet | Community |
|
42
|
-
| BlueCloth | .markdown, .mkd, .md | bluecloth | Community |
|
43
|
-
| Kramdown | .markdown, .mkd, .md | kramdown | Community |
|
44
|
-
| Pandoc | .markdown, .mkd, .md | pandoc | Community |
|
45
|
-
| reStructuredText | .rst | pandoc | Community |
|
46
|
-
| Maruku | .markdown, .mkd, .md | maruku | Community |
|
47
|
-
| CommonMarker | .markdown, .mkd, .md | commonmarker | Community |
|
48
|
-
| RedCloth | .textile | redcloth | Community |
|
49
|
-
| RDoc | .rdoc | rdoc | Tilt team |
|
50
|
-
| Radius | .radius | radius | Community |
|
51
|
-
| Markaby | .mab | markaby | Tilt team |
|
52
|
-
| Nokogiri | .nokogiri | nokogiri | Community |
|
53
|
-
| CoffeeScript | .coffee | coffee-script (+ javascript) | Tilt team |
|
54
|
-
| CoffeeScript (literate) | .litcoffee | coffee-script (>= 1.5.0) (+ javascript) | Tilt team |
|
55
|
-
| LiveScript | .ls | livescript (+ javascript) | Tilt team |
|
56
|
-
| TypeScript | .ts | typescript (+ javascript) | Tilt team |
|
57
|
-
| Creole (Wiki markup) | .wiki, .creole | creole | Community |
|
58
|
-
| WikiCloth (Wiki markup) | .wiki, .mediawiki, .mw | wikicloth | Community |
|
59
|
-
| Yajl | .yajl | yajl-ruby | Community |
|
60
|
-
| CSV | .rcsv | none (Ruby >= 1.9), fastercsv (Ruby < 1.9) | Tilt team |
|
61
|
-
| Prawn | .prawn | prawn (>= 2.0.0) | Community |
|
62
|
-
| Babel | .es6, .babel, .jsx | babel-transpiler | Tilt team |
|
63
|
-
| Opal | .rb | opal | Community |
|
64
|
-
| Sigil | .sigil | sigil | Community |
|
65
|
-
|
66
|
-
Every supported template engine has a *maintainer*. Note that this is the
|
67
|
-
maintainer of the Tilt integration, not the maintainer of the template engine
|
68
|
-
itself. The maintainer is responsible for providing an adequate integration and
|
69
|
-
keeping backwards compatibility across Tilt version. Some integrations are
|
70
|
-
maintained by the *community*, which is handled in the following way:
|
71
|
-
|
72
|
-
- The Tilt team will liberally accept pull requests against the template
|
73
|
-
integration. It's up to the community as a whole to make sure the integration
|
74
|
-
stays consistent and backwards compatible over time.
|
75
|
-
- Test failures in community-maintained integrations will not be prioritized by
|
76
|
-
the Tilt team and a new version of Tilt might be released even though these
|
77
|
-
tests are failing.
|
78
|
-
- Anyone can become a maintainer for a template engine integration they care
|
79
|
-
about. Just open an issue and we'll figure it out.
|
80
|
-
|
81
|
-
These template engines ship with their own Tilt integration:
|
82
|
-
|
83
|
-
| Engine | File Extensions | Required Libraries |
|
84
|
-
| ------------------- | ---------------- | ------------------- |
|
85
|
-
| Slim | .slim | slim (>= 0.7) |
|
86
|
-
| Embedded JavaScript | | sprockets |
|
87
|
-
| Embedded CoffeeScript | | sprockets |
|
88
|
-
| JST | | sprockets |
|
89
|
-
| Org-mode | .org | org-ruby (>= 0.6.2) |
|
90
|
-
| Handlebars | .hbs, handlebars | tilt-handlebars |
|
91
|
-
| Jbuilder | .jbuilder | tilt-jbuilder |
|
92
|
-
|
93
|
-
See [TEMPLATES.md][t] for detailed information on template engine
|
94
|
-
options and supported features.
|
95
|
-
|
96
|
-
[t]: http://github.com/rtomayko/tilt/blob/master/docs/TEMPLATES.md
|
97
|
-
"Tilt Template Engine Documentation"
|
98
|
-
|
99
|
-
Basic Usage
|
100
|
-
-----------
|
101
|
-
|
102
|
-
Instant gratification:
|
103
|
-
|
104
|
-
require 'erb'
|
105
|
-
require 'tilt'
|
106
|
-
template = Tilt.new('templates/foo.erb')
|
107
|
-
=> #<Tilt::ERBTemplate @file="templates/foo.erb" ...>
|
108
|
-
output = template.render
|
109
|
-
=> "Hello world!"
|
110
|
-
|
111
|
-
It's recommended that calling programs explicitly require template engine
|
112
|
-
libraries (like 'erb' above) at load time. Tilt attempts to lazy require the
|
113
|
-
template engine library the first time a template is created but this is
|
114
|
-
prone to error in threaded environments.
|
115
|
-
|
116
|
-
The {Tilt} module contains generic implementation classes for all supported
|
117
|
-
template engines. Each template class adheres to the same interface for
|
118
|
-
creation and rendering. In the instant gratification example, we let Tilt
|
119
|
-
determine the template implementation class based on the filename, but
|
120
|
-
{Tilt::Template} implementations can also be used directly:
|
121
|
-
|
122
|
-
require 'tilt/haml'
|
123
|
-
template = Tilt::HamlTemplate.new('templates/foo.haml')
|
124
|
-
output = template.render
|
125
|
-
|
126
|
-
The `render` method takes an optional evaluation scope and locals hash
|
127
|
-
arguments. Here, the template is evaluated within the context of the
|
128
|
-
`Person` object with locals `x` and `y`:
|
129
|
-
|
130
|
-
require 'tilt/erb'
|
131
|
-
template = Tilt::ERBTemplate.new('templates/foo.erb')
|
132
|
-
joe = Person.find('joe')
|
133
|
-
output = template.render(joe, :x => 35, :y => 42)
|
134
|
-
|
135
|
-
If no scope is provided, the template is evaluated within the context of an
|
136
|
-
object created with `Object.new`.
|
137
|
-
|
138
|
-
A single `Template` instance's `render` method may be called multiple times
|
139
|
-
with different scope and locals arguments. Continuing the previous example,
|
140
|
-
we render the same compiled template but this time in jane's scope:
|
141
|
-
|
142
|
-
jane = Person.find('jane')
|
143
|
-
output = template.render(jane, :x => 22, :y => nil)
|
144
|
-
|
145
|
-
Blocks can be passed to `render` for templates that support running
|
146
|
-
arbitrary ruby code (usually with some form of `yield`). For instance,
|
147
|
-
assuming the following in `foo.erb`:
|
148
|
-
|
149
|
-
Hey <%= yield %>!
|
150
|
-
|
151
|
-
The block passed to `render` is called on `yield`:
|
152
|
-
|
153
|
-
template = Tilt::ERBTemplate.new('foo.erb')
|
154
|
-
template.render { 'Joe' }
|
155
|
-
# => "Hey Joe!"
|
156
|
-
|
157
|
-
Template Mappings
|
158
|
-
-----------------
|
159
|
-
|
160
|
-
The {Tilt::Mapping} class includes methods for associating template
|
161
|
-
implementation classes with filename patterns and for locating/instantiating
|
162
|
-
template classes based on those associations.
|
163
|
-
|
164
|
-
The {Tilt} module has a global instance of `Mapping` that is populated with the
|
165
|
-
table of template engines above.
|
166
|
-
|
167
|
-
The {Tilt.register} method associates a filename pattern with a specific
|
168
|
-
template implementation. To use ERB for files ending in a `.bar` extension:
|
169
|
-
|
170
|
-
>> Tilt.register Tilt::ERBTemplate, 'bar'
|
171
|
-
>> Tilt.new('views/foo.bar')
|
172
|
-
=> #<Tilt::ERBTemplate @file="views/foo.bar" ...>
|
173
|
-
|
174
|
-
Retrieving the template class for a file or file extension:
|
175
|
-
|
176
|
-
>> Tilt['foo.bar']
|
177
|
-
=> Tilt::ERBTemplate
|
178
|
-
>> Tilt['haml']
|
179
|
-
=> Tilt::HamlTemplate
|
180
|
-
|
181
|
-
Retrieving a list of template classes for a file:
|
182
|
-
|
183
|
-
>> Tilt.templates_for('foo.bar')
|
184
|
-
=> [Tilt::ERBTemplate]
|
185
|
-
>> Tilt.templates_for('foo.haml.bar')
|
186
|
-
=> [Tilt::ERBTemplate, Tilt::HamlTemplate]
|
187
|
-
|
188
|
-
The template class is determined by searching for a series of decreasingly
|
189
|
-
specific name patterns. When creating a new template with
|
190
|
-
`Tilt.new('views/foo.html.erb')`, we check for the following template
|
191
|
-
mappings:
|
192
|
-
|
193
|
-
1. `views/foo.html.erb`
|
194
|
-
2. `foo.html.erb`
|
195
|
-
3. `html.erb`
|
196
|
-
4. `erb`
|
197
|
-
|
198
|
-
Encodings
|
199
|
-
---------
|
200
|
-
|
201
|
-
Tilt needs to know the encoding of the template in order to work properly:
|
202
|
-
|
203
|
-
Tilt will use `Encoding.default_external` as the encoding when reading external
|
204
|
-
files. If you're mostly working with one encoding (e.g. UTF-8) we *highly*
|
205
|
-
recommend setting this option. When providing a custom reader block (`Tilt.new
|
206
|
-
{ custom_string }`) you'll have ensure the string is properly encoded yourself.
|
207
|
-
|
208
|
-
Most of the template engines in Tilt also allows you to override the encoding
|
209
|
-
using the `:default_encoding`-option:
|
210
|
-
|
211
|
-
```ruby
|
212
|
-
tmpl = Tilt.new('hello.erb', :default_encoding => 'Big5')
|
213
|
-
```
|
214
|
-
|
215
|
-
Ultimately it's up to the template engine how to handle the encoding: It might
|
216
|
-
respect `:default_encoding`, it might always assume it's UTF-8 (like
|
217
|
-
CoffeeScript), or it can do its own encoding detection.
|
218
|
-
|
219
|
-
Template Compilation
|
220
|
-
--------------------
|
221
|
-
|
222
|
-
Tilt compiles generated Ruby source code produced by template engines and reuses
|
223
|
-
it on subsequent template invocations. Benchmarks show this yields a 5x-10x
|
224
|
-
performance increase over evaluating the Ruby source on each invocation.
|
225
|
-
|
226
|
-
Template compilation is currently supported for these template engines:
|
227
|
-
StringTemplate, ERB, Erubis, Haml, Nokogiri, Builder and Yajl.
|
228
|
-
|
229
|
-
LICENSE
|
230
|
-
-------
|
231
|
-
|
232
|
-
Tilt is Copyright (c) 2010 [Ryan Tomayko](http://tomayko.com/about) and
|
233
|
-
distributed under the MIT license. See the `COPYING` file for more info.
|