logstash-output-scalyr 0.1.10.beta → 0.1.11.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile +4 -0
  4. data/README.md +2 -2
  5. data/lib/logstash/outputs/scalyr.rb +94 -73
  6. data/lib/scalyr/common/client.rb +3 -1
  7. data/lib/scalyr/constants.rb +2 -0
  8. data/logstash-output-scalyr.gemspec +1 -1
  9. data/spec/logstash/outputs/scalyr_integration_spec.rb +119 -8
  10. data/spec/logstash/outputs/scalyr_spec.rb +9 -6
  11. data/vendor/bundle/jruby/2.5.0/cache/addressable-2.7.0.gem +0 -0
  12. data/vendor/bundle/jruby/2.5.0/cache/crack-0.4.5.gem +0 -0
  13. data/vendor/bundle/jruby/2.5.0/cache/hashdiff-1.0.1.gem +0 -0
  14. data/vendor/bundle/jruby/2.5.0/cache/public_suffix-4.0.6.gem +0 -0
  15. data/vendor/bundle/jruby/2.5.0/cache/rexml-3.2.5.gem +0 -0
  16. data/vendor/bundle/jruby/2.5.0/cache/webmock-3.13.0.gem +0 -0
  17. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/CHANGELOG.md +235 -0
  18. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Gemfile +32 -0
  19. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/LICENSE.txt +202 -0
  20. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/README.md +121 -0
  21. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Rakefile +34 -0
  22. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/data/unicode.data +0 -0
  23. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable.rb +4 -0
  24. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna.rb +27 -0
  25. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/native.rb +61 -0
  26. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/pure.rb +676 -0
  27. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/template.rb +1045 -0
  28. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/uri.rb +2529 -0
  29. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/version.rb +32 -0
  30. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/idna_spec.rb +300 -0
  31. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/net_http_compat_spec.rb +30 -0
  32. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/rack_mount_compat_spec.rb +106 -0
  33. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/security_spec.rb +59 -0
  34. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/template_spec.rb +1451 -0
  35. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/uri_spec.rb +6603 -0
  36. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/spec_helper.rb +24 -0
  37. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/clobber.rake +4 -0
  38. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/gem.rake +93 -0
  39. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/git.rake +47 -0
  40. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/metrics.rake +24 -0
  41. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/rspec.rake +23 -0
  42. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/yard.rake +29 -0
  43. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack.rb +7 -0
  44. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/json.rb +98 -0
  45. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/util.rb +17 -0
  46. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/version.rb +3 -0
  47. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/xml.rb +238 -0
  48. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Gemfile +8 -0
  49. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/LICENSE +19 -0
  50. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/README.md +276 -0
  51. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Rakefile +18 -0
  52. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/changelog.md +100 -0
  53. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/hashdiff.gemspec +39 -0
  54. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff.rb +10 -0
  55. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/compare_hashes.rb +69 -0
  56. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/diff.rb +177 -0
  57. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs.rb +66 -0
  58. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
  59. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/linear_compare_array.rb +159 -0
  60. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/patch.rb +88 -0
  61. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/util.rb +155 -0
  62. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/version.rb +5 -0
  63. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/best_diff_spec.rb +75 -0
  64. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_array_spec.rb +60 -0
  65. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_spec.rb +360 -0
  66. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/lcs_spec.rb +76 -0
  67. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/linear_compare_array_spec.rb +50 -0
  68. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/patch_spec.rb +185 -0
  69. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/readme_spec.rb +15 -0
  70. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/util_spec.rb +116 -0
  71. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/spec_helper.rb +15 -0
  72. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/2.0-Upgrade.md +52 -0
  73. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/CHANGELOG.md +406 -0
  74. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Gemfile +15 -0
  75. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/LICENSE.txt +22 -0
  76. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/README.md +207 -0
  77. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Rakefile +51 -0
  78. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/SECURITY.md +104 -0
  79. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/bin/console +15 -0
  80. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/codecov.yml +12 -0
  81. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/data/list.txt +13380 -0
  82. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix.rb +179 -0
  83. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/domain.rb +235 -0
  84. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/errors.rb +41 -0
  85. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/list.rb +247 -0
  86. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/rule.rb +350 -0
  87. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/version.rb +13 -0
  88. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/public_suffix.gemspec +29 -0
  89. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/acceptance_test.rb +131 -0
  90. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find.rb +66 -0
  91. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find_all.rb +102 -0
  92. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_names.rb +91 -0
  93. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select.rb +26 -0
  94. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select_incremental.rb +25 -0
  95. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_valid.rb +101 -0
  96. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/domain_profiler.rb +12 -0
  97. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler.rb +12 -0
  98. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler_jp.rb +12 -0
  99. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/initialization_profiler.rb +11 -0
  100. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/list_profsize.rb +11 -0
  101. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/object_binsize.rb +57 -0
  102. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/psl_test.rb +52 -0
  103. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/test_helper.rb +18 -0
  104. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/tests.txt +98 -0
  105. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/domain_test.rb +106 -0
  106. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/errors_test.rb +25 -0
  107. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/list_test.rb +241 -0
  108. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/public_suffix_test.rb +188 -0
  109. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/rule_test.rb +222 -0
  110. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
  111. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/NEWS.md +178 -0
  112. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/README.md +48 -0
  113. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/context.rdoc +143 -0
  114. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/child.rdoc +87 -0
  115. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/document.rdoc +276 -0
  116. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/element.rdoc +602 -0
  117. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/node.rdoc +97 -0
  118. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
  119. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
  120. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
  121. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
  122. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
  123. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
  124. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
  125. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
  126. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
  127. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
  128. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
  129. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
  130. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
  131. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
  132. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
  133. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
  134. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
  135. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
  136. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
  137. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
  138. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
  139. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
  140. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
  141. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
  142. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
  143. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
  144. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
  145. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
  146. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
  147. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
  148. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
  149. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
  150. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
  151. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
  152. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
  153. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
  154. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
  155. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
  156. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
  157. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
  158. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
  159. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
  160. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
  161. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
  162. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
  163. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
  164. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
  165. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
  166. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
  167. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
  168. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
  169. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
  170. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
  171. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
  172. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
  173. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
  174. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
  175. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/CHANGELOG.md +1894 -0
  176. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Gemfile +9 -0
  177. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/LICENSE +20 -0
  178. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/README.md +1176 -0
  179. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Rakefile +38 -0
  180. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock.rb +59 -0
  181. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/api.rb +109 -0
  182. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/assertion_failure.rb +11 -0
  183. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/callback_registry.rb +35 -0
  184. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/config.rb +18 -0
  185. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/cucumber.rb +10 -0
  186. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/deprecation.rb +9 -0
  187. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/errors.rb +17 -0
  188. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +216 -0
  189. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/curb_adapter.rb +351 -0
  190. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +231 -0
  191. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/excon_adapter.rb +165 -0
  192. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
  193. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
  194. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
  195. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/request.rb +16 -0
  196. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/response.rb +64 -0
  197. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/streamer.rb +29 -0
  198. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/webmock.rb +68 -0
  199. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb_adapter.rb +37 -0
  200. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb +259 -0
  201. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/manticore_adapter.rb +145 -0
  202. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http.rb +385 -0
  203. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http_response.rb +34 -0
  204. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/patron_adapter.rb +130 -0
  205. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +174 -0
  206. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/any_arg_matcher.rb +13 -0
  207. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_argument_matcher.rb +21 -0
  208. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_excluding_matcher.rb +15 -0
  209. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb +17 -0
  210. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/minitest.rb +41 -0
  211. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rack_response.rb +69 -0
  212. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_body_diff.rb +64 -0
  213. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_execution_verifier.rb +77 -0
  214. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_pattern.rb +405 -0
  215. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_registry.rb +35 -0
  216. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature.rb +54 -0
  217. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature_snippet.rb +61 -0
  218. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_stub.rb +100 -0
  219. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/response.rb +159 -0
  220. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/responses_sequence.rb +40 -0
  221. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec.rb +42 -0
  222. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers.rb +27 -0
  223. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/request_pattern_matcher.rb +78 -0
  224. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/webmock_matcher.rb +67 -0
  225. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_registry.rb +82 -0
  226. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_request_snippet.rb +38 -0
  227. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/test_unit.rb +20 -0
  228. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_counter.rb +39 -0
  229. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_keys_stringifier.rb +25 -0
  230. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_validator.rb +17 -0
  231. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/headers.rb +64 -0
  232. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/json.rb +67 -0
  233. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/query_mapper.rb +281 -0
  234. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/uri.rb +111 -0
  235. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/values_stringifier.rb +20 -0
  236. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/version_checker.rb +111 -0
  237. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/version.rb +3 -0
  238. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/webmock.rb +163 -0
  239. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_helper.rb +34 -0
  240. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_webmock.rb +9 -0
  241. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/webmock_spec.rb +60 -0
  242. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
  243. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +73 -0
  244. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec.rb +499 -0
  245. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec_helper.rb +147 -0
  246. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec.rb +462 -0
  247. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +77 -0
  248. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec.rb +77 -0
  249. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec_helper.rb +52 -0
  250. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec.rb +93 -0
  251. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec_helper.rb +54 -0
  252. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec.rb +217 -0
  253. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec_helper.rb +57 -0
  254. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec.rb +107 -0
  255. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec_helper.rb +35 -0
  256. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_shared.rb +153 -0
  257. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec.rb +369 -0
  258. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec_helper.rb +64 -0
  259. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/real_net_http_spec.rb +20 -0
  260. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec.rb +125 -0
  261. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec_helper.rb +54 -0
  262. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +313 -0
  263. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/callbacks.rb +148 -0
  264. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/complex_cross_concern_behaviors.rb +36 -0
  265. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/enabling_and_disabling_webmock.rb +95 -0
  266. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb +15 -0
  267. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/request_expectations.rb +930 -0
  268. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/returning_declared_responses.rb +409 -0
  269. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/stubbing_requests.rb +678 -0
  270. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +135 -0
  271. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +60 -0
  272. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/webmock_shared.rb +41 -0
  273. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/fixtures/test.txt +1 -0
  274. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/quality_spec.rb +84 -0
  275. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/spec_helper.rb +48 -0
  276. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/example_curl_output.txt +22 -0
  277. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/failures.rb +9 -0
  278. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/my_rack_app.rb +53 -0
  279. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/network_connection.rb +19 -0
  280. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/webmock_server.rb +70 -0
  281. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/api_spec.rb +175 -0
  282. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/errors_spec.rb +129 -0
  283. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +17 -0
  284. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
  285. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_excluding_matcher_spec.rb +61 -0
  286. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_including_matcher_spec.rb +87 -0
  287. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/rack_response_spec.rb +112 -0
  288. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_body_diff_spec.rb +90 -0
  289. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_execution_verifier_spec.rb +208 -0
  290. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_pattern_spec.rb +736 -0
  291. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_registry_spec.rb +95 -0
  292. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_snippet_spec.rb +89 -0
  293. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_spec.rb +155 -0
  294. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_stub_spec.rb +199 -0
  295. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/response_spec.rb +286 -0
  296. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_registry_spec.rb +103 -0
  297. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_request_snippet_spec.rb +115 -0
  298. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_counter_spec.rb +39 -0
  299. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb +27 -0
  300. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/headers_spec.rb +28 -0
  301. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/json_spec.rb +33 -0
  302. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/query_mapper_spec.rb +157 -0
  303. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/uri_spec.rb +371 -0
  304. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/version_checker_spec.rb +65 -0
  305. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/webmock_spec.rb +60 -0
  306. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/http_request.rb +24 -0
  307. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/shared_test.rb +108 -0
  308. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_helper.rb +23 -0
  309. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_webmock.rb +12 -0
  310. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/webmock.gemspec +54 -0
  311. data/vendor/bundle/jruby/2.5.0/specifications/addressable-2.7.0.gemspec +39 -0
  312. data/vendor/bundle/jruby/2.5.0/specifications/crack-0.4.5.gemspec +32 -0
  313. data/vendor/bundle/jruby/2.5.0/specifications/hashdiff-1.0.1.gemspec +46 -0
  314. data/vendor/bundle/jruby/2.5.0/specifications/public_suffix-4.0.6.gemspec +24 -0
  315. data/vendor/bundle/jruby/2.5.0/specifications/rexml-3.2.5.gemspec +42 -0
  316. data/vendor/bundle/jruby/2.5.0/specifications/webmock-3.13.0.gemspec +85 -0
  317. metadata +309 -2
