brakeman 8.0.4 → 8.0.6

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 (187) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +17 -0
  3. data/bundle/load.rb +6 -6
  4. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/NEWS.md +39 -1
  5. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/README.md +1 -1
  6. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/parser.rb +7 -2
  7. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/row.rb +26 -2
  8. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/version.rb +1 -1
  9. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv.rb +30 -58
  10. data/bundle/ruby/3.2.0/gems/parallel-1.28.0/lib/parallel/version.rb +4 -0
  11. data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
  12. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/ansi.rb +6 -4
  13. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/windows.rb +49 -23
  14. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io.rb +8 -2
  15. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/line_editor.rb +49 -21
  16. data/bundle/ruby/3.2.0/gems/reline-0.7.0/lib/reline/version.rb +3 -0
  17. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline.rb +10 -9
  18. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/CHANGES +8 -2
  19. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/Gemfile +5 -2
  20. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/LICENSE +1 -1
  21. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.jp.md +10 -12
  22. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.md +21 -26
  23. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/embedded.rb +1 -1
  24. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/context.rb +4 -3
  25. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/builder.rb +18 -19
  26. data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/version.rb +1 -1
  27. data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/CHANGES +8 -0
  28. data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/README.md +1 -1
  29. data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_analyzer.rb +1 -1
  30. data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/string_splitter.rb +61 -5
  31. data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/parser_engine.rb +34 -0
  32. data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/static_analyzer.rb +148 -0
  33. data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/version.rb +1 -1
  34. data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/COPYING +1 -1
  35. data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/commonmarker.rb +24 -0
  36. data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdoc.rb +10 -2
  37. data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt.rb +1 -1
  38. data/lib/brakeman/checks/check_eol_rails.rb +2 -1
  39. data/lib/brakeman/checks/check_eol_ruby.rb +1 -0
  40. data/lib/brakeman/checks/check_execute.rb +23 -19
  41. data/lib/brakeman/checks/check_sql.rb +2 -2
  42. data/lib/brakeman/processors/base_processor.rb +13 -6
  43. data/lib/brakeman/processors/gem_processor.rb +1 -1
  44. data/lib/brakeman/processors/haml_template_processor.rb +3 -1
  45. data/lib/brakeman/processors/lib/render_helper.rb +3 -1
  46. data/lib/brakeman/scanner.rb +8 -2
  47. data/lib/brakeman/version.rb +1 -1
  48. data/lib/brakeman.rb +1 -1
  49. metadata +171 -170
  50. data/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
  51. data/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +0 -3
  52. data/bundle/ruby/3.2.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +0 -78
  53. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/LICENSE.txt +0 -0
  54. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/array.rb +0 -0
  55. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/string.rb +0 -0
  56. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/fields_converter.rb +0 -0
  57. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/input_record_separator.rb +0 -0
  58. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/table.rb +0 -0
  59. data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/writer.rb +0 -0
  60. data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
  61. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/BSDL +0 -0
  62. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/COPYING +0 -0
  63. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/README.md +0 -0
  64. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/config.rb +0 -0
  65. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/face.rb +0 -0
  66. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/history.rb +0 -0
  67. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/dumb.rb +0 -0
  68. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/base.rb +0 -0
  69. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/composite.rb +0 -0
  70. data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/emacs.rb +2 -2
  71. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_command.rb +0 -0
  72. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_insert.rb +0 -0
  73. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor.rb +0 -0
  74. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_stroke.rb +0 -0
  75. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/kill_ring.rb +0 -0
  76. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode/east_asian_width.rb +0 -0
  77. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode.rb +0 -0
  78. /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/license_of_rb-readline +0 -0
  79. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/code_attributes.rb +0 -0
  80. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/command.rb +0 -0
  81. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/controls.rb +0 -0
  82. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/do_inserter.rb +0 -0
  83. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/end_inserter.rb +0 -0
  84. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/engine.rb +0 -0
  85. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/erb_converter.rb +0 -0
  86. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/filter.rb +0 -0
  87. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/grammar.rb +0 -0
  88. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/include.rb +0 -0
  89. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/interpolation.rb +0 -0
  90. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/filter.rb +0 -0
  91. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less.rb +0 -0
  92. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/parser.rb +0 -0
  93. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/railtie.rb +0 -0
  94. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/escaper.rb +0 -0
  95. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/filter.rb +0 -0
  96. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/parser.rb +0 -0
  97. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart.rb +0 -0
  98. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/filter.rb +0 -0
  99. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/template.rb +0 -0
  100. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/translator.rb +0 -0
  101. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim.rb +0 -0
  102. /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/slim.gemspec +0 -0
  103. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/EXPRESSIONS.md +0 -0
  104. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/Gemfile +0 -0
  105. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/LICENSE +0 -0
  106. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/engine.rb +0 -0
  107. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/engine.rb +0 -0
  108. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/parser.rb +0 -0
  109. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/template.rb +0 -0
  110. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/trimming.rb +0 -0
  111. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/exceptions.rb +0 -0
  112. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filter.rb +0 -0
  113. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/ambles.rb +0 -0
  114. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/code_merger.rb +0 -0
  115. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/control_flow.rb +0 -0
  116. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_inliner.rb +0 -0
  117. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_merger.rb +0 -0
  118. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/encoding.rb +0 -0
  119. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/eraser.rb +0 -0
  120. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/escapable.rb +0 -0
  121. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/multi_flattener.rb +0 -0
  122. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/remove_bom.rb +0 -0
  123. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_merger.rb +0 -0
  124. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/validator.rb +0 -0
  125. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generator.rb +0 -0
  126. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array.rb +0 -0
  127. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array_buffer.rb +0 -0
  128. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/erb.rb +0 -0
  129. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/rails_output_buffer.rb +0 -0
  130. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/string_buffer.rb +0 -0
  131. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/grammar.rb +0 -0
  132. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_merger.rb +0 -0
  133. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_remover.rb +0 -0
  134. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_sorter.rb +0 -0
  135. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/dispatcher.rb +0 -0
  136. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/fast.rb +0 -0
  137. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/filter.rb +0 -0
  138. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/pretty.rb +0 -0
  139. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/safe.rb +0 -0
  140. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/map.rb +0 -0
  141. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/dispatcher.rb +0 -0
  142. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/engine_dsl.rb +0 -0
  143. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/grammar_dsl.rb +0 -0
  144. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/options.rb +0 -0
  145. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/template.rb +0 -0
  146. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/parser.rb +0 -0
  147. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/rails.rb +0 -0
  148. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/tilt.rb +0 -0
  149. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates.rb +0 -0
  150. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/utils.rb +0 -0
  151. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple.rb +0 -0
  152. /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/temple.gemspec +0 -0
  153. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_emacs_org.rb +0 -0
  154. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_handlebars.rb +0 -0
  155. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_jbuilder.rb +0 -0
  156. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_org.rb +0 -0
  157. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/asciidoc.rb +0 -0
  158. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/babel.rb +0 -0
  159. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/builder.rb +0 -0
  160. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/cli.rb +0 -0
  161. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/coffee.rb +0 -0
  162. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/csv.rb +0 -0
  163. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erb.rb +0 -0
  164. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erubi.rb +0 -0
  165. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/etanni.rb +0 -0
  166. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/haml.rb +0 -0
  167. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/kramdown.rb +0 -0
  168. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/liquid.rb +0 -0
  169. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/livescript.rb +0 -0
  170. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/mapping.rb +0 -0
  171. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/markaby.rb +0 -0
  172. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/nokogiri.rb +0 -0
  173. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pandoc.rb +0 -0
  174. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pipeline.rb +0 -0
  175. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/plain.rb +0 -0
  176. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/prawn.rb +0 -0
  177. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/radius.rb +0 -0
  178. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdiscount.rb +0 -0
  179. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcarpet.rb +0 -0
  180. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcloth.rb +0 -0
  181. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rst-pandoc.rb +0 -0
  182. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/sass.rb +0 -0
  183. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/slim.rb +0 -0
  184. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/string.rb +0 -0
  185. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/template.rb +0 -0
  186. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/typescript.rb +0 -0
  187. /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/yajl.rb +0 -0
