brakeman 5.2.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +111 -0
- data/README.md +8 -5
- data/bundle/load.rb +15 -15
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/LICENSE.txt +33 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/NEWS.md +965 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/README.md +55 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/parser.rb +1292 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.2/lib/csv.rb +3017 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Changelog.md +34 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/Gemfile +3 -5
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/README.md +41 -3
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/highline.gemspec +6 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/io_console_compatible.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu.rb +0 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question/answer_converter.rb +2 -5
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question.rb +23 -13
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/question_asker.rb +3 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/style.rb +0 -0
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/io_console.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/unix_stty.rb +6 -4
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal.rb +8 -6
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/version.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline.rb +27 -6
- data/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib/parallel/version.rb +4 -0
- data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/lib/parallel.rb +109 -13
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/COPYING +56 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/README.md +94 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/config.rb +373 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/face.rb +199 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/history.rb +76 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/ansi.rb +325 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/dumb.rb +120 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io/windows.rb +530 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/io.rb +55 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/base.rb +37 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/composite.rb +17 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/emacs.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_command.rb +518 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor/vi_insert.rb +517 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_actor.rb +8 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/key_stroke.rb +119 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/kill_ring.rb +125 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/line_editor.rb +2382 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode/east_asian_width.rb +1267 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline.rb +519 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/license_of_rb-readline +25 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/NEWS.md +675 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/README.md +10 -1
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attribute.rb +17 -11
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/document.rb +6 -2
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/element.rb +19 -34
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/entity.rb +9 -38
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/pretty.rb +3 -3
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/functions.rb +1 -2
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/namespace.rb +8 -4
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/node.rb +8 -4
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parseexception.rb +1 -0
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/parsers/baseparser.rb +866 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/pullparser.rb +16 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/sax2parser.rb +16 -19
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/streamparser.rb +16 -10
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/treeparser.rb +9 -21
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/xpathparser.rb +136 -86
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/rexml.rb +3 -1
- data/bundle/ruby/3.1.0/gems/rexml-3.4.0/lib/rexml/source.rb +369 -0
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/text.rb +60 -61
- data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath_parser.rb +7 -3
- data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/History.rdoc +22 -0
- data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/lib/ruby2ruby.rb +162 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/History.rdoc +48 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/Manifest.txt +2 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/README.rdoc +2 -1
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/compare/normalize.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.rb +4267 -4284
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby20_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.rb +4241 -4240
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby21_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.rb +4289 -4290
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby22_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.rb +4274 -4243
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby23_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.rb +4279 -4298
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby24_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.rb +4270 -4289
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby25_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.rb +4270 -4289
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby26_parser.y +50 -26
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.rb +4189 -4206
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby27_parser.y +63 -27
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.rb +6037 -5963
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby30_parser.y +148 -87
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby31_parser.rb +6213 -6186
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y} +149 -143
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y → 3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y} +171 -109
- data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rb +26 -11
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer_strings.rb +2 -2
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.rb +2 -0
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser.yy +63 -27
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_parser_extras.rb +36 -23
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/munge.rb +8 -2
- data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/tools/ripper.rb +14 -12
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/History.rdoc +31 -0
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/pt_testcase.rb +3 -3
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp.rb +9 -3
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_matcher.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/strict_sexp.rb +6 -5
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/CHANGES +44 -8
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/LICENSE +1 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.jp.md +28 -41
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/README.md +66 -43
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/code_attributes.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/command.rb +2 -8
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/controls.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/do_inserter.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/embedded.rb +17 -17
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/end_inserter.rb +3 -2
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/engine.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/erb_converter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/grammar.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/include.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/interpolation.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/context.rb +6 -7
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/logic_less.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/parser.rb +26 -39
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/escaper.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/filter.rb +3 -2
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart/parser.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/smart.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/builder.rb +16 -8
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/splat/filter.rb +6 -4
- data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/translator.rb +4 -3
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim/version.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/lib/slim.rb +2 -0
- data/bundle/ruby/{2.7.0/gems/slim-4.1.0 → 3.1.0/gems/slim-5.2.1}/slim.gemspec +14 -5
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/CHANGES +39 -1
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/Gemfile +2 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/README.md +1 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/engine.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/engine.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/parser.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/template.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/erb/trimming.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/exceptions.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filter.rb +1 -0
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/ambles.rb +22 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/code_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/control_flow.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/dynamic_inliner.rb +2 -1
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/dynamic_merger.rb +69 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/encoding.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/eraser.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/escapable.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/multi_flattener.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/remove_bom.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_analyzer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/static_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/string_splitter.rb +13 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/filters/validator.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generator.rb +5 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/array_buffer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/erb.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/rails_output_buffer.rb +4 -4
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/generators/string_buffer.rb +2 -1
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/grammar.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_merger.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_remover.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/attribute_sorter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/dispatcher.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/fast.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/filter.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/pretty.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/html/safe.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/map.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/dispatcher.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/engine_dsl.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/grammar_dsl.rb +4 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/options.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/mixins/template.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/parser.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/static_analyzer.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/rails.rb +7 -2
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates/tilt.rb +2 -9
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/templates.rb +1 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple/utils.rb +5 -15
- data/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/version.rb +4 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/lib/temple.rb +3 -0
- data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/temple.gemspec +4 -6
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/History.rdoc +142 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/README.md +417 -0
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/cell.rb +8 -8
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/row.rb +18 -4
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/table.rb +47 -18
- data/bundle/ruby/3.1.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/terminal-table.gemspec +3 -3
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/COPYING +1 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_emacs_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_handlebars.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_jbuilder.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/_org.rb +2 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/asciidoc.rb +15 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/babel.rb +8 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/builder.rb +42 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/cli.rb +134 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/coffee.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/commonmarker.rb +95 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/creole.rb +16 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/csv.rb +6 -18
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/erb.rb +23 -21
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/erubi.rb +55 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/etanni.rb +5 -4
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/haml.rb +94 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/kramdown.rb +13 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/liquid.rb +10 -17
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/livescript.rb +11 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/mapping.rb +228 -109
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/markaby.rb +5 -7
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/nokogiri.rb +11 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pandoc.rb +39 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/pipeline.rb +19 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/plain.rb +5 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/prawn.rb +28 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/radius.rb +41 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdiscount.rb +23 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rdoc.rb +11 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcarpet.rb +31 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/redcloth.rb +13 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/rst-pandoc.rb +10 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/sass.rb +78 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/slim.rb +5 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/string.rb +9 -3
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/template.rb +479 -0
- data/bundle/ruby/3.1.0/gems/tilt-2.5.0/lib/tilt/typescript.rb +19 -0
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt/yajl.rb +5 -11
- data/bundle/ruby/{2.7.0/gems/tilt-2.0.10 → 3.1.0/gems/tilt-2.5.0}/lib/tilt.rb +60 -42
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/CHANGELOG.md +65 -2
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/{2.7.0/gems/unicode-display_width-1.8.0 → 3.1.0/gems/unicode-display_width-2.6.0}/README.md +67 -20
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-2.6.0/lib/unicode/display_width.rb +123 -0
- data/lib/brakeman/app_tree.rb +40 -13
- data/lib/brakeman/checks/base_check.rb +2 -3
- data/lib/brakeman/checks/check_basic_auth.rb +4 -2
- data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
- data/lib/brakeman/checks/check_content_tag.rb +16 -9
- data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
- data/lib/brakeman/checks/check_create_with.rb +4 -2
- data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
- data/lib/brakeman/checks/check_default_routes.rb +6 -3
- data/lib/brakeman/checks/check_deserialize.rb +6 -2
- data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
- data/lib/brakeman/checks/check_digest_dos.rb +2 -1
- data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
- data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
- data/lib/brakeman/checks/check_eol_rails.rb +6 -0
- data/lib/brakeman/checks/check_eol_ruby.rb +4 -1
- data/lib/brakeman/checks/check_escape_function.rb +2 -1
- data/lib/brakeman/checks/check_evaluation.rb +21 -2
- data/lib/brakeman/checks/check_execute.rb +34 -3
- data/lib/brakeman/checks/check_file_access.rb +2 -1
- data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
- data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
- data/lib/brakeman/checks/check_force_ssl.rb +2 -1
- data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
- data/lib/brakeman/checks/check_header_dos.rb +2 -1
- data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
- data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
- data/lib/brakeman/checks/check_json_encoding.rb +2 -1
- data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
- data/lib/brakeman/checks/check_json_parsing.rb +4 -2
- data/lib/brakeman/checks/check_link_to.rb +2 -1
- data/lib/brakeman/checks/check_link_to_href.rb +4 -2
- data/lib/brakeman/checks/check_mail_to.rb +2 -1
- data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
- data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
- data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
- data/lib/brakeman/checks/check_model_attributes.rb +4 -2
- data/lib/brakeman/checks/check_model_serialize.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
- data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
- data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
- data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
- data/lib/brakeman/checks/check_pathname.rb +48 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
- data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
- data/lib/brakeman/checks/check_ransack.rb +53 -0
- data/lib/brakeman/checks/check_redirect.rb +67 -31
- data/lib/brakeman/checks/check_regex_dos.rb +2 -1
- data/lib/brakeman/checks/check_render.rb +10 -3
- data/lib/brakeman/checks/check_render_dos.rb +2 -1
- data/lib/brakeman/checks/check_render_inline.rb +4 -2
- data/lib/brakeman/checks/check_response_splitting.rb +2 -1
- data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
- data/lib/brakeman/checks/check_route_dos.rb +2 -1
- data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
- data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
- data/lib/brakeman/checks/check_secrets.rb +2 -1
- data/lib/brakeman/checks/check_select_tag.rb +2 -1
- data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
- data/lib/brakeman/checks/check_send.rb +2 -1
- data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
- data/lib/brakeman/checks/check_session_settings.rb +8 -6
- data/lib/brakeman/checks/check_simple_format.rb +4 -2
- data/lib/brakeman/checks/check_single_quotes.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
- data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
- data/lib/brakeman/checks/check_sql.rb +5 -3
- data/lib/brakeman/checks/check_sql_cves.rb +4 -2
- data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
- data/lib/brakeman/checks/check_strip_tags.rb +6 -3
- data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
- data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
- data/lib/brakeman/checks/check_template_injection.rb +2 -1
- data/lib/brakeman/checks/check_translate_bug.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
- data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
- data/lib/brakeman/checks/check_validation_regex.rb +2 -1
- data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
- data/lib/brakeman/checks/check_weak_hash.rb +6 -3
- data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
- data/lib/brakeman/checks/check_without_protection.rb +2 -1
- data/lib/brakeman/checks/check_xml_dos.rb +2 -1
- data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
- data/lib/brakeman/checks/eol_check.rb +4 -2
- data/lib/brakeman/file_parser.rb +35 -2
- data/lib/brakeman/options.rb +42 -5
- data/lib/brakeman/parsers/erubis_patch.rb +11 -0
- data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
- data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
- data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
- data/lib/brakeman/parsers/slim_embedded.rb +2 -0
- data/lib/brakeman/processors/alias_processor.rb +124 -41
- data/lib/brakeman/processors/gem_processor.rb +2 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
- data/lib/brakeman/processors/lib/module_helper.rb +31 -1
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
- data/lib/brakeman/processors/library_processor.rb +6 -0
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/pager.rb +1 -1
- data/lib/brakeman/report/report_codeclimate.rb +1 -1
- data/lib/brakeman/report/report_csv.rb +2 -0
- data/lib/brakeman/report/report_github.rb +1 -1
- data/lib/brakeman/report/report_junit.rb +2 -2
- data/lib/brakeman/report/report_markdown.rb +1 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/report/report_table.rb +7 -7
- data/lib/brakeman/report/report_tabs.rb +0 -1
- data/lib/brakeman/report/report_text.rb +10 -1
- data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/ignored_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
- data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
- data/lib/brakeman/rescanner.rb +40 -388
- data/lib/brakeman/scanner.rb +161 -76
- data/lib/brakeman/tracker/config.rb +89 -34
- data/lib/brakeman/tracker/controller.rb +14 -10
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +21 -4
- data/lib/brakeman/util.rb +21 -7
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +6 -3
- data/lib/brakeman/warning_codes.rb +6 -0
- data/lib/brakeman.rb +22 -7
- data/lib/ruby_parser/bm_sexp.rb +5 -1
- metadata +438 -422
- data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
- data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
- data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
- data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
- data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
- data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/CHANGELOG.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/FAQ.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/Gemfile +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/MIT-LICENSE +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/README.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/REFERENCE.md +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/TODO +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/haml.gemspec +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/buffer.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/compiler.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/error.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/escapable.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/exec.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/filters.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/generator.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/helpers.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/options.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/parser.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/plugin.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/railtie.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template/options.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/template.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/util.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml/version.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/lib/haml.rb +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -0
- /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/AUTHORS +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/COPYING +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/TODO +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/list_renderer.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.1}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.26.3}/MIT-LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.0/BSDL} +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/cdata.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/child.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/comment.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/doctype.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/encoding.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/instruction.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/quickpath.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/security.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/relaxng.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validation.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml/xpath.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.0}/lib/rexml.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.1}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/Manifest.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/README.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.1 → 3.1.0/gems/sexp_processor-4.17.3}/lib/unique.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.3}/LICENSE +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Gemfile +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/LICENSE.txt +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Manifest +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/Todo.rdoc +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-3.0.2}/lib/terminal-table/table_helper.rb +0 -0
@@ -1,6 +1,81 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'pipeline'
|
2
3
|
|
3
4
|
module Tilt
|
5
|
+
# Private internal base class for both Mapping and FinalizedMapping, for the shared methods.
|
6
|
+
class BaseMapping
|
7
|
+
# Instantiates a new template class based on the file.
|
8
|
+
#
|
9
|
+
# @raise [RuntimeError] if there is no template class registered for the
|
10
|
+
# file name.
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# mapping.new('index.mt') # => instance of MyEngine::Template
|
14
|
+
#
|
15
|
+
# @see Tilt::Template.new
|
16
|
+
def new(file, line=nil, options={}, &block)
|
17
|
+
if template_class = self[file]
|
18
|
+
template_class.new(file, line, options, &block)
|
19
|
+
else
|
20
|
+
fail "No template engine registered for #{File.basename(file)}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Looks up a template class based on file name and/or extension.
|
25
|
+
#
|
26
|
+
# @example
|
27
|
+
# mapping['views/hello.erb'] # => Tilt::ERBTemplate
|
28
|
+
# mapping['hello.erb'] # => Tilt::ERBTemplate
|
29
|
+
# mapping['erb'] # => Tilt::ERBTemplate
|
30
|
+
#
|
31
|
+
# @return [template class]
|
32
|
+
def [](file)
|
33
|
+
_, ext = split(file)
|
34
|
+
ext && lookup(ext)
|
35
|
+
end
|
36
|
+
|
37
|
+
alias template_for []
|
38
|
+
|
39
|
+
# Looks up a list of template classes based on file name. If the file name
|
40
|
+
# has multiple extensions, it will return all template classes matching the
|
41
|
+
# extensions from the end.
|
42
|
+
#
|
43
|
+
# @example
|
44
|
+
# mapping.templates_for('views/index.haml.erb')
|
45
|
+
# # => [Tilt::ERBTemplate, Tilt::HamlTemplate]
|
46
|
+
#
|
47
|
+
# @return [Array<template class>]
|
48
|
+
def templates_for(file)
|
49
|
+
templates = []
|
50
|
+
|
51
|
+
while true
|
52
|
+
prefix, ext = split(file)
|
53
|
+
break unless ext
|
54
|
+
templates << lookup(ext)
|
55
|
+
file = prefix
|
56
|
+
end
|
57
|
+
|
58
|
+
templates
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def split(file)
|
64
|
+
pattern = file.to_s.downcase
|
65
|
+
full_pattern = pattern.dup
|
66
|
+
|
67
|
+
until registered?(pattern)
|
68
|
+
return if pattern.empty?
|
69
|
+
pattern = File.basename(pattern)
|
70
|
+
pattern.sub!(/\A[^.]*\.?/, '')
|
71
|
+
end
|
72
|
+
|
73
|
+
prefix_size = full_pattern.size - pattern.size
|
74
|
+
[full_pattern[0,prefix_size-1], pattern]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
private_constant :BaseMapping
|
78
|
+
|
4
79
|
# Tilt::Mapping associates file extensions with template implementations.
|
5
80
|
#
|
6
81
|
# mapping = Tilt::Mapping.new
|
@@ -38,16 +113,18 @@ module Tilt
|
|
38
113
|
# the exception of the first, since that was the most preferred one.
|
39
114
|
#
|
40
115
|
# mapping = Tilt::Mapping.new
|
41
|
-
# mapping.register_lazy('
|
116
|
+
# mapping.register_lazy('Kramdown::Template', 'kramdown/template', 'md')
|
42
117
|
# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md')
|
43
118
|
# mapping['index.md']
|
44
119
|
# # => RDiscount::Template
|
45
120
|
#
|
46
121
|
# In the previous example we say that RDiscount has a *higher priority* than
|
47
|
-
#
|
48
|
-
# back to `require "
|
122
|
+
# Kramdown. Tilt will first try to `require "rdiscount/template"`, falling
|
123
|
+
# back to `require "kramdown/template"`. If none of these are successful,
|
49
124
|
# the first error will be raised.
|
50
|
-
class Mapping
|
125
|
+
class Mapping < BaseMapping
|
126
|
+
LOCK = Mutex.new
|
127
|
+
|
51
128
|
# @private
|
52
129
|
attr_reader :lazy_map, :template_map
|
53
130
|
|
@@ -58,8 +135,26 @@ module Tilt
|
|
58
135
|
|
59
136
|
# @private
|
60
137
|
def initialize_copy(other)
|
61
|
-
|
62
|
-
|
138
|
+
LOCK.synchronize do
|
139
|
+
@template_map = other.template_map.dup
|
140
|
+
@lazy_map = other.lazy_map.dup
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Return a finalized mapping. A finalized mapping will only include
|
145
|
+
# support for template libraries already loaded, and will not
|
146
|
+
# allow registering new template libraries or lazy loading template
|
147
|
+
# libraries not yet loaded. Finalized mappings improve performance
|
148
|
+
# by not requiring synchronization and ensure that the mapping will
|
149
|
+
# not attempt to load additional files (useful when restricting
|
150
|
+
# file system access after template libraries in use are loaded).
|
151
|
+
def finalized
|
152
|
+
LOCK.synchronize{@lazy_map.dup}.each do |pattern, classes|
|
153
|
+
register_defined_classes(LOCK.synchronize{classes.map(&:first)}, pattern)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check if a template class is already present
|
157
|
+
FinalizedMapping.new(LOCK.synchronize{@template_map.dup}.freeze)
|
63
158
|
end
|
64
159
|
|
65
160
|
# Registers a lazy template implementation by file extension. You
|
@@ -85,8 +180,9 @@ module Tilt
|
|
85
180
|
class_name = "Tilt::#{class_name}"
|
86
181
|
end
|
87
182
|
|
183
|
+
v = [class_name, file].freeze
|
88
184
|
extensions.each do |ext|
|
89
|
-
@lazy_map[ext].unshift(
|
185
|
+
LOCK.synchronize{@lazy_map[ext].unshift(v)}
|
90
186
|
end
|
91
187
|
end
|
92
188
|
|
@@ -108,86 +204,95 @@ module Tilt
|
|
108
204
|
end
|
109
205
|
|
110
206
|
extensions.each do |ext|
|
111
|
-
|
207
|
+
ext = ext.to_s
|
208
|
+
LOCK.synchronize do
|
209
|
+
@template_map[ext] = template_class
|
210
|
+
end
|
112
211
|
end
|
113
212
|
end
|
114
213
|
|
115
|
-
#
|
116
|
-
#
|
214
|
+
# Register a new template class using the given extension that
|
215
|
+
# represents a pipeline of multiple existing template, where the
|
216
|
+
# output from the previous template is used as input to the next
|
217
|
+
# template.
|
117
218
|
#
|
118
|
-
#
|
219
|
+
# This will register a template class that processes the input
|
220
|
+
# with the *erb* template processor, and takes the output of
|
221
|
+
# that and feeds it to the *scss* template processor, returning
|
222
|
+
# the output of the *scss* template processor as the result of
|
223
|
+
# the pipeline.
|
224
|
+
#
|
225
|
+
# @param ext [String] Primary extension to register
|
226
|
+
# @option :templates [Array<String>] Extensions of templates
|
227
|
+
# to execute in order (defaults to the ext.split('.').reverse)
|
228
|
+
# @option :extra_exts [Array<String>] Additional extensions to register
|
229
|
+
# @option String [Hash] Options hash for individual template in the
|
230
|
+
# pipeline (key is extension).
|
231
|
+
# @return [void]
|
119
232
|
#
|
120
233
|
# @example
|
121
|
-
# mapping.
|
122
|
-
# mapping.
|
123
|
-
|
124
|
-
|
234
|
+
# mapping.register_pipeline('scss.erb')
|
235
|
+
# mapping.register_pipeline('scss.erb', 'erb'=>{:outvar=>'@foo'})
|
236
|
+
# mapping.register_pipeline('scsserb', :extra_exts => 'scss.erb',
|
237
|
+
# :templates=>['erb', 'scss'])
|
238
|
+
def register_pipeline(ext, options=EMPTY_HASH)
|
239
|
+
templates = options[:templates] || ext.split('.').reverse
|
240
|
+
templates = templates.map{|t| [self[t], options[t] || EMPTY_HASH]}
|
241
|
+
|
242
|
+
klass = Class.new(Pipeline)
|
243
|
+
klass.send(:const_set, :TEMPLATES, templates)
|
244
|
+
|
245
|
+
register(klass, ext, *Array(options[:extra_exts]))
|
246
|
+
klass
|
125
247
|
end
|
126
248
|
|
127
|
-
#
|
249
|
+
# Unregisters an extension. This removes the both normal registrations
|
250
|
+
# and lazy registrations.
|
128
251
|
#
|
129
|
-
# @
|
130
|
-
#
|
252
|
+
# @param extensions [Array<String>] List of extensions.
|
253
|
+
# @return nil
|
131
254
|
#
|
132
255
|
# @example
|
133
|
-
# mapping.
|
134
|
-
#
|
135
|
-
#
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
256
|
+
# mapping.register MyEngine::Template, 'mt'
|
257
|
+
# mapping['index.mt'] # => MyEngine::Template
|
258
|
+
# mapping.unregister('mt')
|
259
|
+
# mapping['index.mt'] # => nil
|
260
|
+
def unregister(*extensions)
|
261
|
+
extensions.each do |ext|
|
262
|
+
ext = ext.to_s
|
263
|
+
LOCK.synchronize do
|
264
|
+
@template_map.delete(ext)
|
265
|
+
@lazy_map.delete(ext)
|
266
|
+
end
|
141
267
|
end
|
142
|
-
end
|
143
268
|
|
144
|
-
|
145
|
-
#
|
146
|
-
# @example
|
147
|
-
# mapping['views/hello.erb'] # => Tilt::ERBTemplate
|
148
|
-
# mapping['hello.erb'] # => Tilt::ERBTemplate
|
149
|
-
# mapping['erb'] # => Tilt::ERBTemplate
|
150
|
-
#
|
151
|
-
# @return [template class]
|
152
|
-
def [](file)
|
153
|
-
_, ext = split(file)
|
154
|
-
ext && lookup(ext)
|
269
|
+
nil
|
155
270
|
end
|
156
271
|
|
157
|
-
|
158
|
-
|
159
|
-
# Looks up a list of template classes based on file name. If the file name
|
160
|
-
# has multiple extensions, it will return all template classes matching the
|
161
|
-
# extensions from the end.
|
272
|
+
# Checks if a file extension is registered (either eagerly or
|
273
|
+
# lazily) in this mapping.
|
162
274
|
#
|
163
|
-
# @
|
164
|
-
# mapping.templates_for('views/index.haml.erb')
|
165
|
-
# # => [Tilt::ERBTemplate, Tilt::HamlTemplate]
|
275
|
+
# @param ext [String] File extension.
|
166
276
|
#
|
167
|
-
# @
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
break unless ext
|
174
|
-
templates << lookup(ext)
|
175
|
-
file = prefix
|
176
|
-
end
|
177
|
-
|
178
|
-
templates
|
277
|
+
# @example
|
278
|
+
# mapping.registered?('erb') # => true
|
279
|
+
# mapping.registered?('nope') # => false
|
280
|
+
def registered?(ext)
|
281
|
+
ext_downcase = ext.downcase
|
282
|
+
LOCK.synchronize{@template_map.has_key?(ext_downcase)} or lazy?(ext)
|
179
283
|
end
|
180
284
|
|
181
285
|
# Finds the extensions the template class has been registered under.
|
182
286
|
# @param [template class] template_class
|
183
287
|
def extensions_for(template_class)
|
184
288
|
res = []
|
185
|
-
template_map.each do |ext, klass|
|
289
|
+
LOCK.synchronize{@template_map.to_a}.each do |ext, klass|
|
186
290
|
res << ext if template_class == klass
|
187
291
|
end
|
188
|
-
lazy_map.each do |ext, choices|
|
189
|
-
res << ext if choices.any? { |klass, file| template_class.to_s == klass }
|
292
|
+
LOCK.synchronize{@lazy_map.to_a}.each do |ext, choices|
|
293
|
+
res << ext if LOCK.synchronize{choices.dup}.any? { |klass, file| template_class.to_s == klass }
|
190
294
|
end
|
295
|
+
res.uniq!
|
191
296
|
res
|
192
297
|
end
|
193
298
|
|
@@ -195,45 +300,30 @@ module Tilt
|
|
195
300
|
|
196
301
|
def lazy?(ext)
|
197
302
|
ext = ext.downcase
|
198
|
-
@lazy_map.has_key?(ext) && !@lazy_map[ext].empty?
|
199
|
-
end
|
200
|
-
|
201
|
-
def split(file)
|
202
|
-
pattern = file.to_s.downcase
|
203
|
-
full_pattern = pattern.dup
|
204
|
-
|
205
|
-
until registered?(pattern)
|
206
|
-
return if pattern.empty?
|
207
|
-
pattern = File.basename(pattern)
|
208
|
-
pattern.sub!(/^[^.]*\.?/, '')
|
209
|
-
end
|
210
|
-
|
211
|
-
prefix_size = full_pattern.size - pattern.size
|
212
|
-
[full_pattern[0,prefix_size-1], pattern]
|
303
|
+
LOCK.synchronize{@lazy_map.has_key?(ext) && !@lazy_map[ext].empty?}
|
213
304
|
end
|
214
305
|
|
215
306
|
def lookup(ext)
|
216
|
-
@template_map[ext] || lazy_load(ext)
|
307
|
+
LOCK.synchronize{@template_map[ext]} || lazy_load(ext)
|
217
308
|
end
|
218
309
|
|
219
|
-
|
220
|
-
|
221
|
-
def lazy_load(pattern)
|
222
|
-
return unless @lazy_map.has_key?(pattern)
|
223
|
-
|
224
|
-
LOCK.enter
|
225
|
-
entered = true
|
226
|
-
|
227
|
-
choices = @lazy_map[pattern]
|
228
|
-
|
229
|
-
# Check if a template class is already present
|
230
|
-
choices.each do |class_name, file|
|
310
|
+
def register_defined_classes(class_names, pattern)
|
311
|
+
class_names.each do |class_name|
|
231
312
|
template_class = constant_defined?(class_name)
|
232
313
|
if template_class
|
233
314
|
register(template_class, pattern)
|
234
|
-
|
315
|
+
yield template_class if block_given?
|
235
316
|
end
|
236
317
|
end
|
318
|
+
end
|
319
|
+
|
320
|
+
def lazy_load(pattern)
|
321
|
+
choices = LOCK.synchronize{@lazy_map[pattern].dup}
|
322
|
+
|
323
|
+
# Check if a template class is already present
|
324
|
+
register_defined_classes(choices.map(&:first), pattern) do |template_class|
|
325
|
+
return template_class
|
326
|
+
end
|
237
327
|
|
238
328
|
first_failure = nil
|
239
329
|
|
@@ -252,16 +342,9 @@ module Tilt
|
|
252
342
|
end
|
253
343
|
end
|
254
344
|
|
255
|
-
raise first_failure
|
256
|
-
ensure
|
257
|
-
LOCK.exit if entered
|
345
|
+
raise first_failure
|
258
346
|
end
|
259
347
|
|
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
348
|
# The proper behavior (in MRI) for autoload? is to
|
266
349
|
# return `false` when the constant/file has been
|
267
350
|
# explicitly required.
|
@@ -276,18 +359,54 @@ module Tilt
|
|
276
359
|
|
277
360
|
def constant_defined?(name)
|
278
361
|
name.split('::').inject(Object) do |scope, n|
|
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)
|
362
|
+
return false if scope.autoload?(n) || !scope.const_defined?(n)
|
289
363
|
scope.const_get(n)
|
290
364
|
end
|
291
365
|
end
|
292
366
|
end
|
367
|
+
|
368
|
+
# Private internal class for finalized mappings, which are frozen and
|
369
|
+
# cannot be modified.
|
370
|
+
class FinalizedMapping < BaseMapping
|
371
|
+
# Set the template map to use. The template map should already
|
372
|
+
# be frozen, but this is an internal class, so it does not
|
373
|
+
# explicitly check for that.
|
374
|
+
def initialize(template_map)
|
375
|
+
@template_map = template_map
|
376
|
+
freeze
|
377
|
+
end
|
378
|
+
|
379
|
+
# Returns receiver, since instances are always frozen.
|
380
|
+
def dup
|
381
|
+
self
|
382
|
+
end
|
383
|
+
|
384
|
+
# Returns receiver, since instances are always frozen.
|
385
|
+
def clone(freeze: false)
|
386
|
+
self
|
387
|
+
end
|
388
|
+
|
389
|
+
# Return whether the given file extension has been registered.
|
390
|
+
def registered?(ext)
|
391
|
+
@template_map.has_key?(ext.downcase)
|
392
|
+
end
|
393
|
+
|
394
|
+
# Returns an aarry of all extensions the template class will
|
395
|
+
# be used for.
|
396
|
+
def extensions_for(template_class)
|
397
|
+
res = []
|
398
|
+
@template_map.each do |ext, klass|
|
399
|
+
res << ext if template_class == klass
|
400
|
+
end
|
401
|
+
res.uniq!
|
402
|
+
res
|
403
|
+
end
|
404
|
+
|
405
|
+
private
|
406
|
+
|
407
|
+
def lookup(ext)
|
408
|
+
@template_map[ext]
|
409
|
+
end
|
410
|
+
end
|
411
|
+
private_constant :FinalizedMapping
|
293
412
|
end
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
2
3
|
require 'markaby'
|
3
4
|
|
4
5
|
module Tilt
|
@@ -15,19 +16,16 @@ module Tilt
|
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
def prepare
|
19
|
-
end
|
20
|
-
|
21
19
|
def evaluate(scope, locals, &block)
|
22
20
|
builder = self.class.builder_class.new({}, scope)
|
23
21
|
builder.locals = locals
|
24
22
|
|
25
|
-
if data.kind_of? Proc
|
26
|
-
(class << builder; self end).send(:define_method, :__run_markaby_tilt__,
|
23
|
+
if @data.kind_of? Proc
|
24
|
+
(class << builder; self end).send(:define_method, :__run_markaby_tilt__, &@data)
|
27
25
|
else
|
28
26
|
builder.instance_eval <<-CODE, __FILE__, __LINE__
|
29
27
|
def __run_markaby_tilt__
|
30
|
-
#{data}
|
28
|
+
#{@data}
|
31
29
|
end
|
32
30
|
CODE
|
33
31
|
end
|
@@ -1,21 +1,23 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
2
3
|
require 'nokogiri'
|
3
4
|
|
4
5
|
module Tilt
|
5
6
|
# Nokogiri template implementation. See:
|
6
7
|
# http://nokogiri.org/
|
7
8
|
class NokogiriTemplate < Template
|
8
|
-
DOCUMENT_HEADER =
|
9
|
+
DOCUMENT_HEADER = /\A<\?xml version=\"1\.0\"\?>\n?/
|
9
10
|
self.default_mime_type = 'text/xml'
|
10
11
|
|
11
|
-
def prepare; end
|
12
|
-
|
13
12
|
def evaluate(scope, locals)
|
14
|
-
if data.respond_to?(:to_str)
|
15
|
-
|
16
|
-
|
13
|
+
if @data.respond_to?(:to_str)
|
14
|
+
if block_given?
|
15
|
+
super(scope, locals){yield.sub(DOCUMENT_HEADER, "")}
|
16
|
+
else
|
17
|
+
super
|
18
|
+
end
|
17
19
|
else
|
18
|
-
::Nokogiri::XML::Builder.new
|
20
|
+
::Nokogiri::XML::Builder.new(&@data).to_xml
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
@@ -29,8 +31,7 @@ module Tilt
|
|
29
31
|
end
|
30
32
|
|
31
33
|
def precompiled_template(locals)
|
32
|
-
data.to_str
|
34
|
+
@data.to_str
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
36
|
-
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
require 'pandoc-ruby'
|
4
|
+
|
5
|
+
# Pandoc markdown implementation. See: http://pandoc.org/
|
6
|
+
Tilt::PandocTemplate = Tilt::StaticTemplate.subclass do
|
7
|
+
# turn options hash into an array
|
8
|
+
# Map tilt options to pandoc options
|
9
|
+
# Replace hash keys with value true with symbol for key
|
10
|
+
# Remove hash keys with value false
|
11
|
+
# Leave other hash keys untouched
|
12
|
+
pandoc_options = []
|
13
|
+
from = "markdown"
|
14
|
+
smart_extension = "-smart"
|
15
|
+
@options.each do |k,v|
|
16
|
+
case k
|
17
|
+
when :smartypants
|
18
|
+
smart_extension = "+smart" if v
|
19
|
+
when :escape_html
|
20
|
+
from = "markdown-raw_html" if v
|
21
|
+
when :commonmark
|
22
|
+
from = "commonmark" if v
|
23
|
+
when :markdown_strict
|
24
|
+
from = "markdown_strict" if v
|
25
|
+
else
|
26
|
+
case v
|
27
|
+
when true
|
28
|
+
pandoc_options << k
|
29
|
+
when false
|
30
|
+
# do nothing
|
31
|
+
else
|
32
|
+
pandoc_options << { k => v }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
pandoc_options << { :f => from + smart_extension }
|
37
|
+
|
38
|
+
PandocRuby.new(@data, *pandoc_options).to_html.strip
|
39
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
|
4
|
+
module Tilt
|
5
|
+
# Superclass used for pipeline templates. Should not be used directly.
|
6
|
+
class Pipeline < Template
|
7
|
+
def prepare
|
8
|
+
@pipeline = self.class::TEMPLATES.inject(proc{|*| data}) do |data, (klass, options)|
|
9
|
+
proc do |s,l,&sb|
|
10
|
+
klass.new(file, line, options, &proc{|*| data.call(s, l, &sb)}).render(s, l, &sb)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def evaluate(scope, locals, &block)
|
16
|
+
@pipeline.call(scope, locals, &block)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
require 'prawn'
|
4
|
+
|
5
|
+
module Tilt
|
6
|
+
# Prawn template implementation. See: http://prawnpdf.org
|
7
|
+
class PrawnTemplate < Template
|
8
|
+
self.default_mime_type = 'application/pdf'
|
9
|
+
|
10
|
+
def prepare
|
11
|
+
@options[:page_size] = 'A4' unless @options.has_key?(:page_size)
|
12
|
+
@options[:page_layout] = :portrait unless @options.has_key?(:page_layout)
|
13
|
+
@engine = ::Prawn::Document.new(@options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def evaluate(scope, locals, &block)
|
17
|
+
pdf = @engine
|
18
|
+
locals = locals.dup
|
19
|
+
locals[:pdf] = pdf
|
20
|
+
super
|
21
|
+
pdf.render
|
22
|
+
end
|
23
|
+
|
24
|
+
def precompiled_template(locals)
|
25
|
+
@data.to_str
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
require 'radius'
|
4
|
+
|
5
|
+
module Tilt
|
6
|
+
# Radius Template
|
7
|
+
# http://github.com/jlong/radius/
|
8
|
+
class RadiusTemplate < Template
|
9
|
+
class ContextClass < Radius::Context
|
10
|
+
attr_accessor :tilt_scope
|
11
|
+
|
12
|
+
def tag_missing(name, attributes)
|
13
|
+
tilt_scope.__send__(name)
|
14
|
+
end
|
15
|
+
|
16
|
+
def dup
|
17
|
+
i = super
|
18
|
+
i.tilt_scope = tilt_scope
|
19
|
+
i
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def evaluate(scope, locals, &block)
|
24
|
+
context = ContextClass.new
|
25
|
+
context.tilt_scope = scope
|
26
|
+
context.define_tag("yield", &block) if block
|
27
|
+
locals.each do |tag, value|
|
28
|
+
context.define_tag(tag) do
|
29
|
+
value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
@options[:tag_prefix] = 'r' unless @options.has_key?(:tag_prefix)
|
34
|
+
Radius::Parser.new(context, @options).parse(@data)
|
35
|
+
end
|
36
|
+
|
37
|
+
def allows_script?
|
38
|
+
false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
require 'rdiscount'
|
4
|
+
|
5
|
+
aliases = {
|
6
|
+
:escape_html => :filter_html,
|
7
|
+
:smartypants => :smart
|
8
|
+
}.freeze
|
9
|
+
|
10
|
+
_flags = [:smart, :filter_html, :smartypants, :escape_html].freeze
|
11
|
+
|
12
|
+
# Discount Markdown implementation. See:
|
13
|
+
# http://github.com/rtomayko/rdiscount
|
14
|
+
#
|
15
|
+
# RDiscount is a simple text filter. It does not support +scope+ or
|
16
|
+
# +locals+. The +:smart+ and +:filter_html+ options may be set true
|
17
|
+
# to enable those flags on the underlying RDiscount object.
|
18
|
+
Tilt::RDiscountTemplate = Tilt::StaticTemplate.subclass do
|
19
|
+
flags = _flags.select { |flag| @options[flag] }.
|
20
|
+
map! { |flag| aliases[flag] || flag }
|
21
|
+
|
22
|
+
RDiscount.new(@data, *flags).to_html
|
23
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'template'
|
3
|
+
require 'rdoc'
|
4
|
+
require 'rdoc/markup'
|
5
|
+
require 'rdoc/markup/to_html'
|
6
|
+
require 'rdoc/options'
|
7
|
+
|
8
|
+
# RDoc template. See: https://github.com/ruby/rdoc
|
9
|
+
Tilt::RDocTemplate = Tilt::StaticTemplate.subclass do
|
10
|
+
RDoc::Markup::ToHtml.new(RDoc::Options.new, nil).convert(@data).to_s
|
11
|
+
end
|