jmeter_perf 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +19 -0
  4. data/.standard.yml +4 -0
  5. data/CHANGELOG.md +18 -0
  6. data/DSL.md +235 -0
  7. data/README.md +24 -0
  8. data/Rakefile +12 -0
  9. data/example/Gemfile +39 -0
  10. data/example/Gemfile.lock +232 -0
  11. data/example/README.md +3 -0
  12. data/example/Rakefile +6 -0
  13. data/example/app/controllers/application_controller.rb +2 -0
  14. data/example/app/controllers/test_controller.rb +15 -0
  15. data/example/bin/bundle +109 -0
  16. data/example/bin/docker-entrypoint +8 -0
  17. data/example/bin/rails +4 -0
  18. data/example/bin/rake +4 -0
  19. data/example/bin/setup +33 -0
  20. data/example/config/application.rb +44 -0
  21. data/example/config/boot.rb +3 -0
  22. data/example/config/credentials.yml.enc +1 -0
  23. data/example/config/database.yml +25 -0
  24. data/example/config/environment.rb +5 -0
  25. data/example/config/environments/development.rb +64 -0
  26. data/example/config/environments/production.rb +82 -0
  27. data/example/config/environments/test.rb +61 -0
  28. data/example/config/initializers/cors.rb +16 -0
  29. data/example/config/initializers/filter_parameter_logging.rb +8 -0
  30. data/example/config/initializers/inflections.rb +16 -0
  31. data/example/config/locales/en.yml +31 -0
  32. data/example/config/puma.rb +35 -0
  33. data/example/config/routes.rb +5 -0
  34. data/example/config.ru +7 -0
  35. data/example/fast.log +49 -0
  36. data/example/jmeter.log +28 -0
  37. data/example/lib/tasks/test.rake +40 -0
  38. data/example/log/.keep +0 -0
  39. data/example/public/robots.txt +1 -0
  40. data/example/random.log +49 -0
  41. data/example/slow.log +49 -0
  42. data/example/vendor/.keep +0 -0
  43. data/lib/Rakefile +4 -0
  44. data/lib/jmeter_perf/dsl/access_log_sampler.rb +38 -0
  45. data/lib/jmeter_perf/dsl/aggregate_graph.rb +61 -0
  46. data/lib/jmeter_perf/dsl/aggregate_report.rb +61 -0
  47. data/lib/jmeter_perf/dsl/ajp13_sampler.rb +47 -0
  48. data/lib/jmeter_perf/dsl/assertion_results.rb +61 -0
  49. data/lib/jmeter_perf/dsl/bean_shell_assertion.rb +34 -0
  50. data/lib/jmeter_perf/dsl/bean_shell_listener.rb +34 -0
  51. data/lib/jmeter_perf/dsl/bean_shell_postprocessor.rb +34 -0
  52. data/lib/jmeter_perf/dsl/bean_shell_preprocessor.rb +34 -0
  53. data/lib/jmeter_perf/dsl/bean_shell_sampler.rb +34 -0
  54. data/lib/jmeter_perf/dsl/bean_shell_timer.rb +34 -0
  55. data/lib/jmeter_perf/dsl/bsf_assertion.rb +34 -0
  56. data/lib/jmeter_perf/dsl/bsf_listener.rb +34 -0
  57. data/lib/jmeter_perf/dsl/bsf_postprocessor.rb +34 -0
  58. data/lib/jmeter_perf/dsl/bsf_preprocessor.rb +34 -0
  59. data/lib/jmeter_perf/dsl/bsf_sampler.rb +34 -0
  60. data/lib/jmeter_perf/dsl/bsf_timer.rb +34 -0
  61. data/lib/jmeter_perf/dsl/compare_assertion.rb +33 -0
  62. data/lib/jmeter_perf/dsl/comparison_assertion_visualizer.rb +61 -0
  63. data/lib/jmeter_perf/dsl/constant_throughput_timer.rb +32 -0
  64. data/lib/jmeter_perf/dsl/constant_timer.rb +31 -0
  65. data/lib/jmeter_perf/dsl/counter.rb +37 -0
  66. data/lib/jmeter_perf/dsl/css_jquery_extractor.rb +37 -0
  67. data/lib/jmeter_perf/dsl/csv_data_set_config.rb +39 -0
  68. data/lib/jmeter_perf/dsl/debug_postprocessor.rb +34 -0
  69. data/lib/jmeter_perf/dsl/debug_sampler.rb +33 -0
  70. data/lib/jmeter_perf/dsl/distribution_graphalpha.rb +61 -0
  71. data/lib/jmeter_perf/dsl/duration_assertion.rb +31 -0
  72. data/lib/jmeter_perf/dsl/for_each_controller.rb +33 -0
  73. data/lib/jmeter_perf/dsl/ftp_request.rb +40 -0
  74. data/lib/jmeter_perf/dsl/ftp_request_defaults.rb +38 -0
  75. data/lib/jmeter_perf/dsl/gaussian_random_timer.rb +32 -0
  76. data/lib/jmeter_perf/dsl/generate_summary_results.rb +29 -0
  77. data/lib/jmeter_perf/dsl/graph_results.rb +61 -0
  78. data/lib/jmeter_perf/dsl/html_assertion.rb +36 -0
  79. data/lib/jmeter_perf/dsl/html_link_parser.rb +29 -0
  80. data/lib/jmeter_perf/dsl/html_parameter_mask.rb +38 -0
  81. data/lib/jmeter_perf/dsl/http_authorization_manager.rb +39 -0
  82. data/lib/jmeter_perf/dsl/http_cache_manager.rb +32 -0
  83. data/lib/jmeter_perf/dsl/http_cookie_manager.rb +34 -0
  84. data/lib/jmeter_perf/dsl/http_header_manager.rb +36 -0
  85. data/lib/jmeter_perf/dsl/http_request.rb +47 -0
  86. data/lib/jmeter_perf/dsl/http_request_defaults.rb +53 -0
  87. data/lib/jmeter_perf/dsl/http_url_rewriting_modifier.rb +36 -0
  88. data/lib/jmeter_perf/dsl/if_controller.rb +33 -0
  89. data/lib/jmeter_perf/dsl/include_controller.rb +31 -0
  90. data/lib/jmeter_perf/dsl/j_unit_request.rb +43 -0
  91. data/lib/jmeter_perf/dsl/java_request.rb +75 -0
  92. data/lib/jmeter_perf/dsl/java_request_defaults.rb +75 -0
  93. data/lib/jmeter_perf/dsl/jdbc_connection_configuration.rb +43 -0
  94. data/lib/jmeter_perf/dsl/jdbc_postprocessor.rb +39 -0
  95. data/lib/jmeter_perf/dsl/jdbc_preprocessor.rb +39 -0
  96. data/lib/jmeter_perf/dsl/jdbc_request.rb +39 -0
  97. data/lib/jmeter_perf/dsl/jms_pointto_point.rb +47 -0
  98. data/lib/jmeter_perf/dsl/jms_publisher.rb +49 -0
  99. data/lib/jmeter_perf/dsl/jms_subscriber.rb +41 -0
  100. data/lib/jmeter_perf/dsl/json_path_postprocessor.rb +33 -0
  101. data/lib/jmeter_perf/dsl/jsr223_assertion.rb +35 -0
  102. data/lib/jmeter_perf/dsl/jsr223_listener.rb +35 -0
  103. data/lib/jmeter_perf/dsl/jsr223_postprocessor.rb +35 -0
  104. data/lib/jmeter_perf/dsl/jsr223_preprocessor.rb +35 -0
  105. data/lib/jmeter_perf/dsl/jsr223_sampler.rb +35 -0
  106. data/lib/jmeter_perf/dsl/jsr223_timer.rb +35 -0
  107. data/lib/jmeter_perf/dsl/keystore_configuration.rb +34 -0
  108. data/lib/jmeter_perf/dsl/ldap_extended_request.rb +48 -0
  109. data/lib/jmeter_perf/dsl/ldap_extended_request_defaults.rb +48 -0
  110. data/lib/jmeter_perf/dsl/ldap_request.rb +41 -0
  111. data/lib/jmeter_perf/dsl/ldap_request_defaults.rb +45 -0
  112. data/lib/jmeter_perf/dsl/login_config_element.rb +32 -0
  113. data/lib/jmeter_perf/dsl/loop_controller.rb +32 -0
  114. data/lib/jmeter_perf/dsl/mail_reader_sampler.rb +43 -0
  115. data/lib/jmeter_perf/dsl/mailer_visualizer.rb +70 -0
  116. data/lib/jmeter_perf/dsl/md5_hex_assertion.rb +31 -0
  117. data/lib/jmeter_perf/dsl/module_controller.rb +31 -0
  118. data/lib/jmeter_perf/dsl/monitor_results.rb +61 -0
  119. data/lib/jmeter_perf/dsl/once_only_controller.rb +29 -0
  120. data/lib/jmeter_perf/dsl/os_process_sampler.rb +40 -0
  121. data/lib/jmeter_perf/dsl/poisson_random_timer.rb +32 -0
  122. data/lib/jmeter_perf/dsl/random_controller.rb +31 -0
  123. data/lib/jmeter_perf/dsl/random_order_controller.rb +29 -0
  124. data/lib/jmeter_perf/dsl/random_variable.rb +36 -0
  125. data/lib/jmeter_perf/dsl/recording_controller.rb +29 -0
  126. data/lib/jmeter_perf/dsl/reg_ex_user_parameters.rb +33 -0
  127. data/lib/jmeter_perf/dsl/regular_expression_extractor.rb +38 -0
  128. data/lib/jmeter_perf/dsl/response_assertion.rb +37 -0
  129. data/lib/jmeter_perf/dsl/response_time_graph.rb +61 -0
  130. data/lib/jmeter_perf/dsl/result_status_action_handler.rb +31 -0
  131. data/lib/jmeter_perf/dsl/runtime_controller.rb +31 -0
  132. data/lib/jmeter_perf/dsl/save_responses_to_a_file.rb +35 -0
  133. data/lib/jmeter_perf/dsl/simple_config_element.rb +29 -0
  134. data/lib/jmeter_perf/dsl/simple_controller.rb +29 -0
  135. data/lib/jmeter_perf/dsl/simple_data_writer.rb +61 -0
  136. data/lib/jmeter_perf/dsl/smime_assertion.rb +41 -0
  137. data/lib/jmeter_perf/dsl/smtp_sampler.rb +57 -0
  138. data/lib/jmeter_perf/dsl/soap_xml_rpc_request.rb +39 -0
  139. data/lib/jmeter_perf/dsl/spline_visualizer.rb +61 -0
  140. data/lib/jmeter_perf/dsl/summary_report.rb +61 -0
  141. data/lib/jmeter_perf/dsl/switch_controller.rb +31 -0
  142. data/lib/jmeter_perf/dsl/synchronizing_timer.rb +32 -0
  143. data/lib/jmeter_perf/dsl/tcp_sampler.rb +39 -0
  144. data/lib/jmeter_perf/dsl/tcp_sampler_config.rb +37 -0
  145. data/lib/jmeter_perf/dsl/test_action.rb +33 -0
  146. data/lib/jmeter_perf/dsl/test_fragment.rb +29 -0
  147. data/lib/jmeter_perf/dsl/test_plan.rb +37 -0
  148. data/lib/jmeter_perf/dsl/thread_group.rb +43 -0
  149. data/lib/jmeter_perf/dsl/throughput_controller.rb +38 -0
  150. data/lib/jmeter_perf/dsl/transaction_controller.rb +32 -0
  151. data/lib/jmeter_perf/dsl/uniform_random_timer.rb +32 -0
  152. data/lib/jmeter_perf/dsl/user_defined_variables.rb +39 -0
  153. data/lib/jmeter_perf/dsl/user_parameters.rb +36 -0
  154. data/lib/jmeter_perf/dsl/view_results_in_table.rb +61 -0
  155. data/lib/jmeter_perf/dsl/view_results_tree.rb +61 -0
  156. data/lib/jmeter_perf/dsl/while_controller.rb +31 -0
  157. data/lib/jmeter_perf/dsl/x_path_assertion.rb +37 -0
  158. data/lib/jmeter_perf/dsl/x_path_extractor.rb +37 -0
  159. data/lib/jmeter_perf/dsl/xml_assertion.rb +29 -0
  160. data/lib/jmeter_perf/dsl/xml_schema_assertion.rb +31 -0
  161. data/lib/jmeter_perf/extend/assertions/response_assertion.rb +38 -0
  162. data/lib/jmeter_perf/extend/config_elements/header_manager.rb +13 -0
  163. data/lib/jmeter_perf/extend/config_elements/http_cache_manager.rb +12 -0
  164. data/lib/jmeter_perf/extend/config_elements/http_cookie_manager.rb +39 -0
  165. data/lib/jmeter_perf/extend/config_elements/http_request_defaults.rb +55 -0
  166. data/lib/jmeter_perf/extend/config_elements/user_defined_variables.rb +13 -0
  167. data/lib/jmeter_perf/extend/config_elements/user_parameters.rb +31 -0
  168. data/lib/jmeter_perf/extend/controllers/foreach_controller.rb +31 -0
  169. data/lib/jmeter_perf/extend/controllers/loop_controller.rb +11 -0
  170. data/lib/jmeter_perf/extend/controllers/module_controller.rb +26 -0
  171. data/lib/jmeter_perf/extend/controllers/throughput_controller.rb +15 -0
  172. data/lib/jmeter_perf/extend/controllers/transaction_controller.rb +14 -0
  173. data/lib/jmeter_perf/extend/misc/exists.rb +13 -0
  174. data/lib/jmeter_perf/extend/misc/rsync.rb +24 -0
  175. data/lib/jmeter_perf/extend/misc/uuid.rb +12 -0
  176. data/lib/jmeter_perf/extend/misc/with_helpers.rb +27 -0
  177. data/lib/jmeter_perf/extend/plugins/jmeter_plugins.rb +124 -0
  178. data/lib/jmeter_perf/extend/processors/extract.rb +27 -0
  179. data/lib/jmeter_perf/extend/processors/regular_expression_extractor.rb +27 -0
  180. data/lib/jmeter_perf/extend/samplers/http_request.rb +66 -0
  181. data/lib/jmeter_perf/extend/samplers/jms_pointtopoint.rb +23 -0
  182. data/lib/jmeter_perf/extend/samplers/soapxmlrpc_request.rb +10 -0
  183. data/lib/jmeter_perf/extend/threads/thread_group.rb +19 -0
  184. data/lib/jmeter_perf/extend/timers/constant_throughput_timer.rb +11 -0
  185. data/lib/jmeter_perf/extend/timers/random_timer.rb +14 -0
  186. data/lib/jmeter_perf/helpers/dsl_generator.rb +157 -0
  187. data/lib/jmeter_perf/helpers/fallback_content_proxy.rb +96 -0
  188. data/lib/jmeter_perf/helpers/helper.rb +63 -0
  189. data/lib/jmeter_perf/helpers/parser.rb +143 -0
  190. data/lib/jmeter_perf/helpers/running_statistics.rb +62 -0
  191. data/lib/jmeter_perf/helpers/string.rb +60 -0
  192. data/lib/jmeter_perf/helpers/user-agents.rb +42 -0
  193. data/lib/jmeter_perf/plugins/active_threads_over_time.rb +59 -0
  194. data/lib/jmeter_perf/plugins/composite_graph.rb +77 -0
  195. data/lib/jmeter_perf/plugins/console_status_logger.rb +19 -0
  196. data/lib/jmeter_perf/plugins/dummy_sampler.rb +30 -0
  197. data/lib/jmeter_perf/plugins/jmx_collector.rb +74 -0
  198. data/lib/jmeter_perf/plugins/json_path_assertion.rb +23 -0
  199. data/lib/jmeter_perf/plugins/json_path_extractor.rb +22 -0
  200. data/lib/jmeter_perf/plugins/latencies_over_time.rb +53 -0
  201. data/lib/jmeter_perf/plugins/loadosophia_uploader.rb +66 -0
  202. data/lib/jmeter_perf/plugins/perfmon_collector.rb +87 -0
  203. data/lib/jmeter_perf/plugins/redis_data_set.rb +43 -0
  204. data/lib/jmeter_perf/plugins/response_codes_per_second.rb +53 -0
  205. data/lib/jmeter_perf/plugins/response_times_distribution.rb +53 -0
  206. data/lib/jmeter_perf/plugins/response_times_over_time.rb +53 -0
  207. data/lib/jmeter_perf/plugins/response_times_percentiles.rb +54 -0
  208. data/lib/jmeter_perf/plugins/stepping_thread_group.rb +34 -0
  209. data/lib/jmeter_perf/plugins/transactions_per_second.rb +53 -0
  210. data/lib/jmeter_perf/plugins/ultimate_thread_group.rb +28 -0
  211. data/lib/jmeter_perf/plugins/variable_throughput_timer.rb +35 -0
  212. data/lib/jmeter_perf/report/comparator.rb +258 -0
  213. data/lib/jmeter_perf/report/summary.rb +268 -0
  214. data/lib/jmeter_perf/tasks/dsl.rake +19 -0
  215. data/lib/jmeter_perf/version.rb +5 -0
  216. data/lib/jmeter_perf/views/report_template.html.erb +114 -0
  217. data/lib/jmeter_perf.rb +183 -0
  218. data/lib/specifications/idl.xml +1494 -0
  219. data/sig/jmeter_perf.rbs +195 -0
  220. data/sorbet/config +5 -0
  221. data/sorbet/rbi/annotations/.gitattributes +1 -0
  222. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  223. data/sorbet/rbi/gems/.gitattributes +1 -0
  224. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  225. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  226. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3607 -0
  227. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  228. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  229. data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
  230. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  231. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  232. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  233. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  234. data/sorbet/rbi/gems/method_source@1.1.0.rbi +304 -0
  235. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  236. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  237. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  238. data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
  239. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  240. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1151 -0
  241. data/sorbet/rbi/gems/pry@0.14.2.rbi +10076 -0
  242. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  243. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  244. data/sorbet/rbi/gems/rake@13.2.1.rbi +3074 -0
  245. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  246. data/sorbet/rbi/gems/rbtree3@0.7.1.rbi +9 -0
  247. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  248. data/sorbet/rbi/gems/rexml@3.3.8.rbi +4858 -0
  249. data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11132 -0
  250. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  251. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  252. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  253. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  254. data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7054 -0
  255. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  256. data/sorbet/rbi/gems/rubocop@1.65.1.rbi +58182 -0
  257. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  258. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +225 -0
  259. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  260. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  261. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  262. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
  263. data/sorbet/rbi/gems/standard-performance@1.4.0.rbi +9 -0
  264. data/sorbet/rbi/gems/standard@1.40.0.rbi +926 -0
  265. data/sorbet/rbi/gems/tapioca@0.16.3.rbi +3596 -0
  266. data/sorbet/rbi/gems/tdigest@0.2.1.rbi +170 -0
  267. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  268. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
  269. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  270. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  271. data/sorbet/rbi/todo.rbi +31 -0
  272. data/sorbet/tapioca/config.yml +13 -0
  273. data/sorbet/tapioca/require.rb +15 -0
  274. data/tasks/dsl.rake +22 -0
  275. metadata +355 -0