@@ -13,6 +13,7 @@ class Reline::LineEditor
13
13
  attr_accessor :prompt_proc
14
14
  attr_accessor :auto_indent_proc
15
15
  attr_accessor :dig_perfect_match_proc
16
+ attr_accessor :rprompt
16
17
 
17
18
  VI_MOTIONS = %i{
18
19
  ed_prev_char
@@ -43,7 +44,6 @@ class Reline::LineEditor
43
44
  RenderedScreen = Struct.new(:base_y, :lines, :cursor_y, keyword_init: true)
44
45
 
45
46
  CompletionJourneyState = Struct.new(:line_index, :pre, :target, :post, :list, :pointer)
46
- NullActionState = [nil, nil].freeze
47
47
 
48
48
  class MenuInfo
49
49
  attr_reader :list
@@ -223,7 +223,7 @@ class Reline::LineEditor
223
223
 
224
224
  def reset_variables(prompt = '')
225
225
  @prompt = prompt.gsub("\n", "\\n")
226
- @mark_pointer = nil
226
+ @mark_position = nil
227
227
  @is_multiline = false
228
228
  @finished = false
229
229
  @history_pointer = nil
@@ -253,8 +253,8 @@ class Reline::LineEditor
253
253
  @undo_redo_history = [[[""], 0, 0]]
254
254
  @undo_redo_index = 0
255
255
  @restoring = false
256
- @prev_action_state = NullActionState
257
- @next_action_state = NullActionState
256
+ @prev_action_state = {}
257
+ @next_action_state = {}
258
258
  reset_line
259
259
  end
260
260
 
@@ -476,6 +476,20 @@ class Reline::LineEditor
476
476
  prompt_width = Reline::Unicode.calculate_width(prompt, true)
477
477
  [[0, prompt_width, prompt], [prompt_width, Reline::Unicode.calculate_width(line, true), line]]
478
478
  end
479
+
480
+ # Add rprompt to the first visible line if set and there's room
481
+ if @rprompt && !@rprompt.empty? && new_lines[0]
482
+ rprompt_width = Reline::Unicode.calculate_width(@rprompt, true)
483
+ right_col = screen_width - rprompt_width
484
+ first_line = new_lines[0]
485
+ # Calculate the end of the current content (prompt + input)
486
+ content_end = first_line.sum { |_, width, _| width }
487
+ # Only show rprompt if there's at least 1 char gap between content and rprompt
488
+ if right_col > content_end
489
+ first_line << [right_col, rprompt_width, @rprompt]
490
+ end
491
+ end
492
+
479
493
  if @menu_info
480
494
  @menu_info.lines(screen_width).each do |item|
481
495
  new_lines << [[0, Reline::Unicode.calculate_width(item), item]]
@@ -491,8 +505,8 @@ class Reline::LineEditor
491
505
  next if row < 0 || row >= screen_height
492
506
 
493
507
  dialog_rows = new_lines[row] ||= []
494
- # index 0 is for prompt, index 1 is for line, index 2.. is for dialog
495
- dialog_rows[index + 2] = [x_range.begin, dialog.width, dialog.contents[row - y_range.begin]]
508
+ # index 0 is for prompt, index 1 is for line, index 2 is for rprompt, index 3.. is for dialog
509
+ dialog_rows[index + 3] = [x_range.begin, dialog.width, dialog.contents[row - y_range.begin]]
496
510
  end
497
511
  end
498
512
 
@@ -1022,7 +1036,7 @@ class Reline::LineEditor
1022
1036
  @byte_pointer -= byte_size
1023
1037
  end
1024
1038
 
1025
- @prev_action_state, @next_action_state = @next_action_state, NullActionState
1039
+ @prev_action_state, @next_action_state = @next_action_state, {}
1026
1040
 
1027
1041
  unless @completion_occurs
1028
1042
  @completion_state = CompletionState::NORMAL
@@ -1779,17 +1793,24 @@ class Reline::LineEditor
1779
1793
 
1780
1794
  private def em_yank(key)
1781
1795
  yanked = @kill_ring.yank
1782
- insert_text(yanked) if yanked
1796
+ return unless yanked
1797
+
1798
+ before_cursor = current_line.byteslice(0, @byte_pointer)
1799
+ after_cursor = current_line.byteslice(@byte_pointer, current_line.bytesize)
1800
+ set_current_line(before_cursor + yanked + after_cursor, before_cursor.bytesize + yanked.bytesize)
1801
+ set_next_action_state(:em_yank_line, [before_cursor, after_cursor])
1783
1802
  end
1784
1803
  alias_method :yank, :em_yank
1785
1804
 
1786
1805
  private def em_yank_pop(key)
1787
- yanked, prev_yank = @kill_ring.yank_pop
1788
- if yanked
1789
- line, = byteslice!(current_line, @byte_pointer - prev_yank.bytesize, prev_yank.bytesize)
1790
- set_current_line(line, @byte_pointer - prev_yank.bytesize)
1791
- insert_text(yanked)
1792
- end
1806
+ before_cursor, after_cursor = prev_action_state_value(:em_yank_line)
1807
+ return unless before_cursor and after_cursor
1808
+
1809
+ yanked, = @kill_ring.yank_pop
1810
+ return unless yanked
1811
+
1812
+ set_current_line(before_cursor + yanked + after_cursor, before_cursor.bytesize + yanked.bytesize)
1813
+ set_next_action_state(:em_yank_line, [before_cursor, after_cursor])
1793
1814
  end
1794
1815
  alias_method :yank_pop, :em_yank_pop
1795
1816
 
@@ -2303,15 +2324,22 @@ class Reline::LineEditor
2303
2324
  end
2304
2325
 
2305
2326
  private def em_set_mark(key)
2306
- @mark_pointer = [@byte_pointer, @line_index]
2327
+ cursor_column = Reline::Unicode.calculate_width(current_line.byteslice(0, @byte_pointer))
2328
+ @mark_position = [@line_index, cursor_column]
2307
2329
  end
2308
2330
  alias_method :set_mark, :em_set_mark
2309
2331
 
2310
2332
  private def em_exchange_mark(key)
2311
- return unless @mark_pointer
2312
- new_pointer = [@byte_pointer, @line_index]
2313
- @byte_pointer, @line_index = @mark_pointer
2314
- @mark_pointer = new_pointer
2333
+ return unless @mark_position
2334
+ line_index, cursor_column = @mark_position
2335
+ em_set_mark(key)
2336
+ if @buffer_of_lines.size <= line_index
2337
+ @line_index = @buffer_of_lines.size - 1
2338
+ @byte_pointer = current_line.bytesize
2339
+ else
2340
+ @line_index = line_index
2341
+ calculate_nearest_cursor(cursor_column)
2342
+ end
2315
2343
  end
2316
2344
  alias_method :exchange_point_and_mark, :em_exchange_mark
2317
2345
 
@@ -2343,11 +2371,11 @@ class Reline::LineEditor
2343
2371
  end
2344
2372
 
2345
2373
  private def prev_action_state_value(type)
2346
- @prev_action_state[0] == type ? @prev_action_state[1] : nil
2374
+ @prev_action_state[type]
2347
2375
  end
2348
2376
 
2349
2377
  private def set_next_action_state(type, value)
2350
- @next_action_state = [type, value]
2378
+ @next_action_state[type] = value
2351
2379
  end
2352
2380
 
2353
2381
  private def re_read_init_file(_key)
@@ -0,0 +1,3 @@
1
+ module Reline
2
+ VERSION = '0.7.0'
3
+ end
@@ -247,19 +247,19 @@ module Reline
247
247
  } # :nodoc:
