rails-rfc6570 3.2.0 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -1
  3. data/README.md +3 -1
  4. data/lib/rails/rfc6570/version.rb +1 -1
  5. data/lib/rails/rfc6570.rb +10 -29
  6. data/rails-rfc6570.gemspec +1 -1
  7. data/spec/dummy/config/application.rb +5 -1
  8. data/spec/dummy/config/environments/test.rb +1 -1
  9. data/spec/rails/rfc6570/extensions/route_set_spec.rb +29 -0
  10. data/spec/rails/rfc6570/helper_spec.rb +44 -0
  11. data/spec/rails/rfc6570/visitor_spec.rb +12 -0
  12. data/spec/spec_helper.rb +6 -0
  13. data/vendor/bundle/ruby/{3.3.0/bundler/gems/rubocop-config-943facea9d8f → 3.4.0/bundler/gems/rubocop-config-67802c9d1826}/rubocop-config.gemspec +8 -8
  14. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/CHANGELOG.md +205 -0
  15. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/CHANGELOG.md +67 -0
  16. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/CHANGELOG.md +157 -0
  17. data/vendor/bundle/ruby/{3.3.0/gems/io-console-0.7.2 → 3.4.0/gems/base64-0.2.0}/README.md +17 -15
  18. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/README.md +138 -0
  19. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/benchmark.gemspec +32 -0
  20. data/vendor/bundle/ruby/{3.3.0/gems/concurrent-ruby-1.3.4 → 3.4.0/gems/concurrent-ruby-1.3.5}/CHANGELOG.md +12 -2
  21. data/vendor/bundle/ruby/{3.3.0/gems/concurrent-ruby-1.3.4 → 3.4.0/gems/concurrent-ruby-1.3.5}/README.md +1 -1
  22. data/vendor/bundle/ruby/{3.3.0/gems/connection_pool-2.4.1 → 3.4.0/gems/connection_pool-2.5.0}/README.md +32 -0
  23. data/vendor/bundle/ruby/{3.3.0/gems/erubi-1.13.0 → 3.4.0/gems/erubi-1.13.1}/CHANGELOG +4 -0
  24. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/README.md +104 -0
  25. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/logger.gemspec +28 -0
  26. data/vendor/bundle/ruby/{3.3.0/gems/loofah-2.22.0 → 3.4.0/gems/loofah-2.24.0}/CHANGELOG.md +25 -0
  27. data/vendor/bundle/ruby/{3.3.0/gems/loofah-2.22.0 → 3.4.0/gems/loofah-2.24.0}/README.md +59 -12
  28. data/vendor/bundle/ruby/{3.3.0/gems/nokogiri-1.16.7-x86_64-linux → 3.4.0/gems/nokogiri-1.18.2-x86_64-linux-gnu}/LICENSE-DEPENDENCIES.md +6 -6
  29. data/vendor/bundle/ruby/{3.3.0/gems/nokogiri-1.16.7-x86_64-linux → 3.4.0/gems/nokogiri-1.18.2-x86_64-linux-gnu}/README.md +8 -5
  30. data/vendor/bundle/ruby/{3.3.0/gems/rack-3.1.7 → 3.4.0/gems/rack-3.1.9}/CHANGELOG.md +12 -0
  31. data/vendor/bundle/ruby/{3.3.0/gems/rails-html-sanitizer-1.6.0 → 3.4.0/gems/rails-html-sanitizer-1.6.2}/CHANGELOG.md +54 -0
  32. data/vendor/bundle/ruby/{3.3.0/gems/rails-html-sanitizer-1.6.0 → 3.4.0/gems/rails-html-sanitizer-1.6.2}/README.md +0 -4
  33. data/vendor/bundle/ruby/3.4.0/gems/securerandom-0.4.1/README.md +72 -0
  34. data/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/README.md +55 -0
  35. data/vendor/bundle/ruby/{3.3.0/gems/useragent-0.16.10 → 3.4.0/gems/useragent-0.16.11}/README.md +2 -2
  36. data/vendor/bundle/ruby/{3.3.0/specifications/actionpack-7.2.1.gemspec → 3.4.0/specifications/actionpack-8.0.1.gemspec} +11 -12
  37. data/vendor/bundle/ruby/{3.3.0/specifications/actionview-7.2.1.gemspec → 3.4.0/specifications/actionview-8.0.1.gemspec} +10 -10
  38. data/vendor/bundle/ruby/{3.3.0/specifications/activesupport-7.2.1.gemspec → 3.4.0/specifications/activesupport-8.0.1.gemspec} +9 -7
  39. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/addressable-2.8.7.gemspec +1 -1
  40. data/vendor/bundle/ruby/3.4.0/specifications/base64-0.2.0.gemspec +23 -0
  41. data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.0.gemspec +23 -0
  42. data/vendor/bundle/ruby/{3.3.0/specifications/bigdecimal-3.1.8.gemspec → 3.4.0/specifications/bigdecimal-3.1.9.gemspec} +5 -5
  43. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/builder-3.3.0.gemspec +1 -1
  44. data/vendor/bundle/ruby/{3.3.0/specifications/concurrent-ruby-1.3.4.gemspec → 3.4.0/specifications/concurrent-ruby-1.3.5.gemspec} +4 -4
  45. data/vendor/bundle/ruby/{3.3.0/specifications/connection_pool-2.4.1.gemspec → 3.4.0/specifications/connection_pool-2.5.0.gemspec} +5 -5
  46. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/crass-1.0.6.gemspec +1 -1
  47. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/diff-lcs-1.5.1.gemspec +1 -1
  48. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/drb-2.2.1.gemspec +1 -1
  49. data/vendor/bundle/ruby/{3.3.0/specifications/erubi-1.13.0.gemspec → 3.4.0/specifications/erubi-1.13.1.gemspec} +5 -5
  50. data/vendor/bundle/ruby/{3.3.0/specifications/i18n-1.14.5.gemspec → 3.4.0/specifications/i18n-1.14.7.gemspec} +5 -5
  51. data/vendor/bundle/ruby/3.4.0/specifications/logger-1.6.5.gemspec +22 -0
  52. data/vendor/bundle/ruby/{3.3.0/specifications/loofah-2.22.0.gemspec → 3.4.0/specifications/loofah-2.24.0.gemspec} +6 -6
  53. data/vendor/bundle/ruby/{3.3.0/specifications/minitest-5.25.1.gemspec → 3.4.0/specifications/minitest-5.25.4.gemspec} +5 -5
  54. data/vendor/bundle/ruby/3.4.0/specifications/nokogiri-1.18.2-x86_64-linux-gnu.gemspec +31 -0
  55. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/public_suffix-6.0.1.gemspec +1 -1
  56. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/racc-1.8.1.gemspec +1 -1
  57. data/vendor/bundle/ruby/{3.3.0/specifications/rack-3.1.7.gemspec → 3.4.0/specifications/rack-3.1.9.gemspec} +5 -5
  58. data/vendor/bundle/ruby/{3.3.0/specifications/rack-session-2.0.0.gemspec → 3.4.0/specifications/rack-session-2.1.0.gemspec} +8 -6
  59. data/vendor/bundle/ruby/{3.3.0/specifications/rack-test-2.1.0.gemspec → 3.4.0/specifications/rack-test-2.2.0.gemspec} +5 -5
  60. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/rails-dom-testing-2.2.0.gemspec +1 -1
  61. data/vendor/bundle/ruby/{3.3.0/specifications/rails-html-sanitizer-1.6.0.gemspec → 3.4.0/specifications/rails-html-sanitizer-1.6.2.gemspec} +7 -7
  62. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/rake-13.2.1.gemspec +1 -1
  63. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/rake-release-1.3.0.gemspec +1 -1
  64. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/rspec-3.13.0.gemspec +1 -1
  65. data/vendor/bundle/ruby/{3.3.0/specifications/rspec-core-3.13.0.gemspec → 3.4.0/specifications/rspec-core-3.13.2.gemspec} +7 -7
  66. data/vendor/bundle/ruby/{3.3.0/specifications/rspec-expectations-3.13.2.gemspec → 3.4.0/specifications/rspec-expectations-3.13.3.gemspec} +6 -6
  67. data/vendor/bundle/ruby/{3.3.0/specifications/rspec-mocks-3.13.1.gemspec → 3.4.0/specifications/rspec-mocks-3.13.2.gemspec} +7 -7
  68. data/vendor/bundle/ruby/{3.3.0/specifications/rspec-support-3.13.1.gemspec → 3.4.0/specifications/rspec-support-3.13.2.gemspec} +8 -8
  69. data/vendor/bundle/ruby/3.4.0/specifications/securerandom-0.4.1.gemspec +23 -0
  70. data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/specifications/tzinfo-2.0.6.gemspec +1 -1
  71. data/vendor/bundle/ruby/3.4.0/specifications/uri-1.0.2.gemspec +23 -0
  72. data/vendor/bundle/ruby/{3.3.0/specifications/useragent-0.16.10.gemspec → 3.4.0/specifications/useragent-0.16.11.gemspec} +6 -6
  73. metadata +132 -262
  74. data/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/CHANGELOG.md +0 -154
  75. data/vendor/bundle/ruby/3.3.0/gems/actionview-7.2.1/CHANGELOG.md +0 -113
  76. data/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/CHANGELOG.md +0 -258
  77. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/MIT-LICENSE +0 -21
  78. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/README.md +0 -243
  79. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/appraisal.gemspec +0 -29
  80. data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.2/LICENSE.MIT +0 -20
  81. data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.2/README.YARD.md +0 -12
  82. data/vendor/bundle/ruby/3.3.0/gems/benchmark-ips-2.13.0/LICENSE +0 -20
  83. data/vendor/bundle/ruby/3.3.0/gems/benchmark-ips-2.13.0/README.md +0 -279
  84. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/CHANGELOG.md +0 -934
  85. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/LICENSE +0 -23
  86. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/README.md +0 -199
  87. data/vendor/bundle/ruby/3.3.0/gems/coderay-1.1.3/MIT-LICENSE +0 -22
  88. data/vendor/bundle/ruby/3.3.0/gems/coderay-1.1.3/README_INDEX.rdoc +0 -123
  89. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/LICENSE +0 -21
  90. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/README.md +0 -409
  91. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/docile.gemspec +0 -36
  92. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/LICENSE.txt +0 -22
  93. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/README.md +0 -405
  94. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/irb.gemspec +0 -46
  95. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/LICENSE +0 -56
  96. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/README.md +0 -416
  97. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/json.gemspec +0 -68
  98. data/vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/LICENSE.txt +0 -21
  99. data/vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/README.md +0 -88
  100. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/CHANGELOG.md +0 -15
  101. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/LICENSE +0 -22
  102. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/README.markdown +0 -101
  103. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/method_source.gemspec +0 -19
  104. data/vendor/bundle/ruby/3.3.0/gems/parallel-1.26.3/MIT-LICENSE.txt +0 -20
  105. data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.4.2/LICENSE.txt +0 -25
  106. data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.4.2/parser.gemspec +0 -43
  107. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/CHANGELOG.md +0 -1141
  108. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/LICENSE +0 -25
  109. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/README.md +0 -466
  110. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/slop/LICENSE +0 -20
  111. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/CHANGELOG.md +0 -230
  112. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/LICENSE +0 -20
  113. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/README.md +0 -189
  114. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/CHANGELOG.md +0 -361
  115. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/MIT-LICENSE +0 -20
  116. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/README.rdoc +0 -39
  117. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/app/templates/README.md.tt +0 -24
  118. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +0 -28
  119. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +0 -20
  120. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/README.md.tt +0 -28
  121. data/vendor/bundle/ruby/3.3.0/gems/rainbow-3.1.1/LICENSE +0 -20
  122. data/vendor/bundle/ruby/3.3.0/gems/rainbow-3.1.1/README.markdown +0 -227
  123. data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/LICENSE.rdoc +0 -57
  124. data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/README.rdoc +0 -129
  125. data/vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/LICENSE +0 -22
  126. data/vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/regexp_parser.gemspec +0 -34
  127. data/vendor/bundle/ruby/3.3.0/gems/reline-0.5.9/README.md +0 -94
  128. data/vendor/bundle/ruby/3.3.0/gems/rexml-3.3.6/LICENSE.txt +0 -22
  129. data/vendor/bundle/ruby/3.3.0/gems/rexml-3.3.6/README.md +0 -57
  130. data/vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.1.4/LICENSE.md +0 -25
  131. data/vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.1.4/README.md +0 -381
  132. data/vendor/bundle/ruby/3.3.0/gems/rubocop-1.65.1/LICENSE.txt +0 -20
  133. data/vendor/bundle/ruby/3.3.0/gems/rubocop-1.65.1/README.md +0 -251
  134. data/vendor/bundle/ruby/3.3.0/gems/rubocop-ast-1.32.1/LICENSE.txt +0 -20
  135. data/vendor/bundle/ruby/3.3.0/gems/rubocop-ast-1.32.1/README.md +0 -56
  136. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/CHANGELOG.md +0 -85
  137. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/MIT-LICENSE.md +0 -21
  138. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/README.md +0 -88
  139. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/CHANGELOG.md +0 -116
  140. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/MIT-LICENSE.md +0 -21
  141. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/README.md +0 -88
  142. data/vendor/bundle/ruby/3.3.0/gems/rubocop-performance-1.21.1/LICENSE.txt +0 -20
  143. data/vendor/bundle/ruby/3.3.0/gems/rubocop-performance-1.21.1/README.md +0 -97
  144. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/CHANGELOG.md +0 -1028
  145. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/MIT-LICENSE.md +0 -21
  146. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/README.md +0 -109
  147. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/CHANGELOG.md +0 -84
  148. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/MIT-LICENSE.md +0 -21
  149. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/README.md +0 -90
  150. data/vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/LICENSE.txt +0 -19
  151. data/vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/README.md +0 -131
  152. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/CHANGELOG.md +0 -191
  153. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/LICENSE +0 -20
  154. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/README.md +0 -974
  155. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/LICENSE +0 -202
  156. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/README.md +0 -62
  157. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/simplecov-cobertura.gemspec +0 -29
  158. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/CHANGELOG.md +0 -81
  159. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/LICENSE +0 -20
  160. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/README.md +0 -30
  161. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/simplecov-html.gemspec +0 -23
  162. data/vendor/bundle/ruby/3.3.0/gems/simplecov_json_formatter-0.1.4/CHANGELOG.md +0 -13
  163. data/vendor/bundle/ruby/3.3.0/gems/simplecov_json_formatter-0.1.4/README.md +0 -29
  164. data/vendor/bundle/ruby/3.3.0/gems/strscan-3.1.0/LICENSE.txt +0 -22
  165. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/LICENSE.md +0 -20
  166. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/README.md +0 -45
  167. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/thor.gemspec +0 -33
  168. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/CHANGELOG.md +0 -196
  169. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/MIT-LICENSE.txt +0 -22
  170. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/README.md +0 -171
  171. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/LICENSE.txt +0 -22
  172. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/README.md +0 -61
  173. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/webrick.gemspec +0 -70
  174. data/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/MIT-LICENSE +0 -20
  175. data/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/README.md +0 -1494
  176. data/vendor/bundle/ruby/3.3.0/specifications/appraisal-2.5.0.gemspec +0 -31
  177. data/vendor/bundle/ruby/3.3.0/specifications/ast-2.4.2.gemspec +0 -30
  178. data/vendor/bundle/ruby/3.3.0/specifications/benchmark-ips-2.13.0.gemspec +0 -28
  179. data/vendor/bundle/ruby/3.3.0/specifications/byebug-11.1.3.gemspec +0 -31
  180. data/vendor/bundle/ruby/3.3.0/specifications/coderay-1.1.3.gemspec +0 -25
  181. data/vendor/bundle/ruby/3.3.0/specifications/docile-1.4.1.gemspec +0 -22
  182. data/vendor/bundle/ruby/3.3.0/specifications/io-console-0.7.2.gemspec +0 -25
  183. data/vendor/bundle/ruby/3.3.0/specifications/irb-1.14.0.gemspec +0 -30
  184. data/vendor/bundle/ruby/3.3.0/specifications/json-2.7.2.gemspec +0 -0
  185. data/vendor/bundle/ruby/3.3.0/specifications/language_server-protocol-3.17.0.3.gemspec +0 -31
  186. data/vendor/bundle/ruby/3.3.0/specifications/method_source-1.1.0.gemspec +0 -21
  187. data/vendor/bundle/ruby/3.3.0/specifications/nokogiri-1.16.7-x86_64-linux.gemspec +0 -31
  188. data/vendor/bundle/ruby/3.3.0/specifications/parallel-1.26.3.gemspec +0 -21
  189. data/vendor/bundle/ruby/3.3.0/specifications/parser-3.3.4.2.gemspec +0 -37
  190. data/vendor/bundle/ruby/3.3.0/specifications/pry-0.14.2.gemspec +0 -29
  191. data/vendor/bundle/ruby/3.3.0/specifications/pry-byebug-3.10.1.gemspec +0 -28
  192. data/vendor/bundle/ruby/3.3.0/specifications/rackup-2.1.0.gemspec +0 -31
  193. data/vendor/bundle/ruby/3.3.0/specifications/railties-7.2.1.gemspec +0 -37
  194. data/vendor/bundle/ruby/3.3.0/specifications/rainbow-3.1.1.gemspec +0 -25
  195. data/vendor/bundle/ruby/3.3.0/specifications/rdoc-6.7.0.gemspec +0 -31
  196. data/vendor/bundle/ruby/3.3.0/specifications/regexp_parser-2.9.2.gemspec +0 -22
  197. data/vendor/bundle/ruby/3.3.0/specifications/reline-0.5.9.gemspec +0 -26
  198. data/vendor/bundle/ruby/3.3.0/specifications/rexml-3.3.6.gemspec +0 -29
  199. data/vendor/bundle/ruby/3.3.0/specifications/rspec-rails-6.1.4.gemspec +0 -37
  200. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-1.65.1.gemspec +0 -39
  201. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-ast-1.32.1.gemspec +0 -28
  202. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-capybara-2.21.0.gemspec +0 -27
  203. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-factory_bot-2.26.1.gemspec +0 -27
  204. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-performance-1.21.1.gemspec +0 -29
  205. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-rspec-3.0.4.gemspec +0 -28
  206. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-rspec_rails-2.30.0.gemspec +0 -28
  207. data/vendor/bundle/ruby/3.3.0/specifications/ruby-progressbar-1.13.0.gemspec +0 -29
  208. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-0.22.0.gemspec +0 -28
  209. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-cobertura-2.1.0.gemspec +0 -29
  210. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-html-0.12.3.gemspec +0 -21
  211. data/vendor/bundle/ruby/3.3.0/specifications/simplecov_json_formatter-0.1.4.gemspec +0 -21
  212. data/vendor/bundle/ruby/3.3.0/specifications/strscan-3.1.0.gemspec +0 -24
  213. data/vendor/bundle/ruby/3.3.0/specifications/thor-1.3.1.gemspec +0 -28
  214. data/vendor/bundle/ruby/3.3.0/specifications/unicode-display_width-2.5.0.gemspec +0 -29
  215. data/vendor/bundle/ruby/3.3.0/specifications/webrick-1.8.1.gemspec +0 -22
  216. data/vendor/bundle/ruby/3.3.0/specifications/zeitwerk-2.6.17.gemspec +0 -22
  217. /data/vendor/bundle/ruby/{3.3.0/bundler/gems/rubocop-config-943facea9d8f → 3.4.0/bundler/gems/rubocop-config-67802c9d1826}/LICENSE +0 -0
  218. /data/vendor/bundle/ruby/{3.3.0/bundler/gems/rubocop-config-943facea9d8f → 3.4.0/bundler/gems/rubocop-config-67802c9d1826}/README.md +0 -0
  219. /data/vendor/bundle/ruby/{3.3.0/gems/actionpack-7.2.1 → 3.4.0/gems/actionpack-8.0.1}/MIT-LICENSE +0 -0
  220. /data/vendor/bundle/ruby/{3.3.0/gems/actionpack-7.2.1 → 3.4.0/gems/actionpack-8.0.1}/README.rdoc +0 -0
  221. /data/vendor/bundle/ruby/{3.3.0/gems/actionview-7.2.1 → 3.4.0/gems/actionview-8.0.1}/MIT-LICENSE +0 -0
  222. /data/vendor/bundle/ruby/{3.3.0/gems/actionview-7.2.1 → 3.4.0/gems/actionview-8.0.1}/README.rdoc +0 -0
  223. /data/vendor/bundle/ruby/{3.3.0/gems/activesupport-7.2.1 → 3.4.0/gems/activesupport-8.0.1}/MIT-LICENSE +0 -0
  224. /data/vendor/bundle/ruby/{3.3.0/gems/activesupport-7.2.1 → 3.4.0/gems/activesupport-8.0.1}/README.rdoc +0 -0
  225. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/addressable-2.8.7/CHANGELOG.md +0 -0
  226. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/addressable-2.8.7/LICENSE.txt +0 -0
  227. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/addressable-2.8.7/README.md +0 -0
  228. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/addressable-2.8.7/addressable.gemspec +0 -0
  229. /data/vendor/bundle/ruby/{3.3.0/gems/drb-2.2.1 → 3.4.0/gems/base64-0.2.0}/LICENSE.txt +0 -0
  230. /data/vendor/bundle/ruby/{3.3.0/gems/bigdecimal-3.1.8 → 3.4.0/gems/bigdecimal-3.1.9}/LICENSE +0 -0
  231. /data/vendor/bundle/ruby/{3.3.0/gems/bigdecimal-3.1.8 → 3.4.0/gems/bigdecimal-3.1.9}/bigdecimal.gemspec +0 -0
  232. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/builder-3.3.0/MIT-LICENSE +0 -0
  233. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/builder-3.3.0/README.md +0 -0
  234. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/builder-3.3.0/builder.gemspec +0 -0
  235. /data/vendor/bundle/ruby/{3.3.0/gems/concurrent-ruby-1.3.4 → 3.4.0/gems/concurrent-ruby-1.3.5}/LICENSE.txt +0 -0
  236. /data/vendor/bundle/ruby/{3.3.0/gems/connection_pool-2.4.1 → 3.4.0/gems/connection_pool-2.5.0}/LICENSE +0 -0
  237. /data/vendor/bundle/ruby/{3.3.0/gems/connection_pool-2.4.1 → 3.4.0/gems/connection_pool-2.5.0}/connection_pool.gemspec +0 -0
  238. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/crass-1.0.6/LICENSE +0 -0
  239. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/crass-1.0.6/README.md +0 -0
  240. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/crass-1.0.6/crass.gemspec +0 -0
  241. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/diff-lcs-1.5.1/README.rdoc +0 -0
  242. /data/vendor/bundle/ruby/{3.3.0/gems/io-console-0.7.2 → 3.4.0/gems/drb-2.2.1}/LICENSE.txt +0 -0
  243. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/drb-2.2.1/drb.gemspec +0 -0
  244. /data/vendor/bundle/ruby/{3.3.0/gems/erubi-1.13.0 → 3.4.0/gems/erubi-1.13.1}/MIT-LICENSE +0 -0
  245. /data/vendor/bundle/ruby/{3.3.0/gems/erubi-1.13.0 → 3.4.0/gems/erubi-1.13.1}/README.rdoc +0 -0
  246. /data/vendor/bundle/ruby/{3.3.0/gems/i18n-1.14.5 → 3.4.0/gems/i18n-1.14.7}/MIT-LICENSE +0 -0
  247. /data/vendor/bundle/ruby/{3.3.0/gems/i18n-1.14.5 → 3.4.0/gems/i18n-1.14.7}/README.md +0 -0
  248. /data/vendor/bundle/ruby/{3.3.0/gems/loofah-2.22.0 → 3.4.0/gems/loofah-2.24.0}/MIT-LICENSE.txt +0 -0
  249. /data/vendor/bundle/ruby/{3.3.0/gems/minitest-5.25.1 → 3.4.0/gems/minitest-5.25.4}/README.rdoc +0 -0
  250. /data/vendor/bundle/ruby/{3.3.0/gems/nokogiri-1.16.7-x86_64-linux → 3.4.0/gems/nokogiri-1.18.2-x86_64-linux-gnu}/LICENSE.md +0 -0
  251. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/public_suffix-6.0.1/CHANGELOG.md +0 -0
  252. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/public_suffix-6.0.1/LICENSE.txt +0 -0
  253. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/public_suffix-6.0.1/README.md +0 -0
  254. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/racc-1.8.1/README.ja.rdoc +0 -0
  255. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/racc-1.8.1/README.rdoc +0 -0
  256. /data/vendor/bundle/ruby/{3.3.0/gems/rack-3.1.7 → 3.4.0/gems/rack-3.1.9}/MIT-LICENSE +0 -0
  257. /data/vendor/bundle/ruby/{3.3.0/gems/rack-3.1.7 → 3.4.0/gems/rack-3.1.9}/README.md +0 -0
  258. /data/vendor/bundle/ruby/{3.3.0/gems/rack-test-2.1.0 → 3.4.0/gems/rack-test-2.2.0}/MIT-LICENSE.txt +0 -0
  259. /data/vendor/bundle/ruby/{3.3.0/gems/rack-test-2.1.0 → 3.4.0/gems/rack-test-2.2.0}/README.md +0 -0
  260. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rails-dom-testing-2.2.0/MIT-LICENSE +0 -0
  261. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rails-dom-testing-2.2.0/README.md +0 -0
  262. /data/vendor/bundle/ruby/{3.3.0/gems/rails-html-sanitizer-1.6.0 → 3.4.0/gems/rails-html-sanitizer-1.6.2}/MIT-LICENSE +0 -0
  263. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-13.2.1/MIT-LICENSE +0 -0
  264. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-13.2.1/README.rdoc +0 -0
  265. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-13.2.1/rake.gemspec +0 -0
  266. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-release-1.3.0/LICENSE +0 -0
  267. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-release-1.3.0/README.md +0 -0
  268. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rake-release-1.3.0/rake-release.gemspec +0 -0
  269. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rspec-3.13.0/LICENSE.md +0 -0
  270. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/rspec-3.13.0/README.md +0 -0
  271. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-core-3.13.0 → 3.4.0/gems/rspec-core-3.13.2}/LICENSE.md +0 -0
  272. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-core-3.13.0 → 3.4.0/gems/rspec-core-3.13.2}/README.md +0 -0
  273. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-expectations-3.13.2 → 3.4.0/gems/rspec-expectations-3.13.3}/LICENSE.md +0 -0
  274. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-expectations-3.13.2 → 3.4.0/gems/rspec-expectations-3.13.3}/README.md +0 -0
  275. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-mocks-3.13.1 → 3.4.0/gems/rspec-mocks-3.13.2}/LICENSE.md +0 -0
  276. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-mocks-3.13.1 → 3.4.0/gems/rspec-mocks-3.13.2}/README.md +0 -0
  277. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-support-3.13.1 → 3.4.0/gems/rspec-support-3.13.2}/LICENSE.md +0 -0
  278. /data/vendor/bundle/ruby/{3.3.0/gems/rspec-support-3.13.1 → 3.4.0/gems/rspec-support-3.13.2}/README.md +0 -0
  279. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/tzinfo-2.0.6/LICENSE +0 -0
  280. /data/vendor/bundle/ruby/{3.3.0 → 3.4.0}/gems/tzinfo-2.0.6/README.md +0 -0
  281. /data/vendor/bundle/ruby/{3.3.0/gems/useragent-0.16.10 → 3.4.0/gems/useragent-0.16.11}/LICENSE +0 -0
