brakeman 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +11 -0
- data/README.md +3 -2
- data/bundle/load.rb +4 -4
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/History.txt +7 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/Manifest.txt +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/README.txt +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/Rakefile +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/bin/ruby_parse +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/bin/ruby_parse_extract_error +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby18_parser.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby18_parser.y +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby19_parser.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby19_parser.y +0 -0
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby20_parser.rb +6728 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby20_parser.y +33 -24
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby21_parser.rb +6766 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby21_parser.y +33 -24
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby22_parser.rb +6811 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby22_parser.y +33 -24
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.2/lib/ruby23_parser.rb +6817 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby23_parser.y +34 -55
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rex +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_lexer.rex.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser.yy +36 -69
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/lib/ruby_parser_extras.rb +43 -3
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_lexer.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_parser.rb +42 -1
- data/bundle/ruby/2.3.0/gems/{ruby_parser-3.8.1 → ruby_parser-3.8.2}/test/test_ruby_parser_extras.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/CHANGES +5 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/Gemfile +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/LICENSE +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/README.jp.md +36 -11
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/README.md +44 -19
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/Rakefile +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/context.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/profile-parser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/profile-render.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/run-benchmarks.rb +41 -34
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/run-diffbench.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.erb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.haml +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/benchmarks/view.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/bin/slimrb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/include.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/include.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/logic_less.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/smart.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/jp/translator.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/logic_less.md +1 -1
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/smart.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/doc/translator.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/code_attributes.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/command.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/controls.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/do_inserter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/embedded.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/end_inserter.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/engine.rb +1 -3
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/erb_converter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/grammar.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/include.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/interpolation.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less/context.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/logic_less/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/parser.rb +22 -12
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/escaper.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/smart/parser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/splat/builder.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/splat/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/template.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/translator.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/lib/slim/version.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/slim.gemspec +1 -1
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_blocks.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_escaping.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_evaluation.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_output.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_code_structure.rb +18 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_commands.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_embedded_engines.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_encoding.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_erb_converter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_attributes.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_escaping.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_html_structure.rb +16 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_parser_errors.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_pretty.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_ruby_errors.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_slim_template.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_tabs.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_text_interpolation.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_thread_options.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/core/test_unicode.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/recursive.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/slimfile.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/subdir/test.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/files/textfile +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/include/test_include.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/TESTS.md +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/literate/run.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/logic_less/test_logic_less.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/Rakefile +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/application_controller.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/entries_controller.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/controllers/slim_controller.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/helpers/application_helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/models/entry.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/entries/edit.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/layouts/application.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/_partial.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/content_for.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/erb.html.erb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/form_for.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/helper.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/integers.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/no_layout.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/normal.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/partial.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/splat.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/thread_options.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/variables.html.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/app/views/slim/xml.slim +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config.ru +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/application.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/boot.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/environment.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/environments/test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/backtrace_silencers.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/inflections.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/mime_types.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/secret_token.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/initializers/session_store.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/locales/en.yml +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/config/routes.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/script/rails +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/test/helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/rails/test/test_slim.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/smart/test_smart_text.rb +6 -6
- data/bundle/ruby/2.3.0/gems/{slim-3.0.6 → slim-3.0.7}/test/translator/test_translator.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/CHANGES +5 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/EXPRESSIONS.md +0 -0
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/Gemfile +3 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/LICENSE +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/README.md +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/Rakefile +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple.rb +2 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/engine.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/remove_bom.rb +1 -1
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/filters/static_analyzer.rb +87 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/filters/string_splitter.rb +130 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generator.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/array_buffer.rb +3 -2
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/erb.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/rails_output_buffer.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_merger.rb +5 -10
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/pretty.rb +2 -2
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/map.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/dispatcher.rb +8 -6
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/parser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates/rails.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/lib/temple/utils.rb +15 -4
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/lib/temple/version.rb +3 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/temple.gemspec +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_code_merger.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_control_flow.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_dynamic_inliner.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_eraser.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_escapable.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_multi_flattener.rb +0 -0
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/test/filters/test_static_analyzer.rb +23 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/filters/test_static_merger.rb +0 -0
- data/bundle/ruby/2.3.0/gems/temple-0.7.7/test/filters/test_string_splitter.rb +18 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_merger.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_remover.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_attribute_sorter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_fast.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/html/test_pretty.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/mixins/test_dispatcher.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/mixins/test_grammar_dsl.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_engine.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_erb.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_filter.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_generator.rb +4 -4
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_grammar.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_map.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{temple-0.7.6 → temple-0.7.7}/test/test_utils.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/CHANGELOG.md +17 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/COPYING +1 -1
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/Gemfile +3 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/HACKING +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/README.md +3 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/Rakefile +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/bin/tilt +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/docs/TEMPLATES.md +34 -4
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/docs/common.css +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt.rb +10 -6
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/asciidoc.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/babel.rb +2 -1
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/bluecloth.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/builder.rb +12 -8
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/coffee.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/commonmarker.rb +21 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/creole.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/csv.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/dummy.rb +3 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/erb.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/erubis.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/etanni.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/haml.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/kramdown.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/less.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/liquid.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/mapping.rb +37 -9
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/markaby.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/maruku.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/nokogiri.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/pandoc.rb +49 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/plain.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/prawn.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/radius.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/rdiscount.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/rdoc.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/redcarpet.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/redcloth.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/rst-pandoc.rb +18 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/sass.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/string.rb +1 -1
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/template.rb +6 -3
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/lib/tilt/typescript.rb +26 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/wikicloth.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/lib/tilt/yajl.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/man/index.txt +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/man/tilt.1.ronn +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/locals.mab +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/markaby.mab +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/markaby_other_static.mab +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/render_twice.mab +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/scope.mab +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/markaby/yielding.mab +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/mytemplate.rb +2 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/test_helper.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_asciidoctor_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_babeltemplate.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_blueclothtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_buildertemplate_test.rb +13 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_cache_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_coffeescripttemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_commonmarkertemplate_test.rb +20 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_compilesite_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_creoletemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_csv_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_erbtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_erubistemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_etannitemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_hamltemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_kramdown_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_lesstemplate_test.less +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_lesstemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_liquidtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_mapping_test.rb +17 -14
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_markaby_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_markdown_test.rb +9 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_marukutemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_metadata_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_nokogiritemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_pandoctemplate_test.rb +67 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_prawntemplate.prawn +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_prawntemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_radiustemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_rdiscounttemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_rdoctemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_redcarpettemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_redclothtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_rstpandoctemplate_test.rb +32 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_sasstemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_stringtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_template_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/tilt-2.0.5/test/tilt_typescript_test.rb +34 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_wikiclothtemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_yajltemplate_test.rb +0 -0
- data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/tilt.gemspec +12 -2
- data/lib/brakeman.rb +21 -12
- data/lib/brakeman/checks/check_sql.rb +3 -3
- data/lib/brakeman/checks/check_validation_regex.rb +31 -3
- data/lib/brakeman/options.rb +4 -0
- data/lib/brakeman/parsers/rails3_erubis.rb +43 -23
- data/lib/brakeman/processors/alias_processor.rb +5 -0
- data/lib/brakeman/processors/base_processor.rb +2 -8
- data/lib/brakeman/processors/erb_template_processor.rb +1 -5
- data/lib/brakeman/processors/erubis_template_processor.rb +16 -10
- data/lib/brakeman/processors/haml_template_processor.rb +4 -2
- data/lib/brakeman/processors/lib/basic_processor.rb +2 -16
- data/lib/brakeman/processors/lib/safe_call_helper.rb +16 -0
- data/lib/brakeman/processors/output_processor.rb +1 -1
- data/lib/brakeman/processors/slim_template_processor.rb +1 -5
- data/lib/brakeman/processors/template_processor.rb +19 -0
- data/lib/brakeman/rescanner.rb +2 -1
- data/lib/brakeman/scanner.rb +2 -4
- data/lib/brakeman/tracker.rb +0 -9
- data/lib/brakeman/tracker/collection.rb +4 -0
- data/lib/brakeman/version.rb +1 -1
- metadata +322 -307
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby20_parser.rb +0 -6723
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby21_parser.rb +0 -6764
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby22_parser.rb +0 -6804
- data/bundle/ruby/2.3.0/gems/ruby_parser-3.8.1/lib/ruby23_parser.rb +0 -6905
- data/bundle/ruby/2.3.0/gems/temple-0.7.6/Gemfile +0 -3
- data/bundle/ruby/2.3.0/gems/temple-0.7.6/lib/temple/version.rb +0 -3
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'monitor'
|
2
|
+
|
1
3
|
module Tilt
|
2
4
|
# Tilt::Mapping associates file extensions with template implementations.
|
3
5
|
#
|
@@ -60,7 +62,7 @@ module Tilt
|
|
60
62
|
@lazy_map = other.lazy_map.dup
|
61
63
|
end
|
62
64
|
|
63
|
-
#
|
65
|
+
# Registers a lazy template implementation by file extension. You
|
64
66
|
# can have multiple lazy template implementations defined on the
|
65
67
|
# same file extension, in which case the template implementation
|
66
68
|
# defined *last* will be attempted loaded *first*.
|
@@ -214,9 +216,14 @@ module Tilt
|
|
214
216
|
@template_map[ext] || lazy_load(ext)
|
215
217
|
end
|
216
218
|
|
219
|
+
LOCK = Monitor.new
|
220
|
+
|
217
221
|
def lazy_load(pattern)
|
218
222
|
return unless @lazy_map.has_key?(pattern)
|
219
223
|
|
224
|
+
LOCK.enter
|
225
|
+
entered = true
|
226
|
+
|
220
227
|
choices = @lazy_map[pattern]
|
221
228
|
|
222
229
|
# Check if a template class is already present
|
@@ -234,12 +241,6 @@ module Tilt
|
|
234
241
|
choices.each do |class_name, file|
|
235
242
|
begin
|
236
243
|
require file
|
237
|
-
|
238
|
-
if Thread.list.size > 1
|
239
|
-
warn "WARN: tilt autoloading '#{file}' in a non thread-safe way; " +
|
240
|
-
"explicit require '#{file}' suggested."
|
241
|
-
end
|
242
|
-
|
243
244
|
# It's safe to eval() here because constant_defined? will
|
244
245
|
# raise NameError on invalid constant names
|
245
246
|
template_class = eval(class_name)
|
@@ -252,12 +253,39 @@ module Tilt
|
|
252
253
|
end
|
253
254
|
|
254
255
|
raise first_failure if first_failure
|
256
|
+
ensure
|
257
|
+
LOCK.exit if entered
|
255
258
|
end
|
256
259
|
|
260
|
+
# This is due to a bug in JRuby (see GH issue jruby/jruby#3585)
|
261
|
+
Tilt.autoload :Dummy, "tilt/dummy"
|
262
|
+
require "tilt/dummy"
|
263
|
+
AUTOLOAD_IS_BROKEN = Tilt.autoload?(:Dummy)
|
264
|
+
|
265
|
+
# The proper behavior (in MRI) for autoload? is to
|
266
|
+
# return `false` when the constant/file has been
|
267
|
+
# explicitly required.
|
268
|
+
#
|
269
|
+
# However, in JRuby it returns `true` even after it's
|
270
|
+
# been required. In that case it turns out that `defined?`
|
271
|
+
# returns `"constant"` if it exists and `nil` when it doesn't.
|
272
|
+
# This is actually a second bug: `defined?` should resolve
|
273
|
+
# autoload (aka. actually try to require the file).
|
274
|
+
#
|
275
|
+
# We use the second bug in order to resolve the first bug.
|
276
|
+
|
257
277
|
def constant_defined?(name)
|
258
278
|
name.split('::').inject(Object) do |scope, n|
|
259
|
-
|
260
|
-
|
279
|
+
if scope.autoload?(n)
|
280
|
+
if !AUTOLOAD_IS_BROKEN
|
281
|
+
return false
|
282
|
+
end
|
283
|
+
|
284
|
+
if eval("!defined?(scope::#{n})")
|
285
|
+
return false
|
286
|
+
end
|
287
|
+
end
|
288
|
+
return false if !scope.const_defined?(n)
|
261
289
|
scope.const_get(n)
|
262
290
|
end
|
263
291
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'tilt/template'
|
2
|
+
require 'pandoc-ruby'
|
3
|
+
|
4
|
+
module Tilt
|
5
|
+
# Pandoc markdown implementation. See:
|
6
|
+
# http://pandoc.org/
|
7
|
+
class PandocTemplate < Template
|
8
|
+
self.default_mime_type = 'text/html'
|
9
|
+
|
10
|
+
def tilt_to_pandoc_mapping
|
11
|
+
{ :smartypants => :smart,
|
12
|
+
:escape_html => { :f => 'markdown-raw_html' },
|
13
|
+
:commonmark => { :f => 'commonmark' },
|
14
|
+
:markdown_strict => { :f => 'markdown_strict' }
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# turn options hash into an array
|
19
|
+
# Map tilt options to pandoc options
|
20
|
+
# Replace hash keys with value true with symbol for key
|
21
|
+
# Remove hash keys with value false
|
22
|
+
# Leave other hash keys untouched
|
23
|
+
def pandoc_options
|
24
|
+
options.reduce([]) do |sum, (k,v)|
|
25
|
+
case v
|
26
|
+
when true
|
27
|
+
sum << (tilt_to_pandoc_mapping[k] || k)
|
28
|
+
when false
|
29
|
+
sum
|
30
|
+
else
|
31
|
+
sum << { k => v }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def prepare
|
37
|
+
@engine = PandocRuby.new(data, *pandoc_options)
|
38
|
+
@output = nil
|
39
|
+
end
|
40
|
+
|
41
|
+
def evaluate(scope, locals, &block)
|
42
|
+
@output ||= @engine.to_html.strip
|
43
|
+
end
|
44
|
+
|
45
|
+
def allows_script?
|
46
|
+
false
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'tilt/template'
|
2
|
+
require 'tilt/pandoc'
|
3
|
+
|
4
|
+
module Tilt
|
5
|
+
# Pandoc reStructuredText implementation. See:
|
6
|
+
# http://pandoc.org/
|
7
|
+
# Use PandocTemplate and specify input format
|
8
|
+
class RstPandocTemplate < PandocTemplate
|
9
|
+
def tilt_to_pandoc_mapping
|
10
|
+
{ :smartypants => :smart }
|
11
|
+
end
|
12
|
+
|
13
|
+
def pandoc_options
|
14
|
+
options.merge!(f: 'rst')
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
File without changes
|
@@ -79,7 +79,10 @@ module Tilt
|
|
79
79
|
@data = @reader.call(self)
|
80
80
|
|
81
81
|
if @data.respond_to?(:force_encoding)
|
82
|
-
|
82
|
+
if default_encoding
|
83
|
+
@data = @data.dup if @data.frozen?
|
84
|
+
@data.force_encoding(default_encoding)
|
85
|
+
end
|
83
86
|
|
84
87
|
if !@data.valid_encoding?
|
85
88
|
raise Encoding::InvalidByteSequenceError, "#{eval_file} is not valid #{@data.encoding}"
|
@@ -177,7 +180,7 @@ module Tilt
|
|
177
180
|
preamble = precompiled_preamble(local_keys)
|
178
181
|
template = precompiled_template(local_keys)
|
179
182
|
postamble = precompiled_postamble(local_keys)
|
180
|
-
source =
|
183
|
+
source = String.new
|
181
184
|
|
182
185
|
# Ensure that our generated source code has the same encoding as the
|
183
186
|
# the source code generated by the template engine.
|
@@ -246,7 +249,7 @@ module Tilt
|
|
246
249
|
local_code = local_extraction(local_keys)
|
247
250
|
|
248
251
|
method_name = "__tilt_#{Thread.current.object_id.abs}"
|
249
|
-
method_source =
|
252
|
+
method_source = String.new
|
250
253
|
|
251
254
|
if method_source.respond_to?(:force_encoding)
|
252
255
|
method_source.force_encoding(source.encoding)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'tilt/template'
|
2
|
+
require 'typescript-node'
|
3
|
+
|
4
|
+
module Tilt
|
5
|
+
class TypeScriptTemplate < Template
|
6
|
+
self.default_mime_type = 'application/javascript'
|
7
|
+
|
8
|
+
def prepare
|
9
|
+
@option_args = []
|
10
|
+
|
11
|
+
options.each do |key, value|
|
12
|
+
next unless value
|
13
|
+
|
14
|
+
@option_args << "--#{key}"
|
15
|
+
|
16
|
+
if value != true
|
17
|
+
@option_args << value.to_s
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def evaluate(scope, locals, &block)
|
23
|
+
@output ||= TypeScript::Node.compile(data, *@option_args)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -44,6 +44,19 @@ begin
|
|
44
44
|
assert_equal "<em>Hey Joe!</em>\n", template.render
|
45
45
|
end
|
46
46
|
|
47
|
+
test "options can be overridden" do
|
48
|
+
template = Tilt::BuilderTemplate.new(:indent => 0) { "xml.div { xml.em('Hey') }" }
|
49
|
+
assert_equal "<div><em>Hey</em></div>", template.render
|
50
|
+
end
|
51
|
+
|
52
|
+
test "can re-use locals for multiple calls" do
|
53
|
+
locals = { :name => "world" }
|
54
|
+
template = Tilt::BuilderTemplate.new(:indent => 0) { "xml.em name" }
|
55
|
+
3.times do
|
56
|
+
assert_equal "<em>world</em>", template.render(self, locals)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
47
60
|
test "allows nesting raw XML" do
|
48
61
|
subtemplate = Tilt::BuilderTemplate.new { "xml.em 'Hello World!'" }
|
49
62
|
template = Tilt::BuilderTemplate.new { "xml.strong { xml << yield }" }
|
File without changes
|
data/bundle/ruby/2.3.0/gems/{tilt-2.0.2 → tilt-2.0.5}/test/tilt_coffeescripttemplate_test.rb
RENAMED
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'tilt'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'tilt/commonmarker'
|
6
|
+
|
7
|
+
class CommonMarkerTemplateTest < Minitest::Test
|
8
|
+
test "preparing and evaluating templates on #render" do
|
9
|
+
template = Tilt::CommonMarkerTemplate.new { |t| "# Hello World!" }
|
10
|
+
assert_equal "<h1>Hello World!</h1>\n", template.render
|
11
|
+
end
|
12
|
+
|
13
|
+
test "can be rendered more than once" do
|
14
|
+
template = Tilt::CommonMarkerTemplate.new { |t| "# Hello World!" }
|
15
|
+
3.times { assert_equal "<h1>Hello World!</h1>\n", template.render }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
rescue LoadError => boom
|
19
|
+
warn "Tilt::CommonMarkerTemplate (disabled)"
|
20
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -57,10 +57,12 @@ module Tilt
|
|
57
57
|
context "lazy with one template class" do
|
58
58
|
setup do
|
59
59
|
@mapping.register_lazy('MyTemplate', 'my_template', 'mt')
|
60
|
+
@loaded_before = $LOADED_FEATURES.dup
|
60
61
|
end
|
61
62
|
|
62
63
|
teardown do
|
63
64
|
Object.send :remove_const, :MyTemplate if defined? ::MyTemplate
|
65
|
+
$LOADED_FEATURES.replace(@loaded_before)
|
64
66
|
end
|
65
67
|
|
66
68
|
test "registered?" do
|
@@ -97,6 +99,21 @@ module Tilt
|
|
97
99
|
end
|
98
100
|
end
|
99
101
|
|
102
|
+
test "doesn't require when the template class is autoloaded, and then defined" do
|
103
|
+
Object.autoload :MyTemplate, 'mytemplate'
|
104
|
+
did_load = require 'mytemplate'
|
105
|
+
assert did_load, "mytemplate wasn't freshly required"
|
106
|
+
|
107
|
+
req = proc do |file|
|
108
|
+
flunk "#require shouldn't be called"
|
109
|
+
end
|
110
|
+
|
111
|
+
@mapping.stub :require, req do
|
112
|
+
klass = @mapping['hello.mt']
|
113
|
+
assert_equal ::MyTemplate, klass
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
100
117
|
test "raises NameError when the class name is defined" do
|
101
118
|
req = proc do |file|
|
102
119
|
# do nothing
|
@@ -108,20 +125,6 @@ module Tilt
|
|
108
125
|
end
|
109
126
|
end
|
110
127
|
end
|
111
|
-
|
112
|
-
test "warns when there's multiple threads" do
|
113
|
-
Thread.new do
|
114
|
-
req = proc do |file|
|
115
|
-
class ::MyTemplate; end
|
116
|
-
end
|
117
|
-
|
118
|
-
@mapping.stub :require, req do
|
119
|
-
assert_output '', /autoloading 'my_template'/ do
|
120
|
-
@mapping['hello.mt']
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end.join
|
124
|
-
end
|
125
128
|
end
|
126
129
|
|
127
130
|
context "lazy with two template classes" do
|
File without changes
|
@@ -174,4 +174,13 @@ rescue LoadError
|
|
174
174
|
warn "Markdown tests need Nokogiri"
|
175
175
|
end
|
176
176
|
|
177
|
+
begin
|
178
|
+
require 'tilt/pandoc'
|
177
179
|
|
180
|
+
class MarkdownPandocTest < Minitest::Test
|
181
|
+
include MarkdownTests
|
182
|
+
template Tilt::PandocTemplate
|
183
|
+
end
|
184
|
+
rescue LoadError => boom
|
185
|
+
# It should already be warned in the main tests
|
186
|
+
end
|