248
248
  Reline::DEFAULT_DIALOG_CONTEXT = Array.new # :nodoc:
249
249
 
250
- def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
250
+ def readmultiline(_prompt = '', _add_history = false, prompt: _prompt, add_history: _add_history, rprompt: nil, &confirm_multiline_termination)
251
251
  @mutex.synchronize do
252
252
  unless confirm_multiline_termination
253
253
  raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')
254
254
  end
255
255
 
256
256
  io_gate.with_raw_input do
257
- inner_readline(prompt, add_hist, true, &confirm_multiline_termination)
257
+ inner_readline(prompt, add_history, true, rprompt: rprompt, &confirm_multiline_termination)
258
258
  end
259
259
 
260
260
  whole_buffer = line_editor.whole_buffer.dup
261
261
  whole_buffer.taint if RUBY_VERSION < '2.7'
262
- if add_hist and whole_buffer and whole_buffer.chomp("\n").size > 0
262
+ if add_history and whole_buffer and whole_buffer.chomp("\n").size > 0
263
263
  Reline::HISTORY << whole_buffer
264
264
  end
265
265
 
@@ -273,15 +273,15 @@ module Reline
273
273
  end
274
274
  end
275
275
 
276
- def readline(prompt = '', add_hist = false)
276
+ def readline(_prompt = '', _add_history = false, prompt: _prompt, add_history: _add_history, rprompt: nil)
277
277
  @mutex.synchronize do
