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
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
require 'tilt'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'tilt/pandoc'
|
8
|
+
|
9
|
+
class PandocTemplateTest < Minitest::Test
|
10
|
+
test "preparing and evaluating templates on #render" do
|
11
|
+
template = Tilt::PandocTemplate.new { |t| "# Hello World!" }
|
12
|
+
assert_equal "<h1 id=\"hello-world\">Hello World!</h1>", template.render
|
13
|
+
end
|
14
|
+
|
15
|
+
test "can be rendered more than once" do
|
16
|
+
template = Tilt::PandocTemplate.new { |t| "# Hello World!" }
|
17
|
+
3.times { assert_equal "<h1 id=\"hello-world\">Hello World!</h1>", template.render }
|
18
|
+
end
|
19
|
+
|
20
|
+
test "smartypants when :smartypants is set" do
|
21
|
+
template = Tilt::PandocTemplate.new(:smartypants => true) { |t| "OKAY -- 'Smarty Pants'" }
|
22
|
+
assert_equal "<p>OKAY – ‘Smarty Pants’</p>", template.render
|
23
|
+
end
|
24
|
+
|
25
|
+
test "stripping HTML when :escape_html is set" do
|
26
|
+
template = Tilt::PandocTemplate.new(:escape_html => true) { |t| "HELLO <blink>WORLD</blink>" }
|
27
|
+
assert_equal "<p>HELLO <blink>WORLD</blink></p>", template.render
|
28
|
+
end
|
29
|
+
|
30
|
+
# Pandoc has tons of additional markdown features (see http://pandoc.org/README.html#pandocs-markdown).
|
31
|
+
# The test for footnotes should be seen as a general representation for all of them.
|
32
|
+
# use markdown_strict => true to disable additional markdown features
|
33
|
+
describe "passing in Pandoc options" do
|
34
|
+
test "generates footnotes" do
|
35
|
+
template = Tilt::PandocTemplate.new { |t| "Here is an inline note.^[Inlines notes are cool!]" }
|
36
|
+
assert_equal "<p>Here is an inline note.<a href=\"#fn1\" class=\"footnoteRef\" id=\"fnref1\"><sup>1</sup></a></p>\n<div class=\"footnotes\">\n<hr />\n<ol>\n<li id=\"fn1\"><p>Inlines notes are cool!<a href=\"#fnref1\">↩</a></p></li>\n</ol>\n</div>", template.render
|
37
|
+
end
|
38
|
+
|
39
|
+
test "doesn't generate footnotes with markdown_strict option" do
|
40
|
+
template = Tilt::PandocTemplate.new(:markdown_strict => true) { |t| "Here is an inline note.^[Inlines notes are cool!]" }
|
41
|
+
assert_equal "<p>Here is an inline note.^[Inlines notes are cool!]</p>", template.render
|
42
|
+
end
|
43
|
+
|
44
|
+
test "doesn't generate footnotes with commonmark option" do
|
45
|
+
template = Tilt::PandocTemplate.new(:commonmark => true) { |t| "Here is an inline note.^[Inlines notes are cool!]" }
|
46
|
+
assert_equal "<p>Here is an inline note.^[Inlines notes are cool!]</p>", template.render
|
47
|
+
end
|
48
|
+
|
49
|
+
test "accepts arguments with values (e.g. :id_prefix => 'xyz')" do
|
50
|
+
# Table of contents isn't on by default
|
51
|
+
template = Tilt::PandocTemplate.new { |t| "# This is a heading" }
|
52
|
+
assert_equal "<h1 id=\"this-is-a-heading\">This is a heading</h1>", template.render
|
53
|
+
|
54
|
+
# But it can be activated
|
55
|
+
template = Tilt::PandocTemplate.new(:id_prefix => 'test-') { |t| "# This is a heading" }
|
56
|
+
assert_equal "<h1 id=\"test-this-is-a-heading\">This is a heading</h1>", template.render
|
57
|
+
end
|
58
|
+
|
59
|
+
test "requires arguments without value (e.g. --standalone) to be passed as hash keys (:standalone => true)" do
|
60
|
+
template = Tilt::PandocTemplate.new(:standalone => true) { |t| "# This is a heading" }
|
61
|
+
assert_match /^<!DOCTYPE html.*<h1 id="this-is-a-heading">This is a heading<\/h1>.*<\/html>$/m, template.render
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
rescue LoadError => boom
|
66
|
+
warn "Tilt::PandocTemplate (disabled)"
|
67
|
+
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,32 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'tilt'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'tilt/rst-pandoc'
|
6
|
+
|
7
|
+
class RstPandocTemplateTest < Minitest::Test
|
8
|
+
test "is registered for '.rst' files" do
|
9
|
+
assert_equal Tilt::RstPandocTemplate, Tilt['test.rst']
|
10
|
+
end
|
11
|
+
|
12
|
+
test "compiles and evaluates the template on #render" do
|
13
|
+
template = Tilt::RstPandocTemplate.new { |t| "Hello World!\n============" }
|
14
|
+
assert_equal "<h1 id=\"hello-world\">Hello World!</h1>", template.render
|
15
|
+
end
|
16
|
+
|
17
|
+
test "can be rendered more than once" do
|
18
|
+
template = Tilt::RstPandocTemplate.new { |t| "Hello World!\n============" }
|
19
|
+
3.times do
|
20
|
+
assert_equal "<h1 id=\"hello-world\">Hello World!</h1>", template.render
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
test "doens't use markdown options" do
|
25
|
+
template = Tilt::RstPandocTemplate.new(:escape_html => true) { |t| "HELLO <blink>WORLD</blink>" }
|
26
|
+
err = assert_raises(RuntimeError) { template.render }
|
27
|
+
assert_match /pandoc: unrecognized option `--escape-html/, err.message
|
28
|
+
end
|
29
|
+
end
|
30
|
+
rescue LoadError => boom
|
31
|
+
warn "Tilt::RstPandocTemplate (disabled) [#{boom}]"
|
32
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'tilt'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'tilt/typescript'
|
6
|
+
|
7
|
+
class TypeScriptTemplateTest < Minitest::Test
|
8
|
+
def setup
|
9
|
+
@ts = "var x:number = 5"
|
10
|
+
@js = /var x = 5;\s*/
|
11
|
+
end
|
12
|
+
|
13
|
+
test "is registered for '.ts' files" do
|
14
|
+
assert_equal Tilt::TypeScriptTemplate, Tilt['test.ts']
|
15
|
+
end
|
16
|
+
|
17
|
+
test "compiles and evaluates the template on #render" do
|
18
|
+
template = Tilt::TypeScriptTemplate.new { @ts }
|
19
|
+
assert_match @js, template.render
|
20
|
+
end
|
21
|
+
|
22
|
+
test "supports source map" do
|
23
|
+
template = Tilt::TypeScriptTemplate.new(inlineSourceMap: true) { @ts }
|
24
|
+
assert_match /sourceMappingURL/, template.render
|
25
|
+
end
|
26
|
+
|
27
|
+
test "can be rendered more than once" do
|
28
|
+
template = Tilt::TypeScriptTemplate.new { @ts }
|
29
|
+
3.times { assert_match @js, template.render }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
rescue LoadError => boom
|
33
|
+
warn "Tilt::TypeScriptTemplate (disabled)"
|
34
|
+
end
|
File without changes
|
File without changes
|
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = 'tilt'
|
6
|
-
s.version = '2.0.
|
7
|
-
s.date = '2016-
|
6
|
+
s.version = '2.0.5'
|
7
|
+
s.date = '2016-06-02'
|
8
8
|
|
9
9
|
s.description = "Generic interface to multiple Ruby template engines"
|
10
10
|
s.summary = s.description
|
@@ -30,8 +30,10 @@ Gem::Specification.new do |s|
|
|
30
30
|
lib/tilt/bluecloth.rb
|
31
31
|
lib/tilt/builder.rb
|
32
32
|
lib/tilt/coffee.rb
|
33
|
+
lib/tilt/commonmarker.rb
|
33
34
|
lib/tilt/creole.rb
|
34
35
|
lib/tilt/csv.rb
|
36
|
+
lib/tilt/dummy.rb
|
35
37
|
lib/tilt/erb.rb
|
36
38
|
lib/tilt/erubis.rb
|
37
39
|
lib/tilt/etanni.rb
|
@@ -43,6 +45,7 @@ Gem::Specification.new do |s|
|
|
43
45
|
lib/tilt/markaby.rb
|
44
46
|
lib/tilt/maruku.rb
|
45
47
|
lib/tilt/nokogiri.rb
|
48
|
+
lib/tilt/pandoc.rb
|
46
49
|
lib/tilt/plain.rb
|
47
50
|
lib/tilt/prawn.rb
|
48
51
|
lib/tilt/radius.rb
|
@@ -50,9 +53,11 @@ Gem::Specification.new do |s|
|
|
50
53
|
lib/tilt/rdoc.rb
|
51
54
|
lib/tilt/redcarpet.rb
|
52
55
|
lib/tilt/redcloth.rb
|
56
|
+
lib/tilt/rst-pandoc.rb
|
53
57
|
lib/tilt/sass.rb
|
54
58
|
lib/tilt/string.rb
|
55
59
|
lib/tilt/template.rb
|
60
|
+
lib/tilt/typescript.rb
|
56
61
|
lib/tilt/wikicloth.rb
|
57
62
|
lib/tilt/yajl.rb
|
58
63
|
man/index.txt
|
@@ -63,6 +68,7 @@ Gem::Specification.new do |s|
|
|
63
68
|
test/markaby/render_twice.mab
|
64
69
|
test/markaby/scope.mab
|
65
70
|
test/markaby/yielding.mab
|
71
|
+
test/mytemplate.rb
|
66
72
|
test/test_helper.rb
|
67
73
|
test/tilt_asciidoctor_test.rb
|
68
74
|
test/tilt_babeltemplate.rb
|
@@ -70,6 +76,7 @@ Gem::Specification.new do |s|
|
|
70
76
|
test/tilt_buildertemplate_test.rb
|
71
77
|
test/tilt_cache_test.rb
|
72
78
|
test/tilt_coffeescripttemplate_test.rb
|
79
|
+
test/tilt_commonmarkertemplate_test.rb
|
73
80
|
test/tilt_compilesite_test.rb
|
74
81
|
test/tilt_creoletemplate_test.rb
|
75
82
|
test/tilt_csv_test.rb
|
@@ -87,6 +94,7 @@ Gem::Specification.new do |s|
|
|
87
94
|
test/tilt_marukutemplate_test.rb
|
88
95
|
test/tilt_metadata_test.rb
|
89
96
|
test/tilt_nokogiritemplate_test.rb
|
97
|
+
test/tilt_pandoctemplate_test.rb
|
90
98
|
test/tilt_prawntemplate.prawn
|
91
99
|
test/tilt_prawntemplate_test.rb
|
92
100
|
test/tilt_radiustemplate_test.rb
|
@@ -94,10 +102,12 @@ Gem::Specification.new do |s|
|
|
94
102
|
test/tilt_rdoctemplate_test.rb
|
95
103
|
test/tilt_redcarpettemplate_test.rb
|
96
104
|
test/tilt_redclothtemplate_test.rb
|
105
|
+
test/tilt_rstpandoctemplate_test.rb
|
97
106
|
test/tilt_sasstemplate_test.rb
|
98
107
|
test/tilt_stringtemplate_test.rb
|
99
108
|
test/tilt_template_test.rb
|
100
109
|
test/tilt_test.rb
|
110
|
+
test/tilt_typescript_test.rb
|
101
111
|
test/tilt_wikiclothtemplate_test.rb
|
102
112
|
test/tilt_yajltemplate_test.rb
|
103
113
|
tilt.gemspec
|
data/lib/brakeman.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
require 'set'
|
2
2
|
|
3
|
-
path_load = "#{File.expand_path(File.dirname(__FILE__))}/../bundle/load.rb"
|
4
|
-
|
5
|
-
if File.exist? path_load
|
6
|
-
require path_load
|
7
|
-
end
|
8
|
-
|
9
3
|
module Brakeman
|
10
4
|
|
11
5
|
#This exit code is used when warnings are found and the --exit-on-warn
|
@@ -18,6 +12,7 @@ module Brakeman
|
|
18
12
|
@debug = false
|
19
13
|
@quiet = false
|
20
14
|
@loaded_dependencies = []
|
15
|
+
@vendored_paths = false
|
21
16
|
|
22
17
|
#Run Brakeman scan. Returns Tracker object.
|
23
18
|
#
|
@@ -101,7 +96,7 @@ module Brakeman
|
|
101
96
|
#Load configuration file
|
102
97
|
if config = config_file(custom_location, app_path)
|
103
98
|
require 'date' # https://github.com/dtao/safe_yaml/issues/80
|
104
|
-
|
99
|
+
self.load_brakeman_dependency 'safe_yaml/load'
|
105
100
|
options = SafeYAML.load_file config, :deserialize_symbols => true
|
106
101
|
|
107
102
|
if options
|
@@ -167,7 +162,7 @@ module Brakeman
|
|
167
162
|
get_formats_from_output_files options[:output_files]
|
168
163
|
else
|
169
164
|
begin
|
170
|
-
|
165
|
+
self.load_brakeman_dependency 'terminal-table', :allow_fail
|
171
166
|
return [:to_s]
|
172
167
|
rescue LoadError
|
173
168
|
return [:to_json]
|
@@ -433,15 +428,29 @@ module Brakeman
|
|
433
428
|
Brakeman::Differ.new(new_results, previous_results).diff
|
434
429
|
end
|
435
430
|
|
436
|
-
def self.load_brakeman_dependency name
|
431
|
+
def self.load_brakeman_dependency name, allow_fail = false
|
437
432
|
return if @loaded_dependencies.include? name
|
438
433
|
|
434
|
+
unless @vendored_paths
|
435
|
+
path_load = "#{File.expand_path(File.dirname(__FILE__))}/../bundle/load.rb"
|
436
|
+
|
437
|
+
if File.exist? path_load
|
438
|
+
require path_load
|
439
|
+
end
|
440
|
+
|
441
|
+
@vendored_paths = true
|
442
|
+
end
|
443
|
+
|
439
444
|
begin
|
440
445
|
require name
|
441
446
|
rescue LoadError => e
|
442
|
-
|
443
|
-
|
444
|
-
|
447
|
+
if allow_fail
|
448
|
+
raise e
|
449
|
+
else
|
450
|
+
$stderr.puts e.message
|
451
|
+
$stderr.puts "Please install the appropriate dependency: #{name}."
|
452
|
+
exit!(-1)
|
453
|
+
end
|
445
454
|
end
|
446
455
|
end
|
447
456
|
|
@@ -545,9 +545,9 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
|
|
545
545
|
string_building? exp.first_arg
|
546
546
|
end
|
547
547
|
|
548
|
-
IGNORE_METHODS_IN_SQL = Set[:id, :merge_conditions, :table_name, :quoted_table_name,
|
549
|
-
:
|
550
|
-
:sanitize_sql_for_conditions, :sanitize_sql_hash,
|
548
|
+
IGNORE_METHODS_IN_SQL = Set[:id, :merge_conditions, :table_name, :quoted_table_name,
|
549
|
+
:quoted_primary_key, :to_i, :to_f, :sanitize_sql, :sanitize_sql_array,
|
550
|
+
:sanitize_sql_for_assignment, :sanitize_sql_for_conditions, :sanitize_sql_hash,
|
551
551
|
:sanitize_sql_hash_for_assignment, :sanitize_sql_hash_for_conditions,
|
552
552
|
:to_sql, :sanitize, :primary_key, :table_name_prefix, :table_name_suffix]
|
553
553
|
|
@@ -59,17 +59,37 @@ class Brakeman::CheckValidationRegex < Brakeman::BaseCheck
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
# Match secure regexp without extended option
|
63
|
+
SECURE_REGEXP_PATTERN = %r{
|
64
|
+
\A
|
65
|
+
\\A
|
66
|
+
.*
|
67
|
+
\\[zZ]
|
68
|
+
\z
|
69
|
+
}x
|
70
|
+
|
71
|
+
# Match secure of regexp with extended option
|
72
|
+
EXTENDED_SECURE_REGEXP_PATTERN = %r{
|
73
|
+
\A
|
74
|
+
\s*
|
75
|
+
\\A
|
76
|
+
.*
|
77
|
+
\\[zZ]
|
78
|
+
\s*
|
79
|
+
\z
|
80
|
+
}mx
|
81
|
+
|
62
82
|
#Issue warning if the regular expression does not use
|
63
83
|
#+\A+ and +\z+
|
64
84
|
def check_regex value, validator
|
65
85
|
return unless regexp? value
|
66
86
|
|
67
|
-
regex = value.value
|
68
|
-
unless regex
|
87
|
+
regex = value.value
|
88
|
+
unless secure_regex?(regex)
|
69
89
|
warn :model => @current_model,
|
70
90
|
:warning_type => "Format Validation",
|
71
91
|
:warning_code => :validation_regex,
|
72
|
-
:message => "Insufficient validation for '#{get_name validator}' using #{regex}. Use \\A and \\z as anchors",
|
92
|
+
:message => "Insufficient validation for '#{get_name validator}' using #{regex.inspect}. Use \\A and \\z as anchors",
|
73
93
|
:line => value.line,
|
74
94
|
:confidence => CONFIDENCE[:high]
|
75
95
|
end
|
@@ -85,4 +105,12 @@ class Brakeman::CheckValidationRegex < Brakeman::BaseCheck
|
|
85
105
|
name
|
86
106
|
end
|
87
107
|
end
|
108
|
+
|
109
|
+
private
|
110
|
+
|
111
|
+
def secure_regex?(regex)
|
112
|
+
extended_regex = Regexp::EXTENDED == regex.options & Regexp::EXTENDED
|
113
|
+
regex_pattern = extended_regex ? EXTENDED_SECURE_REGEXP_PATTERN : SECURE_REGEXP_PATTERN
|
114
|
+
regex_pattern =~ regex.source
|
115
|
+
end
|
88
116
|
end
|
data/lib/brakeman/options.rb
CHANGED
@@ -276,6 +276,10 @@ module Brakeman::Options
|
|
276
276
|
options[:show_version] = true
|
277
277
|
end
|
278
278
|
|
279
|
+
opts.on "--force-scan", "Scan application even if rails is not detected" do
|
280
|
+
options[:force_scan] = true
|
281
|
+
end
|
282
|
+
|
279
283
|
opts.on_tail "-h", "--help", "Display this message" do
|
280
284
|
options[:show_help] = true
|
281
285
|
end
|
@@ -1,54 +1,74 @@
|
|
1
1
|
Brakeman.load_brakeman_dependency 'erubis'
|
2
2
|
|
3
|
-
#This is from Rails
|
3
|
+
# This is from Rails 5 version of the Erubis handler
|
4
|
+
# https://github.com/rails/rails/blob/ec608107801b1e505db03ba76bae4a326a5804ca/actionview/lib/action_view/template/handlers/erb.rb#L7-L73
|
4
5
|
class Brakeman::Rails3Erubis < ::Erubis::Eruby
|
5
6
|
|
6
7
|
def add_preamble(src)
|
7
|
-
|
8
|
+
@newline_pending = 0
|
9
|
+
src << "@output_buffer = output_buffer || ActionView::OutputBuffer.new;"
|
8
10
|
end
|
9
11
|
|
10
|
-
#This is different from Rails 3 - fixes some line number issues
|
11
12
|
def add_text(src, text)
|
13
|
+
return if text.empty?
|
14
|
+
|
12
15
|
if text == "\n"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
if
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
16
|
+
@newline_pending += 1
|
17
|
+
else
|
18
|
+
src << "@output_buffer.safe_append='"
|
19
|
+
src << "\n" * @newline_pending if @newline_pending > 0
|
20
|
+
src << escape_text(text)
|
21
|
+
src << "'.freeze;"
|
22
|
+
|
23
|
+
@newline_pending = 0
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Erubis toggles <%= and <%== behavior when escaping is enabled.
|
28
|
+
# We override to always treat <%== as escaped.
|
29
|
+
def add_expr(src, code, indicator)
|
30
|
+
case indicator
|
31
|
+
when '=='
|
32
|
+
add_expr_escaped(src, code)
|
27
33
|
else
|
28
|
-
|
34
|
+
super
|
29
35
|
end
|
30
36
|
end
|
31
37
|
|
32
38
|
BLOCK_EXPR = /\s*((\s+|\))do|\{)(\s*\|[^|]*\|)?\s*\Z/
|
33
39
|
|
34
40
|
def add_expr_literal(src, code)
|
41
|
+
flush_newline_if_pending(src)
|
35
42
|
if code =~ BLOCK_EXPR
|
36
43
|
src << '@output_buffer.append= ' << code
|
37
44
|
else
|
38
|
-
src << '@output_buffer.append=
|
45
|
+
src << '@output_buffer.append=(' << code << ');'
|
39
46
|
end
|
40
47
|
end
|
41
48
|
|
42
49
|
def add_expr_escaped(src, code)
|
50
|
+
flush_newline_if_pending(src)
|
43
51
|
if code =~ BLOCK_EXPR
|
44
|
-
src << "@output_buffer.
|
52
|
+
src << "@output_buffer.safe_expr_append= " << code
|
45
53
|
else
|
46
|
-
src << "@output_buffer.
|
54
|
+
src << "@output_buffer.safe_expr_append=(" << code << ");"
|
47
55
|
end
|
48
56
|
end
|
49
57
|
|
50
|
-
|
58
|
+
def add_stmt(src, code)
|
59
|
+
flush_newline_if_pending(src)
|
60
|
+
super
|
61
|
+
end
|
62
|
+
|
51
63
|
def add_postamble(src)
|
52
|
-
|
64
|
+
flush_newline_if_pending(src)
|
65
|
+
src << '@output_buffer.to_s'
|
66
|
+
end
|
67
|
+
|
68
|
+
def flush_newline_if_pending(src)
|
69
|
+
if @newline_pending > 0
|
70
|
+
src << "@output_buffer.safe_append='#{"\n" * @newline_pending}'.freeze;"
|
71
|
+
@newline_pending = 0
|
72
|
+
end
|
53
73
|
end
|
54
74
|
end
|