@@ -0,0 +1,97 @@
1
+ == Module Node
2
+
3
+ :include: ../tocs/node_toc.rdoc
4
+
5
+ === Siblings
6
+
7
+ ==== Task: Find Previous Sibling
8
+
9
+ Use method
10
+ {Node.previous_sibling_node}[../../../../REXML/Node.html#method-i-previous_sibling]
11
+ to retrieve the previous sibling:
12
+
13
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
14
+ b = d.root[1] # => <b/>
15
+ b.previous_sibling_node # => <a/>
16
+
17
+ ==== Task: Find Next Sibling
18
+
19
+ Use method
20
+ {Node.next_sibling_node}[../../../../REXML/Node.html#method-i-next_sibling]
21
+ to retrieve the next sibling:
22
+
23
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
24
+ b = d.root[1] # => <b/>
25
+ b.next_sibling_node # => <c/>
26
+
27
+ === Position
28
+
29
+ ==== Task: Find Own Index Among Siblings
30
+
31
+ Use method
32
+ {Node.index_in_parent}[../../../../REXML/Node.html#method-i-index_in_parent]
33
+ to retrieve the 1-based index of this node among its siblings:
34
+
35
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
36
+ b = d.root[1] # => <b/>
37
+ b.index_in_parent # => 2
38
+
39
+ === Recursive Traversal
40
+
41
+ ==== Task: Traverse Each Recursively
42
+
43
+ Use method
44
+ {Node.each_recursive}[../../../../REXML/Node.html#method-i-each_recursive]
45
+ to traverse a tree of nodes recursively:
46
+
47
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
48
+ d = REXML::Document.new(xml_string)
49
+ d.root.each_recursive {|node| p node }
50
+
51
+ Output:
52
+
53
+ <a> ... </>
54
+ <b> ... </>
55
+ <c/>
56
+ <b> ... </>
57
+ <c/>
58
+
59
+ === Recursive Search
60
+
61
+ ==== Task: Traverse Each Recursively
62
+
63
+ Use method
64
+ {Node.find_first_recursive}[../../../../REXML/Node.html#method-i-find_first_recursive]
65
+ to search a tree of nodes recursively:
66
+
67
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
68
+ d = REXML::Document.new(xml_string)
69
+ d.root.find_first_recursive {|node| node.name == 'c' } # => <c/>
70
+
71
+ === Representation
72
+
73
+ ==== Task: Represent a String
74
+
75
+ Use method {Node.to_s}[../../../../REXML/Node.html#method-i-to_s]
76
+ to represent the node as a string:
77
+
78
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
79
+ d = REXML::Document.new(xml_string)
80
+ d.root.to_s # => "<root><a><b><c/></b><b><c/></b></a></root>"
81
+
82
+ === Parent?
83
+
84
+ ==== Task: Determine Whether the Node is a Parent
85
+
86
+ Use method {Node.parent?}[../../../../REXML/Node.html#method-i-parent-3F]
87
+ to determine whether the node is a parent;
88
+ class Text derives from Node:
89
+
90
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
91
+ t = d.root[1] # => "text"
92
+ t.parent? # => false
93
+
94
+ Class Parent also derives from Node, but overrides this method:
95
+
96
+ p = REXML::Parent.new
97
+ p.parent? # => true
@@ -0,0 +1,267 @@
1
+ == Class Parent
2
+
3
+ Class Parent has methods from its superclasses and included modules;
4
+ see:
5
+
6
+ - {Tasks for Child}[child_rdoc.html].
7
+ - {Tasks for Node}[node_rdoc.html].
8
+ - {Module Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html].
9
+
10
+ :include: ../tocs/parent_toc.rdoc
11
+
12
+ === Queries
13
+
14
+ ==== Task: Get the Count of Children
15
+
16
+ Use method {Parent#size}[../../../../REXML/Parent.html#method-i-size]
17
+ (or its alias +length+) to get the count of the parent's children:
18
+
19
+ p = REXML::Parent.new
20
+ p.size # => 0
21
+ xml_string = '<root><a/><b/><c/></root>'
22
+ d = REXML::Document.new(xml_string)
23
+ d.root.size # => 3
24
+
25
+ ==== Task: Get the Child at a Given Index
26
+
27
+ Use method {Parent#[]}[../../../../REXML/Parent.html#method-i-5B-5D]
28
+ to get the child at a given index:
29
+
30
+ xml_string = '<root><a/><b/><c/></root>'
31
+ d = REXML::Document.new(xml_string)
32
+ d.root[1] # => <b/>
33
+ d.root[-1] # => <c/>
34
+ d.root[50] # => nil
35
+
36
+ ==== Task: Get the Index of a Given Child
37
+
38
+ Use method {Parent#index}[../../../../REXML/Parent.html#method-i-index]
39
+ to get the index (0-based offset) of a child:
40
+
41
+ d = REXML::Document.new('<root></root>')
42
+ root = d.root
43
+ e0 = REXML::Element.new('foo')
44
+ e1 = REXML::Element.new('bar')
45
+ root.add(e0) # => <foo/>
46
+ root.add(e1) # => <bar/>
47
+ root.add(e0) # => <foo/>
48
+ root.add(e1) # => <bar/>
49
+ root.index(e0) # => 0
50
+ root.index(e1) # => 1
51
+
52
+ ==== Task: Get the Children
53
+
54
+ Use method {Parent#children}[../../../../REXML/Parent.html#method-i-children]
55
+ (or its alias +to_a+) to get the parent's children:
56
+
57
+ xml_string = '<root><a/><b/><c/></root>'
58
+ d = REXML::Document.new(xml_string)
59
+ d.root.children # => [<a/>, <b/>, <c/>]
60
+
61
+ ==== Task: Determine Whether the Node is a Parent
62
+
63
+ Use method {Parent#parent?}[../../../../REXML/Parent.html#method-i-parent-3F]
64
+ to determine whether the node is a parent;
65
+ class Text derives from Node:
66
+
67
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
68
+ t = d.root[1] # => "text"
69
+ t.parent? # => false
70
+
71
+ Class Parent also derives from Node, but overrides this method:
72
+
73
+ p = REXML::Parent.new
74
+ p.parent? # => true
75
+
76
+ === Additions
77
+
78
+ ==== Task: Add a Child at the Beginning
79
+
80
+ Use method {Parent#unshift}[../../../../REXML/Parent.html#method-i-unshift]
81
+ to add a child as at the beginning of the children:
82
+
83
+ xml_string = '<root><a/><b/><c/></root>'
84
+ d = REXML::Document.new(xml_string)
85
+ d.root.children # => [<a/>, <b/>, <c/>]
86
+ d.root.unshift REXML::Element.new('d')
87
+ d.root.children # => [<d/>, <a/>, <b/>, <c/>]
88
+
89
+ ==== Task: Add a Child at the End
90
+
91
+ Use method {Parent#<<}[../../../../REXML/Parent.html#method-i-3C-3C]
92
+ (or an alias +push+ or +add+) to add a child as at the end of the children:
93
+
94
+ xml_string = '<root><a/><b/><c/></root>'
95
+ d = REXML::Document.new(xml_string)
96
+ d.root.children # => [<a/>, <b/>, <c/>]
97
+ d.root << REXML::Element.new('d')
98
+ d.root.children # => [<a/>, <b/>, <c/>, <d/>]
99
+
100
+ ==== Task: Replace a Child with Another Child
101
+
102
+ Use method {Parent#replace}[../../../../REXML/Parent.html#method-i-replace]
103
+
104
+ xml_string = '<root><a/><b/><c/></root>'
105
+ d = REXML::Document.new(xml_string)
106
+ d.root.children # => [<a/>, <b/>, <c/>]
107
+ b = d.root[1] # => <b/>
108
+ d.replace_child(b, REXML::Element.new('d'))
109
+ d.root.children # => [<a/>, <c/>]
110
+
111
+ ==== Task: Replace Multiple Children with Another Child
112
+
113
+ Use method {Parent#[]=}[../../../../REXML/Parent.html#method-i-parent-5B-5D-3D]
114
+ to replace multiple consecutive children with another child:
115
+
116
+ xml_string = '<root><a/><b/><c/><d/></root>'
117
+ d = REXML::Document.new(xml_string)
118
+ d.root.children # => [<a/>, <b/>, <c/>, <d/>]
119
+ d.root[1, 2] = REXML::Element.new('x')
120
+ d.root.children # => [<a/>, <x/>, <d/>]
121
+ d.root[1, 5] = REXML::Element.new('x')
122
+ d.root.children # => [<a/>, <x/>] # BUG?
123
+
124
+ ==== Task: Insert Child Before a Given Child
125
+
126
+ Use method {Parent#insert_before}[../../../../REXML/Parent.html#method-i-insert_before]
127
+ to insert a child immediately before a given child:
128
+
129
+ xml_string = '<root><a/><b/><c/></root>'
130
+ d = REXML::Document.new(xml_string)
131
+ d.root.children # => [<a/>, <b/>, <c/>]
132
+ b = d.root[1] # => <b/>
133
+ x = REXML::Element.new('x')
134
+ d.root.insert_before(b, x)
135
+ d.root.children # => [<a/>, <x/>, <b/>, <c/>]
136
+
137
+ ==== Task: Insert Child After a Given Child
138
+
139
+ Use method {Parent#insert_after}[../../../../REXML/Parent.html#method-i-insert_after]
140
+ to insert a child immediately after a given child:
141
+
142
+ xml_string = '<root><a/><b/><c/></root>'
143
+ d = REXML::Document.new(xml_string)
144
+ d.root.children # => [<a/>, <b/>, <c/>]
145
+ b = d.root[1] # => <b/>
146
+ x = REXML::Element.new('x')
147
+ d.root.insert_after(b, x)
148
+ d.root.children # => [<a/>, <b/>, <x/>, <c/>]
149
+
150
+ === Deletions
151
+
152
+ ==== Task: Remove a Given Child
153
+
154
+ Use method {Parent#delete}[../../../../REXML/Parent.html#method-i-delete]
155
+ to remove all occurrences of a given child:
156
+
157
+ d = REXML::Document.new('<root></root>')
158
+ a = REXML::Element.new('a')
159
+ b = REXML::Element.new('b')
160
+ d.root.add(a)
161
+ d.root.add(b)
162
+ d.root.add(a)
163
+ d.root.add(b)
164
+ d.root.children # => [<a/>, <b/>, <a/>, <b/>]
165
+ d.root.delete(b)
166
+ d.root.children # => [<a/>, <a/>]
167
+
168
+ ==== Task: Remove the Child at a Specified Offset
169
+
170
+ Use method {Parent#delete_at}[../../../../REXML/Parent.html#method-i-delete_at]
171
+ to remove the child at a specified offset:
172
+
173
+ d = REXML::Document.new('<root></root>')
174
+ a = REXML::Element.new('a')
175
+ b = REXML::Element.new('b')
176
+ d.root.add(a)
177
+ d.root.add(b)
178
+ d.root.add(a)
179
+ d.root.add(b)
180
+ d.root.children # => [<a/>, <b/>, <a/>, <b/>]
181
+ d.root.delete_at(2)
182
+ d.root.children # => [<a/>, <b/>, <b/>]
183
+
184
+ ==== Task: Remove Children That Meet Specified Criteria
185
+
186
+ Use method {Parent#delete_if}[../../../../REXML/Parent.html#method-i-delete_if]
187
+ to remove children that meet criteria specified in the given block:
188
+
189
+ d = REXML::Document.new('<root></root>')
190
+ d.root.add(REXML::Element.new('x'))
191
+ d.root.add(REXML::Element.new('xx'))
192
+ d.root.add(REXML::Element.new('xxx'))
193
+ d.root.add(REXML::Element.new('xxxx'))
194
+ d.root.children # => [<x/>, <xx/>, <xxx/>, <xxxx/>]
195
+ d.root.delete_if {|child| child.name.size.odd? }
196
+ d.root.children # => [<xx/>, <xxxx/>]
197
+
198
+ === Iterations
199
+
200
+ ==== Task: Iterate Over Children
201
+
202
+ Use method {Parent#each_child}[../../../../REXML/Parent.html#method-i-each_child]
203
+ (or its alias +each+) to iterate over all children:
204
+
205
+ xml_string = '<root><a/><b/><c/></root>'
206
+ d = REXML::Document.new(xml_string)
207
+ d.root.children # => [<a/>, <b/>, <c/>]
208
+ d.root.each_child {|child| p child }
209
+
210
+ Output:
211
+
212
+ <a/>
213
+ <b/>
214
+ <c/>
215
+
216
+ ==== Task: Iterate Over Child Indexes
217
+
218
+ Use method {Parent#each_index}[../../../../REXML/Parent.html#method-i-each_index]
219
+ to iterate over all child indexes:
220
+
221
+ xml_string = '<root><a/><b/><c/></root>'
222
+ d = REXML::Document.new(xml_string)
223
+ d.root.children # => [<a/>, <b/>, <c/>]
224
+ d.root.each_index {|child| p child }
225
+
226
+ Output:
227
+
228
+ 0
229
+ 1
230
+ 2
231
+
232
+ === Clones
233
+
234
+ ==== Task: Clone Deeply
235
+
236
+ Use method {Parent#deep_clone}[../../../../REXML/Parent.html#method-i-deep_clone]
237
+ to clone deeply; that is, to clone every nested node that is a Parent object:
238
+
239
+ xml_string = <<-EOT
240
+ <?xml version="1.0" encoding="UTF-8"?>
241
+ <bookstore>
242
+ <book category="cooking">
243
+ <title lang="en">Everyday Italian</title>
244
+ <author>Giada De Laurentiis</author>
245
+ <year>2005</year>
246
+ <price>30.00</price>
247
+ </book>
248
+ <book category="children">
249
+ <title lang="en">Harry Potter</title>
250
+ <author>J K. Rowling</author>
251
+ <year>2005</year>
252
+ <price>29.99</price>
253
+ </book>
254
+ <book category="web">
255
+ <title lang="en">Learning XML</title>
256
+ <author>Erik T. Ray</author>
257
+ <year>2003</year>
258
+ <price>39.95</price>
259
+ </book>
260
+ </bookstore>
261
+ EOT
262
+ d = REXML::Document.new(xml_string)
263
+ root = d.root
264
+ shallow = root.clone
265
+ deep = root.deep_clone
266
+ shallow.to_s.size # => 12
267
+ deep.to_s.size # => 590
@@ -0,0 +1,12 @@
1
+ Tasks on this page:
2
+
3
+ - {Relationships}[#label-Relationships]
4
+ - {Task: Set the Parent}[#label-Task-3A+Set+the+Parent]
5
+ - {Task: Insert Previous Sibling}[#label-Task-3A+Insert+Previous+Sibling]
6
+ - {Task: Insert Next Sibling}[#label-Task-3A+Insert+Next+Sibling]
7
+ - {Removal or Replacement}[#label-Removal+or+Replacement]
8
+ - {Task: Remove Child from Parent}[#label-Task-3A+Remove+Child+from+Parent]
9
+ - {Task: Replace Child}[#label-Task-3A+Replace+Child]
10
+ - {Document}[#label-Document]
11
+ - {Task: Get the Document}[#label-Task-3A+Get+the+Document]
12
+
@@ -0,0 +1,30 @@
1
+ Tasks on this page:
2
+
3
+ - {New Document}[#label-New+Document]
4
+ - {Task: Create an Empty Document}[#label-Task-3A+Create+an+Empty+Document]
5
+ - {Task: Parse a String into a New Document}[#label-Task-3A+Parse+a+String+into+a+New+Document]
6
+ - {Task: Parse an IO Stream into a New Document}[#label-Task-3A+Parse+an+IO+Stream+into+a+New+Document]
7
+ - {Task: Create a Document from an Existing Document}[#label-Task-3A+Create+a+Document+from+an+Existing+Document]
8
+ - {Task: Clone a Document}[#label-Task-3A+Clone+a+Document]
9
+ - {Document Type}[#label-Document+Type]
10
+ - {Task: Get the Document Type}[#label-Task-3A+Get+the+Document+Type]
11
+ - {Task: Set the Document Type}[#label-Task-3A+Set+the+Document+Type]
12
+ - {XML Declaration}[#label-XML+Declaration]
13
+ - {Task: Get the XML Declaration}[#label-Task-3A+Get+the+XML+Declaration]
14
+ - {Task: Set the XML Declaration}[#label-Task-3A+Set+the+XML+Declaration]
15
+ - {Children}[#label-Children]
16
+ - {Task: Add an Element Child}[#label-Task-3A+Add+an+Element+Child]
17
+ - {Task: Add a Non-Element Child}[#label-Task-3A+Add+a+Non-Element+Child]
18
+ - {Writing}[#label-Writing]
19
+ - {Task: Write to $stdout}[#label-Task-3A+Write+to+-24stdout]
20
+ - {Task: Write to IO Stream}[#label-Task-3A+Write+to+IO+Stream]
21
+ - {Task: Write with No Indentation}[#label-Task-3A+Write+with+No+Indentation]
22
+ - {Task: Write with Specified Indentation}[#label-Task-3A+Write+with+Specified+Indentation]
23
+ - {Querying}[#label-Querying]
24
+ - {Task: Get the Document}[#label-Task-3A+Get+the+Document]
25
+ - {Task: Get the Encoding}[#label-Task-3A+Get+the+Encoding]
26
+ - {Task: Get the Node Type}[#label-Task-3A+Get+the+Node+Type]
27
+ - {Task: Get the Root Element}[#label-Task-3A+Get+the+Root+Element]
28
+ - {Task: Determine Whether Stand-Alone}[#label-Task-3A+Determine+Whether+Stand-Alone]
29
+ - {Task: Get the Version}[#label-Task-3A+Get+the+Version]
30
+
@@ -0,0 +1,55 @@
1
+ Tasks on this page:
2
+
3
+ - {New Element}[#label-New+Element]
4
+ - {Task: Create a Default Element}[#label-Task-3A+Create+a+Default+Element]
5
+ - {Task: Create a Named Element}[#label-Task-3A+Create+a+Named+Element]
6
+ - {Task: Create an Element with Name and Parent}[#label-Task-3A+Create+an+Element+with+Name+and+Parent]
7
+ - {Task: Create an Element with Name, Parent, and Context}[#label-Task-3A+Create+an+Element+with+Name-2C+Parent-2C+and+Context]
8
+ - {Task: Create a Shallow Clone}[#label-Task-3A+Create+a+Shallow+Clone]
9
+ - {Attributes}[#label-Attributes]
10
+ - {Task: Create and Add an Attribute}[#label-Task-3A+Create+and+Add+an+Attribute]
11
+ - {Task: Add an Existing Attribute}[#label-Task-3A+Add+an+Existing+Attribute]
12
+ - {Task: Add Multiple Attributes from a Hash}[#label-Task-3A+Add+Multiple+Attributes+from+a+Hash]
13
+ - {Task: Add Multiple Attributes from an Array}[#label-Task-3A+Add+Multiple+Attributes+from+an+Array]
14
+ - {Task: Retrieve the Value for an Attribute Name}[#label-Task-3A+Retrieve+the+Value+for+an+Attribute+Name]
15
+ - {Task: Retrieve the Attribute Value for a Name and Namespace}[#label-Task-3A+Retrieve+the+Attribute+Value+for+a+Name+and+Namespace]
16
+ - {Task: Delete an Attribute}[#label-Task-3A+Delete+an+Attribute]
17
+ - {Task: Determine Whether the Element Has Attributes}[#label-Task-3A+Determine+Whether+the+Element+Has+Attributes]
18
+ - {Children}[#label-Children]
19
+ - {Task: Create and Add an Element}[#label-Task-3A+Create+and+Add+an+Element]
20
+ - {Task: Add an Existing Element}[#label-Task-3A+Add+an+Existing+Element]
21
+ - {Task: Create and Add an Element with Attributes}[#label-Task-3A+Create+and+Add+an+Element+with+Attributes]
22
+ - {Task: Add an Existing Element with Added Attributes}[#label-Task-3A+Add+an+Existing+Element+with+Added+Attributes]
23
+ - {Task: Delete a Specified Element}[#label-Task-3A+Delete+a+Specified+Element]
24
+ - {Task: Delete an Element by Index}[#label-Task-3A+Delete+an+Element+by+Index]
25
+ - {Task: Delete an Element by XPath}[#label-Task-3A+Delete+an+Element+by+XPath]
26
+ - {Task: Determine Whether Element Children}[#label-Task-3A+Determine+Whether+Element+Children]
27
+ - {Task: Get Element Descendants by XPath}[#label-Task-3A+Get+Element+Descendants+by+XPath]
28
+ - {Task: Get Next Element Sibling}[#label-Task-3A+Get+Next+Element+Sibling]
29
+ - {Task: Get Previous Element Sibling}[#label-Task-3A+Get+Previous+Element+Sibling]
30
+ - {Task: Add a Text Node}[#label-Task-3A+Add+a+Text+Node]
31
+ - {Task: Replace the First Text Node}[#label-Task-3A+Replace+the+First+Text+Node]
32
+ - {Task: Remove the First Text Node}[#label-Task-3A+Remove+the+First+Text+Node]
33
+ - {Task: Retrieve the First Text Node}[#label-Task-3A+Retrieve+the+First+Text+Node]
34
+ - {Task: Retrieve a Specific Text Node}[#label-Task-3A+Retrieve+a+Specific+Text+Node]
35
+ - {Task: Determine Whether the Element has Text Nodes}[#label-Task-3A+Determine+Whether+the+Element+has+Text+Nodes]
36
+ - {Task: Get the Child at a Given Index}[#label-Task-3A+Get+the+Child+at+a+Given+Index]
37
+ - {Task: Get All CDATA Children}[#label-Task-3A+Get+All+CDATA+Children]
38
+ - {Task: Get All Comment Children}[#label-Task-3A+Get+All+Comment+Children]
39
+ - {Task: Get All Processing Instruction Children}[#label-Task-3A+Get+All+Processing+Instruction+Children]
40
+ - {Task: Get All Text Children}[#label-Task-3A+Get+All+Text+Children]
41
+ - {Namespaces}[#label-Namespaces]
42
+ - {Task: Add a Namespace}[#label-Task-3A+Add+a+Namespace]
43
+ - {Task: Delete the Default Namespace}[#label-Task-3A+Delete+the+Default+Namespace]
44
+ - {Task: Delete a Specific Namespace}[#label-Task-3A+Delete+a+Specific+Namespace]
45
+ - {Task: Get a Namespace URI}[#label-Task-3A+Get+a+Namespace+URI]
46
+ - {Task: Retrieve Namespaces}[#label-Task-3A+Retrieve+Namespaces]
47
+ - {Task: Retrieve Namespace Prefixes}[#label-Task-3A+Retrieve+Namespace+Prefixes]
48
+ - {Iteration}[#label-Iteration]
49
+ - {Task: Iterate Over Elements}[#label-Task-3A+Iterate+Over+Elements]
50
+ - {Task: Iterate Over Elements Having a Specified Attribute}[#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute]
51
+ - {Task: Iterate Over Elements Having a Specified Attribute and Value}[#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute+and+Value]
52
+ - {Task: Iterate Over Elements Having Specified Text}[#label-Task-3A+Iterate+Over+Elements+Having+Specified+Text]
53
+ - {Context}[#label-Context]
54
+ - {Other Getters}[#label-Other+Getters]
55
+