278
278
  io_gate.with_raw_input do
279
- inner_readline(prompt, add_hist, false)
279
+ inner_readline(prompt, add_history, false, rprompt: rprompt)
280
280
  end
281
281
 
282
282
  line = line_editor.line.dup
283
283
  line.taint if RUBY_VERSION < '2.7'
284
- if add_hist and line and line.chomp("\n").size > 0
284
+ if add_history and line and line.chomp("\n").size > 0
285
285
  Reline::HISTORY << line.chomp("\n")
286
286
  end
287
287
 
@@ -290,7 +290,7 @@ module Reline
290
290
  end
291
291
  end
292
292
 
293
- private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination)
293
+ private def inner_readline(prompt, add_history, multiline, rprompt: nil, &confirm_multiline_termination)
294
294
  if ENV['RELINE_STDERR_TTY']
295
295
  if io_gate.win?
296
296
  $stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a')
@@ -323,6 +323,7 @@ module Reline
323
323
  line_editor.prompt_proc = prompt_proc
324
324
  line_editor.auto_indent_proc = auto_indent_proc
325
325
  line_editor.dig_perfect_match_proc = dig_perfect_match_proc
326
+ line_editor.rprompt = rprompt&.encode(encoding)
326
327
 
327
328
  pre_input_hook&.call
328
329
 
@@ -442,13 +443,13 @@ module Reline
442
443
  ##
443
444
  # :singleton-method: readmultiline
444
445
  # :call-seq:
445
- # readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination) -> string or nil
446
+ # readmultiline(prompt = '', add_history = false, &confirm_multiline_termination) -> string or nil
446
447
  def_single_delegators :core, :readmultiline
447
448
 
448
449
  ##
449
450
  # :singleton-method: readline
450
451
  # :call-seq:
451
- # readline(prompt = '', add_hist = false) -> string or nil
452
+ # readline(prompt = '', add_history = false) -> string or nil
452
453
  def_single_delegators :core, :readline
453
454
  def_single_delegators :core, :completion_case_fold, :completion_case_fold=
454
455
  def_single_delegators :core, :completion_quote_character
@@ -1,3 +1,9 @@
1
+ 5.2.2 (2026-07-24)
2
+
3
+ * Remove legacy less engine - #963
4
+ * Add asciidoc engine - #973
5
+ * Fix logic less condition for empty objects - #970
6
+
1
7
  5.2.1 (2024-01-20)
2
8
 
3
9
  * Support Ruby 3.3
@@ -33,11 +39,11 @@
33
39
  * Remove deprecated syntax
34
40
  * Add option to hyphenate underscore attributes - #852
35
41
  * Update CI/CD testing and dependencies
36
-
42
+
37
43
  4.1.0 (2020-05-07)
38
44
  * Add support for Tailwind CSS - #841
39
45
  * Update dependencies and testing
40
-
46
+
41
47
  4.0.1 (2018-09-02)
