zuora_connect_ui 0.7.1 → 0.8.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.
Files changed (1322) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/zuora_connect_ui/app.js.erb +9 -3
  3. data/app/assets/javascripts/zuora_connect_ui/datatable.js +9 -8
  4. data/app/assets/javascripts/zuora_connect_ui/fetch.js +36 -27
  5. data/app/assets/javascripts/zuora_connect_ui/noty.js +6 -0
  6. data/app/assets/stylesheets/_zuora_connect_ui.scss +2 -3
  7. data/app/helpers/zuora_connect_ui/application_helper.rb +1 -1
  8. data/app/views/partials/_row_actions.html.erb +2 -2
  9. data/app/views/partials/_table.html.erb +2 -2
  10. data/lib/zuora_connect_ui.rb +0 -1
  11. data/lib/zuora_connect_ui/version.rb +1 -1
  12. data/vendor/assets/anjuna/css/anjuna-application.css +2 -0
  13. data/vendor/assets/anjuna/css/anjuna-theme.css +2 -2
  14. data/vendor/ruby/2.6.0/cache/brakeman-4.6.1.gem +0 -0
  15. data/vendor/ruby/2.6.0/cache/nokogiri-1.10.4.gem +0 -0
  16. data/vendor/ruby/2.6.0/cache/rails-html-sanitizer-1.2.0.gem +0 -0
  17. data/vendor/ruby/2.6.0/cache/rubocop-0.74.0.gem +0 -0
  18. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.10.4/gem.build_complete +0 -0
  19. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.10.4/gem_make.out +438 -0
  20. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.10.4/mkmf.log +558 -0
  21. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.10.4/nokogiri/nokogiri.so +0 -0
  22. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/CHANGES.md +1156 -0
  23. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/FEATURES +16 -0
  24. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/README.md +199 -0
  25. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bin/brakeman +10 -0
  26. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/load.rb +14 -0
  27. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/CHANGES.txt +828 -0
  28. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/MIT-LICENSE +20 -0
  29. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/README.txt +102 -0
  30. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/contrib/erubis +3468 -0
  31. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/contrib/erubis-run.rb +132 -0
  32. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/contrib/inline-require +179 -0
  33. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis.rb +73 -0
  34. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/context.rb +83 -0
  35. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/converter.rb +357 -0
  36. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine.rb +120 -0
  37. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +117 -0
  38. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +113 -0
  39. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +110 -0
  40. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +119 -0
  41. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +126 -0
  42. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +95 -0
  43. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +99 -0
  44. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +125 -0
  45. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +114 -0
  46. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +127 -0
  47. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/enhancer.rb +723 -0
  48. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/error.rb +23 -0
  49. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb +88 -0
  50. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/generator.rb +85 -0
  51. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/helper.rb +47 -0
  52. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +197 -0
  53. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +353 -0
  54. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/local-setting.rb +9 -0
  55. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/main.rb +516 -0
  56. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +58 -0
  57. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/tiny.rb +144 -0
  58. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/lib/erubis/util.rb +22 -0
  59. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/erubis-2.7.0/setup.rb +1331 -0
  60. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/CHANGELOG.md +1363 -0
  61. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/FAQ.md +157 -0
  62. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/MIT-LICENSE +20 -0
  63. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/README.md +173 -0
  64. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/REFERENCE.md +1294 -0
  65. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml.rb +23 -0
  66. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/buffer.rb +345 -0
  67. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/compiler.rb +540 -0
  68. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/engine.rb +245 -0
  69. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/error.rb +61 -0
  70. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/exec.rb +329 -0
  71. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/filters.rb +404 -0
  72. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers.rb +664 -0
  73. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/action_view_extensions.rb +58 -0
  74. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb +147 -0
  75. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/action_view_xss_mods.rb +58 -0
  76. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb +29 -0
  77. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/helpers/xss_mods.rb +104 -0
  78. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/options.rb +279 -0
  79. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/parser.rb +764 -0
  80. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/railtie.rb +22 -0
  81. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/sass_rails_filter.rb +33 -0
  82. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/template.rb +32 -0
  83. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/template/options.rb +16 -0
  84. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/template/plugin.rb +41 -0
  85. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/util.rb +377 -0
  86. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/haml-4.0.7/lib/haml/version.rb +3 -0
  87. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/AUTHORS +3 -0
  88. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/COPYING +339 -0
  89. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/Changelog.md +617 -0
  90. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/Gemfile +22 -0
  91. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/LICENSE +7 -0
  92. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/README.md +202 -0
  93. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/TODO +6 -0
  94. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/appveyor.yml +37 -0
  95. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/highline.gemspec +35 -0
  96. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline.rb +650 -0
  97. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/builtin_styles.rb +129 -0
  98. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/color_scheme.rb +151 -0
  99. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/compatibility.rb +23 -0
  100. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/custom_errors.rb +57 -0
  101. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/import.rb +48 -0
  102. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/io_console_compatible.rb +37 -0
  103. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/list.rb +177 -0
  104. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/list_renderer.rb +261 -0
  105. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/menu.rb +576 -0
  106. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/menu/item.rb +32 -0
  107. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/paginator.rb +52 -0
  108. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/question.rb +630 -0
  109. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/question/answer_converter.rb +103 -0
  110. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/question_asker.rb +150 -0
  111. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/simulate.rb +59 -0
  112. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/statement.rb +88 -0
  113. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/string.rb +36 -0
  114. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/string_extensions.rb +130 -0
  115. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/style.rb +325 -0
  116. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/template_renderer.rb +62 -0
  117. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/terminal.rb +190 -0
  118. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/terminal/io_console.rb +36 -0
  119. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/terminal/ncurses.rb +38 -0
  120. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/terminal/unix_stty.rb +51 -0
  121. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/version.rb +6 -0
  122. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/highline-2.0.2/lib/highline/wrapper.rb +53 -0
  123. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby2ruby-2.4.3/History.rdoc +429 -0
  124. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby2ruby-2.4.3/Manifest.txt +8 -0
  125. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby2ruby-2.4.3/README.rdoc +87 -0
  126. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby2ruby-2.4.3/lib/ruby2ruby.rb +1309 -0
  127. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/History.rdoc +1065 -0
  128. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/Manifest.txt +37 -0
  129. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/README.rdoc +109 -0
  130. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/compare/normalize.rb +173 -0
  131. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/debugging.md +18 -0
  132. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/rp_extensions.rb +74 -0
  133. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/rp_stringscanner.rb +64 -0
  134. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.rb +6869 -0
  135. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.y +2431 -0
  136. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby21_parser.rb +6944 -0
  137. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby21_parser.y +2449 -0
  138. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.rb +6968 -0
  139. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.y +2458 -0
  140. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.rb +6987 -0
  141. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.y +2460 -0
  142. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.rb +6994 -0
  143. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.y +2466 -0
  144. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby25_parser.rb +6994 -0
  145. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby25_parser.y +2466 -0
  146. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.rb +7012 -0
  147. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.y +2478 -0
  148. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_lexer.rb +1449 -0
  149. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_lexer.rex +179 -0
  150. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_lexer.rex.rb +365 -0
  151. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_parser.rb +92 -0
  152. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_parser.yy +2582 -0
  153. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/lib/ruby_parser_extras.rb +1381 -0
  154. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/tools/munge.rb +217 -0
  155. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-3.13.1/tools/ripper.rb +28 -0
  156. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +6 -0
  157. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +19 -0
  158. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +54 -0
  159. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +5 -0
  160. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +5794 -0
  161. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +1909 -0
  162. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +6186 -0
  163. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +2117 -0
  164. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +1412 -0
  165. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +179 -0
  166. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +323 -0
  167. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +30 -0
  168. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +1388 -0
  169. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/CHANGES.md +154 -0
  170. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/Gemfile +11 -0
  171. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/LICENSE.txt +22 -0
  172. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/README.md +191 -0
  173. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +11 -0
  174. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +94 -0
  175. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +34 -0
  176. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +36 -0
  177. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +181 -0
  178. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +37 -0
  179. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +12 -0
  180. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +26 -0
  181. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +99 -0
  182. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +52 -0
  183. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +94 -0
  184. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +29 -0
  185. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +39 -0
  186. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +36 -0
  187. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +43 -0
  188. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +38 -0
  189. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +41 -0
  190. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +21 -0
  191. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +13 -0
  192. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +33 -0
  193. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +26 -0
  194. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +18 -0
  195. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +17 -0
  196. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +47 -0
  197. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +3 -0
  198. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +38 -0
  199. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +19 -0
  200. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/History.rdoc +380 -0
  201. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/Manifest.txt +14 -0
  202. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/README.rdoc +93 -0
  203. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/composite_sexp_processor.rb +49 -0
  204. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/pt_testcase.rb +3128 -0
  205. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/sexp.rb +1423 -0
  206. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/sexp_processor.rb +754 -0
  207. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/strict_sexp.rb +126 -0
  208. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/sexp_processor-4.12.1/lib/unique.rb +21 -0
  209. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/CHANGES +456 -0
  210. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/Gemfile +71 -0
  211. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/LICENSE +21 -0
  212. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/README.jp.md +1289 -0
  213. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/README.md +1290 -0
  214. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim.rb +14 -0
  215. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/code_attributes.rb +67 -0
  216. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/command.rb +128 -0
  217. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/controls.rb +60 -0
  218. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/do_inserter.rb +33 -0
  219. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/embedded.rb +248 -0
  220. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/end_inserter.rb +62 -0
  221. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb +39 -0
  222. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/erb_converter.rb +14 -0
  223. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/filter.rb +30 -0
  224. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/grammar.rb +23 -0
  225. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/include.rb +57 -0
  226. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/interpolation.rb +35 -0
  227. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/logic_less.rb +5 -0
  228. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/logic_less/context.rb +127 -0
  229. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/logic_less/filter.rb +80 -0
  230. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/parser.rb +548 -0
  231. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/smart.rb +8 -0
  232. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/smart/escaper.rb +42 -0
  233. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/smart/filter.rb +96 -0
  234. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/smart/parser.rb +34 -0
  235. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/splat/builder.rb +107 -0
  236. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/splat/filter.rb +91 -0
  237. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/template.rb +19 -0
  238. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/translator.rb +118 -0
  239. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/version.rb +5 -0
  240. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/slim.gemspec +24 -0
  241. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/CHANGES +255 -0
  242. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/EXPRESSIONS.md +262 -0
  243. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/Gemfile +3 -0
  244. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/LICENSE +20 -0
  245. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/README.md +267 -0
  246. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple.rb +67 -0
  247. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/engine.rb +67 -0
  248. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/erb/engine.rb +15 -0
  249. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/erb/parser.rb +40 -0
  250. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/erb/template.rb +11 -0
  251. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/erb/trimming.rb +23 -0
  252. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/exceptions.rb +13 -0
  253. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filter.rb +9 -0
  254. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/code_merger.rb +30 -0
  255. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/control_flow.rb +42 -0
  256. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/dynamic_inliner.rb +71 -0
  257. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/encoding.rb +24 -0
  258. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/eraser.rb +22 -0
  259. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/escapable.rb +40 -0
  260. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/multi_flattener.rb +25 -0
  261. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/remove_bom.rb +13 -0
  262. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/static_analyzer.rb +30 -0
  263. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/static_merger.rb +37 -0
  264. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/string_splitter.rb +130 -0
  265. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/filters/validator.rb +15 -0
  266. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generator.rb +88 -0
  267. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generators/array.rb +21 -0
  268. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generators/array_buffer.rb +29 -0
  269. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generators/erb.rb +32 -0
  270. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generators/rails_output_buffer.rb +35 -0
  271. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/generators/string_buffer.rb +25 -0
  272. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/grammar.rb +57 -0
  273. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/attribute_merger.rb +42 -0
  274. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/attribute_remover.rb +35 -0
  275. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/attribute_sorter.rb +21 -0
  276. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/dispatcher.rb +31 -0
  277. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/fast.rb +130 -0
  278. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/filter.rb +21 -0
  279. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/pretty.rb +103 -0
  280. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/html/safe.rb +23 -0
  281. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/map.rb +105 -0
  282. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/mixins/dispatcher.rb +161 -0
  283. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/mixins/engine_dsl.rb +145 -0
  284. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/mixins/grammar_dsl.rb +170 -0
  285. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/mixins/options.rb +87 -0
  286. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/mixins/template.rb +28 -0
  287. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/parser.rb +8 -0
  288. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/static_analyzer.rb +77 -0
  289. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/templates.rb +11 -0
  290. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/templates/rails.rb +26 -0
  291. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/templates/tilt.rb +46 -0
  292. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/utils.rb +101 -0
  293. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/lib/temple/version.rb +3 -0
  294. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/temple-0.8.1/temple.gemspec +29 -0
  295. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/Gemfile +6 -0
  296. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/History.rdoc +85 -0
  297. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/LICENSE.txt +21 -0
  298. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/Manifest +27 -0
  299. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/README.rdoc +247 -0
  300. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/Todo.rdoc +14 -0
  301. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table.rb +26 -0
  302. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +94 -0
  303. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +3 -0
  304. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +52 -0
  305. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +14 -0
  306. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +79 -0
  307. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +343 -0
  308. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +9 -0
  309. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +5 -0
  310. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/terminal-table-1.8.0/terminal-table.gemspec +26 -0
  311. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/CHANGELOG.md +132 -0
  312. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/COPYING +18 -0
  313. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/Gemfile +70 -0
  314. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/HACKING +16 -0
  315. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/README.md +233 -0
  316. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt.rb +166 -0
  317. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/asciidoc.rb +27 -0
  318. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/babel.rb +16 -0
  319. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/bluecloth.rb +24 -0
  320. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/builder.rb +37 -0
  321. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/coffee.rb +58 -0
  322. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/commonmarker.rb +78 -0
  323. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/creole.rb +25 -0
  324. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/csv.rb +65 -0
  325. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/dummy.rb +3 -0
  326. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/erb.rb +63 -0
  327. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/erubi.rb +32 -0
  328. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/erubis.rb +43 -0
  329. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/etanni.rb +27 -0
  330. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/haml.rb +86 -0
  331. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/kramdown.rb +25 -0
  332. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/less.rb +30 -0
  333. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/liquid.rb +44 -0
  334. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/livescript.rb +23 -0
  335. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/mapping.rb +293 -0
  336. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/markaby.rb +45 -0
  337. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/maruku.rb +22 -0
  338. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/nokogiri.rb +36 -0
  339. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/pandoc.rb +49 -0
  340. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/plain.rb +16 -0
  341. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/prawn.rb +43 -0
  342. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/radius.rb +48 -0
  343. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/rdiscount.rb +39 -0
  344. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/rdoc.rb +40 -0
  345. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/redcarpet.rb +83 -0
  346. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/redcloth.rb +23 -0
  347. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/rst-pandoc.rb +18 -0
  348. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/sass.rb +52 -0
  349. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/sigil.rb +34 -0
  350. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/string.rb +21 -0
  351. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/template.rb +302 -0
  352. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/typescript.rb +26 -0
  353. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/wikicloth.rb +22 -0
  354. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/lib/tilt/yajl.rb +87 -0
  355. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/tilt-2.0.9/tilt.gemspec +130 -0
  356. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/CHANGELOG.md +125 -0
  357. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/MIT-LICENSE.txt +22 -0
  358. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/README.md +124 -0
  359. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/data/display_width.marshal.gz +0 -0
  360. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/lib/unicode/display_width.rb +51 -0
  361. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/lib/unicode/display_width/constants.rb +8 -0
  362. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/lib/unicode/display_width/index.rb +12 -0
  363. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/lib/unicode/display_width/no_string_ext.rb +7 -0
  364. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/lib/unicode/display_width/string_ext.rb +17 -0
  365. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman.rb +553 -0
  366. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/app_tree.rb +217 -0
  367. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/call_index.rb +261 -0
  368. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks.rb +217 -0
  369. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/base_check.rb +485 -0
  370. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_basic_auth.rb +88 -0
  371. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_basic_auth_timing_attack.rb +33 -0
  372. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_content_tag.rb +212 -0
  373. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_cookie_serialization.rb +22 -0
  374. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_create_with.rb +74 -0
  375. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_cross_site_scripting.rb +386 -0
  376. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_default_routes.rb +91 -0
  377. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_deserialize.rb +105 -0
  378. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_detailed_exceptions.rb +55 -0
  379. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_digest_dos.rb +38 -0
  380. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_divide_by_zero.rb +42 -0
  381. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_dynamic_finders.rb +48 -0
  382. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_escape_function.rb +21 -0
  383. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_evaluation.rb +34 -0
  384. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_execute.rb +208 -0
  385. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_file_access.rb +87 -0
  386. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_file_disclosure.rb +35 -0
  387. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_filter_skipping.rb +31 -0
  388. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_force_ssl.rb +27 -0
  389. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_forgery_setting.rb +81 -0
  390. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_header_dos.rb +31 -0
  391. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_i18n_xss.rb +48 -0
  392. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_jruby_xml.rb +36 -0
  393. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_json_encoding.rb +47 -0
  394. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_json_parsing.rb +109 -0
  395. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_link_to.rb +132 -0
  396. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_link_to_href.rb +151 -0
  397. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_mail_to.rb +49 -0
  398. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_mass_assignment.rb +196 -0
  399. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_mime_type_dos.rb +39 -0
  400. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_model_attr_accessible.rb +55 -0
  401. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_model_attributes.rb +81 -0
  402. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_model_serialize.rb +67 -0
  403. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_nested_attributes.rb +38 -0
  404. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_nested_attributes_bypass.rb +58 -0
  405. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_number_to_currency.rb +74 -0
  406. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_permit_attributes.rb +43 -0
  407. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_quote_table_name.rb +40 -0
  408. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_redirect.rb +256 -0
  409. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_regex_dos.rb +68 -0
  410. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_render.rb +97 -0
  411. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_render_dos.rb +37 -0
  412. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_render_inline.rb +53 -0
  413. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_response_splitting.rb +21 -0
  414. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_reverse_tabnabbing.rb +54 -0
  415. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_route_dos.rb +42 -0
  416. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_safe_buffer_manipulation.rb +31 -0
  417. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_sanitize_methods.rb +112 -0
  418. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_secrets.rb +40 -0
  419. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_select_tag.rb +59 -0
  420. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_select_vulnerability.rb +60 -0
  421. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_send.rb +46 -0
  422. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_send_file.rb +19 -0
  423. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_session_manipulation.rb +34 -0
  424. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_session_settings.rb +179 -0
  425. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_simple_format.rb +63 -0
  426. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_single_quotes.rb +105 -0
  427. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_skip_before_filter.rb +60 -0
  428. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_sprockets_path_traversal.rb +39 -0
  429. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_sql.rb +707 -0
  430. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_sql_cves.rb +106 -0
  431. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_ssl_verify.rb +48 -0
  432. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_strip_tags.rb +91 -0
  433. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_symbol_dos.rb +71 -0
  434. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_symbol_dos_cve.rb +30 -0
  435. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_translate_bug.rb +45 -0
  436. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_unsafe_reflection.rb +50 -0
  437. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_unscoped_find.rb +57 -0
  438. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_validation_regex.rb +116 -0
  439. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_weak_hash.rb +147 -0
  440. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_without_protection.rb +80 -0
  441. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_xml_dos.rb +45 -0
  442. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/checks/check_yaml_parsing.rb +113 -0
  443. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/codeclimate/engine_configuration.rb +97 -0
  444. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/commandline.rb +179 -0
  445. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/differ.rb +66 -0
  446. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/file_parser.rb +52 -0
  447. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/file_path.rb +85 -0
  448. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/format/style.css +141 -0
  449. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/messages.rb +220 -0
  450. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/options.rb +359 -0
  451. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/haml_embedded.rb +44 -0
  452. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/rails2_erubis.rb +6 -0
  453. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +48 -0
  454. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/rails3_erubis.rb +81 -0
  455. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/slim_embedded.rb +44 -0
  456. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/parsers/template_parser.rb +106 -0
  457. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processor.rb +101 -0
  458. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/alias_processor.rb +1268 -0
  459. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/base_processor.rb +296 -0
  460. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/config_processor.rb +17 -0
  461. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/controller_alias_processor.rb +281 -0
  462. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/controller_processor.rb +245 -0
  463. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/erb_template_processor.rb +77 -0
  464. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/erubis_template_processor.rb +92 -0
  465. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/gem_processor.rb +100 -0
  466. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/haml_template_processor.rb +196 -0
  467. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/basic_processor.rb +37 -0
  468. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/call_conversion_helper.rb +95 -0
  469. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/find_all_calls.rb +247 -0
  470. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/find_call.rb +122 -0
  471. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/find_return_value.rb +166 -0
  472. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/module_helper.rb +111 -0
  473. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/processor_helper.rb +88 -0
  474. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/rails2_config_processor.rb +145 -0
  475. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/rails2_route_processor.rb +313 -0
  476. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/rails3_config_processor.rb +132 -0
  477. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/rails3_route_processor.rb +306 -0
  478. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/rails4_config_processor.rb +18 -0
  479. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/render_helper.rb +186 -0
  480. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/render_path.rb +139 -0
  481. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/route_helper.rb +68 -0
  482. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/lib/safe_call_helper.rb +16 -0
  483. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/library_processor.rb +74 -0
  484. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/model_processor.rb +90 -0
  485. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/output_processor.rb +149 -0
  486. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/route_processor.rb +17 -0
  487. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/slim_template_processor.rb +127 -0
  488. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/template_alias_processor.rb +117 -0
  489. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/processors/template_processor.rb +89 -0
  490. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report.rb +88 -0
  491. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/config/remediation.yml +71 -0
  492. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/ignore/config.rb +152 -0
  493. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/ignore/interactive.rb +362 -0
  494. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/pager.rb +113 -0
  495. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/renderer.rb +24 -0
  496. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_base.rb +193 -0
  497. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_codeclimate.rb +79 -0
  498. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_csv.rb +72 -0
  499. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_hash.rb +23 -0
  500. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_html.rb +219 -0
  501. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_json.rb +43 -0
  502. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_markdown.rb +114 -0
  503. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_table.rb +290 -0
  504. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_tabs.rb +19 -0
  505. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/report_text.rb +214 -0
  506. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/controller_overview.html.erb +22 -0
  507. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/controller_warnings.html.erb +21 -0
  508. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/error_overview.html.erb +29 -0
  509. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/header.html.erb +58 -0
  510. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/ignored_warnings.html.erb +25 -0
  511. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/model_warnings.html.erb +21 -0
  512. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/overview.html.erb +38 -0
  513. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/security_warnings.html.erb +23 -0
  514. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/template_overview.html.erb +21 -0
  515. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/view_warnings.html.erb +34 -0
  516. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/report/templates/warning_overview.html.erb +17 -0
  517. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/rescanner.rb +484 -0
  518. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/scanner.rb +331 -0
  519. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker.rb +390 -0
  520. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/collection.rb +94 -0
  521. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/config.rb +209 -0
  522. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/constants.rb +172 -0
  523. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/controller.rb +161 -0
  524. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/library.rb +17 -0
  525. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/model.rb +90 -0
  526. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/tracker/template.rb +33 -0
  527. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/util.rb +357 -0
  528. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/version.rb +3 -0
  529. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/warning.rb +313 -0
  530. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/brakeman/warning_codes.rb +122 -0
  531. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/ruby_parser/bm_sexp.rb +626 -0
  532. data/vendor/ruby/2.6.0/gems/brakeman-4.6.1/lib/ruby_parser/bm_sexp_processor.rb +117 -0
  533. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/LICENSE-DEPENDENCIES.md +1614 -0
  534. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/LICENSE.md +9 -0
  535. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/README.md +198 -0
  536. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/bin/nokogiri +118 -0
  537. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/dependencies.yml +72 -0
  538. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/Makefile +628 -0
  539. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/depend +358 -0
  540. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/extconf.rb +686 -0
  541. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_document.c +170 -0
  542. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_document.h +10 -0
  543. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_document.o +0 -0
  544. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_element_description.c +279 -0
  545. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_element_description.h +10 -0
  546. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_element_description.o +0 -0
  547. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_entity_lookup.c +32 -0
  548. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_entity_lookup.h +8 -0
  549. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_entity_lookup.o +0 -0
  550. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_parser_context.c +116 -0
  551. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_parser_context.h +11 -0
  552. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_parser_context.o +0 -0
  553. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_push_parser.c +87 -0
  554. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_push_parser.h +9 -0
  555. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/html_sax_push_parser.o +0 -0
  556. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/nokogiri.c +141 -0
  557. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/nokogiri.h +121 -0
  558. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/nokogiri.o +0 -0
  559. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/nokogiri.so +0 -0
  560. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attr.c +103 -0
  561. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attr.h +9 -0
  562. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attr.o +0 -0
  563. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attribute_decl.c +70 -0
  564. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attribute_decl.h +9 -0
  565. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_attribute_decl.o +0 -0
  566. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_cdata.c +62 -0
  567. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_cdata.h +9 -0
  568. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_cdata.o +0 -0
  569. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_comment.c +69 -0
  570. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_comment.h +9 -0
  571. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_comment.o +0 -0
  572. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document.c +608 -0
  573. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document.h +23 -0
  574. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document.o +0 -0
  575. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document_fragment.c +48 -0
  576. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document_fragment.h +10 -0
  577. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_document_fragment.o +0 -0
  578. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_dtd.c +202 -0
  579. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_dtd.h +10 -0
  580. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_dtd.o +0 -0
  581. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_content.c +123 -0
  582. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_content.h +10 -0
  583. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_content.o +0 -0
  584. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_decl.c +69 -0
  585. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_decl.h +9 -0
  586. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_element_decl.o +0 -0
  587. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_encoding_handler.c +79 -0
  588. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_encoding_handler.h +8 -0
  589. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_encoding_handler.o +0 -0
  590. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_decl.c +110 -0
  591. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_decl.h +10 -0
  592. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_decl.o +0 -0
  593. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_reference.c +52 -0
  594. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_reference.h +9 -0
  595. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_entity_reference.o +0 -0
  596. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_io.c +61 -0
  597. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_io.h +11 -0
  598. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_io.o +0 -0
  599. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_libxml2_hacks.c +112 -0
  600. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_libxml2_hacks.h +12 -0
  601. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_libxml2_hacks.o +0 -0
  602. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_namespace.c +111 -0
  603. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_namespace.h +14 -0
  604. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_namespace.o +0 -0
  605. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node.c +1753 -0
  606. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node.h +13 -0
  607. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node.o +0 -0
  608. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node_set.c +486 -0
  609. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node_set.h +12 -0
  610. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_node_set.o +0 -0
  611. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_processing_instruction.c +56 -0
  612. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_processing_instruction.h +9 -0
  613. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_processing_instruction.o +0 -0
  614. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_reader.c +668 -0
  615. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_reader.h +10 -0
  616. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_reader.o +0 -0
  617. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_relax_ng.c +161 -0
  618. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_relax_ng.h +9 -0
  619. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_relax_ng.o +0 -0
  620. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser.c +310 -0
  621. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser.h +39 -0
  622. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser.o +0 -0
  623. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser_context.c +262 -0
  624. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser_context.h +10 -0
  625. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_parser_context.o +0 -0
  626. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_push_parser.c +159 -0
  627. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_push_parser.h +9 -0
  628. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_sax_push_parser.o +0 -0
  629. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_schema.c +205 -0
  630. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_schema.h +9 -0
  631. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_schema.o +0 -0
  632. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_syntax_error.c +64 -0
  633. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_syntax_error.h +13 -0
  634. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_syntax_error.o +0 -0
  635. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_text.c +52 -0
  636. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_text.h +9 -0
  637. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_text.o +0 -0
  638. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_xpath_context.c +298 -0
  639. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_xpath_context.h +10 -0
  640. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xml_xpath_context.o +0 -0
  641. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xslt_stylesheet.c +270 -0
  642. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xslt_stylesheet.h +14 -0
  643. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/xslt_stylesheet.o +0 -0
  644. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri.rb +144 -0
  645. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css.rb +27 -0
  646. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/node.rb +52 -0
  647. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/parser.rb +750 -0
  648. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/parser.y +272 -0
  649. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/parser_extras.rb +91 -0
  650. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/syntax_error.rb +7 -0
  651. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/tokenizer.rb +153 -0
  652. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/tokenizer.rex +55 -0
  653. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/css/xpath_visitor.rb +230 -0
  654. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/decorators/slop.rb +42 -0
  655. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html.rb +37 -0
  656. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/builder.rb +35 -0
  657. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/document.rb +335 -0
  658. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/document_fragment.rb +49 -0
  659. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/element_description.rb +23 -0
  660. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/element_description_defaults.rb +671 -0
  661. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/entity_lookup.rb +13 -0
  662. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/sax/parser.rb +62 -0
  663. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/sax/parser_context.rb +16 -0
  664. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/html/sax/push_parser.rb +36 -0
  665. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/nokogiri.so +0 -0
  666. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/syntax_error.rb +4 -0
  667. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/version.rb +109 -0
  668. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml.rb +75 -0
  669. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/attr.rb +14 -0
  670. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/attribute_decl.rb +18 -0
  671. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/builder.rb +446 -0
  672. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/cdata.rb +11 -0
  673. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/character_data.rb +7 -0
  674. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/document.rb +285 -0
  675. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/document_fragment.rb +160 -0
  676. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/dtd.rb +32 -0
  677. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/element_content.rb +36 -0
  678. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/element_decl.rb +13 -0
  679. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/entity_decl.rb +19 -0
  680. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/entity_reference.rb +18 -0
  681. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/namespace.rb +13 -0
  682. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/node.rb +902 -0
  683. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/node/save_options.rb +61 -0
  684. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/node_set.rb +371 -0
  685. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/notation.rb +6 -0
  686. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/parse_options.rb +120 -0
  687. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/pp.rb +2 -0
  688. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/pp/character_data.rb +18 -0
  689. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/pp/node.rb +56 -0
  690. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/processing_instruction.rb +8 -0
  691. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/reader.rb +112 -0
  692. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/relax_ng.rb +32 -0
  693. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/sax.rb +4 -0
  694. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/sax/document.rb +171 -0
  695. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/sax/parser.rb +122 -0
  696. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/sax/parser_context.rb +16 -0
  697. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/sax/push_parser.rb +60 -0
  698. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/schema.rb +63 -0
  699. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/searchable.rb +230 -0
  700. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/syntax_error.rb +70 -0
  701. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/text.rb +9 -0
  702. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/xpath.rb +10 -0
  703. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
  704. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/xpath_context.rb +16 -0
  705. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xslt.rb +56 -0
  706. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/nokogiri/xslt/stylesheet.rb +25 -0
  707. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/lib/xsd/xmlparser/nokogiri.rb +102 -0
  708. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +78 -0
  709. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/patches/libxml2/0002-Remove-script-macro-support.patch +40 -0
  710. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +44 -0
  711. data/vendor/ruby/2.6.0/gems/nokogiri-1.10.4/patches/libxslt/0001-Fix-security-framework-bypass.patch +120 -0
  712. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/CHANGELOG.md +38 -0
  713. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/MIT-LICENSE +23 -0
  714. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/README.md +140 -0
  715. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/lib/rails-html-sanitizer.rb +77 -0
  716. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/lib/rails/html/sanitizer.rb +155 -0
  717. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/lib/rails/html/sanitizer/version.rb +7 -0
  718. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/lib/rails/html/scrubbers.rb +201 -0
  719. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/test/sanitizer_test.rb +568 -0
  720. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.2.0/test/scrubbers_test.rb +174 -0
  721. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/LICENSE.txt +20 -0
  722. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/README.md +216 -0
  723. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/assets/logo.png +0 -0
  724. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/assets/output.html.erb +261 -0
  725. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/bin/console +10 -0
  726. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/bin/setup +7 -0
  727. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/config/default.yml +3915 -0
  728. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/exe/rubocop +17 -0
  729. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop.rb +603 -0
  730. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/builder.rb +81 -0
  731. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node.rb +640 -0
  732. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/alias_node.rb +24 -0
  733. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/and_node.rb +29 -0
  734. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/args_node.rb +29 -0
  735. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/array_node.rb +57 -0
  736. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/block_node.rb +115 -0
  737. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/break_node.rb +17 -0
  738. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/case_node.rb +56 -0
  739. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/class_node.rb +31 -0
  740. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/def_node.rb +71 -0
  741. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/defined_node.rb +17 -0
  742. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/ensure_node.rb +17 -0
  743. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/float_node.rb +12 -0
  744. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/for_node.rb +53 -0
  745. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/hash_node.rb +109 -0
  746. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/if_node.rb +175 -0
  747. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/int_node.rb +12 -0
  748. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/keyword_splat_node.rb +45 -0
  749. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/basic_literal_node.rb +16 -0
  750. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/binary_operator_node.rb +43 -0
  751. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/collection_node.rb +15 -0
  752. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/conditional_node.rb +45 -0
  753. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/hash_element_node.rb +125 -0
  754. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +272 -0
  755. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +114 -0
  756. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/modifier_node.rb +17 -0
  757. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/numeric_node.rb +21 -0
  758. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/parameterized_node.rb +61 -0
  759. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +35 -0
  760. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/module_node.rb +24 -0
  761. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/or_node.rb +29 -0
  762. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/pair_node.rb +63 -0
  763. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/range_node.rb +18 -0
  764. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/regexp_node.rb +35 -0
  765. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/resbody_node.rb +24 -0
  766. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/retry_node.rb +17 -0
  767. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/self_class_node.rb +24 -0
  768. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/send_node.rb +13 -0
  769. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/str_node.rb +16 -0
  770. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/super_node.rb +21 -0
  771. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/symbol_node.rb +12 -0
  772. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/until_node.rb +35 -0
  773. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/when_node.rb +53 -0
  774. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/while_node.rb +35 -0
  775. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/yield_node.rb +21 -0
  776. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/sexp.rb +16 -0
  777. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/traversal.rb +183 -0
  778. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cached_data.rb +58 -0
  779. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cli.rb +343 -0
  780. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/comment_config.rb +200 -0
  781. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config.rb +240 -0
  782. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config_loader.rb +255 -0
  783. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config_loader_resolver.rb +194 -0
  784. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config_obsoletion.rb +201 -0
  785. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config_store.rb +48 -0
  786. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/config_validator.rb +239 -0
  787. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/autocorrect_logic.rb +103 -0
  788. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/badge.rb +73 -0
  789. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/bundler/duplicated_gem.rb +73 -0
  790. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/bundler/gem_comment.rb +64 -0
  791. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/bundler/insecure_protocol_source.rb +69 -0
  792. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/bundler/ordered_gems.rb +73 -0
  793. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/commissioner.rb +137 -0
  794. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/cop.rb +270 -0
  795. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/corrector.rb +171 -0
  796. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/alignment_corrector.rb +120 -0
  797. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/condition_corrector.rb +28 -0
  798. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/each_to_for_corrector.rb +53 -0
  799. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/empty_line_corrector.rb +26 -0
  800. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/for_to_each_corrector.rb +73 -0
  801. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +136 -0
  802. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/line_break_corrector.rb +61 -0
  803. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +68 -0
  804. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +44 -0
  805. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/parentheses_corrector.rb +31 -0
  806. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/percent_literal_corrector.rb +117 -0
  807. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/punctuation_corrector.rb +29 -0
  808. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/space_corrector.rb +49 -0
  809. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/string_literal_corrector.rb +25 -0
  810. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/correctors/unused_arg_corrector.rb +43 -0
  811. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/force.rb +42 -0
  812. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/gemspec/duplicated_assignment.rb +104 -0
  813. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/gemspec/ordered_dependencies.rb +106 -0
  814. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/gemspec/required_ruby_version.rb +85 -0
  815. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +55 -0
  816. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/generator.rb +223 -0
  817. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/generator/configuration_injector.rb +61 -0
  818. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/generator/require_file_injector.rb +78 -0
  819. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/ignored_node.rb +38 -0
  820. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs.rb +8 -0
  821. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/node_destructuring.rb +44 -0
  822. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +44 -0
  823. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +54 -0
  824. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +48 -0
  825. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +73 -0
  826. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +52 -0
  827. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/access_modifier_indentation.rb +98 -0
  828. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/align_arguments.rb +93 -0
  829. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/align_array.rb +39 -0
  830. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/align_hash.rb +358 -0
  831. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/align_parameters.rb +118 -0
  832. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/block_alignment.rb +244 -0
  833. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/block_end_newline.rb +62 -0
  834. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/case_indentation.rb +161 -0
  835. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/class_structure.rb +340 -0
  836. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +126 -0
  837. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +203 -0
  838. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/comment_indentation.rb +144 -0
  839. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/condition_position.rb +56 -0
  840. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/def_end_alignment.rb +74 -0
  841. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/dot_position.rb +105 -0
  842. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/else_alignment.rb +134 -0
  843. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_comment.rb +160 -0
  844. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +142 -0
  845. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +64 -0
  846. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_line_between_defs.rb +151 -0
  847. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines.rb +76 -0
  848. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +215 -0
  849. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +99 -0
  850. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +45 -0
  851. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +41 -0
  852. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +88 -0
  853. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +136 -0
  854. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +45 -0
  855. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +62 -0
  856. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/end_alignment.rb +189 -0
  857. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/end_of_line.rb +87 -0
  858. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/extra_spacing.rb +207 -0
  859. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/first_array_element_line_break.rb +45 -0
  860. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/first_hash_element_line_break.rb +37 -0
  861. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/first_method_argument_line_break.rb +55 -0
  862. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +46 -0
  863. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +289 -0
  864. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_assignment.rb +46 -0
  865. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_first_argument.rb +247 -0
  866. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_first_array_element.rb +167 -0
  867. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_first_hash_element.rb +184 -0
  868. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_first_parameter.rb +100 -0
  869. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indent_heredoc.rb +256 -0
  870. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indentation_consistency.rb +202 -0
  871. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/indentation_width.rb +364 -0
  872. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/initial_indentation.rb +59 -0
  873. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/leading_blank_lines.rb +53 -0
  874. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/leading_comment_space.rb +88 -0
  875. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +118 -0
  876. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +39 -0
  877. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_assignment_layout.rb +95 -0
  878. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_block_layout.rb +124 -0
  879. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +122 -0
  880. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +50 -0
  881. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +54 -0
  882. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +134 -0
  883. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +220 -0
  884. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +131 -0
  885. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/multiline_operation_indentation.rb +114 -0
  886. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +189 -0
  887. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_after_colon.rb +47 -0
  888. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_after_comma.rb +35 -0
  889. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_after_method_name.rb +42 -0
  890. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_after_not.rb +40 -0
  891. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_after_semicolon.rb +32 -0
  892. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_around_block_parameters.rb +165 -0
  893. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +92 -0
  894. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_around_keyword.rb +232 -0
  895. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_around_operators.rb +182 -0
  896. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_before_block_braces.rb +119 -0
  897. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_before_comma.rb +31 -0
  898. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_before_comment.rb +35 -0
  899. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_before_first_arg.rb +67 -0
  900. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_before_semicolon.rb +27 -0
  901. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_in_lambda_literal.rb +80 -0
  902. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +228 -0
  903. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +53 -0
  904. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_block_braces.rb +241 -0
  905. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +207 -0
  906. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_parens.rb +113 -0
  907. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +65 -0
  908. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_range_literal.rb +63 -0
  909. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +150 -0
  910. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +63 -0
  911. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/tab.rb +75 -0
  912. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/trailing_blank_lines.rb +113 -0
  913. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/layout/trailing_whitespace.rb +61 -0
  914. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ambiguous_block_association.rb +62 -0
  915. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ambiguous_operator.rb +55 -0
  916. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +43 -0
  917. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/assignment_in_condition.rb +84 -0
  918. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/big_decimal_new.rb +44 -0
  919. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/boolean_symbol.rb +38 -0
  920. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/circular_argument_reference.rb +72 -0
  921. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/debugger.rb +77 -0
  922. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/deprecated_class_methods.rb +111 -0
  923. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +81 -0
  924. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/duplicate_case_condition.rb +53 -0
  925. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/duplicate_methods.rb +239 -0
  926. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/duplicated_key.rb +38 -0
  927. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/each_with_object_argument.rb +42 -0
  928. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/else_layout.rb +66 -0
  929. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/empty_ensure.rb +60 -0
  930. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/empty_expression.rb +42 -0
  931. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/empty_interpolation.rb +36 -0
  932. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/empty_when.rb +38 -0
  933. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/end_in_method.rb +40 -0
  934. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ensure_return.rb +46 -0
  935. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/erb_new_arguments.rb +163 -0
  936. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/flip_flop.rb +32 -0
  937. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/float_out_of_range.rb +35 -0
  938. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/format_parameter_mismatch.rb +185 -0
  939. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/handle_exceptions.rb +95 -0
  940. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/heredoc_method_call_position.rb +156 -0
  941. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/implicit_string_concatenation.rb +101 -0
  942. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ineffective_access_modifier.rb +127 -0
  943. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/inherit_exception.rb +100 -0
  944. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/interpolation_check.rb +40 -0
  945. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/literal_as_condition.rb +138 -0
  946. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/literal_in_interpolation.rb +98 -0
  947. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/loop.rb +63 -0
  948. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +84 -0
  949. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/multiple_compare.rb +48 -0
  950. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/nested_method_definition.rb +104 -0
  951. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/nested_percent_literal.rb +51 -0
  952. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/next_without_accumulator.rb +50 -0
  953. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +83 -0
  954. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/number_conversion.rb +81 -0
  955. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/ordered_magic_comments.rb +86 -0
  956. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +64 -0
  957. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/percent_string_array.rb +73 -0
  958. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/percent_symbol_array.rb +69 -0
  959. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/rand_one.rb +45 -0
  960. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/redundant_with_index.rb +82 -0
  961. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/redundant_with_object.rb +83 -0
  962. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/regexp_as_condition.rb +29 -0
  963. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/require_parentheses.rb +66 -0
  964. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/rescue_exception.rb +46 -0
  965. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/rescue_type.rb +94 -0
  966. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/return_in_void_context.rb +74 -0
  967. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/safe_navigation_chain.rb +66 -0
  968. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb +94 -0
  969. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +38 -0
  970. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/script_permission.rb +70 -0
  971. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/shadowed_argument.rb +182 -0
  972. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/shadowed_exception.rb +178 -0
  973. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +53 -0
  974. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +59 -0
  975. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/syntax.rb +59 -0
  976. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/to_json.rb +41 -0
  977. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +82 -0
  978. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unified_integer.rb +45 -0
  979. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb +263 -0
  980. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb +116 -0
  981. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unneeded_require_statement.rb +50 -0
  982. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +172 -0
  983. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unreachable_code.rb +99 -0
  984. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unused_block_argument.rb +149 -0
  985. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/unused_method_argument.rb +68 -0
  986. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/uri_escape_unescape.rb +76 -0
  987. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/uri_regexp.rb +73 -0
  988. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/useless_access_modifier.rb +240 -0
  989. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/useless_assignment.rb +129 -0
  990. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/useless_comparison.rb +28 -0
  991. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/useless_else_without_rescue.rb +49 -0
  992. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/useless_setter_call.rb +164 -0
  993. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/lint/void.rb +170 -0
  994. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/message_annotator.rb +120 -0
  995. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb +24 -0
  996. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/block_length.rb +50 -0
  997. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/block_nesting.rb +65 -0
  998. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/class_length.rb +36 -0
  999. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +32 -0
  1000. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/line_length.rb +321 -0
  1001. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/method_length.rb +36 -0
  1002. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/module_length.rb +36 -0
  1003. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/parameter_lists.rb +54 -0
  1004. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/perceived_complexity.rb +61 -0
  1005. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +67 -0
  1006. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/alignment.rb +74 -0
  1007. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/annotation_comment.rb +37 -0
  1008. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/array_min_size.rb +59 -0
  1009. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/array_syntax.rb +17 -0
  1010. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/check_assignment.rb +44 -0
  1011. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/check_line_breakable.rb +190 -0
  1012. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/classish_length.rb +37 -0
  1013. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/code_length.rb +38 -0
  1014. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/configurable_enforced_style.rb +98 -0
  1015. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/configurable_formatting.rb +47 -0
  1016. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/configurable_max.rb +23 -0
  1017. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/configurable_naming.rb +16 -0
  1018. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/configurable_numbering.rb +17 -0
  1019. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/def_node.rb +33 -0
  1020. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/documentation_comment.rb +52 -0
  1021. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/duplication.rb +46 -0
  1022. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/empty_lines_around_body.rb +172 -0
  1023. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/empty_parameter.rb +24 -0
  1024. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/end_keyword_alignment.rb +67 -0
  1025. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/enforce_superclass.rb +30 -0
  1026. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/first_element_line_break.rb +46 -0
  1027. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/frozen_string_literal.rb +53 -0
  1028. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/hash_alignment.rb +147 -0
  1029. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/heredoc.rb +32 -0
  1030. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/ignored_method_patterns.rb +19 -0
  1031. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/ignored_methods.rb +19 -0
  1032. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/ignored_pattern.rb +29 -0
  1033. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/integer_node.rb +14 -0
  1034. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/interpolation.rb +27 -0
  1035. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/match_range.rb +26 -0
  1036. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/method_complexity.rb +56 -0
  1037. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/method_preference.rb +31 -0
  1038. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/min_body_length.rb +21 -0
  1039. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/multiline_element_indentation.rb +86 -0
  1040. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb +33 -0
  1041. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +255 -0
  1042. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +141 -0
  1043. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/negative_conditional.rb +32 -0
  1044. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/nil_methods.rb +25 -0
  1045. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/on_normal_if_unless.rb +14 -0
  1046. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/ordered_gem_node.rb +56 -0
  1047. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/parentheses.rb +17 -0
  1048. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/parser_diagnostic.rb +37 -0
  1049. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/percent_array.rb +52 -0
  1050. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/percent_literal.rb +38 -0
  1051. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/preceding_following_alignment.rb +181 -0
  1052. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/preferred_delimiters.rb +53 -0
  1053. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/range_help.rb +117 -0
  1054. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/rescue_node.rb +22 -0
  1055. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/safe_assignment.rb +23 -0
  1056. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/safe_mode.rb +22 -0
  1057. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/space_after_punctuation.rb +55 -0
  1058. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/space_before_punctuation.rb +49 -0
  1059. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/statement_modifier.rb +68 -0
  1060. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/string_help.rb +35 -0
  1061. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/string_literals_help.rb +23 -0
  1062. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/surrounding_space.rb +146 -0
  1063. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/target_ruby_version.rb +16 -0
  1064. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/too_many_lines.rb +35 -0
  1065. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/trailing_body.rb +26 -0
  1066. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/trailing_comma.rb +216 -0
  1067. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/uncommunicative_name.rb +111 -0
  1068. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/unused_argument.rb +33 -0
  1069. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/accessor_method_name.rb +55 -0
  1070. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/ascii_identifiers.rb +72 -0
  1071. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +43 -0
  1072. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/class_and_module_camel_case.rb +33 -0
  1073. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/constant_name.rb +81 -0
  1074. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/file_name.rb +205 -0
  1075. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +62 -0
  1076. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +55 -0
  1077. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +171 -0
  1078. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/method_name.rb +42 -0
  1079. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/predicate_name.rb +108 -0
  1080. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +112 -0
  1081. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/uncommunicative_block_param_name.rb +49 -0
  1082. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/uncommunicative_method_param_name.rb +58 -0
  1083. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/variable_name.rb +51 -0
  1084. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/naming/variable_number.rb +61 -0
  1085. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/offense.rb +194 -0
  1086. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/registry.rb +190 -0
  1087. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/security/eval.rb +31 -0
  1088. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/security/json_load.rb +46 -0
  1089. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/security/marshal_load.rb +39 -0
  1090. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/security/open.rb +71 -0
  1091. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/security/yaml_load.rb +37 -0
  1092. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/severity.rb +77 -0
  1093. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/access_modifier_declarations.rb +111 -0
  1094. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/alias.rb +147 -0
  1095. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/and_or.rb +146 -0
  1096. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/array_join.rb +39 -0
  1097. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/ascii_comments.rb +61 -0
  1098. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/attr.rb +62 -0
  1099. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/auto_resource_cleanup.rb +51 -0
  1100. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/bare_percent_literals.rb +78 -0
  1101. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/begin_block.rb +22 -0
  1102. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/block_comments.rb +70 -0
  1103. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/block_delimiters.rb +330 -0
  1104. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/braces_around_hash_parameters.rb +190 -0
  1105. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/case_equality.rb +30 -0
  1106. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/character_literal.rb +53 -0
  1107. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/class_and_module_children.rb +151 -0
  1108. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/class_check.rb +59 -0
  1109. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/class_methods.rb +60 -0
  1110. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/class_vars.rb +48 -0
  1111. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/collection_methods.rb +77 -0
  1112. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/colon_method_call.rb +48 -0
  1113. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/colon_method_definition.rb +37 -0
  1114. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/command_literal.rb +187 -0
  1115. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/comment_annotation.rb +97 -0
  1116. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/commented_keyword.rb +67 -0
  1117. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/conditional_assignment.rb +668 -0
  1118. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/constant_visibility.rb +77 -0
  1119. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/copyright.rb +95 -0
  1120. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/date_time.rb +77 -0
  1121. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/def_with_parentheses.rb +57 -0
  1122. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/dir.rb +48 -0
  1123. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/documentation.rb +97 -0
  1124. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/documentation_method.rb +81 -0
  1125. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/double_cop_disable_directive.rb +49 -0
  1126. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/double_negation.rb +35 -0
  1127. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/each_for_simple_loop.rb +58 -0
  1128. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/each_with_object.rb +110 -0
  1129. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_block_parameter.rb +48 -0
  1130. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_case_condition.rb +107 -0
  1131. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_else.rb +175 -0
  1132. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_lambda_parameter.rb +45 -0
  1133. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_literal.rb +123 -0
  1134. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/empty_method.rb +115 -0
  1135. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/encoding.rb +56 -0
  1136. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/end_block.rb +25 -0
  1137. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/eval_with_location.rb +148 -0
  1138. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/even_odd.rb +58 -0
  1139. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/expand_path_arguments.rb +194 -0
  1140. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/float_division.rb +94 -0
  1141. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/for.rb +88 -0
  1142. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/format_string.rb +124 -0
  1143. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/format_string_token.rb +170 -0
  1144. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/frozen_string_literal_comment.rb +164 -0
  1145. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/global_vars.rb +80 -0
  1146. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/guard_clause.rb +121 -0
  1147. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/hash_syntax.rb +214 -0
  1148. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/identical_conditional_branches.rb +130 -0
  1149. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/if_inside_else.rb +87 -0
  1150. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/if_unless_modifier.rb +91 -0
  1151. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +39 -0
  1152. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/if_with_semicolon.rb +30 -0
  1153. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/implicit_runtime_error.rb +32 -0
  1154. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/infinite_loop.rb +127 -0
  1155. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/inline_comment.rb +34 -0
  1156. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/inverse_methods.rb +187 -0
  1157. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/ip_addresses.rb +76 -0
  1158. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/lambda.rb +131 -0
  1159. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/lambda_call.rb +93 -0
  1160. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/line_end_concatenation.rb +121 -0
  1161. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +388 -0
  1162. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +77 -0
  1163. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/method_called_on_do_end_block.rb +46 -0
  1164. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/method_def_parentheses.rb +158 -0
  1165. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/method_missing_super.rb +34 -0
  1166. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/min_max.rb +68 -0
  1167. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/missing_else.rb +180 -0
  1168. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/missing_respond_to_missing.rb +46 -0
  1169. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/mixin_grouping.rb +148 -0
  1170. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/mixin_usage.rb +80 -0
  1171. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/module_function.rb +104 -0
  1172. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_block_chain.rb +40 -0
  1173. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_if_modifier.rb +67 -0
  1174. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_if_then.rb +50 -0
  1175. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_memoization.rb +94 -0
  1176. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_method_signature.rb +61 -0
  1177. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_ternary_operator.rb +38 -0
  1178. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiline_when_then.rb +55 -0
  1179. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/multiple_comparison.rb +92 -0
  1180. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/mutable_constant.rb +174 -0
  1181. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/negated_if.rb +99 -0
  1182. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/negated_unless.rb +89 -0
  1183. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/negated_while.rb +48 -0
  1184. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/nested_modifier.rb +89 -0
  1185. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/nested_parenthesized_calls.rb +67 -0
  1186. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/nested_ternary_operator.rb +32 -0
  1187. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/next.rb +244 -0
  1188. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/nil_comparison.rb +75 -0
  1189. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/non_nil_check.rb +124 -0
  1190. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/not.rb +82 -0
  1191. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/numeric_literal_prefix.rb +124 -0
  1192. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/numeric_literals.rb +110 -0
  1193. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/numeric_predicate.rb +137 -0
  1194. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/one_line_conditional.rb +101 -0
  1195. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/option_hash.rb +55 -0
  1196. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/optional_arguments.rb +58 -0
  1197. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/or_assignment.rb +90 -0
  1198. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/parallel_assignment.rb +287 -0
  1199. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/parentheses_around_condition.rb +103 -0
  1200. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/percent_literal_delimiters.rb +127 -0
  1201. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/percent_q_literals.rb +73 -0
  1202. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/perl_backrefs.rb +38 -0
  1203. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/preferred_hash_methods.rb +75 -0
  1204. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/proc.rb +34 -0
  1205. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/raise_args.rb +145 -0
  1206. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/random_with_offset.rb +158 -0
  1207. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_begin.rb +91 -0
  1208. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_conditional.rb +97 -0
  1209. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_exception.rb +60 -0
  1210. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_freeze.rb +67 -0
  1211. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_parentheses.rb +222 -0
  1212. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_return.rb +161 -0
  1213. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_self.rb +154 -0
  1214. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/redundant_sort_by.rb +50 -0
  1215. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/regexp_literal.rb +228 -0
  1216. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/rescue_modifier.rb +49 -0
  1217. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/rescue_standard_error.rb +124 -0
  1218. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/return_nil.rb +89 -0
  1219. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/safe_navigation.rb +255 -0
  1220. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/sample.rb +144 -0
  1221. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/self_assignment.rb +97 -0
  1222. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/semicolon.rb +90 -0
  1223. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/send.rb +31 -0
  1224. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/signal_exception.rb +211 -0
  1225. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/single_line_block_params.rb +95 -0
  1226. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/single_line_methods.rb +76 -0
  1227. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/special_global_vars.rb +213 -0
  1228. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +86 -0
  1229. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/stderr_puts.rb +61 -0
  1230. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/string_hash_keys.rb +50 -0
  1231. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/string_literals.rb +129 -0
  1232. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/string_literals_in_interpolation.rb +49 -0
  1233. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/string_methods.rb +46 -0
  1234. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/strip.rb +46 -0
  1235. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/struct_inheritance.rb +39 -0
  1236. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/symbol_array.rb +119 -0
  1237. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/symbol_literal.rb +32 -0
  1238. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/symbol_proc.rb +110 -0
  1239. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/ternary_parentheses.rb +204 -0
  1240. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_body_on_class.rb +43 -0
  1241. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +54 -0
  1242. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_body_on_module.rb +43 -0
  1243. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +96 -0
  1244. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +58 -0
  1245. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +56 -0
  1246. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_method_end_statement.rb +91 -0
  1247. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trailing_underscore_variable.rb +161 -0
  1248. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/trivial_accessors.rb +191 -0
  1249. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unless_else.rb +55 -0
  1250. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unneeded_capital_w.rb +51 -0
  1251. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unneeded_condition.rb +112 -0
  1252. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unneeded_interpolation.rb +98 -0
  1253. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unneeded_percent_q.rb +112 -0
  1254. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unneeded_sort.rb +165 -0
  1255. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/unpack_first.rb +65 -0
  1256. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/variable_interpolation.rb +48 -0
  1257. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/when_then.rb +37 -0
  1258. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/while_until_do.rb +59 -0
  1259. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/while_until_modifier.rb +61 -0
  1260. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/word_array.rb +102 -0
  1261. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/yoda_condition.rb +141 -0
  1262. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/style/zero_length_predicate.rb +117 -0
  1263. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/team.rb +191 -0
  1264. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/util.rb +127 -0
  1265. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force.rb +464 -0
  1266. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/assignment.rb +96 -0
  1267. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/branch.rb +322 -0
  1268. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/branchable.rb +23 -0
  1269. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/reference.rb +49 -0
  1270. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/scope.rb +109 -0
  1271. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/variable.rb +104 -0
  1272. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/variable_force/variable_table.rb +129 -0
  1273. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/core_ext/string.rb +47 -0
  1274. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/error.rb +34 -0
  1275. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/file_finder.rb +42 -0
  1276. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/auto_gen_config_formatter.rb +16 -0
  1277. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/base_formatter.rb +123 -0
  1278. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/clang_style_formatter.rb +54 -0
  1279. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/colorizable.rb +41 -0
  1280. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/disabled_config_formatter.rb +224 -0
  1281. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/disabled_lines_formatter.rb +57 -0
  1282. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/emacs_style_formatter.rb +24 -0
  1283. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/file_list_formatter.rb +20 -0
  1284. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/formatter_set.rb +105 -0
  1285. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/fuubar_style_formatter.rb +80 -0
  1286. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/html_formatter.rb +141 -0
  1287. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/json_formatter.rb +80 -0
  1288. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/offense_count_formatter.rb +74 -0
  1289. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/progress_formatter.rb +63 -0
  1290. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/quiet_formatter.rb +13 -0
  1291. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/simple_text_formatter.rb +126 -0
  1292. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/tap_formatter.rb +71 -0
  1293. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/text_util.rb +20 -0
  1294. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/formatter/worst_offenders_formatter.rb +62 -0
  1295. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/magic_comment.rb +210 -0
  1296. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/name_similarity.rb +21 -0
  1297. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/node_pattern.rb +799 -0
  1298. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/options.rb +465 -0
  1299. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/path_util.rb +85 -0
  1300. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/platform.rb +11 -0
  1301. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/processed_source.rb +216 -0
  1302. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rake_task.rb +79 -0
  1303. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/remote_config.rb +106 -0
  1304. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/result_cache.rb +191 -0
  1305. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rspec/cop_helper.rb +94 -0
  1306. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rspec/expect_offense.rb +240 -0
  1307. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rspec/host_environment_simulation_helper.rb +28 -0
  1308. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rspec/shared_contexts.rb +90 -0
  1309. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/rspec/support.rb +13 -0
  1310. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/runner.rb +352 -0
  1311. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/string_interpreter.rb +57 -0
  1312. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/string_util.rb +14 -0
  1313. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/target_finder.rb +190 -0
  1314. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/token.rb +114 -0
  1315. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/version.rb +21 -0
  1316. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/warning.rb +11 -0
  1317. data/vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/yaml_duplication_checker.rb +39 -0
  1318. data/vendor/ruby/2.6.0/specifications/brakeman-4.6.1.gemspec +23 -0
  1319. data/vendor/ruby/2.6.0/specifications/nokogiri-1.10.4.gemspec +83 -0
  1320. data/vendor/ruby/2.6.0/specifications/rails-html-sanitizer-1.2.0.gemspec +44 -0
  1321. data/vendor/ruby/2.6.0/specifications/rubocop-0.74.0.gemspec +56 -0
  1322. metadata +1311 -2