@@ -0,0 +1,377 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `docile` gem.
5
+ # Please instead update this file by running `bin/tapioca gem docile`.
6
+
7
+
8
+ # Docile keeps your Ruby DSLs tame and well-behaved.
9
+ #
10
+ # source://docile//lib/docile/version.rb#3
11
+ module Docile
12
+ extend ::Docile::Execution
13
+
14
+ private
15
+
16
+ # Execute a block in the context of an object whose methods represent the
17
+ # commands in a DSL.
18
+ #
19
+ # Use this method to execute an *imperative* DSL, which means that:
20
+ #
21
+ # 1. Each command mutates the state of the DSL context object
22
+ # 2. The return value of each command is ignored
23
+ # 3. The final return value is the original context object
24
+ #
25
+ # @example Use a String as a DSL
26
+ # Docile.dsl_eval("Hello, world!") do
27
+ # reverse!
28
+ # upcase!
29
+ # end
30
+ # #=> "!DLROW ,OLLEH"
31
+ # @example Use an Array as a DSL
32
+ # Docile.dsl_eval([]) do
33
+ # push 1
34
+ # push 2
35
+ # pop
36
+ # push 3
37
+ # end
38
+ # #=> [1, 3]
39
+ # @note Use with an *imperative* DSL (commands modify the context object)
40
+ # @param dsl [Object] context object whose methods make up the DSL
41
+ # @param args [Array] arguments to be passed to the block
42
+ # @param block [Proc] the block of DSL commands to be executed against the
43
+ # `dsl` context object
44
+ # @return [Object] the `dsl` context object after executing the block
45
+ #
46
+ # source://docile//lib/docile.rb#45
47
+ def dsl_eval(dsl, *args, **_arg2, &block); end
48
+
49
+ # Execute a block in the context of an immutable object whose methods,
50
+ # and the methods of their return values, represent the commands in a DSL.
51
+ #
52
+ # Use this method to execute a *functional* DSL, which means that:
53
+ #
54
+ # 1. The original DSL context object is never mutated
55
+ # 2. Each command returns the next DSL context object
56
+ # 3. The final return value is the value returned by the last command
57
+ #
58
+ # @example Use a frozen String as a DSL
59
+ # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
60
+ # reverse
61
+ # upcase
62
+ # end
63
+ # #=> "!ELBATUMMI M'I"
64
+ # @example Use a Float as a DSL
65
+ # Docile.dsl_eval_immutable(84.5) do
66
+ # fdiv(2)
67
+ # floor
68
+ # end
69
+ # #=> 42
70
+ # @note Use with a *functional* DSL (commands return successor
71
+ # context objects)
72
+ # @param dsl [Object] immutable context object whose methods make up the
73
+ # initial DSL
74
+ # @param args [Array] arguments to be passed to the block
75
+ # @param block [Proc] the block of DSL commands to be executed against the
76
+ # `dsl` context object and successor return values
77
+ # @return [Object] the return value of the final command in the block
78
+ #
79
+ # source://docile//lib/docile.rb#128
80
+ def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
81
+
82
+ # Execute a block in the context of an object whose methods represent the
83
+ # commands in a DSL, and return *the block's return value*.
84
+ #
85
+ # Use this method to execute an *imperative* DSL, which means that:
86
+ #
87
+ # 1. Each command mutates the state of the DSL context object
88
+ # 2. The return value of each command is ignored
89
+ # 3. The final return value is the original context object
90
+ #
91
+ # @example Use a String as a DSL
92
+ # Docile.dsl_eval_with_block_return("Hello, world!") do
93
+ # reverse!
94
+ # upcase!
95
+ # first
96
+ # end
97
+ # #=> "!"
98
+ # @example Use an Array as a DSL
99
+ # Docile.dsl_eval_with_block_return([]) do
100
+ # push "a"
101
+ # push "b"
102
+ # pop
103
+ # push "c"
104
+ # length
105
+ # end
106
+ # #=> 2
107
+ # @note Use with an *imperative* DSL (commands modify the context object)
108
+ # @param dsl [Object] context object whose methods make up the DSL
109
+ # @param args [Array] arguments to be passed to the block
110
+ # @param block [Proc] the block of DSL commands to be executed against the
111
+ # `dsl` context object
112
+ # @return [Object] the return value from executing the block
113
+ #
114
+ # source://docile//lib/docile.rb#87
115
+ def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
116
+
117
+ class << self
118
+ # Execute a block in the context of an object whose methods represent the
119
+ # commands in a DSL.
120
+ #
121
+ # Use this method to execute an *imperative* DSL, which means that:
122
+ #
123
+ # 1. Each command mutates the state of the DSL context object
124
+ # 2. The return value of each command is ignored
125
+ # 3. The final return value is the original context object
126
+ #
127
+ # @example Use a String as a DSL
128
+ # Docile.dsl_eval("Hello, world!") do
129
+ # reverse!
130
+ # upcase!
131
+ # end
132
+ # #=> "!DLROW ,OLLEH"
133
+ # @example Use an Array as a DSL
134
+ # Docile.dsl_eval([]) do
135
+ # push 1
136
+ # push 2
137
+ # pop
138
+ # push 3
139
+ # end
140
+ # #=> [1, 3]
141
+ # @note Use with an *imperative* DSL (commands modify the context object)
142
+ # @param dsl [Object] context object whose methods make up the DSL
143
+ # @param args [Array] arguments to be passed to the block
144
+ # @param block [Proc] the block of DSL commands to be executed against the
145
+ # `dsl` context object
146
+ # @return [Object] the `dsl` context object after executing the block
147
+ #
148
+ # source://docile//lib/docile.rb#45
149
+ def dsl_eval(dsl, *args, **_arg2, &block); end
150
+
151
+ # Execute a block in the context of an immutable object whose methods,
152
+ # and the methods of their return values, represent the commands in a DSL.
153
+ #
154
+ # Use this method to execute a *functional* DSL, which means that:
155
+ #
156
+ # 1. The original DSL context object is never mutated
157
+ # 2. Each command returns the next DSL context object
158
+ # 3. The final return value is the value returned by the last command
159
+ #
160
+ # @example Use a frozen String as a DSL
161
+ # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
162
+ # reverse
163
+ # upcase
164
+ # end
165
+ # #=> "!ELBATUMMI M'I"
166
+ # @example Use a Float as a DSL
167
+ # Docile.dsl_eval_immutable(84.5) do
168
+ # fdiv(2)
169
+ # floor
170
+ # end
171
+ # #=> 42
172
+ # @note Use with a *functional* DSL (commands return successor
173
+ # context objects)
174
+ # @param dsl [Object] immutable context object whose methods make up the
175
+ # initial DSL
176
+ # @param args [Array] arguments to be passed to the block
177
+ # @param block [Proc] the block of DSL commands to be executed against the
178
+ # `dsl` context object and successor return values
179
+ # @return [Object] the return value of the final command in the block
180
+ #
181
+ # source://docile//lib/docile.rb#128
182
+ def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
183
+
184
+ # Execute a block in the context of an object whose methods represent the
185
+ # commands in a DSL, and return *the block's return value*.
186
+ #
187
+ # Use this method to execute an *imperative* DSL, which means that:
188
+ #
189
+ # 1. Each command mutates the state of the DSL context object
190
+ # 2. The return value of each command is ignored
191
+ # 3. The final return value is the original context object
192
+ #
193
+ # @example Use a String as a DSL
194
+ # Docile.dsl_eval_with_block_return("Hello, world!") do
195
+ # reverse!
196
+ # upcase!
197
+ # first
198
+ # end
199
+ # #=> "!"
200
+ # @example Use an Array as a DSL
201
+ # Docile.dsl_eval_with_block_return([]) do
202
+ # push "a"
203
+ # push "b"
204
+ # pop
205
+ # push "c"
206
+ # length
207
+ # end
208
+ # #=> 2
209
+ # @note Use with an *imperative* DSL (commands modify the context object)
210
+ # @param dsl [Object] context object whose methods make up the DSL
211
+ # @param args [Array] arguments to be passed to the block
212
+ # @param block [Proc] the block of DSL commands to be executed against the
213
+ # `dsl` context object
214
+ # @return [Object] the return value from executing the block
215
+ #
216
+ # source://docile//lib/docile.rb#87
217
+ def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
218
+ end
219
+ end
220
+
221
+ # This is used to remove entries pointing to Docile's source files
222
+ # from {Exception#backtrace} and {Exception#backtrace_locations}.
223
+ #
224
+ # If {NoMethodError} is caught then the exception object will be extended
225
+ # by this module to add filter functionalities.
226
+ #
227
+ # @api private
228
+ #
229
+ # source://docile//lib/docile/backtrace_filter.rb#11
230
+ module Docile::BacktraceFilter
231
+ # @api private
232
+ #
233
+ # source://docile//lib/docile/backtrace_filter.rb#14
234
+ def backtrace; end
235
+
236
+ # @api private
237
+ #
238
+ # source://docile//lib/docile/backtrace_filter.rb#19
239
+ def backtrace_locations; end
240
+ end
241
+
242
+ # @api private
243
+ #
244
+ # source://docile//lib/docile/backtrace_filter.rb#12
245
+ Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp)
246
+
247
+ # Operates in the same manner as {FallbackContextProxy}, but replacing
248
+ # the primary `receiver` object with the result of each proxied method.
249
+ #
250
+ # This is useful for implementing DSL evaluation for immutable context
251
+ # objects.
252
+ #
253
+ #
254
+ # @api private
255
+ # @see Docile.dsl_eval_immutable
256
+ #
257
+ # source://docile//lib/docile/chaining_fallback_context_proxy.rb#17
258
+ class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy
259
+ # Proxy methods as in {FallbackContextProxy#method_missing}, replacing
260
+ # `receiver` with the returned value.
261
+ #
262
+ # @api private
263
+ #
264
+ # source://docile//lib/docile/chaining_fallback_context_proxy.rb#20
265
+ def method_missing(method, *args, **_arg2, &block); end
266
+ end
267
+
268
+ # A namespace for functions relating to the execution of a block against a
269
+ # proxy object.
270
+ #
271
+ # @api private
272
+ #
273
+ # source://docile//lib/docile/execution.rb#8
274
+ module Docile::Execution
275
+ private
276
+
277
+ # Execute a block in the context of an object whose methods represent the
278
+ # commands in a DSL, using a specific proxy class.
279
+ #
280
+ # @api private
281
+ # @param dsl [Object] context object whose methods make up the
282
+ # (initial) DSL
283
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
284
+ # @param args [Array] arguments to be passed to the block
285
+ # @param block [Proc] the block of DSL commands to be executed
286
+ # @return [Object] the return value of the block
287
+ #
288
+ # source://docile//lib/docile/execution.rb#19
289
+ def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
290
+
291
+ class << self
292
+ # Execute a block in the context of an object whose methods represent the
293
+ # commands in a DSL, using a specific proxy class.
294
+ #
295
+ # @api private
296
+ # @param dsl [Object] context object whose methods make up the
297
+ # (initial) DSL
298
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
299
+ # @param args [Array] arguments to be passed to the block
300
+ # @param block [Proc] the block of DSL commands to be executed
301
+ # @return [Object] the return value of the block
302
+ #
303
+ # source://docile//lib/docile/execution.rb#19
304
+ def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
305
+ end
306
+ end
307
+
308
+ # A proxy object with a primary receiver as well as a secondary
309
+ # fallback receiver.
310
+ #
311
+ # Will attempt to forward all method calls first to the primary receiver,
312
+ # and then to the fallback receiver if the primary does not handle that
313
+ # method.
314
+ #
315
+ # This is useful for implementing DSL evaluation in the context of an object.
316
+ #
317
+ #
318
+ # @api private
319
+ # @see Docile.dsl_eval
320
+ #
321
+ # source://docile//lib/docile/fallback_context_proxy.rb#20
322
+ class Docile::FallbackContextProxy
323
+ # @api private
324
+ # @param receiver [Object] the primary proxy target to which all methods
325
+ # initially will be forwarded
326
+ # @param fallback [Object] the fallback proxy target to which any methods
327
+ # not handled by `receiver` will be forwarded
328
+ # @return [FallbackContextProxy] a new instance of FallbackContextProxy
329
+ #
330
+ # source://docile//lib/docile/fallback_context_proxy.rb#46
331
+ def initialize(receiver, fallback); end
332
+
333
+ # @api private
334
+ # @return [Array<Symbol>] Instance variable names, excluding
335
+ # {NON_PROXIED_INSTANCE_VARIABLES}
336
+ #
337
+ # source://docile//lib/docile/fallback_context_proxy.rb#85
338
+ def instance_variables; end
339
+
340
+ # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver`
341
+ # and then to `fallback` if not found.
342
+ #
343
+ # @api private
344
+ #
345
+ # source://docile//lib/docile/fallback_context_proxy.rb#91
346
+ def method_missing(method, *args, **_arg2, &block); end
347
+ end
348
+
349
+ # The set of methods which will **not** fallback from the block's context
350
+ # to the dsl object.
351
+ #
352
+ # @api private
353
+ #
354
+ # source://docile//lib/docile/fallback_context_proxy.rb#30
355
+ Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set)
356
+
357
+ # The set of instance variables which are local to this object and hidden.
358
+ # All other instance variables will be copied in and out of this object
359
+ # from the scope in which this proxy was created.
360
+ #
361
+ # @api private
362
+ #
363
+ # source://docile//lib/docile/fallback_context_proxy.rb#35
364
+ Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set)
365
+
366
+ # The set of methods which will **not** be proxied, but instead answered
367
+ # by this object directly.
368
+ #
369
+ # @api private
370
+ #
371
+ # source://docile//lib/docile/fallback_context_proxy.rb#23
372
+ Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set)
373
+
374
+ # The current version of this library
375
+ #
376
+ # source://docile//lib/docile/version.rb#5
377
+ Docile::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,150 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `erubi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem erubi`.
6
+
7
+
8
+ # source://erubi//lib/erubi.rb#3
9
+ module Erubi
10
+ private
11
+
12
+ def h(_arg0); end
13
+
14
+ class << self
15
+ def h(_arg0); end
16
+ end
17
+ end
18
+
19
+ # source://erubi//lib/erubi.rb#51
20
+ class Erubi::Engine
21
+ # Initialize a new Erubi::Engine. Options:
22
+ # +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
23
+ # +:bufvar+ :: The variable name to use for the buffer variable, as a string.
24
+ # +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
25
+ # performance, but can cause issues when the buffer variable is reassigned during
26
+ # template rendering (default +false+).
27
+ # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
28
+ # +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
29
+ # +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
30
+ # +:escape_html+ :: Same as +:escape+, with lower priority.
31
+ # +:filename+ :: The filename for the template.
32
+ # the resulting source code. Note this may cause problems if you are wrapping the resulting
33
+ # source code in other code, because the magic comment only has an effect at the beginning of
34
+ # the file, and having the magic comment later in the file can trigger warnings.
35
+ # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
36
+ # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
37
+ # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
38
+ # in order to improve performance.
39
+ # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
40
+ # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
41
+ # +:outvar+ :: Same as +:bufvar+, with lower priority.
42
+ # +:postamble+ :: The postamble for the template, by default returns the resulting source code.
43
+ # +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
44
+ # +:regexp+ :: The regexp to use for scanning.
45
+ # +:src+ :: The initial value to use for the source code, an empty string by default.
46
+ # +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
47
+ #
48
+ # @return [Engine] a new instance of Engine
49
+ #
50
+ # source://erubi//lib/erubi.rb#91
51
+ def initialize(input, properties = T.unsafe(nil)); end
52
+
53
+ # The variable name used for the buffer variable.
54
+ #
55
+ # source://erubi//lib/erubi.rb#62
56
+ def bufvar; end
57
+
58
+ # The filename of the template, if one was given.
59
+ #
60
+ # source://erubi//lib/erubi.rb#59
61
+ def filename; end
62
+
63
+ # The frozen ruby source code generated from the template, which can be evaled.
64
+ #
65
+ # source://erubi//lib/erubi.rb#56
66
+ def src; end
67
+
68
+ private
69
+
70
+ # Add ruby code to the template
71
+ #
72
+ # source://erubi//lib/erubi.rb#223
73
+ def add_code(code); end
74
+
75
+ # Add the given ruby expression result to the template,
76
+ # escaping it based on the indicator given and escape flag.
77
+ #
78
+ # source://erubi//lib/erubi.rb#232
79
+ def add_expression(indicator, code); end
80
+
81
+ # Add the result of Ruby expression to the template
82
+ #
83
+ # source://erubi//lib/erubi.rb#241
84
+ def add_expression_result(code); end
85
+
86
+ # Add the escaped result of Ruby expression to the template
87
+ #
88
+ # source://erubi//lib/erubi.rb#246
89
+ def add_expression_result_escaped(code); end
90
+
91
+ # Add the given postamble to the src. Can be overridden in subclasses
92
+ # to make additional changes to src that depend on the current state.
93
+ #
94
+ # source://erubi//lib/erubi.rb#252
95
+ def add_postamble(postamble); end
96
+
97
+ # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
98
+ # Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
99
+ #
100
+ # source://erubi//lib/erubi.rb#210
101
+ def add_text(text); end
102
+
103
+ # Raise an exception, as the base engine class does not support handling other indicators.
104
+ #
105
+ # @raise [ArgumentError]
106
+ #
107
+ # source://erubi//lib/erubi.rb#258
108
+ def handle(indicator, code, tailch, rspace, lspace); end
109
+
110
+ # Make sure that any current expression has been terminated.
111
+ # The default is to terminate all expressions, but when
112
+ # the chain_appends option is used, expressions may not be
113
+ # terminated.
114
+ #
115
+ # source://erubi//lib/erubi.rb#286
116
+ def terminate_expression; end
117
+
118
+ # Make sure the buffer variable is the target of the next append
119
+ # before yielding to the block. Mark that the buffer is the target
120
+ # of the next append after the block executes.
121
+ #
122
+ # This method should only be called if the block will result in
123
+ # code where << will append to the bufvar.
124
+ #
125
+ # source://erubi//lib/erubi.rb#268
126
+ def with_buffer; end
127
+ end
128
+
129
+ # The default regular expression used for scanning.
130
+ #
131
+ # source://erubi//lib/erubi.rb#53
132
+ Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
133
+
134
+ # source://erubi//lib/erubi.rb#17
135
+ Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
136
+
137
+ # source://erubi//lib/erubi.rb#15
138
+ Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
139
+
140
+ # source://erubi//lib/erubi.rb#8
141
+ Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
142
+
143
+ # source://erubi//lib/erubi.rb#9
144
+ Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
145
+
146
+ # source://erubi//lib/erubi.rb#16
147
+ Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
148
+
149
+ # source://erubi//lib/erubi.rb#4
150
+ Erubi::VERSION = T.let(T.unsafe(nil), String)