42
48
 
43
49
  * Fix incompatibility issue with Slim Include plugin and new ability to specifiy attributes for embedded engines #819
@@ -2,9 +2,12 @@ source 'https://rubygems.org/'
2
2
 
3
3
  gemspec
4
4
 
5
+ gem 'logger', '~> 1.7'
6
+ gem 'ostruct', '~> 0.6'
5
7
  gem 'minitest', '~> 5.15'
6
- gem 'rake', '~> 13.0'
7
- gem 'kramdown', '~> 2.4'
8
+ gem 'rake', '~> 13.3'
9
+ gem 'asciidoctor', '~> 2.0'
10
+ gem 'kramdown', '~> 2.5'
8
11
 
9
12
  if ENV['TEMPLE'] && ENV['TEMPLE'] != 'master'
10
13
  gem 'temple', "= #{ENV['TEMPLE']}"
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2010 - 2023 Slim Team
3
+ Copyright (c) 2010 - 2026 Slim Team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -566,7 +566,7 @@ div class="first second third"
566
566
 
567
567
  ~~~ slim
568
568
  ruby:
569
- def a_unless_current
569
+ def self.a_unless_current
570
570
  @page_current ? {tag: 'span'} : {tag: 'a', href: 'https://slim-template.github.io/'}
571
571
  end
572
572
  - @page_current = true
@@ -866,8 +866,8 @@ p: markdown: Tag with **inline** markdown!
866
866
  | css: | なし | ショートカット | css コードを埋め込み、style タグで囲む |
867
867
  | sass: | sass-embedded または sassc または sass | コンパイル時 | sass コードを埋め込み、style タグで囲む |
868
868
  | scss: | sass-embedded または sassc または sass | コンパイル時 | scss コードを埋め込み、style タグで囲む |
869
- | less: | less | コンパイル時 | less コードを埋め込み、style タグで囲む |
870
869
  | coffee: | coffee-script | コンパイル時 | CoffeeScript をコンパイルし、 script タグで囲む |
870
+ | asciidoc: | asciidoctor | コンパイル時 + 展開 | AsciiDoc をコンパイルし、テキスト中の # \{variables} を展開 |
871
871
  | markdown: | redcarpet/rdiscount/kramdown | コンパイル時 + 展開 | Markdown をコンパイルし、テキスト中の # \{variables} を展開 |
872
872
  | textile: | redcloth | コンパイル時 + 展開 | textile をコンパイルし、テキスト中の # \{variables} を展開 |
873
873
  | rdoc: | rdoc | コンパイル時 + 展開 | RDoc をコンパイルし、テキスト中の # \{variables} を展開 |
@@ -883,7 +883,6 @@ Slim::Embedded.options[:markdown] = {auto_ids: false}
883
883
  * Javascript
884
884
  * CSS
885
885
  * CoffeeScript
886
- * LESS
887
886
  * SASS
888
887
  * SCSS
889
888
 
