rails-rfc6570 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +2 -1
  4. data/lib/rails/rfc6570/version.rb +1 -1
  5. data/rails-rfc6570.gemspec +2 -2
  6. data/spec/spec_helper.rb +8 -5
  7. data/vendor/bundle/ruby/3.3.0/bundler/gems/rubocop-config-943facea9d8f/LICENSE +21 -0
  8. data/vendor/bundle/ruby/3.3.0/bundler/gems/rubocop-config-943facea9d8f/README.md +23 -0
  9. data/vendor/bundle/ruby/3.3.0/bundler/gems/rubocop-config-943facea9d8f/rubocop-config.gemspec +31 -0
  10. data/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/CHANGELOG.md +154 -0
  11. data/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/MIT-LICENSE +21 -0
  12. data/vendor/bundle/ruby/3.3.0/gems/actionpack-7.2.1/README.rdoc +57 -0
  13. data/vendor/bundle/ruby/3.3.0/gems/actionview-7.2.1/CHANGELOG.md +113 -0
  14. data/vendor/bundle/ruby/3.3.0/gems/actionview-7.2.1/MIT-LICENSE +21 -0
  15. data/vendor/bundle/ruby/3.3.0/gems/actionview-7.2.1/README.rdoc +40 -0
  16. data/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/CHANGELOG.md +258 -0
  17. data/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/MIT-LICENSE +20 -0
  18. data/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1/README.rdoc +40 -0
  19. data/vendor/bundle/ruby/3.3.0/gems/addressable-2.8.7/CHANGELOG.md +301 -0
  20. data/vendor/bundle/ruby/3.3.0/gems/addressable-2.8.7/LICENSE.txt +202 -0
  21. data/vendor/bundle/ruby/3.3.0/gems/addressable-2.8.7/README.md +121 -0
  22. data/vendor/bundle/ruby/3.3.0/gems/addressable-2.8.7/addressable.gemspec +28 -0
  23. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/MIT-LICENSE +21 -0
  24. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/README.md +243 -0
  25. data/vendor/bundle/ruby/3.3.0/gems/appraisal-2.5.0/appraisal.gemspec +29 -0
  26. data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.2/LICENSE.MIT +20 -0
  27. data/vendor/bundle/ruby/3.3.0/gems/ast-2.4.2/README.YARD.md +12 -0
  28. data/vendor/bundle/ruby/3.3.0/gems/benchmark-ips-2.13.0/LICENSE +20 -0
  29. data/vendor/bundle/ruby/3.3.0/gems/benchmark-ips-2.13.0/README.md +279 -0
  30. data/vendor/bundle/ruby/3.3.0/gems/bigdecimal-3.1.8/LICENSE +56 -0
  31. data/vendor/bundle/ruby/3.3.0/gems/bigdecimal-3.1.8/bigdecimal.gemspec +57 -0
  32. data/vendor/bundle/ruby/3.3.0/gems/builder-3.3.0/MIT-LICENSE +20 -0
  33. data/vendor/bundle/ruby/3.3.0/gems/builder-3.3.0/README.md +258 -0
  34. data/vendor/bundle/ruby/3.3.0/gems/builder-3.3.0/builder.gemspec +49 -0
  35. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/CHANGELOG.md +934 -0
  36. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/LICENSE +23 -0
  37. data/vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/README.md +199 -0
  38. data/vendor/bundle/ruby/3.3.0/gems/coderay-1.1.3/MIT-LICENSE +22 -0
  39. data/vendor/bundle/ruby/3.3.0/gems/coderay-1.1.3/README_INDEX.rdoc +123 -0
  40. data/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/CHANGELOG.md +593 -0
  41. data/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/LICENSE.txt +21 -0
  42. data/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/README.md +407 -0
  43. data/vendor/bundle/ruby/3.3.0/gems/connection_pool-2.4.1/LICENSE +20 -0
  44. data/vendor/bundle/ruby/3.3.0/gems/connection_pool-2.4.1/README.md +135 -0
  45. data/vendor/bundle/ruby/3.3.0/gems/connection_pool-2.4.1/connection_pool.gemspec +24 -0
  46. data/vendor/bundle/ruby/3.3.0/gems/crass-1.0.6/LICENSE +18 -0
  47. data/vendor/bundle/ruby/3.3.0/gems/crass-1.0.6/README.md +192 -0
  48. data/vendor/bundle/ruby/3.3.0/gems/crass-1.0.6/crass.gemspec +31 -0
  49. data/vendor/bundle/ruby/3.3.0/gems/diff-lcs-1.5.1/README.rdoc +84 -0
  50. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/LICENSE +21 -0
  51. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/README.md +409 -0
  52. data/vendor/bundle/ruby/3.3.0/gems/docile-1.4.1/docile.gemspec +36 -0
  53. data/vendor/bundle/ruby/3.3.0/gems/drb-2.2.1/LICENSE.txt +22 -0
  54. data/vendor/bundle/ruby/3.3.0/gems/drb-2.2.1/drb.gemspec +41 -0
  55. data/vendor/bundle/ruby/3.3.0/gems/erubi-1.13.0/CHANGELOG +107 -0
  56. data/vendor/bundle/ruby/3.3.0/gems/erubi-1.13.0/MIT-LICENSE +21 -0
  57. data/vendor/bundle/ruby/3.3.0/gems/erubi-1.13.0/README.rdoc +151 -0
  58. data/vendor/bundle/ruby/3.3.0/gems/i18n-1.14.5/MIT-LICENSE +20 -0
  59. data/vendor/bundle/ruby/3.3.0/gems/i18n-1.14.5/README.md +127 -0
  60. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.7.2/LICENSE.txt +22 -0
  61. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.7.2/README.md +46 -0
  62. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/LICENSE.txt +22 -0
  63. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/README.md +405 -0
  64. data/vendor/bundle/ruby/3.3.0/gems/irb-1.14.0/irb.gemspec +46 -0
  65. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/LICENSE +56 -0
  66. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/README.md +416 -0
  67. data/vendor/bundle/ruby/3.3.0/gems/json-2.7.2/json.gemspec +68 -0
  68. data/vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/LICENSE.txt +21 -0
  69. data/vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/README.md +88 -0
  70. data/vendor/bundle/ruby/3.3.0/gems/loofah-2.22.0/CHANGELOG.md +566 -0
  71. data/vendor/bundle/ruby/3.3.0/gems/loofah-2.22.0/MIT-LICENSE.txt +23 -0
  72. data/vendor/bundle/ruby/3.3.0/gems/loofah-2.22.0/README.md +363 -0
  73. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/CHANGELOG.md +15 -0
  74. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/LICENSE +22 -0
  75. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/README.markdown +101 -0
  76. data/vendor/bundle/ruby/3.3.0/gems/method_source-1.1.0/method_source.gemspec +19 -0
  77. data/vendor/bundle/ruby/3.3.0/gems/minitest-5.25.1/README.rdoc +835 -0
  78. data/vendor/bundle/ruby/3.3.0/gems/nokogiri-1.16.7-x86_64-linux/LICENSE-DEPENDENCIES.md +2224 -0
  79. data/vendor/bundle/ruby/3.3.0/gems/nokogiri-1.16.7-x86_64-linux/LICENSE.md +9 -0
  80. data/vendor/bundle/ruby/3.3.0/gems/nokogiri-1.16.7-x86_64-linux/README.md +290 -0
  81. data/vendor/bundle/ruby/3.3.0/gems/parallel-1.26.3/MIT-LICENSE.txt +20 -0
  82. data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.4.2/LICENSE.txt +25 -0
  83. data/vendor/bundle/ruby/3.3.0/gems/parser-3.3.4.2/parser.gemspec +43 -0
  84. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/CHANGELOG.md +1141 -0
  85. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/LICENSE +25 -0
  86. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/README.md +466 -0
  87. data/vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/slop/LICENSE +20 -0
  88. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/CHANGELOG.md +230 -0
  89. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/LICENSE +20 -0
  90. data/vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/README.md +189 -0
  91. data/vendor/bundle/ruby/3.3.0/gems/public_suffix-6.0.1/CHANGELOG.md +491 -0
  92. data/vendor/bundle/ruby/3.3.0/gems/public_suffix-6.0.1/LICENSE.txt +22 -0
  93. data/vendor/bundle/ruby/3.3.0/gems/public_suffix-6.0.1/README.md +222 -0
  94. data/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
  95. data/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/README.rdoc +60 -0
  96. data/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/CHANGELOG.md +994 -0
  97. data/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/MIT-LICENSE +20 -0
  98. data/vendor/bundle/ruby/3.3.0/gems/rack-3.1.7/README.md +328 -0
  99. data/vendor/bundle/ruby/3.3.0/gems/rack-test-2.1.0/MIT-LICENSE.txt +20 -0
  100. data/vendor/bundle/ruby/3.3.0/gems/rack-test-2.1.0/README.md +139 -0
  101. data/vendor/bundle/ruby/3.3.0/gems/rails-dom-testing-2.2.0/MIT-LICENSE +23 -0
  102. data/vendor/bundle/ruby/3.3.0/gems/rails-dom-testing-2.2.0/README.md +91 -0
  103. data/vendor/bundle/ruby/3.3.0/gems/rails-html-sanitizer-1.6.0/CHANGELOG.md +201 -0
  104. data/vendor/bundle/ruby/3.3.0/gems/rails-html-sanitizer-1.6.0/MIT-LICENSE +23 -0
  105. data/vendor/bundle/ruby/3.3.0/gems/rails-html-sanitizer-1.6.0/README.md +271 -0
  106. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/CHANGELOG.md +361 -0
  107. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/MIT-LICENSE +20 -0
  108. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/README.rdoc +39 -0
  109. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/app/templates/README.md.tt +24 -0
  110. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +28 -0
  111. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +20 -0
  112. data/vendor/bundle/ruby/3.3.0/gems/railties-7.2.1/lib/rails/generators/rails/plugin/templates/README.md.tt +28 -0
  113. data/vendor/bundle/ruby/3.3.0/gems/rainbow-3.1.1/LICENSE +20 -0
  114. data/vendor/bundle/ruby/3.3.0/gems/rainbow-3.1.1/README.markdown +227 -0
  115. data/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
  116. data/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/README.rdoc +155 -0
  117. data/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/rake.gemspec +101 -0
  118. data/vendor/bundle/ruby/3.3.0/gems/rake-release-1.3.0/LICENSE +21 -0
  119. data/vendor/bundle/ruby/3.3.0/gems/rake-release-1.3.0/README.md +107 -0
  120. data/vendor/bundle/ruby/3.3.0/gems/rake-release-1.3.0/rake-release.gemspec +23 -0
  121. data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/LICENSE.rdoc +57 -0
  122. data/vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/README.rdoc +129 -0
  123. data/vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/LICENSE +22 -0
  124. data/vendor/bundle/ruby/3.3.0/gems/regexp_parser-2.9.2/regexp_parser.gemspec +34 -0
  125. data/vendor/bundle/ruby/3.3.0/gems/reline-0.5.9/README.md +94 -0
  126. data/vendor/bundle/ruby/3.3.0/gems/rexml-3.3.6/LICENSE.txt +22 -0
  127. data/vendor/bundle/ruby/3.3.0/gems/rexml-3.3.6/README.md +57 -0
  128. data/vendor/bundle/ruby/3.3.0/gems/rspec-3.13.0/LICENSE.md +27 -0
  129. data/vendor/bundle/ruby/3.3.0/gems/rspec-3.13.0/README.md +47 -0
  130. data/vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.0/LICENSE.md +26 -0
  131. data/vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.0/README.md +389 -0
  132. data/vendor/bundle/ruby/3.3.0/gems/rspec-expectations-3.13.2/LICENSE.md +25 -0
  133. data/vendor/bundle/ruby/3.3.0/gems/rspec-expectations-3.13.2/README.md +326 -0
  134. data/vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.1/LICENSE.md +25 -0
  135. data/vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.1/README.md +465 -0
  136. data/vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.1.4/LICENSE.md +25 -0
  137. data/vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.1.4/README.md +381 -0
  138. data/vendor/bundle/ruby/3.3.0/gems/rspec-support-3.13.1/LICENSE.md +23 -0
  139. data/vendor/bundle/ruby/3.3.0/gems/rspec-support-3.13.1/README.md +40 -0
  140. data/vendor/bundle/ruby/3.3.0/gems/rubocop-1.65.1/LICENSE.txt +20 -0
  141. data/vendor/bundle/ruby/3.3.0/gems/rubocop-1.65.1/README.md +251 -0
  142. data/vendor/bundle/ruby/3.3.0/gems/rubocop-ast-1.32.1/LICENSE.txt +20 -0
  143. data/vendor/bundle/ruby/3.3.0/gems/rubocop-ast-1.32.1/README.md +56 -0
  144. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/CHANGELOG.md +85 -0
  145. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/MIT-LICENSE.md +21 -0
  146. data/vendor/bundle/ruby/3.3.0/gems/rubocop-capybara-2.21.0/README.md +88 -0
  147. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/CHANGELOG.md +116 -0
  148. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/MIT-LICENSE.md +21 -0
  149. data/vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/README.md +88 -0
  150. data/vendor/bundle/ruby/3.3.0/gems/rubocop-performance-1.21.1/LICENSE.txt +20 -0
  151. data/vendor/bundle/ruby/3.3.0/gems/rubocop-performance-1.21.1/README.md +97 -0
  152. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/CHANGELOG.md +1028 -0
  153. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/MIT-LICENSE.md +21 -0
  154. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec-3.0.4/README.md +109 -0
  155. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/CHANGELOG.md +84 -0
  156. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/MIT-LICENSE.md +21 -0
  157. data/vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.30.0/README.md +90 -0
  158. data/vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/LICENSE.txt +19 -0
  159. data/vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/README.md +131 -0
  160. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/CHANGELOG.md +191 -0
  161. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/LICENSE +20 -0
  162. data/vendor/bundle/ruby/3.3.0/gems/simplecov-0.22.0/README.md +974 -0
  163. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/LICENSE +202 -0
  164. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/README.md +62 -0
  165. data/vendor/bundle/ruby/3.3.0/gems/simplecov-cobertura-2.1.0/simplecov-cobertura.gemspec +29 -0
  166. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/CHANGELOG.md +81 -0
  167. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/LICENSE +20 -0
  168. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/README.md +30 -0
  169. data/vendor/bundle/ruby/3.3.0/gems/simplecov-html-0.12.3/simplecov-html.gemspec +23 -0
  170. data/vendor/bundle/ruby/3.3.0/gems/simplecov_json_formatter-0.1.4/CHANGELOG.md +13 -0
  171. data/vendor/bundle/ruby/3.3.0/gems/simplecov_json_formatter-0.1.4/README.md +29 -0
  172. data/vendor/bundle/ruby/3.3.0/gems/strscan-3.1.0/LICENSE.txt +22 -0
  173. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/LICENSE.md +20 -0
  174. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/README.md +45 -0
  175. data/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/thor.gemspec +33 -0
  176. data/vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/LICENSE +19 -0
  177. data/vendor/bundle/ruby/3.3.0/gems/tzinfo-2.0.6/README.md +406 -0
  178. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/CHANGELOG.md +196 -0
  179. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/MIT-LICENSE.txt +22 -0
  180. data/vendor/bundle/ruby/3.3.0/gems/unicode-display_width-2.5.0/README.md +171 -0
  181. data/vendor/bundle/ruby/3.3.0/gems/useragent-0.16.10/LICENSE +20 -0
  182. data/vendor/bundle/ruby/3.3.0/gems/useragent-0.16.10/README.md +42 -0
  183. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/LICENSE.txt +22 -0
  184. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/README.md +61 -0
  185. data/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/webrick.gemspec +70 -0
  186. data/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/MIT-LICENSE +20 -0
  187. data/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/README.md +1494 -0
  188. data/vendor/bundle/ruby/3.3.0/specifications/actionpack-7.2.1.gemspec +37 -0
  189. data/vendor/bundle/ruby/3.3.0/specifications/actionview-7.2.1.gemspec +33 -0
  190. data/vendor/bundle/ruby/3.3.0/specifications/activesupport-7.2.1.gemspec +36 -0
  191. data/vendor/bundle/ruby/3.3.0/specifications/addressable-2.8.7.gemspec +30 -0
  192. data/vendor/bundle/ruby/3.3.0/specifications/appraisal-2.5.0.gemspec +31 -0
  193. data/vendor/bundle/ruby/3.3.0/specifications/ast-2.4.2.gemspec +30 -0
  194. data/vendor/bundle/ruby/3.3.0/specifications/benchmark-ips-2.13.0.gemspec +28 -0
  195. data/vendor/bundle/ruby/3.3.0/specifications/bigdecimal-3.1.8.gemspec +25 -0
  196. data/vendor/bundle/ruby/3.3.0/specifications/builder-3.3.0.gemspec +22 -0
  197. data/vendor/bundle/ruby/3.3.0/specifications/byebug-11.1.3.gemspec +31 -0
  198. data/vendor/bundle/ruby/3.3.0/specifications/coderay-1.1.3.gemspec +25 -0
  199. data/vendor/bundle/ruby/3.3.0/specifications/concurrent-ruby-1.3.4.gemspec +24 -0
  200. data/vendor/bundle/ruby/3.3.0/specifications/connection_pool-2.4.1.gemspec +28 -0
  201. data/vendor/bundle/ruby/3.3.0/specifications/crass-1.0.6.gemspec +27 -0
  202. data/vendor/bundle/ruby/3.3.0/specifications/diff-lcs-1.5.1.gemspec +37 -0
  203. data/vendor/bundle/ruby/3.3.0/specifications/docile-1.4.1.gemspec +22 -0
  204. data/vendor/bundle/ruby/3.3.0/specifications/drb-2.2.1.gemspec +22 -0
  205. data/vendor/bundle/ruby/3.3.0/specifications/erubi-1.13.0.gemspec +29 -0
  206. data/vendor/bundle/ruby/3.3.0/specifications/i18n-1.14.5.gemspec +26 -0
  207. data/vendor/bundle/ruby/3.3.0/specifications/io-console-0.7.2.gemspec +25 -0
  208. data/vendor/bundle/ruby/3.3.0/specifications/irb-1.14.0.gemspec +30 -0
  209. data/vendor/bundle/ruby/3.3.0/specifications/json-2.7.2.gemspec +0 -0
  210. data/vendor/bundle/ruby/3.3.0/specifications/language_server-protocol-3.17.0.3.gemspec +31 -0
  211. data/vendor/bundle/ruby/3.3.0/specifications/loofah-2.22.0.gemspec +27 -0
  212. data/vendor/bundle/ruby/3.3.0/specifications/method_source-1.1.0.gemspec +21 -0
  213. data/vendor/bundle/ruby/3.3.0/specifications/minitest-5.25.1.gemspec +31 -0
  214. data/vendor/bundle/ruby/3.3.0/specifications/nokogiri-1.16.7-x86_64-linux.gemspec +31 -0
  215. data/vendor/bundle/ruby/3.3.0/specifications/parallel-1.26.3.gemspec +21 -0
  216. data/vendor/bundle/ruby/3.3.0/specifications/parser-3.3.4.2.gemspec +37 -0
  217. data/vendor/bundle/ruby/3.3.0/specifications/pry-0.14.2.gemspec +29 -0
  218. data/vendor/bundle/ruby/3.3.0/specifications/pry-byebug-3.10.1.gemspec +28 -0
  219. data/vendor/bundle/ruby/3.3.0/specifications/public_suffix-6.0.1.gemspec +24 -0
  220. data/vendor/bundle/ruby/3.3.0/specifications/racc-1.8.1.gemspec +28 -0
  221. data/vendor/bundle/ruby/3.3.0/specifications/rack-3.1.7.gemspec +31 -0
  222. data/vendor/bundle/ruby/3.3.0/specifications/rack-session-2.0.0.gemspec +28 -0
  223. data/vendor/bundle/ruby/3.3.0/specifications/rack-test-2.1.0.gemspec +29 -0
  224. data/vendor/bundle/ruby/3.3.0/specifications/rackup-2.1.0.gemspec +31 -0
  225. data/vendor/bundle/ruby/3.3.0/specifications/rails-dom-testing-2.2.0.gemspec +28 -0
  226. data/vendor/bundle/ruby/3.3.0/specifications/rails-html-sanitizer-1.6.0.gemspec +27 -0
  227. data/vendor/bundle/ruby/3.3.0/specifications/railties-7.2.1.gemspec +37 -0
  228. data/vendor/bundle/ruby/3.3.0/specifications/rainbow-3.1.1.gemspec +25 -0
  229. data/vendor/bundle/ruby/3.3.0/specifications/rake-13.2.1.gemspec +26 -0
  230. data/vendor/bundle/ruby/3.3.0/specifications/rake-release-1.3.0.gemspec +26 -0
  231. data/vendor/bundle/ruby/3.3.0/specifications/rdoc-6.7.0.gemspec +31 -0
  232. data/vendor/bundle/ruby/3.3.0/specifications/regexp_parser-2.9.2.gemspec +22 -0
  233. data/vendor/bundle/ruby/3.3.0/specifications/reline-0.5.9.gemspec +26 -0
  234. data/vendor/bundle/ruby/3.3.0/specifications/rexml-3.3.6.gemspec +29 -0
  235. data/vendor/bundle/ruby/3.3.0/specifications/rspec-3.13.0.gemspec +31 -0
  236. data/vendor/bundle/ruby/3.3.0/specifications/rspec-core-3.13.0.gemspec +39 -0
  237. data/vendor/bundle/ruby/3.3.0/specifications/rspec-expectations-3.13.2.gemspec +33 -0
  238. data/vendor/bundle/ruby/3.3.0/specifications/rspec-mocks-3.13.1.gemspec +33 -0
  239. data/vendor/bundle/ruby/3.3.0/specifications/rspec-rails-6.1.4.gemspec +37 -0
  240. data/vendor/bundle/ruby/3.3.0/specifications/rspec-support-3.13.1.gemspec +29 -0
  241. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-1.65.1.gemspec +39 -0
  242. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-ast-1.32.1.gemspec +28 -0
  243. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-capybara-2.21.0.gemspec +27 -0
  244. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-factory_bot-2.26.1.gemspec +27 -0
  245. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-performance-1.21.1.gemspec +29 -0
  246. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-rspec-3.0.4.gemspec +28 -0
  247. data/vendor/bundle/ruby/3.3.0/specifications/rubocop-rspec_rails-2.30.0.gemspec +28 -0
  248. data/vendor/bundle/ruby/3.3.0/specifications/ruby-progressbar-1.13.0.gemspec +29 -0
  249. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-0.22.0.gemspec +28 -0
  250. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-cobertura-2.1.0.gemspec +29 -0
  251. data/vendor/bundle/ruby/3.3.0/specifications/simplecov-html-0.12.3.gemspec +21 -0
  252. data/vendor/bundle/ruby/3.3.0/specifications/simplecov_json_formatter-0.1.4.gemspec +21 -0
  253. data/vendor/bundle/ruby/3.3.0/specifications/strscan-3.1.0.gemspec +24 -0
  254. data/vendor/bundle/ruby/3.3.0/specifications/thor-1.3.1.gemspec +28 -0
  255. data/vendor/bundle/ruby/3.3.0/specifications/tzinfo-2.0.6.gemspec +30 -0
  256. data/vendor/bundle/ruby/3.3.0/specifications/unicode-display_width-2.5.0.gemspec +29 -0
  257. data/vendor/bundle/ruby/3.3.0/specifications/useragent-0.16.10.gemspec +25 -0
  258. data/vendor/bundle/ruby/3.3.0/specifications/webrick-1.8.1.gemspec +22 -0
  259. data/vendor/bundle/ruby/3.3.0/specifications/zeitwerk-2.6.17.gemspec +22 -0
  260. metadata +258 -6
  261. data/spec/dummy/log/test.log +0 -144
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 Evan Phoenix
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,279 @@
1
+ # benchmark-ips
2
+
3
+ * rdoc :: http://rubydoc.info/gems/benchmark-ips
4
+ * home :: https://github.com/evanphx/benchmark-ips
5
+
6
+ [![Gem Version](https://badge.fury.io/rb/benchmark-ips.svg)](http://badge.fury.io/rb/benchmark-ips)
7
+ [![Build Status](https://secure.travis-ci.org/evanphx/benchmark-ips.svg)](http://travis-ci.org/evanphx/benchmark-ips)
8
+ [![Inline docs](http://inch-ci.org/github/evanphx/benchmark-ips.svg)](http://inch-ci.org/github/evanphx/benchmark-ips)
9
+
10
+ * https://github.com/evanphx/benchmark-ips
11
+
12
+ ## DESCRIPTION:
13
+
14
+ An iterations per second enhancement to Benchmark.
15
+
16
+ ## FEATURES/PROBLEMS:
17
+
18
+ * benchmark/ips - benchmarks a blocks iterations/second. For short snippits
19
+ of code, ips automatically figures out how many times to run the code
20
+ to get interesting data. No more guessing at random iteration counts!
21
+
22
+ ## SYNOPSIS:
23
+
24
+ ```ruby
25
+ require 'benchmark/ips'
26
+
27
+ Benchmark.ips do |x|
28
+ # Configure the number of seconds used during
29
+ # the warmup phase (default 2) and calculation phase (default 5)
30
+ x.config(:time => 5, :warmup => 2)
31
+
32
+ # These parameters can also be configured this way
33
+ x.time = 5
34
+ x.warmup = 2
35
+
36
+ # Typical mode, runs the block as many times as it can
37
+ x.report("addition") { 1 + 2 }
38
+
39
+ # To reduce overhead, the number of iterations is passed in
40
+ # and the block must run the code the specific number of times.
41
+ # Used for when the workload is very small and any overhead
42
+ # introduces incorrectable errors.
43
+ x.report("addition2") do |times|
44
+ i = 0
45
+ while i < times
46
+ 1 + 2
47
+ i += 1
48
+ end
49
+ end
50
+
51
+ # To reduce overhead even more, grafts the code given into
52
+ # the loop that performs the iterations internally to reduce
53
+ # overhead. Typically not needed, use the |times| form instead.
54
+ x.report("addition3", "1 + 2")
55
+
56
+ # Really long labels should be formatted correctly
57
+ x.report("addition-test-long-label") { 1 + 2 }
58
+
59
+ # Compare the iterations per second of the various reports!
60
+ x.compare!
61
+ end
62
+ ```
63
+
64
+ This will generate the following report:
65
+
66
+ ```
67
+ Calculating -------------------------------------
68
+ addition 71.254k i/100ms
69
+ addition2 68.658k i/100ms
70
+ addition3 83.079k i/100ms
71
+ addition-test-long-label
72
+ 70.129k i/100ms
73
+ -------------------------------------------------
74
+ addition 4.955M (± 8.7%) i/s - 24.155M
75
+ addition2 24.011M (± 9.5%) i/s - 114.246M
76
+ addition3 23.958M (±10.1%) i/s - 115.064M
77
+ addition-test-long-label
78
+ 5.014M (± 9.1%) i/s - 24.545M
79
+
80
+ Comparison:
81
+ addition2: 24011974.8 i/s
82
+ addition3: 23958619.8 i/s - 1.00x slower
83
+ addition-test-long-label: 5014756.0 i/s - 4.79x slower
84
+ addition: 4955278.9 i/s - 4.85x slower
85
+ ```
86
+
87
+ Benchmark/ips will report the number of iterations per second for a given block
88
+ of code. When analyzing the results, notice the percent of [standard
89
+ deviation](http://en.wikipedia.org/wiki/Standard\_deviation) which tells us how
90
+ spread out our measurements are from the average. A high standard deviation
91
+ could indicate the results having too much variability.
92
+
93
+ One benefit to using this method is benchmark-ips automatically determines the
94
+ data points for testing our code, so we can focus on the results instead of
95
+ guessing iteration counts as we do with the traditional Benchmark library.
96
+
97
+ ### Custom Suite
98
+
99
+ Pass a custom suite to disable garbage collection during benchmark:
100
+
101
+ ```ruby
102
+ require 'benchmark/ips'
103
+
104
+ # Enable and start GC before each job run. Disable GC afterwards.
105
+ #
106
+ # Inspired by https://www.omniref.com/ruby/2.2.1/symbols/Benchmark/bm?#annotation=4095926&line=182
107
+ class GCSuite
108
+ def warming(*)
109
+ run_gc
110
+ end
111
+
112
+ def running(*)
113
+ run_gc
114
+ end
115
+
116
+ def warmup_stats(*)
117
+ end
118
+
119
+ def add_report(*)
120
+ end
121
+
122
+ private
123
+
124
+ def run_gc
125
+ GC.enable
126
+ GC.start
127
+ GC.disable
128
+ end
129
+ end
130
+
131
+ suite = GCSuite.new
132
+
133
+ Benchmark.ips do |x|
134
+ x.config(:suite => suite)
135
+ x.report("job1") { ... }
136
+ x.report("job2") { ... }
137
+ end
138
+ ```
139
+
140
+ ### Independent benchmarking
141
+
142
+ If you are comparing multiple implementations of a piece of code you may want
143
+ to benchmark them in separate invocations of Ruby so that the measurements
144
+ are independent of each other. You can do this with the `hold!` command.
145
+
146
+ ```ruby
147
+ Benchmark.ips do |x|
148
+
149
+ # Hold results between multiple invocations of Ruby
150
+ x.hold! 'filename'
151
+
152
+ end
153
+ ```
154
+
155
+ This will run only one benchmarks each time you run the command, storing
156
+ results in the specified file. The file is deleted when all results have been
157
+ gathered and the report is shown.
158
+
159
+ Alternatively, if you prefer a different approach, the `save!` command is
160
+ available. Examples for [hold!](examples/hold.rb) and [save!](examples/save.rb) are available in
161
+ the `examples/` directory.
162
+
163
+
164
+ ### Multiple iterations
165
+
166
+ In some cases you may want to run multiple iterations of the warmup and
167
+ calculation stages and take only the last result for comparison. This is useful
168
+ if you are benchmarking with an implementation of Ruby that optimizes using
169
+ tracing or on-stack-replacement, because to those implementations the
170
+ calculation phase may appear as new, unoptimized code.
171
+
172
+ You can do this with the `iterations` option, which by default is `1`. The
173
+ total time spent will then be `iterations * warmup + iterations * time` seconds.
174
+
175
+ ```ruby
176
+ Benchmark.ips do |x|
177
+
178
+ x.config(:iterations => 3)
179
+
180
+ # or
181
+
182
+ x.iterations = 3
183
+
184
+ end
185
+ ```
186
+
187
+ ### Online sharing
188
+
189
+ If you want to quickly share your benchmark result with others, run you benchmark
190
+ with `SHARE=1` argument. For example: `SHARE=1 ruby my_benchmark.rb`.
191
+
192
+ Result will be sent to [benchmark.fyi](https://ips.fastruby.io/) and benchmark-ips
193
+ will display the link to share the benchmark's result.
194
+
195
+ If you want to run your own instance of [benchmark.fyi](https://github.com/evanphx/benchmark.fyi)
196
+ and share it to that instance, you can do this: `SHARE_URL=https://ips.example.com ruby my_benchmark.rb`
197
+
198
+ ### Advanced Statistics
199
+
200
+ By default, the margin of error shown is plus-minus one standard deviation. If
201
+ a more advanced statistical test is wanted, a bootstrap confidence interval
202
+ can be calculated instead. A bootstrap confidence interval has the advantages of
203
+ arguably being more mathematically sound for this application than a standard
204
+ deviation, it additionally produces an error for relative slowdowns, which the
205
+ standard deviation does not, and it is arguably more intuitive and actionable.
206
+
207
+ When a bootstrap confidence interval is used, a median of the interval is used
208
+ rather than the mean of the samples, which is what you get with the default
209
+ standard deviation.
210
+
211
+ The bootstrap confidence interval used is the one described by Tomas Kalibera.
212
+ Note that for this technique to be valid your benchmark should have reached a
213
+ non-periodic steady state with statistically independent samples (it should
214
+ have warmed up) by the time measurements start.
215
+
216
+ Using a bootstrap confidence internal requires that the 'kalibera' gem is
217
+ installed separately. This gem is not a formal dependency, as by default it is
218
+ not needed.
219
+
220
+ ```
221
+ gem install kalibera
222
+ ```
223
+
224
+ ```ruby
225
+ Benchmark.ips do |x|
226
+
227
+ # The default is :stats => :sd, which doesn't have a configurable confidence
228
+ x.config(:stats => :bootstrap, :confidence => 95)
229
+
230
+ # or
231
+
232
+ x.stats = :bootstrap
233
+ x.confidence = 95
234
+
235
+ # confidence is 95% by default, so it can be omitted
236
+
237
+ end
238
+ ```
239
+
240
+ ### Output as JSON
241
+
242
+ You can generate output in JSON. If you want to write JSON to a file, pass filename to `json!` method:
243
+
244
+ ```ruby
245
+ Benchmark.ips do |x|
246
+ x.report("some report") { }
247
+ x.json! 'filename.json'
248
+ end
249
+ ```
250
+
251
+ If you want to write JSON to STDOUT, pass `STDOUT` to `json!` method and set `quiet = true` before `json!`:
252
+
253
+ ```ruby
254
+ Benchmark.ips do |x|
255
+ x.report("some report") { }
256
+ x.quiet = true
257
+ x.json! STDOUT
258
+ end
259
+ ```
260
+
261
+ This is useful when the output from `benchmark-ips` becomes an input of other tools via stdin.
262
+
263
+ ## REQUIREMENTS:
264
+
265
+ * None!
266
+
267
+ ## INSTALL:
268
+
269
+ $ gem install benchmark-ips
270
+
271
+ ## DEVELOPERS:
272
+
273
+ After checking out the source, run:
274
+
275
+ $ rake newb
276
+
277
+ This task will install any missing dependencies, run the tests/specs,
278
+ and generate the RDoc.
279
+
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -0,0 +1,57 @@
1
+ # coding: utf-8
2
+
3
+ name = File.basename(__FILE__, '.*')
4
+ source_version = ["", "ext/#{name}/"].find do |dir|
5
+ begin
6
+ break File.foreach(File.join(__dir__, "#{dir}#{name}.c")) {|line|
7
+ break $1.sub("-", ".") if /^#define\s+#{name.upcase}_VERSION\s+"(.+)"/o =~ line
8
+ }
9
+ rescue Errno::ENOENT
10
+ end
11
+ end or raise "can't find #{name.upcase}_VERSION"
12
+
13
+ Gem::Specification.new do |s|
14
+ s.name = name
15
+ s.version = source_version
16
+ s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
17
+ s.email = ["mrkn@mrkn.jp"]
18
+
19
+ s.summary = "Arbitrary-precision decimal floating-point number library."
20
+ s.description = "This library provides arbitrary-precision decimal floating-point number class."
21
+ s.homepage = "https://github.com/ruby/bigdecimal"
22
+ s.licenses = ["Ruby", "BSD-2-Clause"]
23
+
24
+ s.require_paths = %w[lib]
25
+ s.files = %w[
26
+ LICENSE
27
+ bigdecimal.gemspec
28
+ lib/bigdecimal.rb
29
+ lib/bigdecimal/jacobian.rb
30
+ lib/bigdecimal/ludcmp.rb
31
+ lib/bigdecimal/math.rb
32
+ lib/bigdecimal/newton.rb
33
+ lib/bigdecimal/util.rb
34
+ sample/linear.rb
35
+ sample/nlsolve.rb
36
+ sample/pi.rb
37
+ ]
38
+ if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
39
+ s.platform = 'java'
40
+ else
41
+ s.extensions = %w[ext/bigdecimal/extconf.rb]
42
+ s.files += %w[
43
+ ext/bigdecimal/bigdecimal.c
44
+ ext/bigdecimal/bigdecimal.h
45
+ ext/bigdecimal/bits.h
46
+ ext/bigdecimal/feature.h
47
+ ext/bigdecimal/missing.c
48
+ ext/bigdecimal/missing.h
49
+ ext/bigdecimal/missing/dtoa.c
50
+ ext/bigdecimal/static_assert.h
51
+ ]
52
+ end
53
+
54
+ s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
55
+
56
+ s.metadata["changelog_uri"] = s.homepage + "/blob/master/CHANGES.md"
57
+ end
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2003-2012 Jim Weirich (jim.weirich@gmail.com)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,258 @@
1
+ # Project: Builder
2
+
3
+ ## Goal
4
+
5
+ Provide a simple way to create XML markup and data structures.
6
+
7
+ ## Classes
8
+
9
+ Builder::XmlMarkup:: Generate XML markup notation
10
+ Builder::XmlEvents:: Generate XML events (i.e. SAX-like)
11
+
12
+ **Notes:**
13
+
14
+ * An <tt>Builder::XmlTree</tt> class to generate XML tree
15
+ (i.e. DOM-like) structures is also planned, but not yet implemented.
16
+ Also, the events builder is currently lagging the markup builder in
17
+ features.
18
+
19
+ ## Usage
20
+
21
+ ```ruby
22
+ require 'rubygems'
23
+ require_gem 'builder', '~> 2.0'
24
+
25
+ builder = Builder::XmlMarkup.new
26
+ xml = builder.person { |b| b.name("Jim"); b.phone("555-1234") }
27
+ xml #=> <person><name>Jim</name><phone>555-1234</phone></person>
28
+ ```
29
+
30
+ or
31
+
32
+ ```ruby
33
+ require 'rubygems'
34
+ require_gem 'builder'
35
+
36
+ builder = Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2)
37
+ builder.person { |b| b.name("Jim"); b.phone("555-1234") }
38
+ #
39
+ # Prints:
40
+ # <person>
41
+ # <name>Jim</name>
42
+ # <phone>555-1234</phone>
43
+ # </person>
44
+ ```
45
+
46
+ ## Compatibility
47
+
48
+ ### Version 2.0.0 Compatibility Changes
49
+
50
+ Version 2.0.0 introduces automatically escaped attribute values for
51
+ the first time. Versions prior to 2.0.0 did not insert escape
52
+ characters into attribute values in the XML markup. This allowed
53
+ attribute values to explicitly reference entities, which was
54
+ occasionally used by a small number of developers. Since strings
55
+ could always be explicitly escaped by hand, this was not a major
56
+ restriction in functionality.
57
+
58
+ However, it did surprise most users of builder. Since the body text is
59
+ normally escaped, everybody expected the attribute values to be
60
+ escaped as well. Escaped attribute values were the number one support
61
+ request on the 1.x Builder series.
62
+
63
+ Starting with Builder version 2.0.0, all attribute values expressed as
64
+ strings will be processed and the appropriate characters will be
65
+ escaped (e.g. "&" will be translated to "&amp;amp;"). Attribute values
66
+ that are expressed as Symbol values will not be processed for escaped
67
+ characters and will be unchanged in output. (Yes, this probably counts
68
+ as Symbol abuse, but the convention is convenient and flexible).
69
+
70
+ Example:
71
+
72
+ ```ruby
73
+ xml = Builder::XmlMarkup.new
74
+ xml.sample(:escaped=>"This&That", :unescaped=>:"Here&amp;There")
75
+ xml.target! =>
76
+ <sample escaped="This&amp;That" unescaped="Here&amp;There"/>
77
+ ```
78
+
79
+ ### Version 1.0.0 Compatibility Changes
80
+
81
+ Version 1.0.0 introduces some changes that are not backwards
82
+ compatible with earlier releases of builder. The main areas of
83
+ incompatibility are:
84
+
85
+ * Keyword based arguments to +new+ (rather than positional based). It
86
+ was found that a developer would often like to specify indentation
87
+ without providing an explicit target, or specify a target without
88
+ indentation. Keyword based arguments handle this situation nicely.
89
+
90
+ * Builder must now be an explicit target for markup tags. Instead of
91
+ writing
92
+
93
+ ```ruby
94
+ xml_markup = Builder::XmlMarkup.new
95
+ xml_markup.div { strong("text") }
96
+ ```
97
+
98
+ you need to write
99
+
100
+ ```ruby
101
+ xml_markup = Builder::XmlMarkup.new
102
+ xml_markup.div { xml_markup.strong("text") }
103
+ ```
104
+
105
+ * The builder object is passed as a parameter to all nested markup
106
+ blocks. This allows you to create a short alias for the builder
107
+ object that can be used within the block. For example, the previous
108
+ example can be written as:
109
+
110
+ ```ruby
111
+ xml_markup = Builder::XmlMarkup.new
112
+ xml_markup.div { |xml| xml.strong("text") }
113
+ ```
114
+
115
+ * If you have both a pre-1.0 and a post-1.0 gem of builder installed,
116
+ you can choose which version to use through the RubyGems
117
+ +require_gem+ facility.
118
+
119
+ ```ruby
120
+ require_gem 'builder', "~> 0.0" # Gets the old version
121
+ require_gem 'builder', "~> 1.0" # Gets the new version
122
+ ```
123
+
124
+ ## Features
125
+
126
+ * XML Comments are supported ...
127
+
128
+ ```ruby
129
+ xml_markup.comment! "This is a comment"
130
+ #=> <!-- This is a comment -->
131
+ ```
132
+
133
+ * XML processing instructions are supported ...
134
+
135
+ ```ruby
136
+ xml_markup.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
137
+ #=> <?xml version="1.0" encoding="UTF-8"?>
138
+ ```
139
+
140
+ If the processing instruction is omitted, it defaults to "xml".
141
+ When the processing instruction is "xml", the defaults attributes
142
+ are:
143
+
144
+ <b>version</b>: 1.0
145
+ <b>encoding</b>: "UTF-8"
146
+
147
+ (NOTE: if the encoding is set to "UTF-8" and $KCODE is set to
148
+ "UTF8", then Builder will emit UTF-8 encoded strings rather than
149
+ encoding non-ASCII characters as entities.)
150
+
151
+ * XML entity declarations are now supported to a small degree.
152
+
153
+ ```ruby
154
+ xml_markup.declare! :DOCTYPE, :chapter, :SYSTEM, "../dtds/chapter.dtd"
155
+ #=> <!DOCTYPE chapter SYSTEM "../dtds/chapter.dtd">
156
+ ```
157
+
158
+ The parameters to a declare! method must be either symbols or
159
+ strings. Symbols are inserted without quotes, and strings are
160
+ inserted with double quotes. Attribute-like arguments in hashes are
161
+ not allowed.
162
+
163
+ If you need to have an argument to declare! be inserted without
164
+ quotes, but the argument does not conform to the typical Ruby
165
+ syntax for symbols, then use the :"string" form to specify a symbol.
166
+
167
+ For example:
168
+
169
+ ```ruby
170
+ xml_markup.declare! :ELEMENT, :chapter, :"(title,para+)"
171
+ #=> <!ELEMENT chapter (title,para+)>
172
+ ```
173
+
174
+ Nested entity declarations are allowed. For example:
175
+
176
+ ```ruby
177
+ @xml_markup.declare! :DOCTYPE, :chapter do |x|
178
+ x.declare! :ELEMENT, :chapter, :"(title,para+)"
179
+ x.declare! :ELEMENT, :title, :"(#PCDATA)"
180
+ x.declare! :ELEMENT, :para, :"(#PCDATA)"
181
+ end
182
+
183
+ #=>
184
+
185
+ <!DOCTYPE chapter [
186
+ <!ELEMENT chapter (title,para+)>
187
+ <!ELEMENT title (#PCDATA)>
188
+ <!ELEMENT para (#PCDATA)>
189
+ ]>
190
+ ```
191
+
192
+ * Some support for XML namespaces is now available. If the first
193
+ argument to a tag call is a symbol, it will be joined to the tag to
194
+ produce a namespace:tag combination. It is easier to show this than
195
+ describe it.
196
+
197
+ ```ruby
198
+ xml.SOAP :Envelope do ... end
199
+ ```
200
+
201
+ Just put a space before the colon in a namespace to produce the
202
+ right form for builder (e.g. "<tt>SOAP:Envelope</tt>" =>
203
+ "<tt>xml.SOAP :Envelope</tt>")
204
+
205
+ * String attribute values are <em>now</em> escaped by default by
206
+ Builder (<b>NOTE:</b> this is _new_ behavior as of version 2.0).
207
+
208
+ However, occasionally you need to use entities in attribute values.
209
+ Using a symbol (rather than a string) for an attribute value will
210
+ cause Builder to not run its quoting/escaping algorithm on that
211
+ particular value.
212
+
213
+ (<b>Note:</b> The +escape_attrs+ option for builder is now
214
+ obsolete).
215
+
216
+ Example:
217
+
218
+ ```ruby
219
+ xml = Builder::XmlMarkup.new
220
+ xml.sample(:escaped=>"This&That", :unescaped=>:"Here&amp;There")
221
+ xml.target! =>
222
+ <sample escaped="This&amp;That" unescaped="Here&amp;There"/>
223
+ ```
224
+
225
+ * UTF-8 Support
226
+
227
+ Builder correctly translates UTF-8 characters into valid XML. (New
228
+ in version 2.0.0). Thanks to Sam Ruby for the translation code.
229
+
230
+ You can get UTF-8 encoded output by making sure that the XML
231
+ encoding is set to "UTF-8" and that the $KCODE variable is set to
232
+ "UTF8".
233
+
234
+ ```ruby
235
+ $KCODE = 'UTF8'
236
+ xml = Builder::Markup.new
237
+ xml.instruct!(:xml, :encoding => "UTF-8")
238
+ xml.sample("Iñtërnâtiônàl")
239
+ xml.target! =>
240
+ "<sample>Iñtërnâtiônàl</sample>"
241
+ ```
242
+
243
+ ## Links
244
+
245
+ | Description | Link |
246
+ | :----: | :----: |
247
+ | Documents | http://builder.rubyforge.org/ |
248
+ | Github Clone | git://github.com/rails/builder.git |
249
+ | Issue / Bug Reports | https://github.com/rails/builder/issues?state=open |
250
+
251
+ ## Contact
252
+
253
+ | Description | Value |
254
+ | :----: | :----: |
255
+ | Author | Jim Weirich |
256
+ | Email | jim.weirich@gmail.com |
257
+ | Home Page | http://onestepback.org |
258
+ | License | MIT Licence (http://www.opensource.org/licenses/mit-license.html) |