@@ -1,409 +0,0 @@
1
- # Docile
2
-
3
- [![Gem Version](https://img.shields.io/gem/v/docile.svg)](https://rubygems.org/gems/docile)
4
- [![Gem Downloads](https://img.shields.io/gem/dt/docile.svg)](https://rubygems.org/gems/docile)
5
-
6
- [![Join the chat at https://gitter.im/ms-ati/docile](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ms-ati/docile?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
- [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/ms-ati/docile)
8
-
9
- [![Build Status](https://github.com/ms-ati/docile/actions/workflows/main.yml/badge.svg)](https://github.com/ms-ati/docile/actions/workflows/main.yml)
10
- [![Code Coverage](https://img.shields.io/codecov/c/github/ms-ati/docile.svg)](https://codecov.io/github/ms-ati/docile)
11
- [![Maintainability](https://api.codeclimate.com/v1/badges/79ca631bc123f7b83b34/maintainability)](https://codeclimate.com/github/ms-ati/docile/maintainability)
12
-
13
- Ruby makes it possible to create very expressive **Domain Specific
14
- Languages**, or **DSL**'s for short. However, it requires some deep knowledge and
15
- somewhat hairy meta-programming to get the interface just right.
16
-
17
- "Docile" means *Ready to accept control or instruction; submissive* [[1]]
18
-
19
- Instead of each Ruby project reinventing this wheel, let's make our Ruby DSL
20
- coding a bit more docile...
21
-
22
- [1]: http://www.google.com/search?q=docile+definition "Google"
23
-
24
- ## Usage
25
-
26
- ### Basic: Ruby [Array](http://ruby-doc.org/core-3.0.0/Array.html) as DSL
27
-
28
- Let's say that we want to make a DSL for modifying Array objects.
29
- Wouldn't it be great if we could just treat the methods of Array as a DSL?
30
-
31
- ```ruby
32
- with_array([]) do
33
- push 1
34
- push 2
35
- pop
36
- push 3
37
- end
38
- #=> [1, 3]
39
- ```
40
-
41
- No problem, just define the method `with_array` like this:
42
-
43
- ```ruby
44
- def with_array(arr=[], &block)
45
- Docile.dsl_eval(arr, &block)
46
- end
47
- ```
48
-
49
- Easy!
50
-
51
- ### Next step: Allow helper methods to call DSL methods
52
-
53
- What if, in our use of the methods of Array as a DSL, we want to extract
54
- helper methods which in turn call DSL methods?
55
-
56
- ```ruby
57
- def pop_sum_and_push(n)
58
- sum = 0
59
- n.times { sum += pop }
60
- push sum
61
- end
62
-
63
- Docile.dsl_eval([]) do
64
- push 5
65
- push 6
66
- pop_sum_and_push(2)
67
- end
68
- #=> [11]
69
- ```
70
-
71
- Without Docile, you may find this sort of code extraction to be more
72
- challenging.
73
-
74
- ### Wait! Can't I do that with just `instance_eval` or `instance_exec`?
75
-
76
- Good question!
77
-
78
- In short: **No**.
79
-
80
- Not if you want the code in the block to be able to refer to anything
81
- the block would normally have access to from the surrounding context.
82
-
83
- Let's be very specific. Docile internally uses `instance_exec` (see [execution.rb#26](lib/docile/execution.rb#L26)), adding a small layer to support referencing *local variables*, *instance variables*, and *methods* from the _block's context_ **or** the target _object's context_, interchangeably. This is "**the hard part**", where most folks making a DSL in Ruby throw up their hands.
84
-
85
- For example:
86
-
87
- ```ruby
88
- class ContextOfBlock
89
- def example_of_contexts
90
- @block_instance_var = 1
91
- block_local_var = 2
92
-
93
- with_array do
94
- push @block_instance_var
95
- push block_local_var
96
- pop
97
- push block_sees_this_method
98
- end
99
- end
100
-
101
- def block_sees_this_method
102
- 3
103
- end
104
-
105
- def with_array(&block)
106
- {
107
- docile: Docile.dsl_eval([], &block),
108
- instance_eval: ([].instance_eval(&block) rescue $!),
109
- instance_exec: ([].instance_exec(&block) rescue $!)
110
- }
111
- end
112
- end
113
-
114
- ContextOfBlock.new.example_of_contexts
115
- #=> {
116
- :docile=>[1, 3],
117
- :instance_eval=>#<NameError: undefined local variable or method `block_sees_this_method' for [nil]:Array>,
118
- :instance_exec=>#<NameError: undefined local variable or method `block_sees_this_method' for [nil]:Array>
119
- }
120
- ```
121
-
122
- As you can see, it won't be possible to call methods or access instance variables defined in the block's context using just the raw `instance_eval` or `instance_exec` methods. And in fact, Docile goes further, making it easy to maintain this support even in multi-layered DSLs.
123
-
124
- ### Build a Pizza
125
-
126
- Mutating (changing) an Array instance is fine, but what usually makes a good DSL is a [Builder Pattern][2].
127
-
128
- For example, let's say you want a DSL to specify how you want to build a Pizza:
129
-
130
- ```ruby
131
- @sauce_level = :extra
132
-
133
- pizza do
134
- cheese
135
- pepperoni
136
- sauce @sauce_level
137
- end
138
- #=> #<Pizza:0x00001009dc398 @cheese=true, @pepperoni=true, @bacon=false, @sauce=:extra>
139
- ```
140
-
141
- And let's say we have a PizzaBuilder, which builds a Pizza like this:
142
-
143
- ```ruby
144
- Pizza = Struct.new(:cheese, :pepperoni, :bacon, :sauce)
145
-
146
- class PizzaBuilder
147
- def cheese(v=true); @cheese = v; self; end
148
- def pepperoni(v=true); @pepperoni = v; self; end
149
- def bacon(v=true); @bacon = v; self; end
150
- def sauce(v=nil); @sauce = v; self; end
151
- def build
152
- Pizza.new(!!@cheese, !!@pepperoni, !!@bacon, @sauce)
153
- end
154
- end
155
-
156
- PizzaBuilder.new.cheese.pepperoni.sauce(:extra).build
157
- #=> #<Pizza:0x00001009dc398 @cheese=true, @pepperoni=true, @bacon=false, @sauce=:extra>
158
- ```
159
-
160
- Then implement your DSL like this:
161
-
162
- ```ruby
163
- def pizza(&block)
164
- Docile.dsl_eval(PizzaBuilder.new, &block).build
165
- end
166
- ```
167
-
168
- It's just that easy!
169
-
170
- [2]: http://stackoverflow.com/questions/328496/when-would-you-use-the-builder-pattern "Builder Pattern"
171
-
172
- ### Multi-level and Recursive DSLs
173
-
174
- Docile is a very easy way to write a multi-level DSL in Ruby, even for
175
- a [recursive data structure such as a tree][4]:
176
-
177
- ```ruby
178
- Person = Struct.new(:name, :mother, :father)
179
-
180
- person {
181
- name 'John Smith'
182
- mother {
183
- name 'Mary Smith'
184
- }
185
- father {
186
- name 'Tom Smith'
187
- mother {
188
- name 'Jane Smith'
189
- }
190
- }
191
- }
192
-
193
- #=> #<struct Person name="John Smith",
194
- # mother=#<struct Person name="Mary Smith", mother=nil, father=nil>,
195
- # father=#<struct Person name="Tom Smith",
196
- # mother=#<struct Person name="Jane Smith", mother=nil, father=nil>,
197
- # father=nil>>
198
- ```
199
-
200
- See the full [person tree example][4] for details.
201
-
202
- [4]: https://gist.github.com/ms-ati/2bb17bdf10a430faba98
203
-
204
- ### Block parameters
205
-
206
- Parameters can be passed to the DSL block.
207
-
208
- Supposing you want to make some sort of cheap [Sinatra][3] knockoff:
209
-
210
- ```ruby
211
- @last_request = nil
212
- respond '/path' do |request|
213
- puts "Request received: #{request}"
214
- @last_request = request
215
- end
216
-
217
- def ride bike
218
- # Play with your new bike
219
- end
220
-
221
- respond '/new_bike' do |bike|
222
- ride(bike)
223
- end
224
- ```
225
-
226
- You'd put together a dispatcher something like this:
227
-
228
- ```ruby
229
- require 'singleton'
230
-
231
- class DispatchScope
232
- def a_method_you_can_call_from_inside_the_block
233
- :useful_huh?
234
- end
235
- end
236
-
237
- class MessageDispatch
238
- include Singleton
239
-
240
- def initialize
241
- @responders = {}
242
- end
243
-
244
- def add_responder path, &block
245
- @responders[path] = block
246
- end
247
-
248
- def dispatch path, request
249
- Docile.dsl_eval(DispatchScope.new, request, &@responders[path])
250
- end
251
- end
252
-
253
- def respond path, &handler
254
- MessageDispatch.instance.add_responder path, handler
255
- end
256
-
257
- def send_request path, request
258
- MessageDispatch.instance.dispatch path, request
259
- end
260
- ```
261
-
262
- [3]: http://www.sinatrarb.com "Sinatra"
263
-
264
- ### Functional-Style Immutable DSL Objects
265
-
266
- Sometimes, you want to use an object as a DSL, but it doesn't quite fit the
267
- [imperative](http://en.wikipedia.org/wiki/Imperative_programming) pattern shown
268
- above.
269
-
270
- Instead of methods like
271
- [Array#push](http://www.ruby-doc.org/core-3.0.0/Array.html#method-i-push), which
272
- modifies the object at hand, it has methods like
273
- [String#reverse](http://www.ruby-doc.org/core-3.0.0/String.html#method-i-reverse),
274
- which returns a new object without touching the original. Perhaps it's even
275
- [frozen](http://www.ruby-doc.org/core-3.0.0/Object.html#method-i-freeze) in
276
- order to enforce [immutability](http://en.wikipedia.org/wiki/Immutable_object).
277
-
278
- Wouldn't it be great if we could just treat these methods as a DSL as well?
279
-
280
- ```ruby
281
- s = "I'm immutable!".freeze
282
-
283
- with_immutable_string(s) do
284
- reverse
285
- upcase
286
- end
287
- #=> "!ELBATUMMI M'I"
288
-
289
- s
290
- #=> "I'm immutable!"
291
- ```
292
-
293
- No problem, just define the method `with_immutable_string` like this:
294
-
295
- ```ruby
296
- def with_immutable_string(str="", &block)
297
- Docile.dsl_eval_immutable(str, &block)
298
- end
299
- ```
300
-
301
- All set!
302
-
303
- ### Accessing the block's return value
304
-
305
- Sometimes you might want to access the return value of your provided block,
306
- as opposed to the DSL object itself. In these cases, use
307
- `dsl_eval_with_block_return`. It behaves exactly like `dsl_eval`, but returns
308
- the output from executing the block, rather than the DSL object.
309
-
310
- ```ruby
311
- arr = []
312
- with_array(arr) do
313
- push "a"
314
- push "b"
315
- push "c"
316
- length
317
- end
318
- #=> 3
319
-
320
- arr
321
- #=> ["a", "b", "c"]
322
- ```
323
-
324
- ```ruby
325
- def with_array(arr=[], &block)
326
- Docile.dsl_eval_with_block_return(arr, &block)
327
- end
328
- ```
329
-
330
- ## Features
331
-
332
- 1. Method lookup falls back from the DSL object to the block's context
333
- 2. Local variable lookup falls back from the DSL object to the block's
334
- context
335
- 3. Instance variables are from the block's context only
336
- 4. Nested DSL evaluation, correctly chaining method and variable handling
337
- from the inner to the outer DSL scopes
338
- 5. Alternatives for both imperative and functional styles of DSL objects
339
-
340
- ## Installation
341
-
342
- ``` bash
343
- $ gem install docile
344
- ```
345
-
346
- ## Links
347
- * [Source](https://github.com/ms-ati/docile)
348
- * [Documentation](http://rubydoc.info/gems/docile)
349
- * [Bug Tracker](https://github.com/ms-ati/docile/issues)
350
-
351
- ## Status
352
-
353
- Works on [all currently supported ruby versions](https://github.com/ms-ati/docile/blob/master/.github/workflows/main.yml),
354
- or so [Github Actions](https://github.com/ms-ati/docile/actions)
355
- tells us.
356
-
357
- Used by some pretty cool gems to implement their DSLs, notably including
358
- [SimpleCov](https://github.com/colszowka/simplecov). Keep an eye out for new
359
- gems using Docile at the
360
- [Ruby Toolbox](https://www.ruby-toolbox.com/projects/docile).
361
-
362
- ## Release Policy
363
-
364
- Docile releases follow
365
- [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html).
366
-
367
- ## Note on Patches/Pull Requests
368
-
369
- * Fork the project.
370
- * Setup your development environment with:
371
- `gem install bundler; bundle install`
372
- * Make your feature addition or bug fix.
373
- * Add tests for it. This is important so I don't break it in a future version
374
- unintentionally.
375
- * Commit, do not mess with rakefile, version, or history.
376
- (if you want to have your own version, that is fine but bump version in a
377
- commit by itself I can ignore when I pull)
378
- * Send me a pull request. Bonus points for topic branches.
379
-
380
- ## Releasing
381
-
382
- To make a new release of `Docile` to
383
- [RubyGems](https://rubygems.org/gems/docile), first install the release
384
- dependencies (e.g. `rake`) as follows:
385
-
386
- ```shell
387
- bundle config set --local with 'release'
388
- bundle install
389
- ```
390
-
391
- Then carry out these steps:
392
-
393
- 1. Update `HISTORY.md`:
394
- - Add an entry for the upcoming version _x.y.z_
395
- - Move content from _Unreleased_ to the upcoming version _x.y.z_
396
- - Commit with title `Update HISTORY.md for x.y.z`
397
-
398
- 2. Update `lib/docile/version.rb`
399
- - Replace with upcoming version _x.y.z_
400
- - Commit with title `Bump version to x.y.z`
401
-
402
- 3. `bundle exec rake release`
403
-
404
- ## Copyright & License
405
-
406
- Copyright (c) 2012-2024 Marc Siegel.
407
-
408
- Licensed under the [MIT License](http://choosealicense.com/licenses/mit/),
409
- see [LICENSE](LICENSE) for details.
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/docile/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "docile"
7
- s.version = Docile::VERSION
8
- s.author = "Marc Siegel"
9
- s.email = "marc@usainnov.com"
10
- s.homepage = "https://ms-ati.github.io/docile/"
11
- s.summary = "Docile keeps your Ruby DSLs tame and well-behaved."
12
- s.description = "Docile treats the methods of a given ruby object as a DSL "\
13
- "(domain specific language) within a given block. \n\n"\
14
- "Killer feature: you can also reference methods, instance "\
15
- "variables, and local variables from the original (non-DSL) "\
16
- "context within the block. \n\n"\
17
- "Docile releases follow Semantic Versioning as defined at "\
18
- "semver.org."
19
- s.license = "MIT"
20
-
21
- # Specify oldest supported Ruby version (2.5 to support JRuby 9.2.17.0)
22
- s.required_ruby_version = ">= 2.5.0"
23
-
24
- # Files included in the gem
25
- s.files = `git ls-files -z`.split("\x0").reject do |f|
26
- f.match(%r{^(test|spec|features)/})
27
- end
28
- s.require_paths = ["lib"]
29
-
30
- s.metadata = {
31
- "homepage_uri" => "https://ms-ati.github.io/docile/",
32
- "changelog_uri" => "https://github.com/ms-ati/docile/blob/main/HISTORY.md",
33
- "source_code_uri" => "https://github.com/ms-ati/docile",
34
- "rubygems_mfa_required" => "true",
35
- }
36
- end
@@ -1,22 +0,0 @@
1
- Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
-
3
- Redistribution and use in source and binary forms, with or without
4
- modification, are permitted provided that the following conditions
5
- are met:
6
- 1. Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- 2. Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
- SUCH DAMAGE.