@@ -0,0 +1,20 @@
1
+ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,102 @@
1
+ = README
2
+
3
+ release:: 2.7.0
4
+ copyright:: copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
5
+
6
+
7
+
8
+ == About Erubis
9
+
10
+ Erubis is an implementation of eRuby. It has the following features.
11
+ * Very fast, almost three times faster than ERB and even 10% faster than eruby
12
+ * Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript)
13
+ * Auto escaping support
14
+ * Auto trimming spaces around '<% %>'
15
+ * Embedded pattern changeable (default '<% %>')
16
+ * Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>')
17
+ * Context object available and easy to combine eRuby template with YAML datafile
18
+ * Print statement available
19
+ * Easy to extend and customize in subclass
20
+ * Ruby on Rails support
21
+
22
+ Erubis is implemented in pure Ruby. It requires Ruby 1.8 or higher.
23
+ Erubis now supports Ruby 1.9.
24
+
25
+ See doc/users-guide.html for details.
26
+
27
+
28
+
29
+ == Installation
30
+
31
+ * If you have installed RubyGems, just type <tt>gem install erubis</tt>.
32
+
33
+ $ sudo gem install erubis
34
+
35
+ * Else install abstract[http://rubyforge.org/projects/abstract/] at first,
36
+ and download erubis_X.X.X.tar.bz2 and install it by setup.rb.
37
+
38
+ $ tar xjf abstract_X.X.X.tar.bz2
39
+ $ cd abstract_X.X.X/
40
+ $ sudo ruby setup.rb
41
+ $ cd ..
42
+ $ tar xjf erubis_X.X.X.tar.bz2
43
+ $ cd erubis_X.X.X/
44
+ $ sudo ruby setup.rb
45
+
46
+ * (Optional) It is able to merge 'lib/**/*.rb' into 'bin/erubis' by
47
+ 'contrib/inline-require' script.
48
+
49
+ $ tar xjf erubis_X.X.X.tar.bz2
50
+ $ cd erubis_X.X.X/
51
+ $ cp /tmp/abstract_X.X.X/lib/abstract.rb lib
52
+ $ unset RUBYLIB
53
+ $ contrib/inline-require -I lib bin/erubis > contrib/erubis
54
+
55
+
56
+
57
+ == Ruby on Rails Support
58
+
59
+ Erubis supports Ruby on Rails.
60
+ All you have to do is to add the following code into your 'config/environment.rb'
61
+ and restart web server.
62
+
63
+ require 'erubis/helpers/rails_helper'
64
+ #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby
65
+ #Erubis::Helpers::RailsHelper.init_properties = {}
66
+ #Erubis::Helpers::RailsHelper.show_src = nil
67
+
68
+ If Erubis::Helpers::RailsHelper.show_src is ture, Erubis prints converted Ruby code
69
+ into log file ('log/development.log' or so). It is useful for debug.
70
+
71
+
72
+
73
+ == Exploring Guide
74
+
75
+ If you are exploring Eruby, see the following class at first.
76
+ * Erubis::TinyEruby (erubis/tiny.rb) --
77
+ the most simple eRuby implementation.
78
+ * Erubis::Engine (erubis/engine.rb) --
79
+ base class of Eruby, Ephp, Ejava, and so on.
80
+ * Erubis::Eruby (erubis/engine/eruby.rb) --
81
+ engine class for eRuby.
82
+ * Erubis::Converter (erubis/converter.rb) --
83
+ convert eRuby script into Ruby code.
84
+
85
+
86
+
87
+ == Benchmark
88
+
89
+ 'benchmark/erubybenchmark.rb' is a benchmark script of Erubis.
90
+ Try 'ruby erubybenchmark.rb' in benchmark directory.
91
+
92
+
93
+
94
+ == License
95
+
96
+ MIT License
97
+
98
+
99
+
100
+ == Author
101
+
102
+ makoto kuwata <kwa(at)kuwata-lab.com>
@@ -0,0 +1,3468 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ###
4
+ ### $Release: 2.7.0 $
5
+ ### copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
6
+ ###
7
+
8
+ #--begin of require 'erubis/main'
9
+ ###
10
+ ### $Release: 2.7.0 $
11
+ ### copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
12
+ ###
13
+
14
+ require 'yaml'
15
+ #--begin of require 'erubis'
16
+ ##
17
+ ## $Release: 2.7.0 $
18
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
19
+ ##
20
+
21
+ ##
22
+ ## an implementation of eRuby
23
+ ##
24
+ ## ex.
25
+ ## input = <<'END'
26
+ ## <ul>
27
+ ## <% for item in @list %>
28
+ ## <li><%= item %>
29
+ ## <%== item %></li>
30
+ ## <% end %>
31
+ ## </ul>
32
+ ## END
33
+ ## list = ['<aaa>', 'b&b', '"ccc"']
34
+ ## eruby = Erubis::Eruby.new(input)
35
+ ## puts "--- code ---"
36
+ ## puts eruby.src
37
+ ## puts "--- result ---"
38
+ ## context = Erubis::Context.new() # or new(:list=>list)
39
+ ## context[:list] = list
40
+ ## puts eruby.evaluate(context)
41
+ ##
42
+ ## result:
43
+ ## --- source ---
44
+ ## _buf = ''; _buf << '<ul>
45
+ ## '; for item in @list
46
+ ## _buf << ' <li>'; _buf << ( item ).to_s; _buf << '
47
+ ## '; _buf << ' '; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</li>
48
+ ## '; end
49
+ ## _buf << '</ul>
50
+ ## ';
51
+ ## _buf.to_s
52
+ ## --- result ---
53
+ ## <ul>
54
+ ## <li><aaa>
55
+ ## &lt;aaa&gt;</li>
56
+ ## <li>b&b
57
+ ## b&amp;b</li>
58
+ ## <li>"ccc"
59
+ ## &quot;ccc&quot;</li>
60
+ ## </ul>
61
+ ##
62
+
63
+
64
+ module Erubis
65
+ VERSION = ('$Release: 2.7.0 $' =~ /([.\d]+)/) && $1
66
+ end
67
+
68
+ #--begin of require 'erubis/engine'
69
+ ##
70
+ ## $Release: 2.7.0 $
71
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
72
+ ##
73
+
74
+
75
+ #--begin of require 'erubis/generator'
76
+ ##
77
+ ## $Release: 2.7.0 $
78
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
79
+ ##
80
+
81
+ #--begin of require 'erubis/util'
82
+ ##
83
+ ## $Release: 2.7.0 $
84
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
85
+ ##
86
+
87
+ module Kernel
88
+
89
+ ##
90
+ ## raise NotImplementedError
91
+ ##
92
+ def not_implemented #:doc:
93
+ backtrace = caller()
94
+ method_name = (backtrace.shift =~ /`(\w+)'$/) && $1
95
+ mesg = "class #{self.class.name} must implement abstract method '#{method_name}()'."
96
+ #mesg = "#{self.class.name}##{method_name}() is not implemented."
97
+ err = NotImplementedError.new mesg
98
+ err.set_backtrace backtrace
99
+ raise err
100
+ end
101
+ private :not_implemented
102
+
103
+ end
104
+ #--end of require 'erubis/util'
105
+
106
+ module Erubis
107
+
108
+
109
+ ##
110
+ ## code generator, called by Converter module
111
+ ##
112
+ module Generator
113
+
114
+ def self.supported_properties() # :nodoc:
115
+ return [
116
+ [:escapefunc, nil, "escape function name"],
117
+ ]
118
+ end
119
+
120
+ attr_accessor :escapefunc
121
+
122
+ def init_generator(properties={})
123
+ @escapefunc = properties[:escapefunc]
124
+ end
125
+
126
+
127
+ ## (abstract) escape text string
128
+ ##
129
+ ## ex.
130
+ ## def escape_text(text)
131
+ ## return text.dump
132
+ ## # or return "'" + text.gsub(/['\\]/, '\\\\\&') + "'"
133
+ ## end
134
+ def escape_text(text)
135
+ not_implemented
136
+ end
137
+
138
+ ## return escaped expression code (ex. 'h(...)' or 'htmlspecialchars(...)')
139
+ def escaped_expr(code)
140
+ code.strip!
141
+ return "#{@escapefunc}(#{code})"
142
+ end
143
+
144
+ ## (abstract) add @preamble to src
145
+ def add_preamble(src)
146
+ not_implemented
147
+ end
148
+
149
+ ## (abstract) add text string to src
150
+ def add_text(src, text)
151
+ not_implemented
152
+ end
153
+
154
+ ## (abstract) add statement code to src
155
+ def add_stmt(src, code)
156
+ not_implemented
157
+ end
158
+
159
+ ## (abstract) add expression literal code to src. this is called by add_expr().
160
+ def add_expr_literal(src, code)
161
+ not_implemented
162
+ end
163
+
164
+ ## (abstract) add escaped expression code to src. this is called by add_expr().
165
+ def add_expr_escaped(src, code)
166
+ not_implemented
167
+ end
168
+
169
+ ## (abstract) add expression code to src for debug. this is called by add_expr().
170
+ def add_expr_debug(src, code)
171
+ not_implemented
172
+ end
173
+
174
+ ## (abstract) add @postamble to src
175
+ def add_postamble(src)
176
+ not_implemented
177
+ end
178
+
179
+
180
+ end
181
+
182
+
183
+ end
184
+ #--end of require 'erubis/generator'
185
+ #--begin of require 'erubis/converter'
186
+ ##
187
+ ## $Release: 2.7.0 $
188
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
189
+ ##
190
+
191
+ #--already included require 'erubis/util'
192
+
193
+ module Erubis
194
+
195
+
196
+ ##
197
+ ## convert
198
+ ##
199
+ module Converter
200
+
201
+ attr_accessor :preamble, :postamble, :escape
202
+
203
+ def self.supported_properties # :nodoc:
204
+ return [
205
+ [:preamble, nil, "preamble (no preamble when false)"],
206
+ [:postamble, nil, "postamble (no postamble when false)"],
207
+ [:escape, nil, "escape expression or not in default"],
208
+ ]
209
+ end
210
+
211
+ def init_converter(properties={})
212
+ @preamble = properties[:preamble]
213
+ @postamble = properties[:postamble]
214
+ @escape = properties[:escape]
215
+ end
216
+
217
+ ## convert input string into target language
218
+ def convert(input)
219
+ codebuf = "" # or []
220
+ @preamble.nil? ? add_preamble(codebuf) : (@preamble && (codebuf << @preamble))
221
+ convert_input(codebuf, input)
222
+ @postamble.nil? ? add_postamble(codebuf) : (@postamble && (codebuf << @postamble))
223
+ @_proc = nil # clear cached proc object
224
+ return codebuf # or codebuf.join()
225
+ end
226
+
227
+ protected
228
+
229
+ ##
230
+ ## detect spaces at beginning of line
231
+ ##
232
+ def detect_spaces_at_bol(text, is_bol)
233
+ lspace = nil
234
+ if text.empty?
235
+ lspace = "" if is_bol
236
+ elsif text[-1] == ?\n
237
+ lspace = ""
238
+ else
239
+ rindex = text.rindex(?\n)
240
+ if rindex
241
+ s = text[rindex+1..-1]
242
+ if s =~ /\A[ \t]*\z/
243
+ lspace = s
244
+ #text = text[0..rindex]
245
+ text[rindex+1..-1] = ''
246
+ end
247
+ else
248
+ if is_bol && text =~ /\A[ \t]*\z/
249
+ #lspace = text
250
+ #text = nil
251
+ lspace = text.dup
252
+ text[0..-1] = ''
253
+ end
254
+ end
255
+ end
256
+ return lspace
257
+ end
258
+
259
+ ##
260
+ ## (abstract) convert input to code
261
+ ##
262
+ def convert_input(codebuf, input)
263
+ not_implemented
264
+ end
265
+
266
+ end
267
+
268
+
269
+ module Basic
270
+ end
271
+
272
+
273
+ ##
274
+ ## basic converter which supports '<% ... %>' notation.
275
+ ##
276
+ module Basic::Converter
277
+ include Erubis::Converter
278
+
279
+ def self.supported_properties # :nodoc:
280
+ return [
281
+ [:pattern, '<% %>', "embed pattern"],
282
+ [:trim, true, "trim spaces around <% ... %>"],
283
+ ]
284
+ end
285
+
286
+ attr_accessor :pattern, :trim
287
+
288
+ def init_converter(properties={})
289
+ super(properties)
290
+ @pattern = properties[:pattern]
291
+ @trim = properties[:trim] != false
292
+ end
293
+
294
+ protected
295
+
296
+ ## return regexp of pattern to parse eRuby script
297
+ def pattern_regexp(pattern)
298
+ @prefix, @postfix = pattern.split() # '<% %>' => '<%', '%>'
299
+ #return /(.*?)(^[ \t]*)?#{@prefix}(=+|\#)?(.*?)-?#{@postfix}([ \t]*\r?\n)?/m
300
+ #return /(^[ \t]*)?#{@prefix}(=+|\#)?(.*?)-?#{@postfix}([ \t]*\r?\n)?/m
301
+ return /#{@prefix}(=+|-|\#|%)?(.*?)([-=])?#{@postfix}([ \t]*\r?\n)?/m
302
+ end
303
+ module_function :pattern_regexp
304
+
305
+ #DEFAULT_REGEXP = /(.*?)(^[ \t]*)?<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
306
+ #DEFAULT_REGEXP = /(^[ \t]*)?<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
307
+ #DEFAULT_REGEXP = /<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
308
+ DEFAULT_REGEXP = pattern_regexp('<% %>')
309
+
310
+ public
311
+
312
+ def convert_input(src, input)
313
+ pat = @pattern
314
+ regexp = pat.nil? || pat == '<% %>' ? DEFAULT_REGEXP : pattern_regexp(pat)
315
+ pos = 0
316
+ is_bol = true # is beginning of line
317
+ input.scan(regexp) do |indicator, code, tailch, rspace|
318
+ match = Regexp.last_match()
319
+ len = match.begin(0) - pos
320
+ text = input[pos, len]
321
+ pos = match.end(0)
322
+ ch = indicator ? indicator[0] : nil
323
+ lspace = ch == ?= ? nil : detect_spaces_at_bol(text, is_bol)
324
+ is_bol = rspace ? true : false
325
+ add_text(src, text) if text && !text.empty?
326
+ ## * when '<%= %>', do nothing
327
+ ## * when '<% %>' or '<%# %>', delete spaces iff only spaces are around '<% %>'
328
+ if ch == ?= # <%= %>
329
+ rspace = nil if tailch && !tailch.empty?
330
+ add_text(src, lspace) if lspace
331
+ add_expr(src, code, indicator)
332
+ add_text(src, rspace) if rspace
333
+ elsif ch == ?\# # <%# %>
334
+ n = code.count("\n") + (rspace ? 1 : 0)
335
+ if @trim && lspace && rspace
336
+ add_stmt(src, "\n" * n)
337
+ else
338
+ add_text(src, lspace) if lspace
339
+ add_stmt(src, "\n" * n)
340
+ add_text(src, rspace) if rspace
341
+ end
342
+ elsif ch == ?% # <%% %>
343
+ s = "#{lspace}#{@prefix||='<%'}#{code}#{tailch}#{@postfix||='%>'}#{rspace}"
344
+ add_text(src, s)
345
+ else # <% %>
346
+ if @trim && lspace && rspace
347
+ add_stmt(src, "#{lspace}#{code}#{rspace}")
348
+ else
349
+ add_text(src, lspace) if lspace
350
+ add_stmt(src, code)
351
+ add_text(src, rspace) if rspace
352
+ end
353
+ end
354
+ end
355
+ #rest = $' || input # ruby1.8
356
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
357
+ add_text(src, rest)
358
+ end
359
+
360
+ ## add expression code to src
361
+ def add_expr(src, code, indicator)
362
+ case indicator
363
+ when '='
364
+ @escape ? add_expr_escaped(src, code) : add_expr_literal(src, code)
365
+ when '=='
366
+ @escape ? add_expr_literal(src, code) : add_expr_escaped(src, code)
367
+ when '==='
368
+ add_expr_debug(src, code)
369
+ end
370
+ end
371
+
372
+ end
373
+
374
+
375
+ module PI
376
+ end
377
+
378
+ ##
379
+ ## Processing Instructions (PI) converter for XML.
380
+ ## this class converts '<?rb ... ?>' and '${...}' notation.
381
+ ##
382
+ module PI::Converter
383
+ include Erubis::Converter
384
+
385
+ def self.desc # :nodoc:
386
+ "use processing instructions (PI) instead of '<% %>'"
387
+ end
388
+
389
+ def self.supported_properties # :nodoc:
390
+ return [
391
+ [:trim, true, "trim spaces around <% ... %>"],
392
+ [:pi, 'rb', "PI (Processing Instrunctions) name"],
393
+ [:embchar, '@', "char for embedded expression pattern('@{...}@')"],
394
+ [:pattern, '<% %>', "embed pattern"],
395
+ ]
396
+ end
397
+
398
+ attr_accessor :pi, :prefix
399
+
400
+ def init_converter(properties={})
401
+ super(properties)
402
+ @trim = properties.fetch(:trim, true)
403
+ @pi = properties[:pi] if properties[:pi]
404
+ @embchar = properties[:embchar] || '@'
405
+ @pattern = properties[:pattern]
406
+ @pattern = '<% %>' if @pattern.nil? #|| @pattern == true
407
+ end
408
+
409
+ def convert(input)
410
+ code = super(input)
411
+ return @header || @footer ? "#{@header}#{code}#{@footer}" : code
412
+ end
413
+
414
+ protected
415
+
416
+ def convert_input(codebuf, input)
417
+ unless @regexp
418
+ @pi ||= 'e'
419
+ ch = Regexp.escape(@embchar)
420
+ if @pattern
421
+ left, right = @pattern.split(' ')
422
+ @regexp = /<\?#{@pi}(?:-(\w+))?(\s.*?)\?>([ \t]*\r?\n)?|#{ch}(!*)?\{(.*?)\}#{ch}|#{left}(=+)(.*?)#{right}/m
423
+ else
424
+ @regexp = /<\?#{@pi}(?:-(\w+))?(\s.*?)\?>([ \t]*\r?\n)?|#{ch}(!*)?\{(.*?)\}#{ch}/m
425
+ end
426
+ end
427
+ #
428
+ is_bol = true
429
+ pos = 0
430
+ input.scan(@regexp) do |pi_arg, stmt, rspace,
431
+ indicator1, expr1, indicator2, expr2|
432
+ match = Regexp.last_match
433
+ len = match.begin(0) - pos
434
+ text = input[pos, len]
435
+ pos = match.end(0)
436
+ lspace = stmt ? detect_spaces_at_bol(text, is_bol) : nil
437
+ is_bol = stmt && rspace ? true : false
438
+ add_text(codebuf, text) # unless text.empty?
439
+ #
440
+ if stmt
441
+ if @trim && lspace && rspace
442
+ add_pi_stmt(codebuf, "#{lspace}#{stmt}#{rspace}", pi_arg)
443
+ else
444
+ add_text(codebuf, lspace) if lspace
445
+ add_pi_stmt(codebuf, stmt, pi_arg)
446
+ add_text(codebuf, rspace) if rspace
447
+ end
448
+ else
449
+ add_pi_expr(codebuf, expr1 || expr2, indicator1 || indicator2)
450
+ end
451
+ end
452
+ #rest = $' || input # ruby1.8
453
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
454
+ add_text(codebuf, rest)
455
+ end
456
+
457
+ #--
458
+ #def convert_input(codebuf, input)
459
+ # parse_stmts(codebuf, input)
460
+ # #parse_stmts2(codebuf, input)
461
+ #end
462
+ #
463
+ #def parse_stmts(codebuf, input)
464
+ # #regexp = pattern_regexp(@pattern)
465
+ # @pi ||= 'e'
466
+ # @stmt_pattern ||= /<\?#{@pi}(?:-(\w+))?(\s.*?)\?>([ \t]*\r?\n)?/m
467
+ # is_bol = true
468
+ # pos = 0
469
+ # input.scan(@stmt_pattern) do |pi_arg, code, rspace|
470
+ # match = Regexp.last_match
471
+ # len = match.begin(0) - pos
472
+ # text = input[pos, len]
473
+ # pos = match.end(0)
474
+ # lspace = detect_spaces_at_bol(text, is_bol)
475
+ # is_bol = rspace ? true : false
476
+ # parse_exprs(codebuf, text) # unless text.empty?
477
+ # if @trim && lspace && rspace
478
+ # add_pi_stmt(codebuf, "#{lspace}#{code}#{rspace}", pi_arg)
479
+ # else
480
+ # add_text(codebuf, lspace)
481
+ # add_pi_stmt(codebuf, code, pi_arg)
482
+ # add_text(codebuf, rspace)
483
+ # end
484
+ # end
485
+ # rest = $' || input
486
+ # parse_exprs(codebuf, rest)
487
+ #end
488
+ #
489
+ #def parse_exprs(codebuf, input)
490
+ # unless @expr_pattern
491
+ # ch = Regexp.escape(@embchar)
492
+ # if @pattern
493
+ # left, right = @pattern.split(' ')
494
+ # @expr_pattern = /#{ch}(!*)?\{(.*?)\}#{ch}|#{left}(=+)(.*?)#{right}/
495
+ # else
496
+ # @expr_pattern = /#{ch}(!*)?\{(.*?)\}#{ch}/
497
+ # end
498
+ # end
499
+ # pos = 0
500
+ # input.scan(@expr_pattern) do |indicator1, code1, indicator2, code2|
501
+ # indicator = indicator1 || indicator2
502
+ # code = code1 || code2
503
+ # match = Regexp.last_match
504
+ # len = match.begin(0) - pos
505
+ # text = input[pos, len]
506
+ # pos = match.end(0)
507
+ # add_text(codebuf, text) # unless text.empty?
508
+ # add_pi_expr(codebuf, code, indicator)
509
+ # end
510
+ # rest = $' || input
511
+ # add_text(codebuf, rest)
512
+ #end
513
+ #++
514
+
515
+ def add_pi_stmt(codebuf, code, pi_arg) # :nodoc:
516
+ case pi_arg
517
+ when nil ; add_stmt(codebuf, code)
518
+ when 'header' ; @header = code
519
+ when 'footer' ; @footer = code
520
+ when 'comment'; add_stmt(codebuf, "\n" * code.count("\n"))
521
+ when 'value' ; add_expr_literal(codebuf, code)
522
+ else ; add_stmt(codebuf, code)
523
+ end
524
+ end
525
+
526
+ def add_pi_expr(codebuf, code, indicator) # :nodoc:
527
+ case indicator
528
+ when nil, '', '==' # @{...}@ or <%== ... %>
529
+ @escape == false ? add_expr_literal(codebuf, code) : add_expr_escaped(codebuf, code)
530
+ when '!', '=' # @!{...}@ or <%= ... %>
531
+ @escape == false ? add_expr_escaped(codebuf, code) : add_expr_literal(codebuf, code)
532
+ when '!!', '===' # @!!{...}@ or <%=== ... %>
533
+ add_expr_debug(codebuf, code)
534
+ else
535
+ # ignore
536
+ end
537
+ end
538
+
539
+ end
540
+
541
+
542
+ end
543
+ #--end of require 'erubis/converter'
544
+ #--begin of require 'erubis/evaluator'
545
+ ##
546
+ ## $Release: 2.7.0 $
547
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
548
+ ##
549
+
550
+ #--begin of require 'erubis/error'
551
+ ##
552
+ ## $Release: 2.7.0 $
553
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
554
+ ##
555
+
556
+ module Erubis
557
+
558
+
559
+ ##
560
+ ## base error class
561
+ ##
562
+ class ErubisError < StandardError
563
+ end
564
+
565
+
566
+ ##
567
+ ## raised when method or function is not supported
568
+ ##
569
+ class NotSupportedError < ErubisError
570
+ end
571
+
572
+
573
+ end
574
+ #--end of require 'erubis/error'
575
+ #--begin of require 'erubis/context'
576
+ ##
577
+ ## $Release: 2.7.0 $
578
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
579
+ ##
580
+
581
+
582
+ module Erubis
583
+
584
+
585
+ ##
586
+ ## context object for Engine#evaluate
587
+ ##
588
+ ## ex.
589
+ ## template = <<'END'
590
+ ## Hello <%= @user %>!
591
+ ## <% for item in @list %>
592
+ ## - <%= item %>
593
+ ## <% end %>
594
+ ## END
595
+ ##
596
+ ## context = Erubis::Context.new(:user=>'World', :list=>['a','b','c'])
597
+ ## # or
598
+ ## # context = Erubis::Context.new
599
+ ## # context[:user] = 'World'
600
+ ## # context[:list] = ['a', 'b', 'c']
601
+ ##
602
+ ## eruby = Erubis::Eruby.new(template)
603
+ ## print eruby.evaluate(context)
604
+ ##
605
+ class Context
606
+ include Enumerable
607
+
608
+ def initialize(hash=nil)
609
+ hash.each do |name, value|
610
+ self[name] = value
611
+ end if hash
612
+ end
613
+
614
+ def [](key)
615
+ return instance_variable_get("@#{key}")
616
+ end
617
+
618
+ def []=(key, value)
619
+ return instance_variable_set("@#{key}", value)
620
+ end
621
+
622
+ def keys
623
+ return instance_variables.collect { |name| name[1..-1] }
624
+ end
625
+
626
+ def each
627
+ instance_variables.each do |name|
628
+ key = name[1..-1]
629
+ value = instance_variable_get(name)
630
+ yield(key, value)
631
+ end
632
+ end
633
+
634
+ def to_hash
635
+ hash = {}
636
+ self.keys.each { |key| hash[key] = self[key] }
637
+ return hash
638
+ end
639
+
640
+ def update(context_or_hash)
641
+ arg = context_or_hash
642
+ if arg.is_a?(Hash)
643
+ arg.each do |key, val|
644
+ self[key] = val
645
+ end
646
+ else
647
+ arg.instance_variables.each do |varname|
648
+ key = varname[1..-1]
649
+ val = arg.instance_variable_get(varname)
650
+ self[key] = val
651
+ end
652
+ end
653
+ end
654
+
655
+ end
656
+
657
+
658
+ end
659
+ #--end of require 'erubis/context'
660
+
661
+
662
+ module Erubis
663
+
664
+ EMPTY_BINDING = binding()
665
+
666
+
667
+ ##
668
+ ## evaluate code
669
+ ##
670
+ module Evaluator
671
+
672
+ def self.supported_properties # :nodoc:
673
+ return []
674
+ end
675
+
676
+ attr_accessor :src, :filename
677
+
678
+ def init_evaluator(properties)
679
+ @filename = properties[:filename]
680
+ end
681
+
682
+ def result(*args)
683
+ raise NotSupportedError.new("evaluation of code except Ruby is not supported.")
684
+ end
685
+
686
+ def evaluate(*args)
687
+ raise NotSupportedError.new("evaluation of code except Ruby is not supported.")
688
+ end
689
+
690
+ end
691
+
692
+
693
+ ##
694
+ ## evaluator for Ruby
695
+ ##
696
+ module RubyEvaluator
697
+ include Evaluator
698
+
699
+ def self.supported_properties # :nodoc:
700
+ list = Evaluator.supported_properties
701
+ return list
702
+ end
703
+
704
+ ## eval(@src) with binding object
705
+ def result(_binding_or_hash=TOPLEVEL_BINDING)
706
+ _arg = _binding_or_hash
707
+ if _arg.is_a?(Hash)
708
+ _b = binding()
709
+ eval _arg.collect{|k,v| "#{k} = _arg[#{k.inspect}]; "}.join, _b
710
+ elsif _arg.is_a?(Binding)
711
+ _b = _arg
712
+ elsif _arg.nil?
713
+ _b = binding()
714
+ else
715
+ raise ArgumentError.new("#{self.class.name}#result(): argument should be Binding or Hash but passed #{_arg.class.name} object.")
716
+ end
717
+ return eval(@src, _b, (@filename || '(erubis'))
718
+ end
719
+
720
+ ## invoke context.instance_eval(@src)
721
+ def evaluate(_context=Context.new)
722
+ _context = Context.new(_context) if _context.is_a?(Hash)
723
+ #return _context.instance_eval(@src, @filename || '(erubis)')
724
+ #@_proc ||= eval("proc { #{@src} }", Erubis::EMPTY_BINDING, @filename || '(erubis)')
725
+ @_proc ||= eval("proc { #{@src} }", binding(), @filename || '(erubis)')
726
+ return _context.instance_eval(&@_proc)
727
+ end
728
+
729
+ ## if object is an Class or Module then define instance method to it,
730
+ ## else define singleton method to it.
731
+ def def_method(object, method_name, filename=nil)
732
+ m = object.is_a?(Module) ? :module_eval : :instance_eval
733
+ object.__send__(m, "def #{method_name}; #{@src}; end", filename || @filename || '(erubis)')
734
+ end
735
+
736
+
737
+ end
738
+
739
+
740
+ end
741
+ #--end of require 'erubis/evaluator'
742
+ #--already included require 'erubis/context'
743
+
744
+
745
+ module Erubis
746
+
747
+
748
+ ##
749
+ ## (abstract) abstract engine class.
750
+ ## subclass must include evaluator and converter module.
751
+ ##
752
+ class Engine
753
+ #include Evaluator
754
+ #include Converter
755
+ #include Generator
756
+
757
+ def initialize(input=nil, properties={})
758
+ #@input = input
759
+ init_generator(properties)
760
+ init_converter(properties)
761
+ init_evaluator(properties)
762
+ @src = convert(input) if input
763
+ end
764
+
765
+
766
+ ##
767
+ ## convert input string and set it to @src
768
+ ##
769
+ def convert!(input)
770
+ @src = convert(input)
771
+ end
772
+
773
+
774
+ ##
775
+ ## load file, write cache file, and return engine object.
776
+ ## this method create code cache file automatically.
777
+ ## cachefile name can be specified with properties[:cachename],
778
+ ## or filname + 'cache' is used as default.
779
+ ##
780
+ def self.load_file(filename, properties={})
781
+ cachename = properties[:cachename] || (filename + '.cache')
782
+ properties[:filename] = filename
783
+ timestamp = File.mtime(filename)
784
+ if test(?f, cachename) && timestamp == File.mtime(cachename)
785
+ engine = self.new(nil, properties)
786
+ engine.src = File.read(cachename)
787
+ else
788
+ input = File.open(filename, 'rb') {|f| f.read }
789
+ engine = self.new(input, properties)
790
+ tmpname = cachename + rand().to_s[1,8]
791
+ File.open(tmpname, 'wb') {|f| f.write(engine.src) }
792
+ File.rename(tmpname, cachename)
793
+ File.utime(timestamp, timestamp, cachename)
794
+ end
795
+ engine.src.untaint # ok?
796
+ return engine
797
+ end
798
+
799
+
800
+ ##
801
+ ## helper method to convert and evaluate input text with context object.
802
+ ## context may be Binding, Hash, or Object.
803
+ ##
804
+ def process(input, context=nil, filename=nil)
805
+ code = convert(input)
806
+ filename ||= '(erubis)'
807
+ if context.is_a?(Binding)
808
+ return eval(code, context, filename)
809
+ else
810
+ context = Context.new(context) if context.is_a?(Hash)
811
+ return context.instance_eval(code, filename)
812
+ end
813
+ end
814
+
815
+
816
+ ##
817
+ ## helper method evaluate Proc object with contect object.
818
+ ## context may be Binding, Hash, or Object.
819
+ ##
820
+ def process_proc(proc_obj, context=nil, filename=nil)
821
+ if context.is_a?(Binding)
822
+ filename ||= '(erubis)'
823
+ return eval(proc_obj, context, filename)
824
+ else
825
+ context = Context.new(context) if context.is_a?(Hash)
826
+ return context.instance_eval(&proc_obj)
827
+ end
828
+ end
829
+
830
+
831
+ end # end of class Engine
832
+
833
+
834
+ ##
835
+ ## (abstract) base engine class for Eruby, Eperl, Ejava, and so on.
836
+ ## subclass must include generator.
837
+ ##
838
+ class Basic::Engine < Engine
839
+ include Evaluator
840
+ include Basic::Converter
841
+ include Generator
842
+ end
843
+
844
+
845
+ class PI::Engine < Engine
846
+ include Evaluator
847
+ include PI::Converter
848
+ include Generator
849
+ end
850
+
851
+
852
+ end
853
+ #--end of require 'erubis/engine'
854
+ #require 'erubis/generator'
855
+ #require 'erubis/converter'
856
+ #require 'erubis/evaluator'
857
+ #require 'erubis/error'
858
+ #require 'erubis/context'
859
+ #requier 'erubis/util'
860
+ #--begin of require 'erubis/helper'
861
+ ##
862
+ ## $Release: 2.7.0 $
863
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
864
+ ##
865
+
866
+
867
+ module Erubis
868
+
869
+ ##
870
+ ## helper for xml
871
+ ##
872
+ module XmlHelper
873
+
874
+ module_function
875
+
876
+ ESCAPE_TABLE = {
877
+ '&' => '&amp;',
878
+ '<' => '&lt;',
879
+ '>' => '&gt;',
880
+ '"' => '&quot;',
881
+ "'" => '&#039;',
882
+ }
883
+
884
+ def escape_xml(value)
885
+ value.to_s.gsub(/[&<>"]/) { |s| ESCAPE_TABLE[s] } # or /[&<>"']/
886
+ #value.to_s.gsub(/[&<>"]/) { ESCAPE_TABLE[$&] }
887
+ end
888
+
889
+ def escape_xml2(value)
890
+ return value.to_s.gsub(/\&/,'&amp;').gsub(/</,'&lt;').gsub(/>/,'&gt;').gsub(/"/,'&quot;')
891
+ end
892
+
893
+ alias h escape_xml
894
+ alias html_escape escape_xml
895
+
896
+ def url_encode(str)
897
+ return str.gsub(/[^-_.a-zA-Z0-9]+/) { |s|
898
+ s.unpack('C*').collect { |i| "%%%02X" % i }.join
899
+ }
900
+ end
901
+
902
+ alias u url_encode
903
+
904
+ end
905
+
906
+
907
+ end
908
+ #--end of require 'erubis/helper'
909
+ #--begin of require 'erubis/enhancer'
910
+ ##
911
+ ## $Release: 2.7.0 $
912
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
913
+ ##
914
+
915
+
916
+ module Erubis
917
+
918
+
919
+ ##
920
+ ## switch '<%= ... %>' to escaped and '<%== ... %>' to unescaped
921
+ ##
922
+ ## ex.
923
+ ## class XmlEruby < Eruby
924
+ ## include EscapeEnhancer
925
+ ## end
926
+ ##
927
+ ## this is language-indenedent.
928
+ ##
929
+ module EscapeEnhancer
930
+
931
+ def self.desc # :nodoc:
932
+ "switch '<%= %>' to escaped and '<%== %>' to unescaped"
933
+ end
934
+
935
+ #--
936
+ #def self.included(klass)
937
+ # klass.class_eval <<-END
938
+ # alias _add_expr_literal add_expr_literal
939
+ # alias _add_expr_escaped add_expr_escaped
940
+ # alias add_expr_literal _add_expr_escaped
941
+ # alias add_expr_escaped _add_expr_literal
942
+ # END
943
+ #end
944
+ #++
945
+
946
+ def add_expr(src, code, indicator)
947
+ case indicator
948
+ when '='
949
+ @escape ? add_expr_literal(src, code) : add_expr_escaped(src, code)
950
+ when '=='
951
+ @escape ? add_expr_escaped(src, code) : add_expr_literal(src, code)
952
+ when '==='
953
+ add_expr_debug(src, code)
954
+ end
955
+ end
956
+
957
+ end
958
+
959
+
960
+ #--
961
+ ## (obsolete)
962
+ #module FastEnhancer
963
+ #end
964
+ #++
965
+
966
+
967
+ ##
968
+ ## use $stdout instead of string
969
+ ##
970
+ ## this is only for Eruby.
971
+ ##
972
+ module StdoutEnhancer
973
+
974
+ def self.desc # :nodoc:
975
+ "use $stdout instead of array buffer or string buffer"
976
+ end
977
+
978
+ def add_preamble(src)
979
+ src << "#{@bufvar} = $stdout;"
980
+ end
981
+
982
+ def add_postamble(src)
983
+ src << "\n''\n"
984
+ end
985
+
986
+ end
987
+
988
+
989
+ ##
990
+ ## use print statement instead of '_buf << ...'
991
+ ##
992
+ ## this is only for Eruby.
993
+ ##
994
+ module PrintOutEnhancer
995
+
996
+ def self.desc # :nodoc:
997
+ "use print statement instead of '_buf << ...'"
998
+ end
999
+
1000
+ def add_preamble(src)
1001
+ end
1002
+
1003
+ def add_text(src, text)
1004
+ src << " print '#{escape_text(text)}';" unless text.empty?
1005
+ end
1006
+
1007
+ def add_expr_literal(src, code)
1008
+ src << " print((#{code}).to_s);"
1009
+ end
1010
+
1011
+ def add_expr_escaped(src, code)
1012
+ src << " print #{escaped_expr(code)};"
1013
+ end
1014
+
1015
+ def add_postamble(src)
1016
+ src << "\n" unless src[-1] == ?\n
1017
+ end
1018
+
1019
+ end
1020
+
1021
+
1022
+ ##
1023
+ ## enable print function
1024
+ ##
1025
+ ## Notice: use Eruby#evaluate() and don't use Eruby#result()
1026
+ ## to be enable print function.
1027
+ ##
1028
+ ## this is only for Eruby.
1029
+ ##
1030
+ module PrintEnabledEnhancer
1031
+
1032
+ def self.desc # :nodoc:
1033
+ "enable to use print function in '<% %>'"
1034
+ end
1035
+
1036
+ def add_preamble(src)
1037
+ src << "@_buf = "
1038
+ super
1039
+ end
1040
+
1041
+ def print(*args)
1042
+ args.each do |arg|
1043
+ @_buf << arg.to_s
1044
+ end
1045
+ end
1046
+
1047
+ def evaluate(context=nil)
1048
+ _src = @src
1049
+ if context.is_a?(Hash)
1050
+ context.each do |key, val| instance_variable_set("@#{key}", val) end
1051
+ elsif context
1052
+ context.instance_variables.each do |name|
1053
+ instance_variable_set(name, context.instance_variable_get(name))
1054
+ end
1055
+ end
1056
+ return instance_eval(_src, (@filename || '(erubis)'))
1057
+ end
1058
+
1059
+ end
1060
+
1061
+
1062
+ ##
1063
+ ## return array instead of string
1064
+ ##
1065
+ ## this is only for Eruby.
1066
+ ##
1067
+ module ArrayEnhancer
1068
+
1069
+ def self.desc # :nodoc:
1070
+ "return array instead of string"
1071
+ end
1072
+
1073
+ def add_preamble(src)
1074
+ src << "#{@bufvar} = [];"
1075
+ end
1076
+
1077
+ def add_postamble(src)
1078
+ src << "\n" unless src[-1] == ?\n
1079
+ src << "#{@bufvar}\n"
1080
+ end
1081
+
1082
+ end
1083
+
1084
+
1085
+ ##
1086
+ ## use an Array object as buffer (included in Eruby by default)
1087
+ ##
1088
+ ## this is only for Eruby.
1089
+ ##
1090
+ module ArrayBufferEnhancer
1091
+
1092
+ def self.desc # :nodoc:
1093
+ "use an Array object for buffering (included in Eruby class)"
1094
+ end
1095
+
1096
+ def add_preamble(src)
1097
+ src << "_buf = [];"
1098
+ end
1099
+
1100
+ def add_postamble(src)
1101
+ src << "\n" unless src[-1] == ?\n
1102
+ src << "_buf.join\n"
1103
+ end
1104
+
1105
+ end
1106
+
1107
+
1108
+ ##
1109
+ ## use String class for buffering
1110
+ ##
1111
+ ## this is only for Eruby.
1112
+ ##
1113
+ module StringBufferEnhancer
1114
+
1115
+ def self.desc # :nodoc:
1116
+ "use a String object for buffering"
1117
+ end
1118
+
1119
+ def add_preamble(src)
1120
+ src << "#{@bufvar} = '';"
1121
+ end
1122
+
1123
+ def add_postamble(src)
1124
+ src << "\n" unless src[-1] == ?\n
1125
+ src << "#{@bufvar}.to_s\n"
1126
+ end
1127
+
1128
+ end
1129
+
1130
+
1131
+ ##
1132
+ ## use StringIO class for buffering
1133
+ ##
1134
+ ## this is only for Eruby.
1135
+ ##
1136
+ module StringIOEnhancer # :nodoc:
1137
+
1138
+ def self.desc # :nodoc:
1139
+ "use a StringIO object for buffering"
1140
+ end
1141
+
1142
+ def add_preamble(src)
1143
+ src << "#{@bufvar} = StringIO.new;"
1144
+ end
1145
+
1146
+ def add_postamble(src)
1147
+ src << "\n" unless src[-1] == ?\n
1148
+ src << "#{@bufvar}.string\n"
1149
+ end
1150
+
1151
+ end
1152
+
1153
+
1154
+ ##
1155
+ ## set buffer variable name to '_erbout' as well as '_buf'
1156
+ ##
1157
+ ## this is only for Eruby.
1158
+ ##
1159
+ module ErboutEnhancer
1160
+
1161
+ def self.desc # :nodoc:
1162
+ "set '_erbout = _buf = \"\";' to be compatible with ERB."
1163
+ end
1164
+
1165
+ def add_preamble(src)
1166
+ src << "_erbout = #{@bufvar} = '';"
1167
+ end
1168
+
1169
+ def add_postamble(src)
1170
+ src << "\n" unless src[-1] == ?\n
1171
+ src << "#{@bufvar}.to_s\n"
1172
+ end
1173
+
1174
+ end
1175
+
1176
+
1177
+ ##
1178
+ ## remove text and leave code, especially useful when debugging.
1179
+ ##
1180
+ ## ex.
1181
+ ## $ erubis -s -E NoText file.eruby | more
1182
+ ##
1183
+ ## this is language independent.
1184
+ ##
1185
+ module NoTextEnhancer
1186
+
1187
+ def self.desc # :nodoc:
1188
+ "remove text and leave code (useful when debugging)"
1189
+ end
1190
+
1191
+ def add_text(src, text)
1192
+ src << ("\n" * text.count("\n"))
1193
+ if text[-1] != ?\n
1194
+ text =~ /^(.*?)\z/
1195
+ src << (' ' * $1.length)
1196
+ end
1197
+ end
1198
+
1199
+ end
1200
+
1201
+
1202
+ ##
1203
+ ## remove code and leave text, especially useful when validating HTML tags.
1204
+ ##
1205
+ ## ex.
1206
+ ## $ erubis -s -E NoCode file.eruby | tidy -errors
1207
+ ##
1208
+ ## this is language independent.
1209
+ ##
1210
+ module NoCodeEnhancer
1211
+
1212
+ def self.desc # :nodoc:
1213
+ "remove code and leave text (useful when validating HTML)"
1214
+ end
1215
+
1216
+ def add_preamble(src)
1217
+ end
1218
+
1219
+ def add_postamble(src)
1220
+ end
1221
+
1222
+ def add_text(src, text)
1223
+ src << text
1224
+ end
1225
+
1226
+ def add_expr(src, code, indicator)
1227
+ src << "\n" * code.count("\n")
1228
+ end
1229
+
1230
+ def add_stmt(src, code)
1231
+ src << "\n" * code.count("\n")
1232
+ end
1233
+
1234
+ end
1235
+
1236
+
1237
+ ##
1238
+ ## get convert faster, but spaces around '<%...%>' are not trimmed.
1239
+ ##
1240
+ ## this is language-independent.
1241
+ ##
1242
+ module SimplifyEnhancer
1243
+
1244
+ def self.desc # :nodoc:
1245
+ "get convert faster but leave spaces around '<% %>'"
1246
+ end
1247
+
1248
+ #DEFAULT_REGEXP = /(^[ \t]*)?<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
1249
+ SIMPLE_REGEXP = /<%(=+|\#)?(.*?)-?%>/m
1250
+
1251
+ def convert(input)
1252
+ src = ""
1253
+ add_preamble(src)
1254
+ #regexp = pattern_regexp(@pattern)
1255
+ pos = 0
1256
+ input.scan(SIMPLE_REGEXP) do |indicator, code|
1257
+ match = Regexp.last_match
1258
+ index = match.begin(0)
1259
+ text = input[pos, index - pos]
1260
+ pos = match.end(0)
1261
+ add_text(src, text)
1262
+ if !indicator # <% %>
1263
+ add_stmt(src, code)
1264
+ elsif indicator[0] == ?\# # <%# %>
1265
+ n = code.count("\n")
1266
+ add_stmt(src, "\n" * n)
1267
+ else # <%= %>
1268
+ add_expr(src, code, indicator)
1269
+ end
1270
+ end
1271
+ #rest = $' || input # ruby1.8
1272
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
1273
+ add_text(src, rest)
1274
+ add_postamble(src)
1275
+ return src
1276
+ end
1277
+
1278
+ end
1279
+
1280
+
1281
+ ##
1282
+ ## enable to use other embedded expression pattern (default is '\[= =\]').
1283
+ ##
1284
+ ## notice! this is an experimental. spec may change in the future.
1285
+ ##
1286
+ ## ex.
1287
+ ## input = <<END
1288
+ ## <% for item in list %>
1289
+ ## <%= item %> : <%== item %>
1290
+ ## [= item =] : [== item =]
1291
+ ## <% end %>
1292
+ ## END
1293
+ ##
1294
+ ## class BiPatternEruby
1295
+ ## include BiPatternEnhancer
1296
+ ## end
1297
+ ## eruby = BiPatternEruby.new(input, :bipattern=>'\[= =\]')
1298
+ ## list = ['<a>', 'b&b', '"c"']
1299
+ ## print eruby.result(binding())
1300
+ ##
1301
+ ## ## output
1302
+ ## <a> : &lt;a&gt;
1303
+ ## <a> : &lt;a&gt;
1304
+ ## b&b : b&amp;b
1305
+ ## b&b : b&amp;b
1306
+ ## "c" : &quot;c&quot;
1307
+ ## "c" : &quot;c&quot;
1308
+ ##
1309
+ ## this is language independent.
1310
+ ##
1311
+ module BiPatternEnhancer
1312
+
1313
+ def self.desc # :nodoc:
1314
+ "another embedded expression pattern (default '\[= =\]')."
1315
+ end
1316
+
1317
+ def initialize(input, properties={})
1318
+ self.bipattern = properties[:bipattern] # or '\$\{ \}'
1319
+ super
1320
+ end
1321
+
1322
+ ## when pat is nil then '\[= =\]' is used
1323
+ def bipattern=(pat) # :nodoc:
1324
+ @bipattern = pat || '\[= =\]'
1325
+ pre, post = @bipattern.split()
1326
+ @bipattern_regexp = /(.*?)#{pre}(=*)(.*?)#{post}/m
1327
+ end
1328
+
1329
+ def add_text(src, text)
1330
+ return unless text
1331
+ m = nil
1332
+ text.scan(@bipattern_regexp) do |txt, indicator, code|
1333
+ m = Regexp.last_match
1334
+ super(src, txt)
1335
+ add_expr(src, code, '=' + indicator)
1336
+ end
1337
+ #rest = $' || text # ruby1.8
1338
+ rest = m ? text[m.end(0)..-1] : text # ruby1.9
1339
+ super(src, rest)
1340
+ end
1341
+
1342
+ end
1343
+
1344
+
1345
+ ##
1346
+ ## regards lines starting with '^[ \t]*%' as program code
1347
+ ##
1348
+ ## in addition you can specify prefix character (default '%')
1349
+ ##
1350
+ ## this is language-independent.
1351
+ ##
1352
+ module PrefixedLineEnhancer
1353
+
1354
+ def self.desc # :nodoc:
1355
+ "regard lines matched to '^[ \t]*%' as program code"
1356
+ end
1357
+
1358
+ def init_generator(properties={})
1359
+ super
1360
+ @prefixchar = properties[:prefixchar]
1361
+ end
1362
+
1363
+ def add_text(src, text)
1364
+ unless @prefixrexp
1365
+ @prefixchar ||= '%'
1366
+ @prefixrexp = Regexp.compile("^([ \\t]*)\\#{@prefixchar}(.*?\\r?\\n)")
1367
+ end
1368
+ pos = 0
1369
+ text2 = ''
1370
+ text.scan(@prefixrexp) do
1371
+ space = $1
1372
+ line = $2
1373
+ space, line = '', $1 unless $2
1374
+ match = Regexp.last_match
1375
+ len = match.begin(0) - pos
1376
+ str = text[pos, len]
1377
+ pos = match.end(0)
1378
+ if text2.empty?
1379
+ text2 = str
1380
+ else
1381
+ text2 << str
1382
+ end
1383
+ if line[0, 1] == @prefixchar
1384
+ text2 << space << line
1385
+ else
1386
+ super(src, text2)
1387
+ text2 = ''
1388
+ add_stmt(src, space + line)
1389
+ end
1390
+ end
1391
+ #rest = pos == 0 ? text : $' # ruby1.8
1392
+ rest = pos == 0 ? text : text[pos..-1] # ruby1.9
1393
+ unless text2.empty?
1394
+ text2 << rest if rest
1395
+ rest = text2
1396
+ end
1397
+ super(src, rest)
1398
+ end
1399
+
1400
+ end
1401
+
1402
+
1403
+ ##
1404
+ ## regards lines starting with '%' as program code
1405
+ ##
1406
+ ## this is for compatibility to eruby and ERB.
1407
+ ##
1408
+ ## this is language-independent.
1409
+ ##
1410
+ module PercentLineEnhancer
1411
+ include PrefixedLineEnhancer
1412
+
1413
+ def self.desc # :nodoc:
1414
+ "regard lines starting with '%' as program code"
1415
+ end
1416
+
1417
+ #--
1418
+ #def init_generator(properties={})
1419
+ # super
1420
+ # @prefixchar = '%'
1421
+ # @prefixrexp = /^\%(.*?\r?\n)/
1422
+ #end
1423
+ #++
1424
+
1425
+ def add_text(src, text)
1426
+ unless @prefixrexp
1427
+ @prefixchar = '%'
1428
+ @prefixrexp = /^\%(.*?\r?\n)/
1429
+ end
1430
+ super(src, text)
1431
+ end
1432
+
1433
+ end
1434
+
1435
+
1436
+ ##
1437
+ ## [experimental] allow header and footer in eRuby script
1438
+ ##
1439
+ ## ex.
1440
+ ## ====================
1441
+ ## ## without header and footer
1442
+ ## $ cat ex1.eruby
1443
+ ## <% def list_items(list) %>
1444
+ ## <% for item in list %>
1445
+ ## <li><%= item %></li>
1446
+ ## <% end %>
1447
+ ## <% end %>
1448
+ ##
1449
+ ## $ erubis -s ex1.eruby
1450
+ ## _buf = []; def list_items(list)
1451
+ ## ; for item in list
1452
+ ## ; _buf << '<li>'; _buf << ( item ).to_s; _buf << '</li>
1453
+ ## '; end
1454
+ ## ; end
1455
+ ## ;
1456
+ ## _buf.join
1457
+ ##
1458
+ ## ## with header and footer
1459
+ ## $ cat ex2.eruby
1460
+ ## <!--#header:
1461
+ ## def list_items(list)
1462
+ ## #-->
1463
+ ## <% for item in list %>
1464
+ ## <li><%= item %></li>
1465
+ ## <% end %>
1466
+ ## <!--#footer:
1467
+ ## end
1468
+ ## #-->
1469
+ ##
1470
+ ## $ erubis -s -c HeaderFooterEruby ex4.eruby
1471
+ ##
1472
+ ## def list_items(list)
1473
+ ## _buf = []; _buf << '
1474
+ ## '; for item in list
1475
+ ## ; _buf << '<li>'; _buf << ( item ).to_s; _buf << '</li>
1476
+ ## '; end
1477
+ ## ; _buf << '
1478
+ ## ';
1479
+ ## _buf.join
1480
+ ## end
1481
+ ##
1482
+ ## ====================
1483
+ ##
1484
+ ## this is language-independent.
1485
+ ##
1486
+ module HeaderFooterEnhancer
1487
+
1488
+ def self.desc # :nodoc:
1489
+ "allow header/footer in document (ex. '<!--#header: #-->')"
1490
+ end
1491
+
1492
+ HEADER_FOOTER_PATTERN = /(.*?)(^[ \t]*)?<!--\#(\w+):(.*?)\#-->([ \t]*\r?\n)?/m
1493
+
1494
+ def add_text(src, text)
1495
+ m = nil
1496
+ text.scan(HEADER_FOOTER_PATTERN) do |txt, lspace, word, content, rspace|
1497
+ m = Regexp.last_match
1498
+ flag_trim = @trim && lspace && rspace
1499
+ super(src, txt)
1500
+ content = "#{lspace}#{content}#{rspace}" if flag_trim
1501
+ super(src, lspace) if !flag_trim && lspace
1502
+ instance_variable_set("@#{word}", content)
1503
+ super(src, rspace) if !flag_trim && rspace
1504
+ end
1505
+ #rest = $' || text # ruby1.8
1506
+ rest = m ? text[m.end(0)..-1] : text # ruby1.9
1507
+ super(src, rest)
1508
+ end
1509
+
1510
+ attr_accessor :header, :footer
1511
+
1512
+ def convert(input)
1513
+ source = super
1514
+ return @src = "#{@header}#{source}#{@footer}"
1515
+ end
1516
+
1517
+ end
1518
+
1519
+
1520
+ ##
1521
+ ## delete indentation of HTML.
1522
+ ##
1523
+ ## this is language-independent.
1524
+ ##
1525
+ module DeleteIndentEnhancer
1526
+
1527
+ def self.desc # :nodoc:
1528
+ "delete indentation of HTML."
1529
+ end
1530
+
1531
+ def convert_input(src, input)
1532
+ input = input.gsub(/^[ \t]+</, '<')
1533
+ super(src, input)
1534
+ end
1535
+
1536
+ end
1537
+
1538
+
1539
+ ##
1540
+ ## convert "<h1><%=title%></h1>" into "_buf << %Q`<h1>#{title}</h1>`"
1541
+ ##
1542
+ ## this is only for Eruby.
1543
+ ##
1544
+ module InterpolationEnhancer
1545
+
1546
+ def self.desc # :nodoc:
1547
+ "convert '<p><%=text%></p>' into '_buf << %Q`<p>\#{text}</p>`'"
1548
+ end
1549
+
1550
+ def convert_input(src, input)
1551
+ pat = @pattern
1552
+ regexp = pat.nil? || pat == '<% %>' ? Basic::Converter::DEFAULT_REGEXP : pattern_regexp(pat)
1553
+ pos = 0
1554
+ is_bol = true # is beginning of line
1555
+ str = ''
1556
+ input.scan(regexp) do |indicator, code, tailch, rspace|
1557
+ match = Regexp.last_match()
1558
+ len = match.begin(0) - pos
1559
+ text = input[pos, len]
1560
+ pos = match.end(0)
1561
+ ch = indicator ? indicator[0] : nil
1562
+ lspace = ch == ?= ? nil : detect_spaces_at_bol(text, is_bol)
1563
+ is_bol = rspace ? true : false
1564
+ _add_text_to_str(str, text)
1565
+ ## * when '<%= %>', do nothing
1566
+ ## * when '<% %>' or '<%# %>', delete spaces iff only spaces are around '<% %>'
1567
+ if ch == ?= # <%= %>
1568
+ rspace = nil if tailch && !tailch.empty?
1569
+ str << lspace if lspace
1570
+ add_expr(str, code, indicator)
1571
+ str << rspace if rspace
1572
+ elsif ch == ?\# # <%# %>
1573
+ n = code.count("\n") + (rspace ? 1 : 0)
1574
+ if @trim && lspace && rspace
1575
+ add_text(src, str)
1576
+ str = ''
1577
+ add_stmt(src, "\n" * n)
1578
+ else
1579
+ str << lspace if lspace
1580
+ add_text(src, str)
1581
+ str = ''
1582
+ add_stmt(src, "\n" * n)
1583
+ str << rspace if rspace
1584
+ end
1585
+ else # <% %>
1586
+ if @trim && lspace && rspace
1587
+ add_text(src, str)
1588
+ str = ''
1589
+ add_stmt(src, "#{lspace}#{code}#{rspace}")
1590
+ else
1591
+ str << lspace if lspace
1592
+ add_text(src, str)
1593
+ str = ''
1594
+ add_stmt(src, code)
1595
+ str << rspace if rspace
1596
+ end
1597
+ end
1598
+ end
1599
+ #rest = $' || input # ruby1.8
1600
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
1601
+ _add_text_to_str(str, rest)
1602
+ add_text(src, str)
1603
+ end
1604
+
1605
+ def add_text(src, text)
1606
+ return if !text || text.empty?
1607
+ #src << " _buf << %Q`" << text << "`;"
1608
+ if text[-1] == ?\n
1609
+ text[-1] = "\\n"
1610
+ src << " #{@bufvar} << %Q`#{text}`\n"
1611
+ else
1612
+ src << " #{@bufvar} << %Q`#{text}`;"
1613
+ end
1614
+ end
1615
+
1616
+ def _add_text_to_str(str, text)
1617
+ return if !text || text.empty?
1618
+ str << text.gsub(/[`\#\\]/, '\\\\\&')
1619
+ end
1620
+
1621
+ def add_expr_escaped(str, code)
1622
+ str << "\#{#{escaped_expr(code)}}"
1623
+ end
1624
+
1625
+ def add_expr_literal(str, code)
1626
+ str << "\#{#{code}}"
1627
+ end
1628
+
1629
+ end
1630
+
1631
+
1632
+ end
1633
+ #--end of require 'erubis/enhancer'
1634
+ #require 'erubis/tiny'
1635
+ #--begin of require 'erubis/engine/eruby'
1636
+ ##
1637
+ ## $Release: 2.7.0 $
1638
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
1639
+ ##
1640
+
1641
+ #--already included require 'erubis/engine'
1642
+ #--already included require 'erubis/enhancer'
1643
+
1644
+
1645
+ module Erubis
1646
+
1647
+
1648
+ ##
1649
+ ## code generator for Ruby
1650
+ ##
1651
+ module RubyGenerator
1652
+ include Generator
1653
+ #include ArrayBufferEnhancer
1654
+ include StringBufferEnhancer
1655
+
1656
+ def init_generator(properties={})
1657
+ super
1658
+ @escapefunc ||= "Erubis::XmlHelper.escape_xml"
1659
+ @bufvar = properties[:bufvar] || "_buf"
1660
+ end
1661
+
1662
+ def self.supported_properties() # :nodoc:
1663
+ return []
1664
+ end
1665
+
1666
+ def escape_text(text)
1667
+ text.gsub(/['\\]/, '\\\\\&') # "'" => "\\'", '\\' => '\\\\'
1668
+ end
1669
+
1670
+ def escaped_expr(code)
1671
+ return "#{@escapefunc}(#{code})"
1672
+ end
1673
+
1674
+ #--
1675
+ #def add_preamble(src)
1676
+ # src << "#{@bufvar} = [];"
1677
+ #end
1678
+ #++
1679
+
1680
+ def add_text(src, text)
1681
+ src << " #{@bufvar} << '" << escape_text(text) << "';" unless text.empty?
1682
+ end
1683
+
1684
+ def add_stmt(src, code)
1685
+ #src << code << ';'
1686
+ src << code
1687
+ src << ';' unless code[-1] == ?\n
1688
+ end
1689
+
1690
+ def add_expr_literal(src, code)
1691
+ src << " #{@bufvar} << (" << code << ').to_s;'
1692
+ end
1693
+
1694
+ def add_expr_escaped(src, code)
1695
+ src << " #{@bufvar} << " << escaped_expr(code) << ';'
1696
+ end
1697
+
1698
+ def add_expr_debug(src, code)
1699
+ code.strip!
1700
+ s = (code.dump =~ /\A"(.*)"\z/) && $1
1701
+ src << ' $stderr.puts("*** debug: ' << s << '=#{(' << code << ').inspect}");'
1702
+ end
1703
+
1704
+ #--
1705
+ #def add_postamble(src)
1706
+ # src << "\n#{@bufvar}.join\n"
1707
+ #end
1708
+ #++
1709
+
1710
+ end
1711
+
1712
+
1713
+ ##
1714
+ ## engine for Ruby
1715
+ ##
1716
+ class Eruby < Basic::Engine
1717
+ include RubyEvaluator
1718
+ include RubyGenerator
1719
+ end
1720
+
1721
+
1722
+ ##
1723
+ ## fast engine for Ruby
1724
+ ##
1725
+ class FastEruby < Eruby
1726
+ include InterpolationEnhancer
1727
+ end
1728
+
1729
+
1730
+ ##
1731
+ ## swtich '<%= %>' to escaped and '<%== %>' to not escaped
1732
+ ##
1733
+ class EscapedEruby < Eruby
1734
+ include EscapeEnhancer
1735
+ end
1736
+
1737
+
1738
+ ##
1739
+ ## sanitize expression (<%= ... %>) by default
1740
+ ##
1741
+ ## this is equivalent to EscapedEruby and is prepared only for compatibility.
1742
+ ##
1743
+ class XmlEruby < Eruby
1744
+ include EscapeEnhancer
1745
+ end
1746
+
1747
+
1748
+ class PI::Eruby < PI::Engine
1749
+ include RubyEvaluator
1750
+ include RubyGenerator
1751
+
1752
+ def init_converter(properties={})
1753
+ @pi = 'rb'
1754
+ super(properties)
1755
+ end
1756
+
1757
+ end
1758
+
1759
+
1760
+ end
1761
+ #--end of require 'erubis/engine/eruby'
1762
+ #require 'erubis/engine/enhanced' # enhanced eruby engines
1763
+ #require 'erubis/engine/optimized' # generates optimized ruby code
1764
+ #require 'erubis/engine/ephp'
1765
+ #require 'erubis/engine/ec'
1766
+ #require 'erubis/engine/ejava'
1767
+ #require 'erubis/engine/escheme'
1768
+ #require 'erubis/engine/eperl'
1769
+ #require 'erubis/engine/ejavascript'
1770
+
1771
+ #--begin of require 'erubis/local-setting'
1772
+ ##
1773
+ ## $Release: 2.7.0 $
1774
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
1775
+ ##
1776
+
1777
+ ##
1778
+ ## you can add site-local settings here.
1779
+ ## this files is required by erubis.rb
1780
+ ##
1781
+ #--end of require 'erubis/local-setting'
1782
+ #--end of require 'erubis'
1783
+ #--begin of require 'erubis/tiny'
1784
+ ##
1785
+ ## $Release: 2.7.0 $
1786
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
1787
+ ##
1788
+
1789
+ module Erubis
1790
+
1791
+ ##
1792
+ ## tiny and the simplest implementation of eRuby
1793
+ ##
1794
+ ## ex.
1795
+ ## eruby = TinyEruby.new(File.read('example.rhtml'))
1796
+ ## print eruby.src # print ruby code
1797
+ ## print eruby.result(binding()) # eval ruby code with Binding object
1798
+ ## print eruby.evalute(context) # eval ruby code with context object
1799
+ ##
1800
+ class TinyEruby
1801
+
1802
+ def initialize(input=nil)
1803
+ @src = convert(input) if input
1804
+ end
1805
+ attr_reader :src
1806
+
1807
+ EMBEDDED_PATTERN = /<%(=+|\#)?(.*?)-?%>/m
1808
+
1809
+ def convert(input)
1810
+ src = "_buf = '';" # preamble
1811
+ pos = 0
1812
+ input.scan(EMBEDDED_PATTERN) do |indicator, code|
1813
+ m = Regexp.last_match
1814
+ text = input[pos...m.begin(0)]
1815
+ pos = m.end(0)
1816
+ #src << " _buf << '" << escape_text(text) << "';"
1817
+ text.gsub!(/['\\]/, '\\\\\&')
1818
+ src << " _buf << '" << text << "';" unless text.empty?
1819
+ if !indicator # <% %>
1820
+ src << code << ";"
1821
+ elsif indicator == '#' # <%# %>
1822
+ src << ("\n" * code.count("\n"))
1823
+ else # <%= %>
1824
+ src << " _buf << (" << code << ").to_s;"
1825
+ end
1826
+ end
1827
+ #rest = $' || input # ruby1.8
1828
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
1829
+ #src << " _buf << '" << escape_text(rest) << "';"
1830
+ rest.gsub!(/['\\]/, '\\\\\&')
1831
+ src << " _buf << '" << rest << "';" unless rest.empty?
1832
+ src << "\n_buf.to_s\n" # postamble
1833
+ return src
1834
+ end
1835
+
1836
+ #def escape_text(text)
1837
+ # return text.gsub!(/['\\]/, '\\\\\&') || text
1838
+ #end
1839
+
1840
+ def result(_binding=TOPLEVEL_BINDING)
1841
+ eval @src, _binding
1842
+ end
1843
+
1844
+ def evaluate(_context=Object.new)
1845
+ if _context.is_a?(Hash)
1846
+ _obj = Object.new
1847
+ _context.each do |k, v| _obj.instance_variable_set("@#{k}", v) end
1848
+ _context = _obj
1849
+ end
1850
+ _context.instance_eval @src
1851
+ end
1852
+
1853
+ end
1854
+
1855
+
1856
+
1857
+ module PI
1858
+ end
1859
+
1860
+ class PI::TinyEruby
1861
+
1862
+ def initialize(input=nil, options={})
1863
+ @escape = options[:escape] || 'Erubis::XmlHelper.escape_xml'
1864
+ @src = convert(input) if input
1865
+ end
1866
+
1867
+ attr_reader :src
1868
+
1869
+ EMBEDDED_PATTERN = /(^[ \t]*)?<\?rb(\s.*?)\?>([ \t]*\r?\n)?|@(!+)?\{(.*?)\}@/m
1870
+
1871
+ def convert(input)
1872
+ src = "_buf = '';" # preamble
1873
+ pos = 0
1874
+ input.scan(EMBEDDED_PATTERN) do |lspace, stmt, rspace, indicator, expr|
1875
+ match = Regexp.last_match
1876
+ len = match.begin(0) - pos
1877
+ text = input[pos, len]
1878
+ pos = match.end(0)
1879
+ #src << " _buf << '" << escape_text(text) << "';"
1880
+ text.gsub!(/['\\]/, '\\\\\&')
1881
+ src << " _buf << '" << text << "';" unless text.empty?
1882
+ if stmt # <?rb ... ?>
1883
+ if lspace && rspace
1884
+ src << "#{lspace}#{stmt}#{rspace}"
1885
+ else
1886
+ src << " _buf << '" << lspace << "';" if lspace
1887
+ src << stmt << ";"
1888
+ src << " _buf << '" << rspace << "';" if rspace
1889
+ end
1890
+ else # ${...}, $!{...}
1891
+ if !indicator
1892
+ src << " _buf << " << @escape << "(" << expr << ");"
1893
+ elsif indicator == '!'
1894
+ src << " _buf << (" << expr << ").to_s;"
1895
+ end
1896
+ end
1897
+ end
1898
+ #rest = $' || input # ruby1.8
1899
+ rest = pos == 0 ? input : input[pos..-1] # ruby1.9
1900
+ #src << " _buf << '" << escape_text(rest) << "';"
1901
+ rest.gsub!(/['\\]/, '\\\\\&')
1902
+ src << " _buf << '" << rest << "';" unless rest.empty?
1903
+ src << "\n_buf.to_s\n" # postamble
1904
+ return src
1905
+ end
1906
+
1907
+ #def escape_text(text)
1908
+ # return text.gsub!(/['\\]/, '\\\\\&') || text
1909
+ #end
1910
+
1911
+ def result(_binding=TOPLEVEL_BINDING)
1912
+ eval @src, _binding
1913
+ end
1914
+
1915
+ def evaluate(_context=Object.new)
1916
+ if _context.is_a?(Hash)
1917
+ _obj = Object.new
1918
+ _context.each do |k, v| _obj.instance_variable_set("@#{k}", v) end
1919
+ _context = _obj
1920
+ end
1921
+ _context.instance_eval @src
1922
+ end
1923
+
1924
+ end
1925
+
1926
+
1927
+ end
1928
+ #--end of require 'erubis/tiny'
1929
+ #--begin of require 'erubis/engine/enhanced'
1930
+ ##
1931
+ ## $Release: 2.7.0 $
1932
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
1933
+ ##
1934
+
1935
+ #--already included require 'erubis/enhancer'
1936
+ #--already included require 'erubis/engine/eruby'
1937
+
1938
+
1939
+ module Erubis
1940
+
1941
+
1942
+ #--
1943
+ ## moved to engine/ruby.rb
1944
+ #class EscapedEruby < Eruby
1945
+ # include EscapeEnhancer
1946
+ #end
1947
+ #++
1948
+
1949
+
1950
+ #--
1951
+ ### (obsolete)
1952
+ #class FastEruby < Eruby
1953
+ # include FastEnhancer
1954
+ #end
1955
+ #++
1956
+
1957
+
1958
+ class StdoutEruby < Eruby
1959
+ include StdoutEnhancer
1960
+ end
1961
+
1962
+
1963
+ class PrintOutEruby < Eruby
1964
+ include PrintOutEnhancer
1965
+ end
1966
+
1967
+
1968
+ class PrintEnabledEruby < Eruby
1969
+ include PrintEnabledEnhancer
1970
+ end
1971
+
1972
+
1973
+ class ArrayEruby < Eruby
1974
+ include ArrayEnhancer
1975
+ end
1976
+
1977
+
1978
+ class ArrayBufferEruby < Eruby
1979
+ include ArrayBufferEnhancer
1980
+ end
1981
+
1982
+
1983
+ class StringBufferEruby < Eruby
1984
+ include StringBufferEnhancer
1985
+ end
1986
+
1987
+
1988
+ class StringIOEruby < Eruby
1989
+ include StringIOEnhancer
1990
+ end
1991
+
1992
+
1993
+ class ErboutEruby < Eruby
1994
+ include ErboutEnhancer
1995
+ end
1996
+
1997
+
1998
+ class NoTextEruby < Eruby
1999
+ include NoTextEnhancer
2000
+ end
2001
+
2002
+
2003
+ class NoCodeEruby < Eruby
2004
+ include NoCodeEnhancer
2005
+ end
2006
+
2007
+
2008
+ class SimplifiedEruby < Eruby
2009
+ include SimplifyEnhancer
2010
+ end
2011
+
2012
+
2013
+ class StdoutSimplifiedEruby < Eruby
2014
+ include StdoutEnhancer
2015
+ include SimplifyEnhancer
2016
+ end
2017
+
2018
+
2019
+ class PrintOutSimplifiedEruby < Eruby
2020
+ include PrintOutEnhancer
2021
+ include SimplifyEnhancer
2022
+ end
2023
+
2024
+
2025
+ class BiPatternEruby < Eruby
2026
+ include BiPatternEnhancer
2027
+ end
2028
+
2029
+
2030
+ class PercentLineEruby < Eruby
2031
+ include PercentLineEnhancer
2032
+ end
2033
+
2034
+
2035
+ class PrefixedLineEruby < Eruby
2036
+ include PrefixedLineEnhancer
2037
+ end
2038
+
2039
+
2040
+ class HeaderFooterEruby < Eruby
2041
+ include HeaderFooterEnhancer
2042
+ end
2043
+
2044
+
2045
+ class DeleteIndentEruby < Eruby
2046
+ include DeleteIndentEnhancer
2047
+ end
2048
+
2049
+
2050
+ class InterpolationEruby < Eruby
2051
+ include InterpolationEnhancer
2052
+ end
2053
+
2054
+
2055
+ end
2056
+ #--end of require 'erubis/engine/enhanced'
2057
+ #--begin of require 'erubis/engine/optimized'
2058
+ ##
2059
+ ## $Release: 2.7.0 $
2060
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2061
+ ##
2062
+
2063
+
2064
+ #--already included require 'erubis/engine/eruby'
2065
+
2066
+
2067
+ module Erubis
2068
+
2069
+
2070
+ module OptimizedGenerator
2071
+ include Generator
2072
+
2073
+ def self.supported_properties() # :nodoc:
2074
+ return []
2075
+ end
2076
+
2077
+ def init_generator(properties={})
2078
+ super
2079
+ @escapefunc ||= "Erubis::XmlHelper.escape_xml"
2080
+ @initialized = false
2081
+ @prev_is_expr = false
2082
+ end
2083
+
2084
+ protected
2085
+
2086
+ def escape_text(text)
2087
+ text.gsub(/['\\]/, '\\\\\&') # "'" => "\\'", '\\' => '\\\\'
2088
+ end
2089
+
2090
+ def escaped_expr(code)
2091
+ @escapefunc ||= 'Erubis::XmlHelper.escape_xml'
2092
+ return "#{@escapefunc}(#{code})"
2093
+ end
2094
+
2095
+ def switch_to_expr(src)
2096
+ return if @prev_is_expr
2097
+ @prev_is_expr = true
2098
+ src << ' _buf'
2099
+ end
2100
+
2101
+ def switch_to_stmt(src)
2102
+ return unless @prev_is_expr
2103
+ @prev_is_expr = false
2104
+ src << ';'
2105
+ end
2106
+
2107
+ def add_preamble(src)
2108
+ #@initialized = false
2109
+ #@prev_is_expr = false
2110
+ end
2111
+
2112
+ def add_text(src, text)
2113
+ return if text.empty?
2114
+ if @initialized
2115
+ switch_to_expr(src)
2116
+ src << " << '" << escape_text(text) << "'"
2117
+ else
2118
+ src << "_buf = '" << escape_text(text) << "';"
2119
+ @initialized = true
2120
+ end
2121
+ end
2122
+
2123
+ def add_stmt(src, code)
2124
+ switch_to_stmt(src) if @initialized
2125
+ #super
2126
+ src << code
2127
+ src << ';' unless code[-1] == ?\n
2128
+ end
2129
+
2130
+ def add_expr_literal(src, code)
2131
+ unless @initialized; src << "_buf = ''"; @initialized = true; end
2132
+ switch_to_expr(src)
2133
+ src << " << (" << code << ").to_s"
2134
+ end
2135
+
2136
+ def add_expr_escaped(src, code)
2137
+ unless @initialized; src << "_buf = ''"; @initialized = true; end
2138
+ switch_to_expr(src)
2139
+ src << " << " << escaped_expr(code)
2140
+ end
2141
+
2142
+ def add_expr_debug(src, code)
2143
+ code.strip!
2144
+ s = (code.dump =~ /\A"(.*)"\z/) && $1
2145
+ src << ' $stderr.puts("*** debug: ' << s << '=#{(' << code << ').inspect}");'
2146
+ end
2147
+
2148
+ def add_postamble(src)
2149
+ #super if @initialized
2150
+ src << "\n_buf\n" if @initialized
2151
+ end
2152
+
2153
+ end # end of class OptimizedEruby
2154
+
2155
+
2156
+ ##
2157
+ ## Eruby class which generates optimized ruby code
2158
+ ##
2159
+ class OptimizedEruby < Basic::Engine # Eruby
2160
+ include RubyEvaluator
2161
+ include OptimizedGenerator
2162
+
2163
+ def init_converter(properties={})
2164
+ @pi = 'rb'
2165
+ super(properties)
2166
+ end
2167
+
2168
+ end
2169
+
2170
+
2171
+ ##
2172
+ ## XmlEruby class which generates optimized ruby code
2173
+ ##
2174
+ class OptimizedXmlEruby < OptimizedEruby
2175
+ include EscapeEnhancer
2176
+
2177
+ def add_expr_debug(src, code)
2178
+ switch_to_stmt(src) if indicator == '===' && !@initialized
2179
+ super
2180
+ end
2181
+
2182
+ end # end of class OptimizedXmlEruby
2183
+
2184
+ end
2185
+ #--end of require 'erubis/engine/optimized'
2186
+ #--already included require 'erubis/engine/eruby'
2187
+ #--begin of require 'erubis/engine/ephp'
2188
+ ##
2189
+ ## $Release: 2.7.0 $
2190
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2191
+ ##
2192
+
2193
+ #--already included require 'erubis/engine'
2194
+ #--already included require 'erubis/enhancer'
2195
+
2196
+
2197
+ module Erubis
2198
+
2199
+
2200
+ module PhpGenerator
2201
+ include Generator
2202
+
2203
+ def self.supported_properties() # :nodoc:
2204
+ return []
2205
+ end
2206
+
2207
+ def init_generator(properties={})
2208
+ super
2209
+ @escapefunc ||= 'htmlspecialchars'
2210
+ end
2211
+
2212
+ def add_preamble(src)
2213
+ # empty
2214
+ end
2215
+
2216
+ def escape_text(text)
2217
+ return text.gsub!(/<\?xml\b/, '<<?php ?>?xml') || text
2218
+ end
2219
+
2220
+ def add_text(src, text)
2221
+ src << escape_text(text)
2222
+ end
2223
+
2224
+ def add_expr_literal(src, code)
2225
+ code.strip!
2226
+ src << "<?php echo #{code}; ?>"
2227
+ end
2228
+
2229
+ def add_expr_escaped(src, code)
2230
+ add_expr_literal(src, escaped_expr(code))
2231
+ end
2232
+
2233
+ def add_expr_debug(src, code)
2234
+ code.strip!
2235
+ s = code.gsub(/\'/, "\\'")
2236
+ src << "<?php error_log('*** debug: #{s}='.(#{code}), 0); ?>"
2237
+ end
2238
+
2239
+ def add_stmt(src, code)
2240
+ src << "<?php"
2241
+ src << " " if code[0] != ?\ #
2242
+ if code[-1] == ?\n
2243
+ code.chomp!
2244
+ src << code << "?>\n"
2245
+ else
2246
+ src << code << "?>"
2247
+ end
2248
+ end
2249
+
2250
+ def add_postamble(src)
2251
+ # empty
2252
+ end
2253
+
2254
+ end
2255
+
2256
+
2257
+ ##
2258
+ ## engine for PHP
2259
+ ##
2260
+ class Ephp < Basic::Engine
2261
+ include PhpGenerator
2262
+ end
2263
+
2264
+
2265
+ class EscapedEphp < Ephp
2266
+ include EscapeEnhancer
2267
+ end
2268
+
2269
+
2270
+ #class XmlEphp < Ephp
2271
+ # include EscapeEnhancer
2272
+ #end
2273
+
2274
+
2275
+ class PI::Ephp < PI::Engine
2276
+ include PhpGenerator
2277
+
2278
+ def init_converter(properties={})
2279
+ @pi = 'php'
2280
+ super(properties)
2281
+ end
2282
+
2283
+ end
2284
+
2285
+
2286
+ end
2287
+ #--end of require 'erubis/engine/ephp'
2288
+ #--begin of require 'erubis/engine/ec'
2289
+ ##
2290
+ ## $Release: 2.7.0 $
2291
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2292
+ ##
2293
+
2294
+ #--already included require 'erubis/engine'
2295
+ #--already included require 'erubis/enhancer'
2296
+
2297
+
2298
+ module Erubis
2299
+
2300
+
2301
+ module CGenerator
2302
+ include Generator
2303
+
2304
+ def self.supported_properties() # :nodoc:
2305
+ return [
2306
+ [:indent, '', "indent spaces (ex. ' ')"],
2307
+ [:out, 'stdout', "output file pointer name"],
2308
+ ]
2309
+ end
2310
+
2311
+ def init_generator(properties={})
2312
+ super
2313
+ @escapefunc ||= "escape"
2314
+ @indent = properties[:indent] || ''
2315
+ @out = properties[:out] || 'stdout'
2316
+ end
2317
+
2318
+ def add_preamble(src)
2319
+ src << "#line 1 \"#{self.filename}\"\n" if self.filename
2320
+ end
2321
+
2322
+ def escape_text(text)
2323
+ @@table_ ||= { "\r"=>"\\r", "\n"=>"\\n", "\t"=>"\\t", '"'=>'\\"', "\\"=>"\\\\" }
2324
+ text.gsub!(/[\r\n\t"\\]/) { |m| @@table_[m] }
2325
+ return text
2326
+ end
2327
+
2328
+ def escaped_expr(code)
2329
+ return "#{@escapefunc}(#{code.strip}, #{@out})"
2330
+ end
2331
+
2332
+ def add_text(src, text)
2333
+ return if text.empty?
2334
+ src << (src.empty? || src[-1] == ?\n ? @indent : ' ')
2335
+ src << "fputs("
2336
+ i = 0
2337
+ text.each_line do |line|
2338
+ src << "\n" << @indent << ' ' if i > 0
2339
+ i += 1
2340
+ src << '"' << escape_text(line) << '"'
2341
+ end
2342
+ src << ", #{@out});" #<< (text[-1] == ?\n ? "\n" : "")
2343
+ src << "\n" if text[-1] == ?\n
2344
+ end
2345
+
2346
+ def add_stmt(src, code)
2347
+ src << code
2348
+ end
2349
+
2350
+ def add_expr_literal(src, code)
2351
+ src << @indent if src.empty? || src[-1] == ?\n
2352
+ src << " fprintf(#{@out}, " << code.strip << ');'
2353
+ end
2354
+
2355
+ def add_expr_escaped(src, code)
2356
+ src << @indent if src.empty? || src[-1] == ?\n
2357
+ src << ' ' << escaped_expr(code) << ';'
2358
+ end
2359
+
2360
+ def add_expr_debug(src, code)
2361
+ code.strip!
2362
+ s = nil
2363
+ if code =~ /\A\".*?\"\s*,\s*(.*)/
2364
+ s = $1.gsub(/[%"]/, '\\\1') + '='
2365
+ end
2366
+ src << @indent if src.empty? || src[-1] == ?\n
2367
+ src << " fprintf(stderr, \"*** debug: #{s}\" #{code});"
2368
+ end
2369
+
2370
+ def add_postamble(src)
2371
+ # empty
2372
+ end
2373
+
2374
+ end
2375
+
2376
+
2377
+ ##
2378
+ ## engine for C
2379
+ ##
2380
+ class Ec < Basic::Engine
2381
+ include CGenerator
2382
+ end
2383
+
2384
+
2385
+ class EscapedEc < Ec
2386
+ include EscapeEnhancer
2387
+ end
2388
+
2389
+
2390
+ #class XmlEc < Ec
2391
+ # include EscapeEnhancer
2392
+ #end
2393
+
2394
+ class PI::Ec < PI::Engine
2395
+ include CGenerator
2396
+
2397
+ def init_converter(properties={})
2398
+ @pi = 'c'
2399
+ super(properties)
2400
+ end
2401
+
2402
+ end
2403
+
2404
+
2405
+ end
2406
+ #--end of require 'erubis/engine/ec'
2407
+ #--begin of require 'erubis/engine/ecpp'
2408
+ ##
2409
+ ## $Release: 2.7.0 $
2410
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2411
+ ##
2412
+
2413
+ #--already included require 'erubis/engine'
2414
+ #--already included require 'erubis/enhancer'
2415
+
2416
+
2417
+ module Erubis
2418
+
2419
+
2420
+ module CppGenerator
2421
+ include Generator
2422
+
2423
+ def self.supported_properties() # :nodoc:
2424
+ return [
2425
+ [:indent, '', "indent spaces (ex. ' ')"],
2426
+ [:bufvar, '_buf', "buffer variable name"],
2427
+ ]
2428
+ end
2429
+
2430
+ def init_generator(properties={})
2431
+ super
2432
+ @escapefunc ||= "escape"
2433
+ @indent = properties[:indent] || ''
2434
+ @bufvar = properties[:bufvar] || '_buf'
2435
+ end
2436
+
2437
+ def add_preamble(src)
2438
+ src << "#line 1 \"#{self.filename}\"\n" if self.filename
2439
+ end
2440
+
2441
+ def escape_text(text)
2442
+ @@table_ ||= { "\r"=>"\\r", "\n"=>"\\n", "\t"=>"\\t", '"'=>'\\"', "\\"=>"\\\\" }
2443
+ text.gsub!(/[\r\n\t"\\]/) { |m| @@table_[m] }
2444
+ return text
2445
+ end
2446
+
2447
+ def escaped_expr(code)
2448
+ return "#{@escapefunc}(#{code.strip})"
2449
+ end
2450
+
2451
+ def add_text(src, text)
2452
+ return if text.empty?
2453
+ src << (src.empty? || src[-1] == ?\n ? @indent : ' ')
2454
+ src << "_buf << "
2455
+ i = 0
2456
+ text.each_line do |line|
2457
+ src << "\n" << @indent << " " if i > 0
2458
+ i += 1
2459
+ src << '"' << escape_text(line) << '"'
2460
+ end
2461
+ src << ";" #<< (text[-1] == ?\n ? "\n" : "")
2462
+ src << "\n" if text[-1] == ?\n
2463
+ end
2464
+
2465
+ def add_stmt(src, code)
2466
+ src << code
2467
+ end
2468
+
2469
+ def add_expr_literal(src, code)
2470
+ src << @indent if src.empty? || src[-1] == ?\n
2471
+ src << " _buf << (" << code.strip << ");"
2472
+ end
2473
+
2474
+ def add_expr_escaped(src, code)
2475
+ src << @indent if src.empty? || src[-1] == ?\n
2476
+ src << ' ' << escaped_expr(code) << ';'
2477
+ end
2478
+
2479
+ def add_expr_debug(src, code)
2480
+ code.strip!
2481
+ src << @indent if src.empty? || src[-1] == ?\n
2482
+ src << " std::cerr << \"*** debug: #{code.gsub(/(")/, '\\\&')}=\" << (#{code});"
2483
+ end
2484
+
2485
+ def add_postamble(src)
2486
+ # empty
2487
+ end
2488
+
2489
+ end
2490
+
2491
+
2492
+ ##
2493
+ ## engine for C
2494
+ ##
2495
+ class Ecpp < Basic::Engine
2496
+ include CppGenerator
2497
+ end
2498
+
2499
+
2500
+ class EscapedEcpp < Ecpp
2501
+ include EscapeEnhancer
2502
+ end
2503
+
2504
+
2505
+ #class XmlEcpp < Ecpp
2506
+ # include EscapeEnhancer
2507
+ #end
2508
+
2509
+ class PI::Ecpp < PI::Engine
2510
+ include CppGenerator
2511
+
2512
+ def init_converter(properties={})
2513
+ @pi = 'cpp'
2514
+ super(properties)
2515
+ end
2516
+
2517
+ end
2518
+
2519
+
2520
+ end
2521
+ #--end of require 'erubis/engine/ecpp'
2522
+ #--begin of require 'erubis/engine/ejava'
2523
+ ##
2524
+ ## $Release: 2.7.0 $
2525
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2526
+ ##
2527
+
2528
+ #--already included require 'erubis/engine'
2529
+ #--already included require 'erubis/enhancer'
2530
+
2531
+
2532
+ module Erubis
2533
+
2534
+
2535
+ module JavaGenerator
2536
+ include Generator
2537
+
2538
+ def self.supported_properties() # :nodoc:
2539
+ return [
2540
+ [:indent, '', "indent spaces (ex. ' ')"],
2541
+ [:bufvar, '_buf', "output buffer variable name"],
2542
+ [:bufclass, 'StringBuffer', "output buffer class (ex. 'StringBuilder')"],
2543
+ ]
2544
+ end
2545
+
2546
+ def init_generator(properties={})
2547
+ super
2548
+ @escapefunc ||= 'escape'
2549
+ @indent = properties[:indent] || ''
2550
+ @bufvar = properties[:bufvar] || '_buf'
2551
+ @bufclass = properties[:bufclass] || 'StringBuffer'
2552
+ end
2553
+
2554
+ def add_preamble(src)
2555
+ src << "#{@indent}#{@bufclass} #{@bufvar} = new #{@bufclass}();"
2556
+ end
2557
+
2558
+ def escape_text(text)
2559
+ @@table_ ||= { "\r"=>"\\r", "\n"=>"\\n", "\t"=>"\\t", '"'=>'\\"', "\\"=>"\\\\" }
2560
+ return text.gsub!(/[\r\n\t"\\]/) { |m| @@table_[m] } || text
2561
+ end
2562
+
2563
+ def add_text(src, text)
2564
+ return if text.empty?
2565
+ src << (src.empty? || src[-1] == ?\n ? @indent : ' ')
2566
+ src << @bufvar << ".append("
2567
+ i = 0
2568
+ text.each_line do |line|
2569
+ src << "\n" << @indent << ' + ' if i > 0
2570
+ i += 1
2571
+ src << '"' << escape_text(line) << '"'
2572
+ end
2573
+ src << ");" << (text[-1] == ?\n ? "\n" : "")
2574
+ end
2575
+
2576
+ def add_stmt(src, code)
2577
+ src << code
2578
+ end
2579
+
2580
+ def add_expr_literal(src, code)
2581
+ src << @indent if src.empty? || src[-1] == ?\n
2582
+ code.strip!
2583
+ src << " #{@bufvar}.append(#{code});"
2584
+ end
2585
+
2586
+ def add_expr_escaped(src, code)
2587
+ add_expr_literal(src, escaped_expr(code))
2588
+ end
2589
+
2590
+ def add_expr_debug(src, code)
2591
+ code.strip!
2592
+ src << @indent if src.empty? || src[-1] == ?\n
2593
+ src << " System.err.println(\"*** debug: #{code}=\"+(#{code}));"
2594
+ end
2595
+
2596
+ def add_postamble(src)
2597
+ src << "\n" if src[-1] == ?;
2598
+ src << @indent << "return " << @bufvar << ".toString();\n"
2599
+ #src << @indent << "System.out.print(" << @bufvar << ".toString());\n"
2600
+ end
2601
+
2602
+ end
2603
+
2604
+
2605
+ ##
2606
+ ## engine for Java
2607
+ ##
2608
+ class Ejava < Basic::Engine
2609
+ include JavaGenerator
2610
+ end
2611
+
2612
+
2613
+ class EscapedEjava < Ejava
2614
+ include EscapeEnhancer
2615
+ end
2616
+
2617
+
2618
+ #class XmlEjava < Ejava
2619
+ # include EscapeEnhancer
2620
+ #end
2621
+
2622
+ class PI::Ejava < PI::Engine
2623
+ include JavaGenerator
2624
+
2625
+ def init_converter(properties={})
2626
+ @pi = 'java'
2627
+ super(properties)
2628
+ end
2629
+
2630
+ end
2631
+
2632
+ end
2633
+ #--end of require 'erubis/engine/ejava'
2634
+ #--begin of require 'erubis/engine/escheme'
2635
+ ##
2636
+ ## $Release: 2.7.0 $
2637
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2638
+ ##
2639
+
2640
+ #--already included require 'erubis/engine'
2641
+ #--already included require 'erubis/enhancer'
2642
+
2643
+
2644
+ module Erubis
2645
+
2646
+
2647
+ module SchemeGenerator
2648
+ include Generator
2649
+
2650
+ def self.supported_properties() # :nodoc:
2651
+ return [
2652
+ [:func, '_add', "function name (ex. 'display')"],
2653
+ ]
2654
+ end
2655
+
2656
+ def init_generator(properties={})
2657
+ super
2658
+ @escapefunc ||= 'escape'
2659
+ @func = properties[:func] || '_add' # or 'display'
2660
+ end
2661
+
2662
+ def add_preamble(src)
2663
+ return unless @func == '_add'
2664
+ src << "(let ((_buf '())) " + \
2665
+ "(define (_add x) (set! _buf (cons x _buf))) "
2666
+ #src << "(let* ((_buf '())" + \
2667
+ # " (_add (lambda (x) (set! _buf (cons x _buf))))) "
2668
+ end
2669
+
2670
+ def escape_text(text)
2671
+ @table_ ||= { '"'=>'\\"', '\\'=>'\\\\' }
2672
+ text.gsub!(/["\\]/) { |m| @table_[m] }
2673
+ return text
2674
+ end
2675
+
2676
+ def escaped_expr(code)
2677
+ code.strip!
2678
+ return "(#{@escapefunc} #{code})"
2679
+ end
2680
+
2681
+ def add_text(src, text)
2682
+ return if text.empty?
2683
+ t = escape_text(text)
2684
+ if t[-1] == ?\n
2685
+ t[-1, 1] = ''
2686
+ src << "(#{@func} \"" << t << "\\n\")\n"
2687
+ else
2688
+ src << "(#{@func} \"" << t << '")'
2689
+ end
2690
+ end
2691
+
2692
+ def add_stmt(src, code)
2693
+ src << code
2694
+ end
2695
+
2696
+ def add_expr_literal(src, code)
2697
+ code.strip!
2698
+ src << "(#{@func} #{code})"
2699
+ end
2700
+
2701
+ def add_expr_escaped(src, code)
2702
+ add_expr_literal(src, escaped_expr(code))
2703
+ end
2704
+
2705
+ def add_expr_debug(src, code)
2706
+ s = (code.strip! || code).gsub(/\"/, '\\"')
2707
+ src << "(display \"*** debug: #{s}=\")(display #{code.strip})(display \"\\n\")"
2708
+ end
2709
+
2710
+ def add_postamble(src)
2711
+ return unless @func == '_add'
2712
+ src << "\n" unless src[-1] == ?\n
2713
+ src << " (reverse _buf))\n"
2714
+ end
2715
+
2716
+ end
2717
+
2718
+
2719
+ ##
2720
+ ## engine for Scheme
2721
+ ##
2722
+ class Escheme < Basic::Engine
2723
+ include SchemeGenerator
2724
+ end
2725
+
2726
+
2727
+ class EscapedEscheme < Escheme
2728
+ include EscapeEnhancer
2729
+ end
2730
+
2731
+
2732
+ #class XmlEscheme < Escheme
2733
+ # include EscapeEnhancer
2734
+ #end
2735
+
2736
+
2737
+ class PI::Escheme < PI::Engine
2738
+ include SchemeGenerator
2739
+
2740
+ def init_converter(properties={})
2741
+ @pi = 'scheme'
2742
+ super(properties)
2743
+ end
2744
+
2745
+ end
2746
+
2747
+
2748
+ end
2749
+ #--end of require 'erubis/engine/escheme'
2750
+ #--begin of require 'erubis/engine/eperl'
2751
+ ##
2752
+ ## $Release: 2.7.0 $
2753
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2754
+ ##
2755
+
2756
+ #--already included require 'erubis/engine'
2757
+ #--already included require 'erubis/enhancer'
2758
+
2759
+
2760
+ module Erubis
2761
+
2762
+
2763
+ module PerlGenerator
2764
+ include Generator
2765
+
2766
+ def self.supported_properties() # :nodoc:
2767
+ return [
2768
+ [:func, 'print', "function name"],
2769
+ ]
2770
+ end
2771
+
2772
+ def init_generator(properties={})
2773
+ super
2774
+ @escapefunc ||= 'encode_entities'
2775
+ @func = properties[:func] || 'print'
2776
+ end
2777
+
2778
+ def add_preamble(src)
2779
+ src << "use HTML::Entities; ";
2780
+ end
2781
+
2782
+ def escape_text(text)
2783
+ return text.gsub!(/['\\]/, '\\\\\&') || text
2784
+ end
2785
+
2786
+ def add_text(src, text)
2787
+ src << @func << "('" << escape_text(text) << "'); " unless text.empty?
2788
+ end
2789
+
2790
+ def add_expr_literal(src, code)
2791
+ code.strip!
2792
+ src << @func << "(" << code << "); "
2793
+ end
2794
+
2795
+ def add_expr_escaped(src, code)
2796
+ add_expr_literal(src, escaped_expr(code))
2797
+ end
2798
+
2799
+ def add_expr_debug(src, code)
2800
+ code.strip!
2801
+ s = code.gsub(/\'/, "\\'")
2802
+ src << @func << "('*** debug: #{code}=', #{code}, \"\\n\");"
2803
+ end
2804
+
2805
+ def add_stmt(src, code)
2806
+ src << code
2807
+ end
2808
+
2809
+ def add_postamble(src)
2810
+ src << "\n" unless src[-1] == ?\n
2811
+ end
2812
+
2813
+ end
2814
+
2815
+
2816
+ ##
2817
+ ## engine for Perl
2818
+ ##
2819
+ class Eperl < Basic::Engine
2820
+ include PerlGenerator
2821
+ end
2822
+
2823
+
2824
+ class EscapedEperl < Eperl
2825
+ include EscapeEnhancer
2826
+ end
2827
+
2828
+
2829
+ #class XmlEperl < Eperl
2830
+ # include EscapeEnhancer
2831
+ #end
2832
+
2833
+
2834
+ class PI::Eperl < PI::Engine
2835
+ include PerlGenerator
2836
+
2837
+ def init_converter(properties={})
2838
+ @pi = 'perl'
2839
+ super(properties)
2840
+ end
2841
+
2842
+ end
2843
+
2844
+
2845
+ end
2846
+ #--end of require 'erubis/engine/eperl'
2847
+ #--begin of require 'erubis/engine/ejavascript'
2848
+ ##
2849
+ ## $Release: 2.7.0 $
2850
+ ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
2851
+ ##
2852
+
2853
+ #--already included require 'erubis/engine'
2854
+ #--already included require 'erubis/enhancer'
2855
+
2856
+
2857
+ module Erubis
2858
+
2859
+
2860
+ module JavascriptGenerator
2861
+ include Generator
2862
+
2863
+ def self.supported_properties() # :nodoc:
2864
+ list = []
2865
+ #list << [:indent, '', "indent spaces (ex. ' ')"]
2866
+ #list << [:bufvar, '_buf', "output buffer variable name"]
2867
+ list << [:docwrite, true, "use 'document.write()' when true"]
2868
+ return list
2869
+ end
2870
+
2871
+ def init_generator(properties={})
2872
+ super
2873
+ @escapefunc ||= 'escape'
2874
+ @indent = properties[:indent] || ''
2875
+ @bufvar = properties[:bufvar] || '_buf'
2876
+ @docwrite = properties[:docwrite] != false # '!= false' will be removed in the next release
2877
+ end
2878
+
2879
+ def add_preamble(src)
2880
+ src << "#{@indent}var #{@bufvar} = [];"
2881
+ end
2882
+
2883
+ def escape_text(text)
2884
+ @@table_ ||= { "\r"=>"\\r", "\n"=>"\\n\\\n", "\t"=>"\\t", '"'=>'\\"', "\\"=>"\\\\" }
2885
+ return text.gsub!(/[\r\n\t"\\]/) { |m| @@table_[m] } || text
2886
+ end
2887
+
2888
+ def add_indent(src, indent)
2889
+ src << (src.empty? || src[-1] == ?\n ? indent : ' ')
2890
+ end
2891
+
2892
+ def add_text(src, text)
2893
+ return if text.empty?
2894
+ add_indent(src, @indent)
2895
+ src << @bufvar << '.push("'
2896
+ s = escape_text(text)
2897
+ if s[-1] == ?\n
2898
+ s[-2, 2] = ''
2899
+ src << s << "\");\n"
2900
+ else
2901
+ src << s << "\");"
2902
+ end
2903
+ end
2904
+
2905
+ def add_stmt(src, code)
2906
+ src << code
2907
+ end
2908
+
2909
+ def add_expr_literal(src, code)
2910
+ add_indent(src, @indent)
2911
+ code.strip!
2912
+ src << "#{@bufvar}.push(#{code});"
2913
+ end
2914
+
2915
+ def add_expr_escaped(src, code)
2916
+ add_expr_literal(src, escaped_expr(code))
2917
+ end
2918
+
2919
+ def add_expr_debug(src, code)
2920
+ add_indent(src, @indent)
2921
+ code.strip!
2922
+ src << "alert(\"*** debug: #{code}=\"+(#{code}));"
2923
+ end
2924
+
2925
+ def add_postamble(src)
2926
+ src << "\n" if src[-1] == ?;
2927
+ if @docwrite
2928
+ src << @indent << 'document.write(' << @bufvar << ".join(\"\"));\n"
2929
+ else
2930
+ src << @indent << @bufvar << ".join(\"\");\n"
2931
+ end
2932
+ end
2933
+
2934
+ end
2935
+
2936
+
2937
+ ##
2938
+ ## engine for JavaScript
2939
+ ##
2940
+ class Ejavascript < Basic::Engine
2941
+ include JavascriptGenerator
2942
+ end
2943
+
2944
+
2945
+ class EscapedEjavascript < Ejavascript
2946
+ include EscapeEnhancer
2947
+ end
2948
+
2949
+
2950
+ #class XmlEjavascript < Ejavascript
2951
+ # include EscapeEnhancer
2952
+ #end
2953
+
2954
+
2955
+ class PI::Ejavascript < PI::Engine
2956
+ include JavascriptGenerator
2957
+
2958
+ def init_converter(properties={})
2959
+ @pi = 'js'
2960
+ super(properties)
2961
+ end
2962
+
2963
+ end
2964
+
2965
+
2966
+ end
2967
+ #--end of require 'erubis/engine/ejavascript'
2968
+
2969
+
2970
+ module Erubis
2971
+
2972
+
2973
+ Ejs = Ejavascript
2974
+ EscapedEjs = EscapedEjavascript
2975
+
2976
+
2977
+ class CommandOptionError < ErubisError
2978
+ end
2979
+
2980
+
2981
+ ##
2982
+ ## main class of command
2983
+ ##
2984
+ ## ex.
2985
+ ## Main.main(ARGV)
2986
+ ##
2987
+ class Main
2988
+
2989
+ def self.main(argv=ARGV)
2990
+ status = 0
2991
+ begin
2992
+ Main.new.execute(ARGV)
2993
+ rescue CommandOptionError => ex
2994
+ $stderr.puts ex.message
2995
+ status = 1
2996
+ end
2997
+ exit(status)
2998
+ end
2999
+
3000
+ def initialize
3001
+ @single_options = "hvxztTSbeBXNUC"
3002
+ @arg_options = "pcrfKIlaE" #C
3003
+ @option_names = {
3004
+ 'h' => :help,
3005
+ 'v' => :version,
3006
+ 'x' => :source,
3007
+ 'z' => :syntax,
3008
+ 'T' => :unexpand,
3009
+ 't' => :untabify, # obsolete
3010
+ 'S' => :intern,
3011
+ 'b' => :bodyonly,
3012
+ 'B' => :binding,
3013
+ 'p' => :pattern,
3014
+ 'c' => :context,
3015
+ #'C' => :class,
3016
+ 'e' => :escape,
3017
+ 'r' => :requires,
3018
+ 'f' => :datafiles,
3019
+ 'K' => :kanji,
3020
+ 'I' => :includes,
3021
+ 'l' => :lang,
3022
+ 'a' => :action,
3023
+ 'E' => :enhancers,
3024
+ 'X' => :notext,
3025
+ 'N' => :linenum,
3026
+ 'U' => :unique,
3027
+ 'C' => :compact,
3028
+ }
3029
+ assert unless @single_options.length + @arg_options.length == @option_names.length
3030
+ (@single_options + @arg_options).each_byte do |ch|
3031
+ assert unless @option_names.key?(ch.chr)
3032
+ end
3033
+ end
3034
+
3035
+
3036
+ def execute(argv=ARGV)
3037
+ ## parse command-line options
3038
+ options, properties = parse_argv(argv, @single_options, @arg_options)
3039
+ filenames = argv
3040
+ options['h'] = true if properties[:help]
3041
+ opts = Object.new
3042
+ arr = @option_names.collect {|ch, name| "def #{name}; @#{name}; end\n" }
3043
+ opts.instance_eval arr.join
3044
+ options.each do |ch, val|
3045
+ name = @option_names[ch]
3046
+ opts.instance_variable_set("@#{name}", val)
3047
+ end
3048
+
3049
+ ## help, version, enhancer list
3050
+ if opts.help || opts.version
3051
+ puts version() if opts.version
3052
+ puts usage() if opts.help
3053
+ puts show_properties() if opts.help
3054
+ puts show_enhancers() if opts.help
3055
+ return
3056
+ end
3057
+
3058
+ ## include path
3059
+ opts.includes.split(/,/).each do |path|
3060
+ $: << path
3061
+ end if opts.includes
3062
+
3063
+ ## require library
3064
+ opts.requires.split(/,/).each do |library|
3065
+ require library
3066
+ end if opts.requires
3067
+
3068
+ ## action
3069
+ action = opts.action
3070
+ action ||= 'syntax' if opts.syntax
3071
+ action ||= 'convert' if opts.source || opts.notext
3072
+
3073
+ ## lang
3074
+ lang = opts.lang || 'ruby'
3075
+ action ||= 'convert' if opts.lang
3076
+
3077
+ ## class name of Eruby
3078
+ #classname = opts.class
3079
+ classname = nil
3080
+ klass = get_classobj(classname, lang, properties[:pi])
3081
+
3082
+ ## kanji code
3083
+ $KCODE = opts.kanji if opts.kanji
3084
+
3085
+ ## read context values from yaml file
3086
+ datafiles = opts.datafiles
3087
+ context = load_datafiles(datafiles, opts)
3088
+
3089
+ ## parse context data
3090
+ if opts.context
3091
+ context = parse_context_data(opts.context, opts)
3092
+ end
3093
+
3094
+ ## properties for engine
3095
+ properties[:escape] = true if opts.escape && !properties.key?(:escape)
3096
+ properties[:pattern] = opts.pattern if opts.pattern
3097
+ #properties[:trim] = false if opts.notrim
3098
+ properties[:preamble] = properties[:postamble] = false if opts.bodyonly
3099
+ properties[:pi] = nil if properties[:pi] == true
3100
+
3101
+ ## create engine and extend enhancers
3102
+ engine = klass.new(nil, properties)
3103
+ enhancers = get_enhancers(opts.enhancers)
3104
+ #enhancers.push(Erubis::EscapeEnhancer) if opts.escape
3105
+ enhancers.each do |enhancer|
3106
+ engine.extend(enhancer)
3107
+ engine.bipattern = properties[:bipattern] if enhancer == Erubis::BiPatternEnhancer
3108
+ end
3109
+
3110
+ ## no-text
3111
+ engine.extend(Erubis::NoTextEnhancer) if opts.notext
3112
+
3113
+ ## convert and execute
3114
+ val = nil
3115
+ msg = "Syntax OK\n"
3116
+ if filenames && !filenames.empty?
3117
+ filenames.each do |filename|
3118
+ File.file?(filename) or
3119
+ raise CommandOptionError.new("#{filename}: file not found.")
3120
+ engine.filename = filename
3121
+ engine.convert!(File.read(filename))
3122
+ val = do_action(action, engine, context, filename, opts)
3123
+ msg = nil if val
3124
+ end
3125
+ else
3126
+ engine.filename = filename = '(stdin)'
3127
+ engine.convert!($stdin.read())
3128
+ val = do_action(action, engine, context, filename, opts)
3129
+ msg = nil if val
3130
+ end
3131
+ print msg if action == 'syntax' && msg
3132
+
3133
+ end
3134
+
3135
+ private
3136
+
3137
+ def do_action(action, engine, context, filename, opts)
3138
+ case action
3139
+ when 'convert'
3140
+ s = manipulate_src(engine.src, opts)
3141
+ when nil, 'exec', 'execute'
3142
+ s = opts.binding ? engine.result(context.to_hash) : engine.evaluate(context)
3143
+ when 'syntax'
3144
+ s = check_syntax(filename, engine.src)
3145
+ else
3146
+ raise "*** internal error"
3147
+ end
3148
+ print s if s
3149
+ return s
3150
+ end
3151
+
3152
+ def manipulate_src(source, opts)
3153
+ flag_linenum = opts.linenum
3154
+ flag_unique = opts.unique
3155
+ flag_compact = opts.compact
3156
+ if flag_linenum
3157
+ n = 0
3158
+ source.gsub!(/^/) { n += 1; "%5d: " % n }
3159
+ source.gsub!(/^ *\d+:\s+?\n/, '') if flag_compact
3160
+ source.gsub!(/(^ *\d+:\s+?\n)+/, "\n") if flag_unique
3161
+ else
3162
+ source.gsub!(/^\s*?\n/, '') if flag_compact
3163
+ source.gsub!(/(^\s*?\n)+/, "\n") if flag_unique
3164
+ end
3165
+ return source
3166
+ end
3167
+
3168
+ def usage(command=nil)
3169
+ command ||= File.basename($0)
3170
+ buf = []
3171
+ buf << "erubis - embedded program converter for multi-language"
3172
+ buf << "Usage: #{command} [..options..] [file ...]"
3173
+ buf << " -h, --help : help"
3174
+ buf << " -v : version"
3175
+ buf << " -x : show converted code"
3176
+ buf << " -X : show converted code, only ruby code and no text part"
3177
+ buf << " -N : numbering: add line numbers (for '-x/-X')"
3178
+ buf << " -U : unique: compress empty lines to a line (for '-x/-X')"
3179
+ buf << " -C : compact: remove empty lines (for '-x/-X')"
3180
+ buf << " -b : body only: no preamble nor postamble (for '-x/-X')"
3181
+ buf << " -z : syntax checking"
3182
+ buf << " -e : escape (equal to '--E Escape')"
3183
+ buf << " -p pattern : embedded pattern (default '<% %>')"
3184
+ buf << " -l lang : convert but no execute (ruby/php/c/cpp/java/scheme/perl/js)"
3185
+ buf << " -E e1,e2,... : enhancer names (Escape, PercentLine, BiPattern, ...)"
3186
+ buf << " -I path : library include path"
3187
+ buf << " -K kanji : kanji code (euc/sjis/utf8) (default none)"
3188
+ buf << " -c context : context data string (yaml inline style or ruby code)"
3189
+ buf << " -f datafile : context data file ('*.yaml', '*.yml', or '*.rb')"
3190
+ #buf << " -t : expand tab characters in YAML file"
3191
+ buf << " -T : don't expand tab characters in YAML file"
3192
+ buf << " -S : convert mapping key from string to symbol in YAML file"
3193
+ buf << " -B : invoke 'result(binding)' instead of 'evaluate(context)'"
3194
+ buf << " --pi=name : parse '<?name ... ?>' instead of '<% ... %>'"
3195
+ #'
3196
+ # -T : don't trim spaces around '<% %>'
3197
+ # -c class : class name (XmlEruby/PercentLineEruby/...) (default Eruby)
3198
+ # -r library : require library
3199
+ # -a : action (convert/execute)
3200
+ return buf.join("\n")
3201
+ end
3202
+
3203
+ def collect_supported_properties(erubis_klass)
3204
+ list = []
3205
+ erubis_klass.ancestors.each do |klass|
3206
+ if klass.respond_to?(:supported_properties)
3207
+ list.concat(klass.supported_properties)
3208
+ end
3209
+ end
3210
+ return list
3211
+ end
3212
+
3213
+ def show_properties
3214
+ s = "supported properties:\n"
3215
+ basic_props = collect_supported_properties(Erubis::Basic::Engine)
3216
+ pi_props = collect_supported_properties(Erubis::PI::Engine)
3217
+ list = []
3218
+ common_props = basic_props & pi_props
3219
+ list << ['(common)', common_props]
3220
+ list << ['(basic)', basic_props - common_props]
3221
+ list << ['(pi)', pi_props - common_props]
3222
+ %w[ruby php c cpp java scheme perl javascript].each do |lang|
3223
+ klass = Erubis.const_get("E#{lang}")
3224
+ list << [lang, collect_supported_properties(klass) - basic_props]
3225
+ end
3226
+ list.each do |lang, props|
3227
+ s << " * #{lang}\n"
3228
+ props.each do |name, default_val, desc|
3229
+ s << (" --%-23s : %s\n" % ["#{name}=#{default_val.inspect}", desc])
3230
+ end
3231
+ end
3232
+ s << "\n"
3233
+ return s
3234
+ end
3235
+
3236
+ def show_enhancers
3237
+ dict = {}
3238
+ ObjectSpace.each_object(Module) do |mod|
3239
+ dict[$1] = mod if mod.name =~ /\AErubis::(.*)Enhancer\z/
3240
+ end
3241
+ s = "enhancers:\n"
3242
+ dict.sort_by {|name, mod| name }.each do |name, mod|
3243
+ s << (" %-13s : %s\n" % [name, mod.desc])
3244
+ end
3245
+ return s
3246
+ end
3247
+
3248
+ def version
3249
+ return Erubis::VERSION
3250
+ end
3251
+
3252
+ def parse_argv(argv, arg_none='', arg_required='', arg_optional='')
3253
+ options = {}
3254
+ context = {}
3255
+ while argv[0] && argv[0][0] == ?-
3256
+ optstr = argv.shift
3257
+ optstr = optstr[1, optstr.length-1]
3258
+ #
3259
+ if optstr[0] == ?- # context
3260
+ optstr =~ /\A\-([-\w]+)(?:=(.*))?/ or
3261
+ raise CommandOptionError.new("-#{optstr}: invalid context value.")
3262
+ name, value = $1, $2
3263
+ name = name.gsub(/-/, '_').intern
3264
+ #value = value.nil? ? true : YAML.load(value) # error, why?
3265
+ value = value.nil? ? true : YAML.load("---\n#{value}\n")
3266
+ context[name] = value
3267
+ #
3268
+ else # options
3269
+ while optstr && !optstr.empty?
3270
+ optchar = optstr[0].chr
3271
+ optstr = optstr[1..-1]
3272
+ if arg_none.include?(optchar)
3273
+ options[optchar] = true
3274
+ elsif arg_required.include?(optchar)
3275
+ arg = optstr.empty? ? argv.shift : optstr or
3276
+ raise CommandOptionError.new("-#{optchar}: #{@option_names[optchar]} required.")
3277
+ options[optchar] = arg
3278
+ optstr = nil
3279
+ elsif arg_optional.include?(optchar)
3280
+ arg = optstr.empty? ? true : optstr
3281
+ options[optchar] = arg
3282
+ optstr = nil
3283
+ else
3284
+ raise CommandOptionError.new("-#{optchar}: unknown option.")
3285
+ end
3286
+ end
3287
+ end
3288
+ #
3289
+ end # end of while
3290
+
3291
+ return options, context
3292
+ end
3293
+
3294
+
3295
+ def untabify(str, width=8)
3296
+ list = str.split(/\t/)
3297
+ last = list.pop
3298
+ sb = ''
3299
+ list.each do |s|
3300
+ column = (n = s.rindex(?\n)) ? s.length - n - 1 : s.length
3301
+ n = width - (column % width)
3302
+ sb << s << (' ' * n)
3303
+ end
3304
+ sb << last
3305
+ return sb
3306
+ end
3307
+ #--
3308
+ #def untabify(str, width=8)
3309
+ # sb = ''
3310
+ # str.scan(/(.*?)\t/m) do |s, |
3311
+ # len = (n = s.rindex(?\n)) ? s.length - n - 1 : s.length
3312
+ # sb << s << (" " * (width - len % width))
3313
+ # end
3314
+ # return $' ? (sb << $') : str
3315
+ #end
3316
+ #++
3317
+
3318
+
3319
+ def get_classobj(classname, lang, pi)
3320
+ classname ||= "E#{lang}"
3321
+ base_module = pi ? Erubis::PI : Erubis
3322
+ begin
3323
+ klass = base_module.const_get(classname)
3324
+ rescue NameError
3325
+ klass = nil
3326
+ end
3327
+ unless klass
3328
+ if lang
3329
+ msg = "-l #{lang}: invalid language name (class #{base_module.name}::#{classname} not found)."
3330
+ else
3331
+ msg = "-c #{classname}: invalid class name."
3332
+ end
3333
+ raise CommandOptionError.new(msg)
3334
+ end
3335
+ return klass
3336
+ end
3337
+
3338
+ def get_enhancers(enhancer_names)
3339
+ return [] unless enhancer_names
3340
+ enhancers = []
3341
+ shortname = nil
3342
+ begin
3343
+ enhancer_names.split(/,/).each do |name|
3344
+ shortname = name
3345
+ enhancers << Erubis.const_get("#{shortname}Enhancer")
3346
+ end
3347
+ rescue NameError
3348
+ raise CommandOptionError.new("#{shortname}: no such Enhancer (try '-h' to show all enhancers).")
3349
+ end
3350
+ return enhancers
3351
+ end
3352
+
3353
+ def load_datafiles(filenames, opts)
3354
+ context = Erubis::Context.new
3355
+ return context unless filenames
3356
+ filenames.split(/,/).each do |filename|
3357
+ filename.strip!
3358
+ test(?f, filename) or raise CommandOptionError.new("#{filename}: file not found.")
3359
+ if filename =~ /\.ya?ml$/
3360
+ if opts.unexpand
3361
+ ydoc = YAML.load_file(filename)
3362
+ else
3363
+ ydoc = YAML.load(untabify(File.read(filename)))
3364
+ end
3365
+ ydoc.is_a?(Hash) or raise CommandOptionError.new("#{filename}: root object is not a mapping.")
3366
+ intern_hash_keys(ydoc) if opts.intern
3367
+ context.update(ydoc)
3368
+ elsif filename =~ /\.rb$/
3369
+ str = File.read(filename)
3370
+ context2 = Erubis::Context.new
3371
+ _instance_eval(context2, str)
3372
+ context.update(context2)
3373
+ else
3374
+ CommandOptionError.new("#{filename}: '*.yaml', '*.yml', or '*.rb' required.")
3375
+ end
3376
+ end
3377
+ return context
3378
+ end
3379
+
3380
+ def _instance_eval(_context, _str)
3381
+ _context.instance_eval(_str)
3382
+ end
3383
+
3384
+ def parse_context_data(context_str, opts)
3385
+ if context_str[0] == ?{
3386
+ require 'yaml'
3387
+ ydoc = YAML.load(context_str)
3388
+ unless ydoc.is_a?(Hash)
3389
+ raise CommandOptionError.new("-c: root object is not a mapping.")
3390
+ end
3391
+ intern_hash_keys(ydoc) if opts.intern
3392
+ return ydoc
3393
+ else
3394
+ context = Erubis::Context.new
3395
+ context.instance_eval(context_str, '-c')
3396
+ return context
3397
+ end
3398
+ end
3399
+
3400
+ def intern_hash_keys(obj, done={})
3401
+ return if done.key?(obj.__id__)
3402
+ case obj
3403
+ when Hash
3404
+ done[obj.__id__] = obj
3405
+ obj.keys.each do |key|
3406
+ obj[key.intern] = obj.delete(key) if key.is_a?(String)
3407
+ end
3408
+ obj.values.each do |val|
3409
+ intern_hash_keys(val, done) if val.is_a?(Hash) || val.is_a?(Array)
3410
+ end
3411
+ when Array
3412
+ done[obj.__id__] = obj
3413
+ obj.each do |val|
3414
+ intern_hash_keys(val, done) if val.is_a?(Hash) || val.is_a?(Array)
3415
+ end
3416
+ end
3417
+ end
3418
+
3419
+ def check_syntax(filename, src)
3420
+ require 'open3'
3421
+ #command = (ENV['_'] || 'ruby') + ' -wc' # ENV['_'] stores command name
3422
+ bin = ENV['_'] && File.basename(ENV['_']) =~ /^ruby/ ? ENV['_'] : 'ruby'
3423
+ command = bin + ' -wc'
3424
+ stdin, stdout, stderr = Open3.popen3(command)
3425
+ stdin.write(src)
3426
+ stdin.close
3427
+ result = stdout.read()
3428
+ stdout.close()
3429
+ errmsg = stderr.read()
3430
+ stderr.close()
3431
+ return nil unless errmsg && !errmsg.empty?
3432
+ errmsg =~ /\A-:(\d+): /
3433
+ linenum, message = $1, $'
3434
+ return "#{filename}:#{linenum}: #{message}"
3435
+ end
3436
+
3437
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
3438
+ def check_syntax(filename, src)
3439
+ require 'compiler'
3440
+ verbose = $VERBOSE
3441
+ msg = nil
3442
+ begin
3443
+ $VERBOSE = true
3444
+ Rubinius::Compiler.compile_string(src, filename)
3445
+ rescue SyntaxError => ex
3446
+ ex_linenum = ex.line
3447
+ linenum = 0
3448
+ srcline = src.each_line do |line|
3449
+ linenum += 1
3450
+ break line if linenum == ex_linenum
3451
+ end
3452
+ msg = "#{ex.message}\n"
3453
+ msg << srcline
3454
+ msg << "\n" unless srcline =~ /\n\z/
3455
+ msg << (" " * (ex.column-1)) << "^\n"
3456
+ ensure
3457
+ $VERBOSE = verbose
3458
+ end
3459
+ return msg
3460
+ end
3461
+ end
3462
+
3463
+ end
3464
+
3465
+ end
3466
+ #--end of require 'erubis/main'
3467
+
3468
+ Erubis::Main.main(ARGV)