@@ -1160,7 +1159,6 @@ markdown:
1160
1159
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1161
1160
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1162
1161
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1163
- * [Atom](https://github.com/slim-template/language-slim)
1164
1162
 
1165
1163
  ### テンプレート変換 (HAML, ERB, ...)
1166
1164
 
@@ -1244,7 +1242,6 @@ Slim は [MIT license](http://www.opensource.org/licenses/MIT) に基づいて
1244
1242
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1245
1243
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1246
1244
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1247
- * [Atom](https://github.com/slim-template/language-slim)
1248
1245
 
1249
1246
  静的コード解析:
1250
1247
 
@@ -1259,18 +1256,19 @@ Slim は [MIT license](http://www.opensource.org/licenses/MIT) に基づいて
1259
1256
  移植言語/同様の言語:
1260
1257
 
1261
1258
  * [Sliq (Slim/Liquid integration)](https://github.com/slim-template/sliq)
1262
- * [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
1263
- * [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
1264
- * [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
1265
1259
  * [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
1266
- * [Plim (Python port of Slim)](https://github.com/2nd/plim)
1260
+ * [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
1267
1261
  * [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
1268
1262
  * [Emblem.js (Javascript, similar to Slim)](https://github.com/machty/emblem.js)
1269
- * [Hamlit (High performance Haml implementation, based on Temple like Slim)](https://github.com/k0kubun/hamlit)
1270
- * [Faml (Faster Haml implementation, also using Temple like Slim)](https://github.com/eagletmt/faml)
1271
- * [Haml (Older engine which inspired Slim)](https://github.com/haml/haml)
1272
1263
  * [Jade (Similar engine for javascript)](https://github.com/visionmedia/jade)
1273
1264
  * [Pug (Successor of Jade, Similar engine for javascript)](https://github.com/pugjs/pug)
1265
+ * [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
1266
+ * [Plim (Python port of Slim)](https://github.com/2nd/plim)
1267
+ * [Trim-Template (Python template engine inspired by Slim)](https://github.com/opensourceame/trim-template)
1268
+ * [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
1269
+ * [Hamlit (Haml implementation, using Temple like Slim)](https://github.com/k0kubun/hamlit)
1270
+ * [Faml (Haml implementation, using Temple like Slim)](https://github.com/eagletmt/faml)
1271
+ * [Haml (Older template engine which inspired Slim)](https://github.com/haml/haml)
1274
1272
  * [Sweet (Similar engine which also allows to write classes and functions)](https://github.com/joaomdmoura/sweet)
1275
1273
  * [Amber (Similar engine for Go)](https://github.com/eknkc/amber)
1276
1274
  * [Slang (Slim-inspired templating language for Crystal)](https://github.com/jeromegn/slang)
@@ -41,7 +41,7 @@ A short list of the features...
41
41
  ### What is Slim?
42
42
 
43
43
  Slim is a fast, lightweight templating engine with support for __Rails 5 and later__. It has been heavily tested on all major ruby implementations. We use
44
- continuous integration (github actions).
44
+ continuous integration (GitHub actions).
45
45
 
46
46
  Slim's core syntax is guided by one thought: "What's the minimum required to make this work".
47
47
 
@@ -502,7 +502,7 @@ You can also break ruby attributes with backslash `\` or trailing `,` as describ
502
502
  #### Boolean attributes
503
503
 
504
504
  The attribute values `true`, `false` and `nil` are interpreted
505
- as booleans. If you use the attribute wrapper you can omit the attribute assigment.
505
+ as booleans. If you use the attribute wrapper you can omit the attribute assignment.
506
506
 
507
507
  ~~~ slim
508
508
  input type="text" disabled="disabled"
@@ -578,7 +578,7 @@ with the :tag key.
578
578
 
579
579
  ~~~ slim
580
580
  ruby:
581
- def a_unless_current
581
+ def self.a_unless_current
582
582
  @page_current ? {tag: 'span'} : {tag: 'a', href: 'https://slim-template.github.io/'}
583
583
  end
584
584
  - @page_current = true
@@ -696,7 +696,7 @@ which renders to
696
696
  ~~~ html
697
697
  <script data-binding="products" type="text/javascript">
698
698
  [{"name": "product1", "price": "$100"},
699
- {"name": "prodcut2", "price": "$200"}]
699
+ {"name": "product2", "price": "$200"}]
700
700
  </script>
701
701
  ~~~
702
702
 
@@ -902,8 +902,8 @@ Supported engines:
902
902
  | css: | none | Shortcut | Shortcut to embed css code and wrap in style tag |
903
903
  | sass: | sass-embedded or sassc or sass | Compile time | Embed sass code and wrap in style tag |
904
904
  | scss: | sass-embedded or sassc or sass | Compile time | Embed scss code and wrap in style tag |
905
- | less: | less | Compile time | Embed less css code and wrap in style tag |
906
905
  | coffee: | coffee-script | Compile time | Compile coffee script code and wrap in script tag |
906
+ | asciidoc: | asciidoctor | Compile time + Interpolation | Compile AsciiDoc code and interpolate #\{variables} in text |
907
907
  | markdown: | redcarpet/rdiscount/kramdown | Compile time + Interpolation | Compile markdown code and interpolate #\{variables} in text |
908
908
  | textile: | redcloth | Compile time + Interpolation | Compile textile code and interpolate #\{variables} in text |
909
909
  | rdoc: | rdoc | Compile time + Interpolation | Compile rdoc code and interpolate #\{variables} in text |
@@ -918,7 +918,6 @@ You can also specify HTML attributes for the following embedded engines:
918
918
  * Javascript
919
919
  * CSS
920
920
  * CoffeeScript
921
- * LESS
922
921
  * SASS
923
922
  * SCSS
924
923
 
@@ -1114,11 +1113,11 @@ There are two ways to resolve it:
1114
1113
  * Set `splat_prefix` to any custom value, double asterisk, for example: `splat_prefix: '**'`. Now structural directives should work as expected. Remember that now splat attributes should be written with new custom prefix before them.
1115
1114
  * Use alternative directive syntax without asterisk.
1116
1115
 
1117
- #### Attribute delimeters
1116
+ #### Attribute delimiters
1118
1117
 
1119
1118
  Angular and slim both uses brackets in their syntax. So there are also two ways:
1120
1119
  * Use alternative syntax for binding (`bind-...` and so on)
1121
- * Limit attribute delimeters to curly braces only:
1120
+ * Limit attribute delimiters to curly braces only:
1122
1121
  ```
1123
1122
  code_attr_delims: {
1124
1123
  '{' => '}',
@@ -1196,12 +1195,11 @@ There are plugins for various text editors (including the most important ones -
1196
1195
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1197
1196
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1198
1197
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1199
- * [Atom](https://github.com/slim-template/language-slim)
1200
1198
  * VS Code ([Official marketplace](https://marketplace.visualstudio.com/items?itemName=sianglim.slim), [Open VSX registry](https://open-vsx.org/extension/sianglim/slim))
1201
1199
 
1202
1200
  ### Template Converters (HAML, ERB, ...)
1203
1201
 
1204
- * Slim can be converted to ERB using `slimrb` or `Slim::ERBConverter' which are both included in the Slim gem
1202
+ * Slim can be converted to ERB using `slimrb` or `Slim::ERBConverter` which are both included in the Slim gem
1205
1203
  * [Haml2Slim converter](https://github.com/slim-template/haml2slim)
1206
1204
  * [ERB2Slim, HTML2Slim converter](https://github.com/slim-template/html2slim)
1207
1205
 
@@ -1214,12 +1212,7 @@ There are plugins for various text editors (including the most important ones -
1214
1212
  But we would be happy if you chose Slim also for any other reason, we assure
1215
1213
  you performance will not be an obstacle.*
1216
1214
 
1217
- Run the benchmarks with `rake bench`. You can add the option `slow` to
1218
- run the slow parsing benchmark which needs more time. You can also increase the number of iterations.
1219
-
1220
- ~~~
1221
- $ rake bench slow=1 iterations=1000
1222
- ~~~
1215
+ For up-to-date benchmarks, please refer to our dedicated [Template engine benchmarks](https://github.com/slim-template/benchmarks) repository.
1223
1216
 
1224
1217
  ### Test suite and continuous integration
1225
1218
 
@@ -1259,7 +1252,8 @@ Slim is released under the [MIT license](http://www.opensource.org/licenses/MIT)
1259
1252
 
1260
1253
  ## Donations and sponsoring
1261
1254
 
1262
- If you want to support this project please visit the GitHub sponsors page.
1255
+ This project relies on sponsoring for its continued maintenance. If you want to
1256
+ support the project, please visit the GitHub sponsors page.
1263
1257
 
1264
1258
  [![GitHub Sponsors](https://img.shields.io/github/sponsors/slim-template)](https://github.com/sponsors/slim-template)
1265
1259
 
@@ -1281,7 +1275,6 @@ Syntax highlighting:
1281
1275
  * [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
1282
1276
  * [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
1283
1277
  * [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
1284
- * [Atom](https://github.com/slim-template/language-slim)
1285
1278
 
1286
1279
  Static code analysis:
1287
1280
 
@@ -1297,17 +1290,19 @@ Template Converters (HAML, ERB, ...):
1297
1290
  Language ports/Similar languages:
1298
1291
 
1299
1292
  * [Sliq (Slim/Liquid integration)](https://github.com/slim-template/sliq)
1300
- * [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
1301
- * [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
1302
- * [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
1303
1293
  * [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
1304
- * [Plim (Python port of Slim)](https://github.com/2nd/plim)
1294
+ * [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
1305
1295
  * [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
1306
1296
  * [Emblem.js (Javascript, similar to Slim)](https://github.com/machty/emblem.js)
1307
- * [Hamlit (High performance Haml implementation, based on Temple like Slim)](https://github.com/k0kubun/hamlit)
1308
- * [Faml (Faster Haml implementation, also using Temple like Slim)](https://github.com/eagletmt/faml)
1309
- * [Haml (Older engine which inspired Slim)](https://github.com/haml/haml)
1310
- * [Pug (Similar engine for javascript)](https://github.com/pugjs/pug)
1297
+ * [Jade (Similar engine for javascript)](https://github.com/visionmedia/jade)
1298
+ * [Pug (Successor of Jade, Similar engine for javascript)](https://github.com/pugjs/pug)
1299
+ * [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
1300
+ * [Plim (Python port of Slim)](https://github.com/2nd/plim)
1301
+ * [Trim-Template (Python template engine inspired by Slim)](https://github.com/opensourceame/trim-template)
1302
+ * [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
1303
+ * [Hamlit (Haml implementation, using Temple like Slim)](https://github.com/k0kubun/hamlit)
1304
+ * [Faml (Haml implementation, using Temple like Slim)](https://github.com/eagletmt/faml)
1305
+ * [Haml (Older template engine which inspired Slim)](https://github.com/haml/haml)
1311
1306
  * [Sweet (Similar engine which also allows to write classes and functions)](https://github.com/joaomdmoura/sweet)
1312
1307
  * [Amber (Similar engine for Go)](https://github.com/eknkc/amber)
1313
1308
  * [Slang (Slim-inspired templating language for Crystal)](https://github.com/jeromegn/slang)
@@ -228,13 +228,13 @@ module Slim
228
228
  end
229
229
 
230
230
  # These engines are executed at compile time, embedded ruby is interpolated
231
+ register :asciidoc, InterpolateTiltEngine
231
232
  register :markdown, InterpolateTiltEngine
232
233
  register :textile, InterpolateTiltEngine
233
234
  register :rdoc, InterpolateTiltEngine
234
235
 
235
236
  # These engines are executed at compile time
236
237
  register :coffee, JavaScriptEngine, engine: TiltEngine
237
- register :less, TagEngine, tag: :style, engine: TiltEngine
238
238
  register :sass, TagEngine, :pretty, tag: :style, engine: SassEngine
239
239
  register :scss, TagEngine, :pretty, tag: :style, engine: SassEngine
240
240
 
@@ -27,7 +27,8 @@ module Slim
27
27
  end
28
28
 
29
29
  def section(name)
30
- if dict = scope[name]
30
+ dict = scope[name]
31
+ if dict && !(dict.respond_to?(:empty?) && dict.empty?)
31
32
  if !dict.respond_to?(:has_key?) && dict.respond_to?(:each)
32
33
  new_scope do
33
34
  dict.each do |d|
@@ -42,8 +43,8 @@ module Slim
42
43
  end
43
44
 
44
45
  def inverted_section(name)
45
- value = scope[name]
46
- yield if !value || (value.respond_to?(:empty?) && value.empty?)
46
+ dict = scope[name]
47
+ yield if !dict || (dict.respond_to?(:empty?) && dict.empty?)
47
48
  end
48
49
 
49
50
  def to_s
@@ -48,25 +48,7 @@ module Slim
48
48
  tag = @attrs.delete('tag').to_s
49
49
  tag = @options[:default_tag] if tag.empty?
50
50
  if block
51
- # This is a bit of a hack to get a universal capturing.
52
- #
53
- # TODO: Add this as a helper somewhere to solve these capturing issues
54
- # once and for all.
55
- #
56
- # If we have Slim capturing disabled and the scope defines the method `capture` (i.e. Rails)
57
- # we use this method to capture the content.
58
- #
59
- # otherwise we just use normal Slim capturing (yield).
60
- #
61
- # See https://github.com/slim-template/slim/issues/591
62
- # https://github.com/slim-template/slim#helpers-capturing-and-includes
63
- #
64
- content =
65
- if @options[:disable_capture] && (scope = block.binding.eval('self')).respond_to?(:capture)
66
- scope.capture(&block)
67
- else
68
- yield
69
- end
51
+ content = capture_block_content(&block)
70
52
  "<#{tag}#{build_attrs}>#{content}</#{tag}>"
71
53
  else
72
54
  "<#{tag}#{build_attrs} />"
@@ -90,6 +72,23 @@ module Slim
90
72
 
91
73
  private
92
74
 
75
+ # Captures block content using the appropriate capturing mechanism.
76
+ #
77
+ # If we have Slim capturing disabled and the scope defines the method `capture` (i.e. Rails)
78
+ # we use this method to capture the content.
79
+ #
80
+ # Otherwise we just use normal Slim capturing (yield).
81
+ #
82
+ # See https://github.com/slim-template/slim/issues/591
83
+ # https://github.com/slim-template/slim#helpers-capturing-and-includes
84
+ def capture_block_content(&block)
85
+ if @options[:disable_capture] && (scope = block.binding.eval('self')).respond_to?(:capture)
86
+ scope.capture(&block)
87
+ else
88
+ yield
89
+ end
90
+ end
91
+
93
92
  def hyphen_attr(name, escape, value)
94
93
  if Hash === value
95
94
  if @options[:hyphen_underscore_attrs]
@@ -2,5 +2,5 @@
2
2
  module Slim
3
3
  # Slim version string
4
4
  # @api public
5
- VERSION = '5.2.1'
5
+ VERSION = '5.2.2'
6
6
  end
@@ -1,3 +1,11 @@
1
+ 0.10.6
2
+
3
+ * Make StaticAnalyzer recognize shorthand syntax as dynamic (#149)
4
+
5
+ 0.10.5
6
+
7
+ * Allow using prism as the parser engine (#156)
8
+
1
9
  0.10.4
2
10
 
3
11
  * Fix Ruby 3.4 compatibility (#152)
@@ -1,7 +1,7 @@
1
1
  Temple
2
2
  ======
3
3
 
4
- [![test](https://github.com/judofyr/temple/actions/workflows/test.yml/badge.svg)](https://github.com/judofyr/temple/actions/workflows/test.yml) [![Code Climate](https://codeclimate.com/github/judofyr/temple.svg)](https://codeclimate.com/github/judofyr/temple) [![Gem Version](https://badge.fury.io/rb/temple.svg)](https://rubygems.org/gems/temple) [![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/temple/frames)
4
+ [![test](https://github.com/judofyr/temple/actions/workflows/test.yml/badge.svg)](https://github.com/judofyr/temple/actions/workflows/test.yml) [![Maintainability](https://qlty.sh/gh/judofyr/projects/temple/maintainability.svg)](https://qlty.sh/gh/judofyr/projects/temple) [![Gem Version](https://badge.fury.io/rb/temple.svg)](https://rubygems.org/gems/temple) [![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/temple/frames)
5
5
 
6
6
  Temple is an abstraction and a framework for compiling templates to pure Ruby.
7
7
  It's all about making it easier to experiment, implement and optimize template
@@ -4,7 +4,7 @@ module Temple
4
4
  # Convert [:dynamic, code] to [:static, text] if code is static Ruby expression.
5
5
  class StaticAnalyzer < Filter
6
6
  def call(exp)
7
- # Optimize only when Ripper is available.
7
+ # Optimize only when a parser engine is available.
8
8
  if ::Temple::StaticAnalyzer.available?
9
9
  super
10
10
  else