xaiml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (780) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.reek.yml +95 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +21 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +4 -0
  8. data/CODE_OF_CONDUCT.md +49 -0
  9. data/Gemfile +4 -0
  10. data/README.md +35 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/lib/xaiml/document.rb +87 -0
  15. data/lib/xaiml/element/base.rb +19 -0
  16. data/lib/xaiml/element/category.rb +12 -0
  17. data/lib/xaiml/element/condition.rb +7 -0
  18. data/lib/xaiml/element/conditional_random.rb +7 -0
  19. data/lib/xaiml/element/ext.rb +7 -0
  20. data/lib/xaiml/element/topic.rb +7 -0
  21. data/lib/xaiml/element.rb +28 -0
  22. data/lib/xaiml/exceptions.rb +4 -0
  23. data/lib/xaiml/version.rb +3 -0
  24. data/lib/xaiml.rb +9 -0
  25. data/vendor/bundle/ruby/2.5.0/bin/coderay +27 -0
  26. data/vendor/bundle/ruby/2.5.0/bin/htmldiff +29 -0
  27. data/vendor/bundle/ruby/2.5.0/bin/ldiff +29 -0
  28. data/vendor/bundle/ruby/2.5.0/bin/pry +27 -0
  29. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  30. data/vendor/bundle/ruby/2.5.0/bin/rspec +27 -0
  31. data/vendor/bundle/ruby/2.5.0/cache/coderay-1.1.2.gem +0 -0
  32. data/vendor/bundle/ruby/2.5.0/cache/diff-lcs-1.3.gem +0 -0
  33. data/vendor/bundle/ruby/2.5.0/cache/method_source-0.9.0.gem +0 -0
  34. data/vendor/bundle/ruby/2.5.0/cache/ox-2.10.0.gem +0 -0
  35. data/vendor/bundle/ruby/2.5.0/cache/pry-0.11.3.gem +0 -0
  36. data/vendor/bundle/ruby/2.5.0/cache/rake-10.5.0.gem +0 -0
  37. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.8.0.gem +0 -0
  38. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.8.0.gem +0 -0
  39. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.8.1.gem +0 -0
  40. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.8.0.gem +0 -0
  41. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.8.0.gem +0 -0
  42. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/gem.build_complete +0 -0
  43. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/gem_make.out +93 -0
  44. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/ox.bundle +0 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/MIT-LICENSE +22 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/README_INDEX.rdoc +123 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/bin/coderay +215 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/duo.rb +81 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +17 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +25 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +39 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +49 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +63 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +23 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +190 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +58 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +65 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +108 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +166 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +333 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +83 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +45 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +59 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +18 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +24 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +23 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +95 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +195 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +46 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +111 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +72 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +50 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders.rb +18 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +95 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +151 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +55 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +221 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +72 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +24 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +189 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +217 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +217 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +196 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +75 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +144 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +221 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +81 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +208 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +268 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +168 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +275 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +421 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +174 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +237 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +98 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +280 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +527 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +287 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +75 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +178 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +79 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +477 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +232 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +337 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +169 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +36 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +26 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +17 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +140 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners.rb +27 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +7 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +153 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/style.rb +18 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles.rb +15 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +85 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens.rb +161 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +55 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/version.rb +3 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay.rb +284 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/.rspec +1 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Contributing.md +83 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/History.md +220 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/License.md +39 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/README.rdoc +84 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Rakefile +57 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.gemtest +0 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.travis.yml +30 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.yardopts +1 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Gemfile +2 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/LICENSE +25 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/README.markdown +91 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Rakefile +80 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/code_helpers.rb +154 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/source_location.rb +138 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/version.rb +3 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source.rb +141 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/method_source.gemspec +34 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source/code_helpers_spec.rb +43 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source_spec.rb +143 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/spec_helper.rb +101 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/CHANGELOG.md +455 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/LICENSE +21 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/README.md +307 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/.sitearchdir.time +0 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/Makefile +264 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/attr.h +84 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.c +99 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.h +18 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.o +0 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/buf.h +160 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.c +937 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.o +0 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.c +160 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.h +19 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.o +0 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.c +109 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.h +23 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.o +0 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.c +1321 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.o +0 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.c +43 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h +36 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.o +0 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/extconf.rb +67 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.c +492 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.o +0 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.c +228 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.o +0 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/helper.h +91 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.c +986 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.o +0 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.bundle +0 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.c +1562 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.h +279 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.o +0 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.c +1177 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.o +0 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.c +1750 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.h +55 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.o +0 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.c +276 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.o +0 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.c +228 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.h +222 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.o +0 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_has.h +53 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.c +216 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.h +40 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.o +0 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_stack.h +85 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.c +51 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.h +13 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.o +0 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/type.h +39 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/bag.rb +99 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/cdata.rb +12 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/comment.rb +13 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/doctype.rb +13 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/document.rb +30 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/element.rb +319 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/error.rb +24 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/hasattrs.rb +48 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/instruct.rb +36 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/node.rb +24 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/raw.rb +14 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/sax.rb +113 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/version.rb +5 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/xmlrpc_adapter.rb +34 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.bundle +0 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.rb +79 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/CHANGELOG.md +797 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/LICENSE +25 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/README.md +407 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/bin/pry +12 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/basic_object.rb +6 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/cli.rb +225 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_file.rb +109 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_range.rb +71 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/loc.rb +92 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code.rb +353 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code_object.rb +195 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/color_printer.rb +64 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command.rb +716 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command_set.rb +450 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/amend_line.rb +99 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang.rb +20 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang_pry.rb +17 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/abstract_formatter.rb +27 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/exception_formatter.rb +78 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/file_formatter.rb +71 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat.rb +62 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cd.rb +41 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_inspector.rb +27 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_prompt.rb +26 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/code_collector.rb +167 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disable_pry.rb +27 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disabled_commands.rb +2 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/easter_eggs.rb +112 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/exception_patcher.rb +25 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/file_and_line_locator.rb +36 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit.rb +199 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit.rb +42 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_all.rb +29 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_program.rb +23 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/find_method.rb +193 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/fix_indent.rb +19 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_cd.rb +26 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_install.rb +32 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_list.rb +33 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb +29 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_readme.rb +25 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_search.rb +40 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gist.rb +101 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/help.rb +164 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/hist.rb +180 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/import_set.rb +22 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/install_command.rb +53 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/jump_to.rb +29 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_inspectors.rb +35 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_prompts.rb +35 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/constants.rb +58 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/formatter.rb +50 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/globals.rb +48 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/grep.rb +21 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/instance_vars.rb +39 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/interrogatable.rb +18 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/jruby_hacks.rb +49 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_names.rb +35 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_vars.rb +39 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/ls_entity.rb +70 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods.rb +57 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods_helper.rb +46 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb +34 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls.rb +116 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/nesting.rb +25 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/play.rb +103 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_backtrace.rb +25 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_version.rb +17 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/raise_up.rb +32 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reload_code.rb +62 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reset.rb +18 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ri.rb +64 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/save_file.rb +61 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_command.rb +74 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_mode.rb +25 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_doc.rb +83 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_info.rb +209 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_input.rb +17 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_source.rb +50 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/simple_prompt.rb +22 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/stat.rb +40 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/switch_to.rb +23 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/toggle_color.rb +24 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression/expression.rb +38 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression.rb +105 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/whereami.rb +197 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/wtf.rb +57 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands.rb +6 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/behavior.rb +231 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/convenience.rb +25 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/default.rb +149 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/memoization.rb +44 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config.rb +11 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/core_extensions.rb +141 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/editor.rb +135 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/exceptions.rb +78 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/forwardable.rb +23 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/base_helpers.rb +71 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/command_helpers.rb +156 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/documentation_helpers.rb +76 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/options_helpers.rb +27 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/table.rb +109 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/text.rb +116 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers.rb +5 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history.rb +148 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history_array.rb +121 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/hooks.rb +171 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/indent.rb +410 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_completer.rb +260 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_lock.rb +132 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/inspector.rb +27 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/last_exception.rb +61 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/disowned.rb +54 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/patcher.rb +122 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/weird_method_locator.rb +199 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method.rb +546 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/object_path.rb +82 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/output.rb +49 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pager.rb +242 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/platform.rb +93 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/plugins.rb +118 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/prompt.rb +26 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb +401 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_instance.rb +666 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rbx_path.rb +22 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl.rb +232 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl_file_loader.rb +74 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rubygem.rb +84 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/LICENSE +20 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/commands.rb +196 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/option.rb +208 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop.rb +661 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/terminal.rb +90 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb +15 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/mockable.rb +14 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/pry_tester.rb +73 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/utility.rb +26 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/variables.rb +46 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable.rb +70 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/version.rb +3 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module/candidate.rb +131 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module.rb +378 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry.rb +162 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.autotest +7 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.rubocop.yml +27 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.togglerc +7 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/History.rdoc +659 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Manifest.txt +166 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/README.rdoc +139 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Rakefile +81 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/bin/rake +33 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/a.c +6 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/b.c +6 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/main.c +11 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rake.1 +141 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake.rb +79 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/helper.rb +129 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/LICENSE.md +27 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/README.md +43 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.document +5 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.yardopts +8 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/README.md +384 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/.rspec +1 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
  621. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
  622. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.document +5 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.yardopts +6 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/Changelog.md +1110 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/LICENSE.md +25 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/README.md +305 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/configuration.rb +215 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb +127 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/fail_with.rb +39 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb +170 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/minitest_integration.rb +58 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/syntax.rb +132 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/version.rb +8 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations.rb +82 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/all.rb +85 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be.rb +288 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb +426 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb +271 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/cover.rb +24 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eq.rb +40 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eql.rb +34 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/equal.rb +81 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/exist.rb +90 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/has.rb +103 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/include.rb +149 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/match.rb +106 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/operators.rb +128 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/output.rb +200 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/respond_to.rb +165 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/yield.rb +432 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in.rb +52 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/composable.rb +171 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/dsl.rb +527 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/english_phrasing.rb +58 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/fail_matchers.rb +42 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers.rb +1034 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.document +5 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.yardopts +6 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/README.md +460 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  699. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/README.md +40 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
  768. data/vendor/bundle/ruby/2.5.0/specifications/coderay-1.1.2.gemspec +26 -0
  769. data/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec +61 -0
  770. data/vendor/bundle/ruby/2.5.0/specifications/method_source-0.9.0.gemspec +34 -0
  771. data/vendor/bundle/ruby/2.5.0/specifications/ox-2.10.0.gemspec +0 -0
  772. data/vendor/bundle/ruby/2.5.0/specifications/pry-0.11.3.gemspec +41 -0
  773. data/vendor/bundle/ruby/2.5.0/specifications/rake-10.5.0.gemspec +43 -0
  774. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.8.0.gemspec +42 -0
  775. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.8.0.gemspec +62 -0
  776. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.8.1.gemspec +50 -0
  777. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
  778. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.8.0.gemspec +41 -0
  779. data/xaiml.gemspec +25 -0
  780. metadata +891 -0
@@ -0,0 +1,1562 @@
1
+ /* ox.c
2
+ * Copyright (c) 2011, Peter Ohler
3
+ * All rights reserved.
4
+ */
5
+
6
+ #include <stdlib.h>
7
+ #include <errno.h>
8
+ #include <stdint.h>
9
+ #include <stdbool.h>
10
+ #include <stdio.h>
11
+ #include <string.h>
12
+
13
+ #include "ruby.h"
14
+ #include "ox.h"
15
+ #include "sax.h"
16
+
17
+ /* maximum to allocate on the stack, arbitrary limit */
18
+ #define SMALL_XML 4096
19
+ #define WITH_CACHE_TESTS 0
20
+
21
+ typedef struct _YesNoOpt {
22
+ VALUE sym;
23
+ char *attr;
24
+ } *YesNoOpt;
25
+
26
+ void Init_ox();
27
+
28
+ VALUE Ox = Qnil;
29
+
30
+ ID ox_abort_id;
31
+ ID ox_at_column_id;
32
+ ID ox_at_content_id;
33
+ ID ox_at_id;
34
+ ID ox_at_line_id;
35
+ ID ox_at_pos_id;
36
+ ID ox_at_value_id;
37
+ ID ox_attr_id;
38
+ ID ox_attr_value_id;
39
+ ID ox_attributes_id;
40
+ ID ox_attrs_done_id;
41
+ ID ox_beg_id;
42
+ ID ox_bigdecimal_id;
43
+ ID ox_call_id;
44
+ ID ox_cdata_id;
45
+ ID ox_comment_id;
46
+ ID ox_den_id;
47
+ ID ox_doctype_id;
48
+ ID ox_end_element_id;
49
+ ID ox_end_id;
50
+ ID ox_end_instruct_id;
51
+ ID ox_error_id;
52
+ ID ox_excl_id;
53
+ ID ox_external_encoding_id;
54
+ ID ox_fileno_id;
55
+ ID ox_force_encoding_id;
56
+ ID ox_inspect_id;
57
+ ID ox_instruct_id;
58
+ ID ox_jd_id;
59
+ ID ox_keys_id;
60
+ ID ox_local_id;
61
+ ID ox_mesg_id;
62
+ ID ox_message_id;
63
+ ID ox_new_id;
64
+ ID ox_nodes_id;
65
+ ID ox_num_id;
66
+ ID ox_parse_id;
67
+ ID ox_pos_id;
68
+ ID ox_read_id;
69
+ ID ox_readpartial_id;
70
+ ID ox_start_element_id;
71
+ ID ox_string_id;
72
+ ID ox_text_id;
73
+ ID ox_to_c_id;
74
+ ID ox_to_s_id;
75
+ ID ox_to_sym_id;
76
+ ID ox_tv_nsec_id;
77
+ ID ox_tv_sec_id;
78
+ ID ox_tv_usec_id;
79
+ ID ox_value_id;
80
+
81
+ VALUE ox_encoding_sym;
82
+ VALUE ox_version_sym;
83
+ VALUE ox_standalone_sym;
84
+ VALUE ox_indent_sym;
85
+ VALUE ox_size_sym;
86
+
87
+ VALUE ox_empty_string;
88
+ VALUE ox_zero_fixnum;
89
+ VALUE ox_sym_bank; // Array
90
+
91
+ VALUE ox_arg_error_class;
92
+ VALUE ox_bag_clas;
93
+ VALUE ox_bigdecimal_class;
94
+ VALUE ox_cdata_clas;
95
+ VALUE ox_comment_clas;
96
+ VALUE ox_raw_clas;
97
+ VALUE ox_date_class;
98
+ VALUE ox_doctype_clas;
99
+ VALUE ox_document_clas;
100
+ VALUE ox_element_clas;
101
+ VALUE ox_instruct_clas;
102
+ VALUE ox_parse_error_class;
103
+ VALUE ox_stringio_class;
104
+ VALUE ox_struct_class;
105
+ VALUE ox_time_class;
106
+
107
+ Cache ox_symbol_cache = 0;
108
+ Cache ox_class_cache = 0;
109
+ Cache ox_attr_cache = 0;
110
+
111
+ static VALUE abort_sym;
112
+ static VALUE active_sym;
113
+ static VALUE attr_key_mod_sym;
114
+ static VALUE auto_define_sym;
115
+ static VALUE auto_sym;
116
+ static VALUE block_sym;
117
+ static VALUE circular_sym;
118
+ static VALUE convert_special_sym;
119
+ static VALUE effort_sym;
120
+ static VALUE generic_sym;
121
+ static VALUE hash_no_attrs_sym;
122
+ static VALUE hash_sym;
123
+ static VALUE inactive_sym;
124
+ static VALUE invalid_replace_sym;
125
+ static VALUE limited_sym;
126
+ static VALUE margin_sym;
127
+ static VALUE mode_sym;
128
+ static VALUE nest_ok_sym;
129
+ static VALUE object_sym;
130
+ static VALUE off_sym;
131
+ static VALUE opt_format_sym;
132
+ static VALUE optimized_sym;
133
+ static VALUE overlay_sym;
134
+ static VALUE skip_none_sym;
135
+ static VALUE skip_off_sym;
136
+ static VALUE skip_return_sym;
137
+ static VALUE skip_sym;
138
+ static VALUE skip_white_sym;
139
+ static VALUE smart_sym;
140
+ static VALUE strict_sym;
141
+ static VALUE strip_namespace_sym;
142
+ static VALUE symbolize_keys_sym;
143
+ static VALUE symbolize_sym;
144
+ static VALUE tolerant_sym;
145
+ static VALUE trace_sym;
146
+ static VALUE with_dtd_sym;
147
+ static VALUE with_instruct_sym;
148
+ static VALUE with_xml_sym;
149
+ static VALUE xsd_date_sym;
150
+ static VALUE element_key_mod_sym;
151
+
152
+ static ID encoding_id;
153
+ static ID has_key_id;
154
+
155
+ #if HAS_ENCODING_SUPPORT
156
+ rb_encoding *ox_utf8_encoding = 0;
157
+ #elif HAS_PRIVATE_ENCODING
158
+ VALUE ox_utf8_encoding = Qnil;
159
+ #else
160
+ void *ox_utf8_encoding = 0;
161
+ #endif
162
+
163
+ struct _Options ox_default_options = {
164
+ { '\0' }, // encoding
165
+ { '\0' }, // margin
166
+ 2, // indent
167
+ 0, // trace
168
+ 0, // margin_len
169
+ No, // with_dtd
170
+ No, // with_xml
171
+ No, // with_instruct
172
+ No, // circular
173
+ No, // xsd_date
174
+ NoMode, // mode
175
+ StrictEffort, // effort
176
+ Yes, // sym_keys
177
+ SpcSkip, // skip
178
+ No, // smart
179
+ 1, // convert_special
180
+ No, // allow_invalid
181
+ { '\0' }, // inv_repl
182
+ { '\0' }, // strip_ns
183
+ NULL, // html_hints
184
+ Qnil, // attr_key_mod;
185
+ Qnil, // element_key_mod;
186
+ #if HAS_PRIVATE_ENCODING
187
+ Qnil // rb_enc
188
+ #else
189
+ 0 // rb_enc
190
+ #endif
191
+ };
192
+
193
+ extern ParseCallbacks ox_obj_callbacks;
194
+ extern ParseCallbacks ox_gen_callbacks;
195
+ extern ParseCallbacks ox_limited_callbacks;
196
+ extern ParseCallbacks ox_nomode_callbacks;
197
+ extern ParseCallbacks ox_hash_callbacks;
198
+ extern ParseCallbacks ox_hash_no_attrs_callbacks;
199
+
200
+ static void parse_dump_options(VALUE ropts, Options copts);
201
+
202
+ static char*
203
+ defuse_bom(char *xml, Options options) {
204
+ switch ((uint8_t)*xml) {
205
+ case 0xEF: // UTF-8
206
+ if (0xBB == (uint8_t)xml[1] && 0xBF == (uint8_t)xml[2]) {
207
+ options->rb_enc = ox_utf8_encoding;
208
+ xml += 3;
209
+ } else {
210
+ rb_raise(ox_parse_error_class, "Invalid BOM in XML string.\n");
211
+ }
212
+ break;
213
+ #if 0
214
+ case 0xFE: // UTF-16BE
215
+ if (0xFF == (uint8_t)xml[1]) {
216
+ options->rb_enc = ox_utf16be_encoding;
217
+ xml += 2;
218
+ } else {
219
+ rb_raise(ox_parse_error_class, "Invalid BOM in XML string.\n");
220
+ }
221
+ break;
222
+ case 0xFF: // UTF-16LE or UTF-32LE
223
+ if (0xFE == (uint8_t)xml[1]) {
224
+ if (0x00 == (uint8_t)xml[2] && 0x00 == (uint8_t)xml[3]) {
225
+ options->rb_enc = ox_utf32le_encoding;
226
+ xml += 4;
227
+ } else {
228
+ options->rb_enc = ox_utf16le_encoding;
229
+ xml += 2;
230
+ }
231
+ } else {
232
+ rb_raise(ox_parse_error_class, "Invalid BOM in XML string.\n");
233
+ }
234
+ break;
235
+ case 0x00: // UTF-32BE
236
+ if (0x00 == (uint8_t)xml[1] && 0xFE == (uint8_t)xml[2] && 0xFF == (uint8_t)xml[3]) {
237
+ options->rb_enc = ox_utf32be_encoding;
238
+ xml += 4;
239
+ } else {
240
+ rb_raise(ox_parse_error_class, "Invalid BOM in XML string.\n");
241
+ }
242
+ break;
243
+ #endif
244
+ default:
245
+ // Let it fail if there is a BOM that is not UTF-8. Other BOM options
246
+ // are not ASCII compatible.
247
+ break;
248
+ }
249
+ return xml;
250
+ }
251
+
252
+ static VALUE
253
+ hints_to_overlay(Hints hints) {
254
+ volatile VALUE overlay = rb_hash_new();
255
+ Hint h;
256
+ int i;
257
+ VALUE ov;
258
+
259
+ for (i = hints->size, h = hints->hints; 0 < i; i--, h++) {
260
+ switch (h->overlay) {
261
+ case InactiveOverlay: ov = inactive_sym; break;
262
+ case BlockOverlay: ov = block_sym; break;
263
+ case OffOverlay: ov = off_sym; break;
264
+ case AbortOverlay: ov = abort_sym; break;
265
+ case NestOverlay: ov = nest_ok_sym; break;
266
+ case ActiveOverlay:
267
+ default: ov = active_sym; break;
268
+ }
269
+ rb_hash_aset(overlay, rb_str_new2(h->name), ov);
270
+ }
271
+ return overlay;
272
+ }
273
+
274
+ /* call-seq: default_options() => Hash
275
+ *
276
+ * Returns the default load and dump options as a Hash. The options are
277
+ * - _:margin_ [String] left margin to inset when dumping
278
+ * - _:indent_ [Fixnum] number of spaces to indent each element in an XML document
279
+ * - _:trace_ [Fixnum] trace level where 0 is silent
280
+ * - _:encoding_ [String] character encoding for the XML file
281
+ * - _:with_dtd_ [true|false|nil] include DTD in the dump
282
+ * - _:with_instruct_ [true|false|nil] include instructions in the dump
283
+ * - _:with_xml_ [true|false|nil] include XML prolog in the dump
284
+ * - _:circular_ [true|false|nil] support circular references while dumping
285
+ * - _:xsd_date_ [true|false|nil] use XSD date format instead of decimal format
286
+ * - _:mode_ [:object|:generic|:limited|:hash|:hash_no_attrs|nil] load method to use for XML
287
+ * - _:effort_ [:strict|:tolerant|:auto_define] set the tolerance level for loading
288
+ * - _:symbolize_keys_ [true|false|nil] symbolize element attribute keys or leave as Strings
289
+ * - _:element_key_mod_ [Proc|nil] converts element keys on parse if not nil
290
+ * - _:attr_key_mod_ [Proc|nil] converts attribute keys on parse if not nil
291
+ * - _:skip_ [:skip_none|:skip_return|:skip_white|:skip_off] determines how to handle white space in text
292
+ * - _:smart_ [true|false|nil] flag indicating the SAX parser uses hints if available (use with html)
293
+ * - _:convert_special_ [true|false|nil] flag indicating special characters like &lt; are converted with the SAX parser
294
+ * - _:invalid_replace_ [nil|String] replacement string for invalid XML characters on dump. nil indicates include anyway as hex. A string, limited to 10 characters will replace the invalid character with the replace.
295
+ * - _:strip_namespace_ [String|true|false] false or "" results in no namespace stripping. A string of "*" or true will strip all namespaces. Any other non-empty string indicates that matching namespaces will be stripped.
296
+ * - _:overlay_ [Hash] a Hash of keys that match html element names and values that are one of
297
+ * - _:active_ - make the normal callback for the element
298
+ * - _:nest_ok_ - active but the nesting check is ignored
299
+ * - _:inactive_ - do not make the element start, end, or attribute callbacks for this element only
300
+ * - _:block_ - block this and all children callbacks
301
+ * - _:off_ - block this element and it's children unless the child element is active
302
+ * - _:abort_ - abort the html processing and return
303
+ *
304
+ * *return* [Hash] all current option settings.
305
+ *
306
+ * Note that an indent of less than zero will result in a tight one line output
307
+ * unless the text in the XML fields contain new line characters.
308
+ */
309
+ static VALUE
310
+ get_def_opts(VALUE self) {
311
+ VALUE opts = rb_hash_new();
312
+ int elen = (int)strlen(ox_default_options.encoding);
313
+
314
+ rb_hash_aset(opts, ox_encoding_sym, (0 == elen) ? Qnil : rb_str_new(ox_default_options.encoding, elen));
315
+ rb_hash_aset(opts, margin_sym, rb_str_new(ox_default_options.margin, ox_default_options.margin_len));
316
+ rb_hash_aset(opts, ox_indent_sym, INT2FIX(ox_default_options.indent));
317
+ rb_hash_aset(opts, trace_sym, INT2FIX(ox_default_options.trace));
318
+ rb_hash_aset(opts, with_dtd_sym, (Yes == ox_default_options.with_dtd) ? Qtrue : ((No == ox_default_options.with_dtd) ? Qfalse : Qnil));
319
+ rb_hash_aset(opts, with_xml_sym, (Yes == ox_default_options.with_xml) ? Qtrue : ((No == ox_default_options.with_xml) ? Qfalse : Qnil));
320
+ rb_hash_aset(opts, with_instruct_sym, (Yes == ox_default_options.with_instruct) ? Qtrue : ((No == ox_default_options.with_instruct) ? Qfalse : Qnil));
321
+ rb_hash_aset(opts, circular_sym, (Yes == ox_default_options.circular) ? Qtrue : ((No == ox_default_options.circular) ? Qfalse : Qnil));
322
+ rb_hash_aset(opts, xsd_date_sym, (Yes == ox_default_options.xsd_date) ? Qtrue : ((No == ox_default_options.xsd_date) ? Qfalse : Qnil));
323
+ rb_hash_aset(opts, symbolize_keys_sym, (Yes == ox_default_options.sym_keys) ? Qtrue : ((No == ox_default_options.sym_keys) ? Qfalse : Qnil));
324
+ rb_hash_aset(opts, attr_key_mod_sym, ox_default_options.attr_key_mod);
325
+ rb_hash_aset(opts, element_key_mod_sym, ox_default_options.element_key_mod);
326
+ rb_hash_aset(opts, smart_sym, (Yes == ox_default_options.smart) ? Qtrue : ((No == ox_default_options.smart) ? Qfalse : Qnil));
327
+ rb_hash_aset(opts, convert_special_sym, (ox_default_options.convert_special) ? Qtrue : Qfalse);
328
+ switch (ox_default_options.mode) {
329
+ case ObjMode: rb_hash_aset(opts, mode_sym, object_sym); break;
330
+ case GenMode: rb_hash_aset(opts, mode_sym, generic_sym); break;
331
+ case LimMode: rb_hash_aset(opts, mode_sym, limited_sym); break;
332
+ case HashMode: rb_hash_aset(opts, mode_sym, hash_sym); break;
333
+ case HashNoAttrMode: rb_hash_aset(opts, mode_sym, hash_no_attrs_sym); break;
334
+ case NoMode:
335
+ default: rb_hash_aset(opts, mode_sym, Qnil); break;
336
+ }
337
+ switch (ox_default_options.effort) {
338
+ case StrictEffort: rb_hash_aset(opts, effort_sym, strict_sym); break;
339
+ case TolerantEffort: rb_hash_aset(opts, effort_sym, tolerant_sym); break;
340
+ case AutoEffort: rb_hash_aset(opts, effort_sym, auto_define_sym); break;
341
+ case NoEffort:
342
+ default: rb_hash_aset(opts, effort_sym, Qnil); break;
343
+ }
344
+ switch (ox_default_options.skip) {
345
+ case OffSkip: rb_hash_aset(opts, skip_sym, skip_off_sym); break;
346
+ case NoSkip: rb_hash_aset(opts, skip_sym, skip_none_sym); break;
347
+ case CrSkip: rb_hash_aset(opts, skip_sym, skip_return_sym); break;
348
+ case SpcSkip: rb_hash_aset(opts, skip_sym, skip_white_sym); break;
349
+ default: rb_hash_aset(opts, skip_sym, Qnil); break;
350
+ }
351
+ if (Yes == ox_default_options.allow_invalid) {
352
+ rb_hash_aset(opts, invalid_replace_sym, Qnil);
353
+ } else {
354
+ rb_hash_aset(opts, invalid_replace_sym, rb_str_new(ox_default_options.inv_repl + 1, (int)*ox_default_options.inv_repl));
355
+ }
356
+ if ('\0' == *ox_default_options.strip_ns) {
357
+ rb_hash_aset(opts, strip_namespace_sym, Qfalse);
358
+ } else if ('*' == *ox_default_options.strip_ns && '\0' == ox_default_options.strip_ns[1]) {
359
+ rb_hash_aset(opts, strip_namespace_sym, Qtrue);
360
+ } else {
361
+ rb_hash_aset(opts, strip_namespace_sym, rb_str_new(ox_default_options.strip_ns, strlen(ox_default_options.strip_ns)));
362
+ }
363
+ if (NULL == ox_default_options.html_hints) {
364
+ //rb_hash_aset(opts, overlay_sym, hints_to_overlay(ox_hints_html()));
365
+ rb_hash_aset(opts, overlay_sym, Qnil);
366
+ } else {
367
+ rb_hash_aset(opts, overlay_sym, hints_to_overlay(ox_default_options.html_hints));
368
+ }
369
+ return opts;
370
+ }
371
+
372
+ static int
373
+ set_overlay(VALUE key, VALUE value, VALUE ctx) {
374
+ Hints hints = (Hints)ctx;
375
+ Hint hint;
376
+
377
+ if (NULL != (hint = ox_hint_find(hints, StringValuePtr(key)))) {
378
+ if (active_sym == value) {
379
+ hint->overlay = ActiveOverlay;
380
+ } else if (inactive_sym == value) {
381
+ hint->overlay = InactiveOverlay;
382
+ } else if (block_sym == value) {
383
+ hint->overlay = BlockOverlay;
384
+ } else if (nest_ok_sym == value) {
385
+ hint->overlay = NestOverlay;
386
+ } else if (off_sym == value) {
387
+ hint->overlay = OffOverlay;
388
+ } else if (abort_sym == value) {
389
+ hint->overlay = AbortOverlay;
390
+ }
391
+ }
392
+ return ST_CONTINUE;
393
+ }
394
+
395
+ /* call-seq: sax_html_overlay() => Hash
396
+ *
397
+ * Returns an overlay hash that can be modified and used as an overlay in the
398
+ * default options or in the sax_html() function call. Values for the keys are:
399
+ * - _:active_ - make the normal callback for the element
400
+ * - _:nest_ok_ - active but ignore nest check
401
+ * - _:inactive_ - do not make the element start, end, or attribute callbacks for this element only
402
+ * - _:block_ - block this and all children callbacks
403
+ * - _:off_ - block this element and it's children unless the child element is active
404
+ * - _:abort_ - abort the html processing and return
405
+ *
406
+ * *return* [Hash] default SAX HTML settings
407
+ */
408
+ static VALUE
409
+ sax_html_overlay(VALUE self) {
410
+ return hints_to_overlay(ox_hints_html());
411
+ }
412
+
413
+ /* call-seq: default_options=(opts)
414
+ *
415
+ * Sets the default options for load and dump.
416
+ * - +opts+ [Hash] opts options to change
417
+ * - _:margin_ [String] left margin to inset when dumping
418
+ * - _:indent_ [Fixnum] number of spaces to indent each element in an XML document
419
+ * - _:trace_ [Fixnum] trace level where 0 is silent
420
+ * - _:encoding_ [String] character encoding for the XML file
421
+ * - _:with_dtd_ [true|false|nil] include DTD in the dump
422
+ * - _:with_instruct_ [true|false|nil] include instructions in the dump
423
+ * - _:with_xml_ [true|false|nil] include XML prolog in the dump
424
+ * - _:circular_ [true|false|nil] support circular references while dumping
425
+ * - _:xsd_date_ [true|false|nil] use XSD date format instead of decimal format
426
+ * - _:mode_ [:object|:generic|:limited|:hash|:hash_no_attrs|nil] load method to use for XML
427
+ * - _:effort_ [:strict|:tolerant|:auto_define] set the tolerance level for loading
428
+ * - _:symbolize_keys_ [true|false|nil] symbolize element attribute keys or leave as Strings
429
+ * - _:element_key_mod_ [Proc|nil] converts element keys on parse if not nil
430
+ * - _:attr_key_mod_ [Proc|nil] converts attribute keys on parse if not nil
431
+ * - _:skip_ [:skip_none|:skip_return|:skip_white|:skip_off] determines how to handle white space in text
432
+ * - _:smart_ [true|false|nil] flag indicating the SAX parser uses hints if available (use with html)
433
+ * - _:invalid_replace_ [nil|String] replacement string for invalid XML characters on dump. nil indicates include anyway as hex. A string, limited to 10 characters will replace the invalid character with the replace.
434
+ * - _:strip_namespace_ [nil|String|true|false] "" or false result in no namespace stripping. A string of "*" or true will strip all namespaces. Any other non-empty string indicates that matching namespaces will be stripped.
435
+ * - _:overlay_ [Hash] a Hash of keys that match html element names and values that are one of
436
+ * - _:active_ - make the normal callback for the element
437
+ * - _:nest_ok_ - active but ignore nest check
438
+ * - _:inactive_ - do not make the element start, end, or attribute callbacks for this element only
439
+ * - _:block_ - block this and all children callbacks
440
+ * - _:off_ - block this element and it's children unless the child element is active
441
+ * - _:abort_ - abort the html processing and return
442
+ *
443
+ * *return* [nil]
444
+ */
445
+ static VALUE
446
+ set_def_opts(VALUE self, VALUE opts) {
447
+ struct _YesNoOpt ynos[] = {
448
+ { with_xml_sym, &ox_default_options.with_xml },
449
+ { with_dtd_sym, &ox_default_options.with_dtd },
450
+ { with_instruct_sym, &ox_default_options.with_instruct },
451
+ { xsd_date_sym, &ox_default_options.xsd_date },
452
+ { circular_sym, &ox_default_options.circular },
453
+ { symbolize_keys_sym, &ox_default_options.sym_keys },
454
+ { smart_sym, &ox_default_options.smart },
455
+ { Qnil, 0 }
456
+ };
457
+ YesNoOpt o;
458
+ VALUE v;
459
+
460
+ Check_Type(opts, T_HASH);
461
+
462
+ v = rb_hash_aref(opts, ox_encoding_sym);
463
+ if (Qnil == v) {
464
+ *ox_default_options.encoding = '\0';
465
+ } else {
466
+ Check_Type(v, T_STRING);
467
+ strncpy(ox_default_options.encoding, StringValuePtr(v), sizeof(ox_default_options.encoding) - 1);
468
+ #if HAS_ENCODING_SUPPORT
469
+ ox_default_options.rb_enc = rb_enc_find(ox_default_options.encoding);
470
+ #elif HAS_PRIVATE_ENCODING
471
+ ox_default_options.rb_enc = rb_str_new2(ox_default_options.encoding);
472
+ rb_gc_register_address(&ox_default_options.rb_enc);
473
+ #endif
474
+ }
475
+
476
+ v = rb_hash_aref(opts, ox_indent_sym);
477
+ if (Qnil != v) {
478
+ Check_Type(v, T_FIXNUM);
479
+ ox_default_options.indent = FIX2INT(v);
480
+ }
481
+
482
+ v = rb_hash_aref(opts, trace_sym);
483
+ if (Qnil != v) {
484
+ Check_Type(v, T_FIXNUM);
485
+ ox_default_options.trace = FIX2INT(v);
486
+ }
487
+
488
+ v = rb_hash_aref(opts, mode_sym);
489
+ if (Qnil == v) {
490
+ ox_default_options.mode = NoMode;
491
+ } else if (object_sym == v) {
492
+ ox_default_options.mode = ObjMode;
493
+ } else if (generic_sym == v) {
494
+ ox_default_options.mode = GenMode;
495
+ } else if (limited_sym == v) {
496
+ ox_default_options.mode = LimMode;
497
+ } else if (hash_sym == v) {
498
+ ox_default_options.mode = HashMode;
499
+ } else if (hash_no_attrs_sym == v) {
500
+ ox_default_options.mode = HashNoAttrMode;
501
+ } else {
502
+ rb_raise(ox_parse_error_class, ":mode must be :object, :generic, :limited, :hash, :hash_no_attrs, or nil.\n");
503
+ }
504
+
505
+ v = rb_hash_aref(opts, effort_sym);
506
+ if (Qnil == v) {
507
+ ox_default_options.effort = NoEffort;
508
+ } else if (strict_sym == v) {
509
+ ox_default_options.effort = StrictEffort;
510
+ } else if (tolerant_sym == v) {
511
+ ox_default_options.effort = TolerantEffort;
512
+ } else if (auto_define_sym == v) {
513
+ ox_default_options.effort = AutoEffort;
514
+ } else {
515
+ rb_raise(ox_parse_error_class, ":effort must be :strict, :tolerant, :auto_define, or nil.\n");
516
+ }
517
+
518
+ v = rb_hash_aref(opts, skip_sym);
519
+ if (Qnil == v) {
520
+ ox_default_options.skip = NoSkip;
521
+ } else if (skip_off_sym == v) {
522
+ ox_default_options.skip = OffSkip;
523
+ } else if (skip_none_sym == v) {
524
+ ox_default_options.skip = NoSkip;
525
+ } else if (skip_return_sym == v) {
526
+ ox_default_options.skip = CrSkip;
527
+ } else if (skip_white_sym == v) {
528
+ ox_default_options.skip = SpcSkip;
529
+ } else {
530
+ rb_raise(ox_parse_error_class, ":skip must be :skip_none, :skip_return, :skip_white, :skip_off, or nil.\n");
531
+ }
532
+
533
+ v = rb_hash_lookup(opts, convert_special_sym);
534
+ if (Qnil == v) {
535
+ // no change
536
+ } else if (Qtrue == v) {
537
+ ox_default_options.convert_special = 1;
538
+ } else if (Qfalse == v) {
539
+ ox_default_options.convert_special = 0;
540
+ } else {
541
+ rb_raise(ox_parse_error_class, ":convert_special must be true or false.\n");
542
+ }
543
+
544
+ v = rb_hash_aref(opts, invalid_replace_sym);
545
+ if (Qnil == v) {
546
+ ox_default_options.allow_invalid = Yes;
547
+ } else {
548
+ long slen;
549
+
550
+ Check_Type(v, T_STRING);
551
+ slen = RSTRING_LEN(v);
552
+ if (sizeof(ox_default_options.inv_repl) - 2 < (size_t)slen) {
553
+ rb_raise(ox_parse_error_class, ":invalid_replace can be no longer than %d characters.",
554
+ (int)sizeof(ox_default_options.inv_repl) - 2);
555
+ }
556
+ strncpy(ox_default_options.inv_repl + 1, StringValuePtr(v), sizeof(ox_default_options.inv_repl) - 1);
557
+ ox_default_options.inv_repl[sizeof(ox_default_options.inv_repl) - 1] = '\0';
558
+ *ox_default_options.inv_repl = (char)slen;
559
+ ox_default_options.allow_invalid = No;
560
+ }
561
+
562
+ v = rb_hash_aref(opts, strip_namespace_sym);
563
+ if (Qfalse == v) {
564
+ *ox_default_options.strip_ns = '\0';
565
+ } else if (Qtrue == v) {
566
+ *ox_default_options.strip_ns = '*';
567
+ ox_default_options.strip_ns[1] = '\0';
568
+ } else if (Qnil != v) {
569
+ long slen;
570
+
571
+ Check_Type(v, T_STRING);
572
+ slen = RSTRING_LEN(v);
573
+ if (sizeof(ox_default_options.strip_ns) - 1 < (size_t)slen) {
574
+ rb_raise(ox_parse_error_class, ":strip_namespace can be no longer than %d characters.",
575
+ (int)sizeof(ox_default_options.strip_ns) - 1);
576
+ }
577
+ strncpy(ox_default_options.strip_ns, StringValuePtr(v), sizeof(ox_default_options.strip_ns) - 1);
578
+ ox_default_options.strip_ns[sizeof(ox_default_options.strip_ns) - 1] = '\0';
579
+ }
580
+
581
+ v = rb_hash_aref(opts, margin_sym);
582
+ if (Qnil != v) {
583
+ long slen;
584
+
585
+ Check_Type(v, T_STRING);
586
+ slen = RSTRING_LEN(v);
587
+ if (sizeof(ox_default_options.margin) - 1 < (size_t)slen) {
588
+ rb_raise(ox_parse_error_class, ":margin can be no longer than %d characters.",
589
+ (int)sizeof(ox_default_options.margin) - 1);
590
+ }
591
+ strncpy(ox_default_options.margin, StringValuePtr(v), sizeof(ox_default_options.margin) - 1);
592
+ ox_default_options.margin[sizeof(ox_default_options.margin) - 1] = '\0';
593
+ ox_default_options.margin_len = strlen(ox_default_options.margin);
594
+ }
595
+
596
+ for (o = ynos; 0 != o->attr; o++) {
597
+ v = rb_hash_lookup(opts, o->sym);
598
+ if (Qnil == v) {
599
+ *o->attr = NotSet;
600
+ } else if (Qtrue == v) {
601
+ *o->attr = Yes;
602
+ } else if (Qfalse == v) {
603
+ *o->attr = No;
604
+ } else {
605
+ rb_raise(ox_parse_error_class, "%s must be true or false.\n", rb_id2name(SYM2ID(o->sym)));
606
+ }
607
+ }
608
+ v = rb_hash_aref(opts, overlay_sym);
609
+ if (Qnil == v) {
610
+ ox_hints_destroy(ox_default_options.html_hints);
611
+ ox_default_options.html_hints = NULL;
612
+ } else {
613
+ int cnt;
614
+
615
+ Check_Type(v, T_HASH);
616
+ cnt = (int)RHASH_SIZE(v);
617
+ if (0 == cnt) {
618
+ ox_hints_destroy(ox_default_options.html_hints);
619
+ ox_default_options.html_hints = NULL;
620
+ } else {
621
+ ox_hints_destroy(ox_default_options.html_hints);
622
+ ox_default_options.html_hints = ox_hints_dup(ox_hints_html());
623
+ rb_hash_foreach(v, set_overlay, (VALUE)ox_default_options.html_hints);
624
+ }
625
+ }
626
+ ox_default_options.element_key_mod = rb_hash_lookup2(opts, element_key_mod_sym, ox_default_options.element_key_mod);
627
+ ox_default_options.attr_key_mod = rb_hash_lookup2(opts, attr_key_mod_sym, ox_default_options.attr_key_mod);
628
+
629
+ return Qnil;
630
+ }
631
+
632
+ /* call-seq: parse_obj(xml) => Object
633
+ *
634
+ * Parses an XML document String that is in the object format and returns an
635
+ * Object of the type represented by the XML. This function expects an
636
+ * optimized XML formated String. For other formats use the more generic
637
+ * Ox.load() method. Raises an exception if the XML is malformed or the
638
+ * classes specified in the file are not valid.
639
+ * - +xml+ [String] XML String in optimized Object format.
640
+ * *return* [Object] deserialized Object.
641
+ */
642
+ static VALUE
643
+ to_obj(VALUE self, VALUE ruby_xml) {
644
+ char *xml, *x;
645
+ size_t len;
646
+ VALUE obj;
647
+ struct _Options options = ox_default_options;
648
+ struct _Err err;
649
+
650
+ err_init(&err);
651
+ Check_Type(ruby_xml, T_STRING);
652
+ /* the xml string gets modified so make a copy of it */
653
+ len = RSTRING_LEN(ruby_xml) + 1;
654
+ x = defuse_bom(StringValuePtr(ruby_xml), &options);
655
+ if (SMALL_XML < len) {
656
+ xml = ALLOC_N(char, len);
657
+ } else {
658
+ xml = ALLOCA_N(char, len);
659
+ }
660
+ memcpy(xml, x, len);
661
+ #if HAS_GC_GUARD
662
+ rb_gc_disable();
663
+ #endif
664
+ obj = ox_parse(xml, len - 1, ox_obj_callbacks, 0, &options, &err);
665
+ if (SMALL_XML < len) {
666
+ xfree(xml);
667
+ }
668
+ #if HAS_GC_GUARD
669
+ RB_GC_GUARD(obj);
670
+ rb_gc_enable();
671
+ #endif
672
+ if (err_has(&err)) {
673
+ ox_err_raise(&err);
674
+ }
675
+ return obj;
676
+ }
677
+
678
+ /* call-seq: parse(xml) => Ox::Document or Ox::Element
679
+ *
680
+ * Parses and XML document String into an Ox::Document or Ox::Element.
681
+ * - +xml+ [String] xml XML String
682
+ * *return* [Ox::Document or Ox::Element] parsed XML document.
683
+ *
684
+ * _raise_ [Exception] if the XML is malformed.
685
+ */
686
+ static VALUE
687
+ to_gen(VALUE self, VALUE ruby_xml) {
688
+ char *xml, *x;
689
+ size_t len;
690
+ VALUE obj;
691
+ struct _Options options = ox_default_options;
692
+ struct _Err err;
693
+
694
+ err_init(&err);
695
+ Check_Type(ruby_xml, T_STRING);
696
+ /* the xml string gets modified so make a copy of it */
697
+ len = RSTRING_LEN(ruby_xml) + 1;
698
+ x = defuse_bom(StringValuePtr(ruby_xml), &options);
699
+ if (SMALL_XML < len) {
700
+ xml = ALLOC_N(char, len);
701
+ } else {
702
+ xml = ALLOCA_N(char, len);
703
+ }
704
+ memcpy(xml, x, len);
705
+ obj = ox_parse(xml, len - 1, ox_gen_callbacks, 0, &options, &err);
706
+ if (SMALL_XML < len) {
707
+ xfree(xml);
708
+ }
709
+ if (err_has(&err)) {
710
+ ox_err_raise(&err);
711
+ }
712
+ return obj;
713
+ }
714
+
715
+ static VALUE
716
+ load(char *xml, size_t len, int argc, VALUE *argv, VALUE self, VALUE encoding, Err err) {
717
+ VALUE obj;
718
+ struct _Options options = ox_default_options;
719
+
720
+ if (1 == argc && rb_cHash == rb_obj_class(*argv)) {
721
+ VALUE h = *argv;
722
+ VALUE v;
723
+
724
+ if (Qnil != (v = rb_hash_lookup(h, mode_sym))) {
725
+ if (object_sym == v) {
726
+ options.mode = ObjMode;
727
+ } else if (optimized_sym == v) {
728
+ options.mode = ObjMode;
729
+ } else if (generic_sym == v) {
730
+ options.mode = GenMode;
731
+ } else if (limited_sym == v) {
732
+ options.mode = LimMode;
733
+ } else if (hash_sym == v) {
734
+ options.mode = HashMode;
735
+ } else if (hash_no_attrs_sym == v) {
736
+ options.mode = HashNoAttrMode;
737
+ } else {
738
+ rb_raise(ox_parse_error_class, ":mode must be :generic, :object, :limited, :hash, :hash_no_attrs.\n");
739
+ }
740
+ }
741
+ if (Qnil != (v = rb_hash_lookup(h, effort_sym))) {
742
+ if (auto_define_sym == v) {
743
+ options.effort = AutoEffort;
744
+ } else if (tolerant_sym == v) {
745
+ options.effort = TolerantEffort;
746
+ } else if (strict_sym == v) {
747
+ options.effort = StrictEffort;
748
+ } else {
749
+ rb_raise(ox_parse_error_class, ":effort must be :strict, :tolerant, or :auto_define.\n");
750
+ }
751
+ }
752
+ if (Qnil != (v = rb_hash_lookup(h, skip_sym))) {
753
+ if (skip_none_sym == v) {
754
+ options.skip = NoSkip;
755
+ } else if (skip_off_sym == v) {
756
+ options.skip = OffSkip;
757
+ } else if (skip_return_sym == v) {
758
+ options.skip = CrSkip;
759
+ } else if (skip_white_sym == v) {
760
+ options.skip = SpcSkip;
761
+ } else {
762
+ rb_raise(ox_parse_error_class, ":skip must be :skip_none, :skip_return, :skip_white, or :skip_off.\n");
763
+ }
764
+ }
765
+
766
+ if (Qnil != (v = rb_hash_lookup(h, trace_sym))) {
767
+ Check_Type(v, T_FIXNUM);
768
+ options.trace = FIX2INT(v);
769
+ }
770
+ if (Qnil != (v = rb_hash_lookup(h, symbolize_keys_sym))) {
771
+ options.sym_keys = (Qfalse == v) ? No : Yes;
772
+ }
773
+ options.element_key_mod = rb_hash_lookup2(h, element_key_mod_sym, options.element_key_mod);
774
+ options.attr_key_mod = rb_hash_lookup2(h, attr_key_mod_sym, options.attr_key_mod);
775
+
776
+ if (Qnil != (v = rb_hash_lookup(h, convert_special_sym))) {
777
+ options.convert_special = (Qfalse != v);
778
+ }
779
+
780
+ v = rb_hash_lookup(h, invalid_replace_sym);
781
+ if (Qnil == v) {
782
+ if (Qtrue == rb_funcall(h, has_key_id, 1, invalid_replace_sym)) {
783
+ options.allow_invalid = Yes;
784
+ }
785
+ } else {
786
+ long slen;
787
+
788
+ Check_Type(v, T_STRING);
789
+ slen = RSTRING_LEN(v);
790
+ if (sizeof(options.inv_repl) - 2 < (size_t)slen) {
791
+ rb_raise(ox_parse_error_class, ":invalid_replace can be no longer than %d characters.",
792
+ (int)sizeof(options.inv_repl) - 2);
793
+ }
794
+ strncpy(options.inv_repl + 1, StringValuePtr(v), sizeof(options.inv_repl) - 1);
795
+ options.inv_repl[sizeof(options.inv_repl) - 1] = '\0';
796
+ *options.inv_repl = (char)slen;
797
+ options.allow_invalid = No;
798
+ }
799
+ v = rb_hash_lookup(h, strip_namespace_sym);
800
+ if (Qfalse == v) {
801
+ *options.strip_ns = '\0';
802
+ } else if (Qtrue == v) {
803
+ *options.strip_ns = '*';
804
+ options.strip_ns[1] = '\0';
805
+ } else if (Qnil != v) {
806
+ long slen;
807
+
808
+ Check_Type(v, T_STRING);
809
+ slen = RSTRING_LEN(v);
810
+ if (sizeof(options.strip_ns) - 1 < (size_t)slen) {
811
+ rb_raise(ox_parse_error_class, ":strip_namespace can be no longer than %d characters.",
812
+ (int)sizeof(options.strip_ns) - 1);
813
+ }
814
+ strncpy(options.strip_ns, StringValuePtr(v), sizeof(options.strip_ns) - 1);
815
+ options.strip_ns[sizeof(options.strip_ns) - 1] = '\0';
816
+ }
817
+ v = rb_hash_lookup(h, margin_sym);
818
+ if (Qnil != v) {
819
+ long slen;
820
+
821
+ Check_Type(v, T_STRING);
822
+ slen = RSTRING_LEN(v);
823
+ if (sizeof(options.margin) - 1 < (size_t)slen) {
824
+ rb_raise(ox_parse_error_class, ":margin can be no longer than %d characters.",
825
+ (int)sizeof(options.margin) - 1);
826
+ }
827
+ strncpy(options.margin, StringValuePtr(v), sizeof(options.margin) - 1);
828
+ options.margin[sizeof(options.margin) - 1] = '\0';
829
+ options.margin_len = strlen(options.margin);
830
+ }
831
+ }
832
+ #if HAS_ENCODING_SUPPORT
833
+ if ('\0' == *options.encoding) {
834
+ if (Qnil != encoding) {
835
+ options.rb_enc = rb_enc_from_index(rb_enc_get_index(encoding));
836
+ } else {
837
+ options.rb_enc = 0;
838
+ }
839
+ } else if (0 == options.rb_enc) {
840
+ options.rb_enc = rb_enc_find(options.encoding);
841
+ }
842
+ #elif HAS_PRIVATE_ENCODING
843
+ if ('\0' == *options.encoding) {
844
+ if (Qnil != encoding) {
845
+ options.rb_enc = encoding;
846
+ } else {
847
+ options.rb_enc = Qnil;
848
+ }
849
+ } else if (0 == options.rb_enc) {
850
+ options.rb_enc = rb_str_new2(options.encoding);
851
+ rb_gc_register_address(&options.rb_enc);
852
+ }
853
+ #endif
854
+ xml = defuse_bom(xml, &options);
855
+ switch (options.mode) {
856
+ case ObjMode:
857
+ #if HAS_GC_GUARD
858
+ rb_gc_disable();
859
+ #endif
860
+ obj = ox_parse(xml, len, ox_obj_callbacks, 0, &options, err);
861
+ #if HAS_GC_GUARD
862
+ RB_GC_GUARD(obj);
863
+ rb_gc_enable();
864
+ #endif
865
+ break;
866
+ case GenMode:
867
+ obj = ox_parse(xml, len, ox_gen_callbacks, 0, &options, err);
868
+ break;
869
+ case LimMode:
870
+ obj = ox_parse(xml, len, ox_limited_callbacks, 0, &options, err);
871
+ break;
872
+ case HashMode:
873
+ obj = ox_parse(xml, len, ox_hash_callbacks, 0, &options, err);
874
+ break;
875
+ case HashNoAttrMode:
876
+ obj = ox_parse(xml, len, ox_hash_no_attrs_callbacks, 0, &options, err);
877
+ break;
878
+ case NoMode:
879
+ obj = ox_parse(xml, len, ox_nomode_callbacks, 0, &options, err);
880
+ break;
881
+ default:
882
+ obj = ox_parse(xml, len, ox_gen_callbacks, 0, &options, err);
883
+ break;
884
+ }
885
+ return obj;
886
+ }
887
+
888
+ /* call-seq: load(xml, options) => Ox::Document or Ox::Element or Object
889
+ *
890
+ * Parses and XML document String into an Ox::Document, or Ox::Element, or
891
+ * Object depending on the options. Raises an exception if the XML is malformed
892
+ * or the classes specified are not valid. If a block is given it will be called
893
+ * on the completion of each complete top level entity with that entity as it's
894
+ * only argument.
895
+ *
896
+ * - +xml+ [String] XML String
897
+ * - +options+ [Hash] load options
898
+ * - *:mode* [:object|:generic|:limited] format expected
899
+ * - _:object_ - object format
900
+ * - _:generic_ - read as a generic XML file
901
+ * - _:limited_ - read as a generic XML file but with callbacks on text and elements events only
902
+ * - _:hash_ - read and convert to a Hash and core class objects only
903
+ * - _:hash_no_attrs_ - read and convert to a Hash and core class objects only without capturing attributes
904
+ * - *:effort* [:strict|:tolerant|:auto_define] effort to use when an undefined class is encountered, default: :strict
905
+ * - _:strict_ - raise an NameError for missing classes and modules
906
+ * - _:tolerant_ - return nil for missing classes and modules
907
+ * - _:auto_define_ - auto define missing classes and modules
908
+ * - *:trace* [Fixnum] trace level as a Fixnum, default: 0 (silent)
909
+ * - *:symbolize_keys* [true|false|nil] symbolize element attribute keys or leave as Strings
910
+ * - *:invalid_replace* [nil|String] replacement string for invalid XML characters on dump. nil indicates include anyway as hex. A string, limited to 10 characters will replace the invalid character with the replace.
911
+ * - *:strip_namespace* [String|true|false] "" or false result in no namespace stripping. A string of "*" or true will strip all namespaces. Any other non-empty string indicates that matching namespaces will be stripped.
912
+ */
913
+ static VALUE
914
+ load_str(int argc, VALUE *argv, VALUE self) {
915
+ char *xml;
916
+ size_t len;
917
+ VALUE obj;
918
+ VALUE encoding;
919
+ struct _Err err;
920
+
921
+ err_init(&err);
922
+ Check_Type(*argv, T_STRING);
923
+ /* the xml string gets modified so make a copy of it */
924
+ len = RSTRING_LEN(*argv) + 1;
925
+ if (SMALL_XML < len) {
926
+ xml = ALLOC_N(char, len);
927
+ } else {
928
+ xml = ALLOCA_N(char, len);
929
+ }
930
+ #if HAS_ENCODING_SUPPORT
931
+ #ifdef MACRUBY_RUBY
932
+ encoding = rb_funcall(*argv, encoding_id, 0);
933
+ #else
934
+ encoding = rb_obj_encoding(*argv);
935
+ #endif
936
+ #elif HAS_PRIVATE_ENCODING
937
+ encoding = rb_funcall(*argv, encoding_id, 0);
938
+ #else
939
+ encoding = Qnil;
940
+ #endif
941
+ memcpy(xml, StringValuePtr(*argv), len);
942
+ xml[len - 1] = '\0';
943
+ obj = load(xml, len - 1, argc - 1, argv + 1, self, encoding, &err);
944
+ if (SMALL_XML < len) {
945
+ xfree(xml);
946
+ }
947
+ if (err_has(&err)) {
948
+ ox_err_raise(&err);
949
+ }
950
+ return obj;
951
+ }
952
+
953
+ /* call-seq: load_file(file_path, options) => Ox::Document or Ox::Element or Object
954
+ *
955
+ * Parses and XML document from a file into an Ox::Document, or Ox::Element,
956
+ * or Object depending on the options. Raises an exception if the XML is
957
+ * malformed or the classes specified are not valid.
958
+ * - +file_path+ [String] file path to read the XML document from
959
+ * - +options+ [Hash] load options
960
+ * - *:mode* [:object|:generic|:limited] format expected
961
+ * - _:object_ - object format
962
+ * - _:generic_ - read as a generic XML file
963
+ * - _:limited_ - read as a generic XML file but with callbacks on text and elements events only
964
+ * - _:hash_ - read and convert to a Hash and core class objects only
965
+ * - _:hash_no_attrs_ - read and convert to a Hash and core class objects only without capturing attributes
966
+ * - *:effort* [:strict|:tolerant|:auto_define] effort to use when an undefined class is encountered, default: :strict
967
+ * - _:strict_ - raise an NameError for missing classes and modules
968
+ * - _:tolerant_ - return nil for missing classes and modules
969
+ * - _:auto_define_ - auto define missing classes and modules
970
+ * - *:trace* [Fixnum] trace level as a Fixnum, default: 0 (silent)
971
+ * - *:symbolize_keys* [true|false|nil] symbolize element attribute keys or leave as Strings
972
+ * - *:invalid_replace* [nil|String] replacement string for invalid XML characters on dump. nil indicates include anyway as hex. A string, limited to 10 characters will replace the invalid character with the replace.
973
+ * - *:strip_namespace* [String|true|false] "" or false result in no namespace stripping. A string of "*" or true will strip all namespaces. Any other non-empty string indicates that matching namespaces will be stripped.
974
+ */
975
+ static VALUE
976
+ load_file(int argc, VALUE *argv, VALUE self) {
977
+ char *path;
978
+ char *xml;
979
+ FILE *f;
980
+ size_t len;
981
+ VALUE obj;
982
+ struct _Err err;
983
+
984
+ err_init(&err);
985
+ Check_Type(*argv, T_STRING);
986
+ path = StringValuePtr(*argv);
987
+ if (0 == (f = fopen(path, "r"))) {
988
+ rb_raise(rb_eIOError, "%s\n", strerror(errno));
989
+ }
990
+ fseek(f, 0, SEEK_END);
991
+ len = ftell(f);
992
+ if (SMALL_XML < len) {
993
+ xml = ALLOC_N(char, len + 1);
994
+ } else {
995
+ xml = ALLOCA_N(char, len + 1);
996
+ }
997
+ fseek(f, 0, SEEK_SET);
998
+ if (len != fread(xml, 1, len, f)) {
999
+ ox_err_set(&err, rb_eLoadError, "Failed to read %ld bytes from %s.\n", (long)len, path);
1000
+ obj = Qnil;
1001
+ } else {
1002
+ xml[len] = '\0';
1003
+ obj = load(xml, len, argc - 1, argv + 1, self, Qnil, &err);
1004
+ }
1005
+ fclose(f);
1006
+ if (SMALL_XML < len) {
1007
+ xfree(xml);
1008
+ }
1009
+ if (err_has(&err)) {
1010
+ ox_err_raise(&err);
1011
+ }
1012
+ return obj;
1013
+ }
1014
+
1015
+ /* call-seq: sax_parse(handler, io, options)
1016
+ *
1017
+ * Parses an IO stream or file containing an XML document. Raises an exception
1018
+ * if the XML is malformed or the classes specified are not valid.
1019
+ * - +handler+ [Ox::Sax] SAX (responds to OX::Sax methods) like handler
1020
+ * - +io+ [IO|String] IO Object to read from
1021
+ * - +options+ [Hash] options parse options
1022
+ * - *:convert_special* [true|false] flag indicating special characters like &lt; are converted
1023
+ * - *:symbolize* [true|false] flag indicating the parser symbolize element and attribute names
1024
+ * - *:smart* [true|false] flag indicating the parser uses hints if available (use with html)
1025
+ * - *:skip* [:skip_none|:skip_return|:skip_white|:skip_off] flag indicating the parser skips \\r or collpase white space into a single space. Default (skip space)
1026
+ * - *:strip_namespace* [nil|String|true|false] "" or false result in no namespace stripping. A string of "*" or true will strip all namespaces. Any other non-empty string indicates that matching namespaces will be stripped.
1027
+ */
1028
+ static VALUE
1029
+ sax_parse(int argc, VALUE *argv, VALUE self) {
1030
+ struct _SaxOptions options;
1031
+
1032
+ options.symbolize = (No != ox_default_options.sym_keys);
1033
+ options.convert_special = ox_default_options.convert_special;
1034
+ options.smart = (Yes == ox_default_options.smart);
1035
+ options.skip = ox_default_options.skip;
1036
+ options.hints = NULL;
1037
+ strcpy(options.strip_ns, ox_default_options.strip_ns);
1038
+
1039
+ if (argc < 2) {
1040
+ rb_raise(ox_parse_error_class, "Wrong number of arguments to sax_parse.\n");
1041
+ }
1042
+ if (3 <= argc && rb_cHash == rb_obj_class(argv[2])) {
1043
+ VALUE h = argv[2];
1044
+ VALUE v;
1045
+
1046
+ if (Qnil != (v = rb_hash_lookup(h, convert_special_sym))) {
1047
+ options.convert_special = (Qtrue == v);
1048
+ }
1049
+ if (Qnil != (v = rb_hash_lookup(h, smart_sym))) {
1050
+ options.smart = (Qtrue == v);
1051
+ }
1052
+ if (Qnil != (v = rb_hash_lookup(h, symbolize_sym))) {
1053
+ options.symbolize = (Qtrue == v);
1054
+ }
1055
+ if (Qnil != (v = rb_hash_lookup(h, skip_sym))) {
1056
+ if (skip_return_sym == v) {
1057
+ options.skip = CrSkip;
1058
+ } else if (skip_white_sym == v) {
1059
+ options.skip = SpcSkip;
1060
+ } else if (skip_none_sym == v) {
1061
+ options.skip = NoSkip;
1062
+ } else if (skip_off_sym == v) {
1063
+ options.skip = OffSkip;
1064
+ }
1065
+ }
1066
+ if (Qnil != (v = rb_hash_lookup(h, strip_namespace_sym))) {
1067
+ if (Qfalse == v) {
1068
+ *options.strip_ns = '\0';
1069
+ } else if (Qtrue == v) {
1070
+ *options.strip_ns = '*';
1071
+ options.strip_ns[1] = '\0';
1072
+ } else {
1073
+ long slen;
1074
+
1075
+ Check_Type(v, T_STRING);
1076
+ slen = RSTRING_LEN(v);
1077
+ if (sizeof(options.strip_ns) - 1 < (size_t)slen) {
1078
+ rb_raise(ox_parse_error_class, ":strip_namespace can be no longer than %d characters.",
1079
+ (int)sizeof(options.strip_ns) - 1);
1080
+ }
1081
+ strncpy(options.strip_ns, StringValuePtr(v), sizeof(options.strip_ns) - 1);
1082
+ options.strip_ns[sizeof(options.strip_ns) - 1] = '\0';
1083
+ }
1084
+ }
1085
+ }
1086
+ ox_sax_parse(argv[0], argv[1], &options);
1087
+
1088
+ return Qnil;
1089
+ }
1090
+
1091
+ /* call-seq: sax_html(handler, io, options)
1092
+ *
1093
+ * Parses an IO stream or file containing an XML document. Raises an exception
1094
+ * if the XML is malformed or the classes specified are not valid.
1095
+ * - +handler+ [Ox::Sax] SAX (responds to OX::Sax methods) like handler
1096
+ * - +io+ [IO|String] IO Object to read from
1097
+ * - +options+ [Hash] options parse options
1098
+ * - *:convert_special* [true|false] flag indicating special characters like &lt; are converted
1099
+ * - *:symbolize* [true|false] flag indicating the parser symbolize element and attribute names
1100
+ * - *:skip* [:skip_none|:skip_return|:skip_white|:skip_off] flag indicating the parser skips \\r or collapse white space into a single space. Default (skip space)
1101
+ * - *:overlay* [Hash] a Hash of keys that match html element names and values that are one of
1102
+ * - _:active_ - make the normal callback for the element
1103
+ * - _:nest_ok_ - active but ignore nest check
1104
+ * - _:inactive_ - do not make the element start, end, or attribute callbacks for this element only
1105
+ * - _:block_ - block this and all children callbacks
1106
+ * - _:off_ - block this element and it's children unless the child element is active
1107
+ * - _:abort_ - abort the html processing and return
1108
+ */
1109
+ static VALUE
1110
+ sax_html(int argc, VALUE *argv, VALUE self) {
1111
+ struct _SaxOptions options;
1112
+ bool free_hints = false;
1113
+
1114
+ options.symbolize = (No != ox_default_options.sym_keys);
1115
+ options.convert_special = ox_default_options.convert_special;
1116
+ options.smart = true;
1117
+ options.skip = ox_default_options.skip;
1118
+ options.hints = ox_default_options.html_hints;
1119
+ if (NULL == options.hints) {
1120
+ options.hints = ox_hints_html();
1121
+ }
1122
+ *options.strip_ns = '\0';
1123
+
1124
+ if (argc < 2) {
1125
+ rb_raise(ox_parse_error_class, "Wrong number of arguments to sax_html.\n");
1126
+ }
1127
+ if (3 <= argc && rb_cHash == rb_obj_class(argv[2])) {
1128
+ volatile VALUE h = argv[2];
1129
+ volatile VALUE v;
1130
+
1131
+ if (Qnil != (v = rb_hash_lookup(h, convert_special_sym))) {
1132
+ options.convert_special = (Qtrue == v);
1133
+ }
1134
+ if (Qnil != (v = rb_hash_lookup(h, symbolize_sym))) {
1135
+ options.symbolize = (Qtrue == v);
1136
+ }
1137
+ if (Qnil != (v = rb_hash_lookup(h, skip_sym))) {
1138
+ if (skip_return_sym == v) {
1139
+ options.skip = CrSkip;
1140
+ } else if (skip_white_sym == v) {
1141
+ options.skip = SpcSkip;
1142
+ } else if (skip_none_sym == v) {
1143
+ options.skip = NoSkip;
1144
+ } else if (skip_off_sym == v) {
1145
+ options.skip = OffSkip;
1146
+ }
1147
+ }
1148
+ if (Qnil != (v = rb_hash_lookup(h, overlay_sym))) {
1149
+ int cnt;
1150
+
1151
+ Check_Type(v, T_HASH);
1152
+ cnt = (int)RHASH_SIZE(v);
1153
+ if (0 == cnt) {
1154
+ options.hints = ox_hints_html();
1155
+ } else {
1156
+ options.hints = ox_hints_dup(options.hints);
1157
+ free_hints = true;
1158
+ rb_hash_foreach(v, set_overlay, (VALUE)options.hints);
1159
+ }
1160
+ }
1161
+ }
1162
+ ox_sax_parse(argv[0], argv[1], &options);
1163
+ if (free_hints) {
1164
+ ox_hints_destroy(options.hints);
1165
+ }
1166
+ return Qnil;
1167
+ }
1168
+
1169
+ static void
1170
+ parse_dump_options(VALUE ropts, Options copts) {
1171
+ struct _YesNoOpt ynos[] = {
1172
+ { with_xml_sym, &copts->with_xml },
1173
+ { with_dtd_sym, &copts->with_dtd },
1174
+ { with_instruct_sym, &copts->with_instruct },
1175
+ { xsd_date_sym, &copts->xsd_date },
1176
+ { circular_sym, &copts->circular },
1177
+ { Qnil, 0 }
1178
+ };
1179
+ YesNoOpt o;
1180
+
1181
+ if (rb_cHash == rb_obj_class(ropts)) {
1182
+ VALUE v;
1183
+
1184
+ if (Qnil != (v = rb_hash_lookup(ropts, ox_indent_sym))) {
1185
+ #ifdef RUBY_INTEGER_UNIFICATION
1186
+ if (rb_cInteger != rb_obj_class(v) && T_FIXNUM != rb_type(v)) {
1187
+ #else
1188
+ if (rb_cFixnum != rb_obj_class(v)) {
1189
+ #endif
1190
+ rb_raise(ox_parse_error_class, ":indent must be a Fixnum.\n");
1191
+ }
1192
+ copts->indent = NUM2INT(v);
1193
+ }
1194
+ if (Qnil != (v = rb_hash_lookup(ropts, trace_sym))) {
1195
+ #ifdef RUBY_INTEGER_UNIFICATION
1196
+ if (rb_cInteger != rb_obj_class(v) && T_FIXNUM != rb_type(v)) {
1197
+ #else
1198
+ if (rb_cFixnum != rb_obj_class(v)) {
1199
+ #endif
1200
+ rb_raise(ox_parse_error_class, ":trace must be a Fixnum.\n");
1201
+ }
1202
+ copts->trace = NUM2INT(v);
1203
+ }
1204
+ if (Qnil != (v = rb_hash_lookup(ropts, ox_encoding_sym))) {
1205
+ if (rb_cString != rb_obj_class(v)) {
1206
+ rb_raise(ox_parse_error_class, ":encoding must be a String.\n");
1207
+ }
1208
+ strncpy(copts->encoding, StringValuePtr(v), sizeof(copts->encoding) - 1);
1209
+ }
1210
+ if (Qnil != (v = rb_hash_lookup(ropts, effort_sym))) {
1211
+ if (auto_define_sym == v) {
1212
+ copts->effort = AutoEffort;
1213
+ } else if (tolerant_sym == v) {
1214
+ copts->effort = TolerantEffort;
1215
+ } else if (strict_sym == v) {
1216
+ copts->effort = StrictEffort;
1217
+ } else {
1218
+ rb_raise(ox_parse_error_class, ":effort must be :strict, :tolerant, or :auto_define.\n");
1219
+ }
1220
+ }
1221
+ v = rb_hash_lookup(ropts, invalid_replace_sym);
1222
+ if (Qnil == v) {
1223
+ if (Qtrue == rb_funcall(ropts, has_key_id, 1, invalid_replace_sym)) {
1224
+ copts->allow_invalid = Yes;
1225
+ }
1226
+ } else {
1227
+ long slen;
1228
+
1229
+ Check_Type(v, T_STRING);
1230
+ slen = RSTRING_LEN(v);
1231
+ if (sizeof(copts->inv_repl) - 2 < (size_t)slen) {
1232
+ rb_raise(ox_parse_error_class, ":invalid_replace can be no longer than %d characters.",
1233
+ (int)sizeof(copts->inv_repl) - 2);
1234
+ }
1235
+ strncpy(copts->inv_repl + 1, StringValuePtr(v), sizeof(copts->inv_repl) - 1);
1236
+ copts->inv_repl[sizeof(copts->inv_repl) - 1] = '\0';
1237
+ *copts->inv_repl = (char)slen;
1238
+ copts->allow_invalid = No;
1239
+ }
1240
+ v = rb_hash_lookup(ropts, margin_sym);
1241
+ if (Qnil != v) {
1242
+ long slen;
1243
+
1244
+ Check_Type(v, T_STRING);
1245
+ slen = RSTRING_LEN(v);
1246
+ if (sizeof(copts->margin) - 2 < (size_t)slen) {
1247
+ rb_raise(ox_parse_error_class, ":margin can be no longer than %d characters.",
1248
+ (int)sizeof(copts->margin) - 2);
1249
+ }
1250
+ strncpy(copts->margin, StringValuePtr(v), sizeof(copts->margin) - 1);
1251
+ copts->margin[sizeof(copts->margin) - 1] = '\0';
1252
+ copts->margin_len = (char)slen;
1253
+ }
1254
+
1255
+ for (o = ynos; 0 != o->attr; o++) {
1256
+ if (Qnil != (v = rb_hash_lookup(ropts, o->sym))) {
1257
+ VALUE c = rb_obj_class(v);
1258
+
1259
+ if (rb_cTrueClass == c) {
1260
+ *o->attr = Yes;
1261
+ } else if (rb_cFalseClass == c) {
1262
+ *o->attr = No;
1263
+ } else {
1264
+ rb_raise(ox_parse_error_class, "%s must be true or false.\n", rb_id2name(SYM2ID(o->sym)));
1265
+ }
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+
1271
+ /* call-seq: dump(obj, options) => xml-string
1272
+ *
1273
+ * Dumps an Object (obj) to a string.
1274
+ * - +obj+ [Object] Object to serialize as an XML document String
1275
+ * - +options+ [Hash] formating options
1276
+ * - *:indent* [Fixnum] format expected
1277
+ * - *:xsd_date* [true|false] use XSD date format if true, default: false
1278
+ * - *:circular* [true|false] allow circular references, default: false
1279
+ * - *:strict|:tolerant]* [ :effort effort to use when an undumpable object (e.g., IO) is encountered, default: :strict
1280
+ * - _:strict_ - raise an NotImplementedError if an undumpable object is encountered
1281
+ * - _:tolerant_ - replaces undumplable objects with nil
1282
+ *
1283
+ * Note that an indent of less than zero will result in a tight one line output
1284
+ * unless the text in the XML fields contain new line characters.
1285
+ */
1286
+ static VALUE
1287
+ dump(int argc, VALUE *argv, VALUE self) {
1288
+ char *xml;
1289
+ struct _Options copts = ox_default_options;
1290
+ VALUE rstr;
1291
+
1292
+ if (2 == argc) {
1293
+ parse_dump_options(argv[1], &copts);
1294
+ }
1295
+ if (0 == (xml = ox_write_obj_to_str(*argv, &copts))) {
1296
+ rb_raise(rb_eNoMemError, "Not enough memory.\n");
1297
+ }
1298
+ rstr = rb_str_new2(xml);
1299
+ #if HAS_ENCODING_SUPPORT
1300
+ if ('\0' != *copts.encoding) {
1301
+ rb_enc_associate(rstr, rb_enc_find(copts.encoding));
1302
+ }
1303
+ #elif HAS_PRIVATE_ENCODING
1304
+ if ('\0' != *copts.encoding) {
1305
+ rb_funcall(rstr, ox_force_encoding_id, 1, rb_str_new2(copts.encoding));
1306
+ }
1307
+ #endif
1308
+ xfree(xml);
1309
+
1310
+ return rstr;
1311
+ }
1312
+
1313
+ /* call-seq: to_file(file_path, obj, options)
1314
+ *
1315
+ * Dumps an Object to the specified file.
1316
+ * - +file_path+ [String] file path to write the XML document to
1317
+ * - +obj+ [Object] Object to serialize as an XML document String
1318
+ * - +options+ [Hash] formating options
1319
+ * - *:indent* [Fixnum] format expected
1320
+ * - *:xsd_date* [true|false] use XSD date format if true, default: false
1321
+ * - *:circular* [true|false] allow circular references, default: false
1322
+ * - *:strict|:tolerant]* [ :effort effort to use when an undumpable object (e.g., IO) is encountered, default: :strict
1323
+ * - _:strict_ - raise an NotImplementedError if an undumpable object is encountered
1324
+ * - _:tolerant_ - replaces undumplable objects with nil
1325
+ *
1326
+ * Note that an indent of less than zero will result in a tight one line output
1327
+ * unless the text in the XML fields contain new line characters.
1328
+ */
1329
+ static VALUE
1330
+ to_file(int argc, VALUE *argv, VALUE self) {
1331
+ struct _Options copts = ox_default_options;
1332
+
1333
+ if (3 == argc) {
1334
+ parse_dump_options(argv[2], &copts);
1335
+ }
1336
+ Check_Type(*argv, T_STRING);
1337
+ ox_write_obj_to_file(argv[1], StringValuePtr(*argv), &copts);
1338
+
1339
+ return Qnil;
1340
+ }
1341
+
1342
+ #if WITH_CACHE_TESTS
1343
+ extern void ox_cache_test(void);
1344
+
1345
+ static VALUE
1346
+ cache_test(VALUE self) {
1347
+ ox_cache_test();
1348
+ return Qnil;
1349
+ }
1350
+
1351
+ extern void ox_cache8_test(void);
1352
+
1353
+ static VALUE
1354
+ cache8_test(VALUE self) {
1355
+ ox_cache8_test();
1356
+ return Qnil;
1357
+ }
1358
+ #endif
1359
+
1360
+ void Init_ox() {
1361
+ Ox = rb_define_module("Ox");
1362
+
1363
+ rb_define_module_function(Ox, "default_options", get_def_opts, 0);
1364
+ rb_define_module_function(Ox, "default_options=", set_def_opts, 1);
1365
+
1366
+ rb_define_module_function(Ox, "parse_obj", to_obj, 1);
1367
+ rb_define_module_function(Ox, "parse", to_gen, 1);
1368
+ rb_define_module_function(Ox, "load", load_str, -1);
1369
+ rb_define_module_function(Ox, "sax_parse", sax_parse, -1);
1370
+ rb_define_module_function(Ox, "sax_html", sax_html, -1);
1371
+
1372
+ rb_define_module_function(Ox, "to_xml", dump, -1);
1373
+ rb_define_module_function(Ox, "dump", dump, -1);
1374
+
1375
+ rb_define_module_function(Ox, "load_file", load_file, -1);
1376
+ rb_define_module_function(Ox, "to_file", to_file, -1);
1377
+
1378
+ rb_define_module_function(Ox, "sax_html_overlay", sax_html_overlay, 0);
1379
+
1380
+ ox_init_builder(Ox);
1381
+
1382
+ rb_require("time");
1383
+ rb_require("date");
1384
+ rb_require("bigdecimal");
1385
+ rb_require("stringio");
1386
+
1387
+ ox_abort_id = rb_intern("abort");
1388
+ ox_at_column_id = rb_intern("@column");
1389
+ ox_at_content_id = rb_intern("@content");
1390
+ ox_at_id = rb_intern("at");
1391
+ ox_at_line_id = rb_intern("@line");
1392
+ ox_at_pos_id = rb_intern("@pos");
1393
+ ox_at_value_id = rb_intern("@value");
1394
+ ox_attr_id = rb_intern("attr");
1395
+ ox_attr_value_id = rb_intern("attr_value");
1396
+ ox_attributes_id = rb_intern("@attributes");
1397
+ ox_attrs_done_id = rb_intern("attrs_done");
1398
+ ox_beg_id = rb_intern("@beg");
1399
+ ox_bigdecimal_id = rb_intern("BigDecimal");
1400
+ ox_call_id = rb_intern("call");
1401
+ ox_cdata_id = rb_intern("cdata");
1402
+ ox_comment_id = rb_intern("comment");
1403
+ ox_den_id = rb_intern("@den");
1404
+ ox_doctype_id = rb_intern("doctype");
1405
+ ox_end_element_id = rb_intern("end_element");
1406
+ ox_end_id = rb_intern("@end");
1407
+ ox_end_instruct_id = rb_intern("end_instruct");
1408
+ ox_error_id = rb_intern("error");
1409
+ ox_excl_id = rb_intern("@excl");
1410
+ ox_external_encoding_id = rb_intern("external_encoding");
1411
+ ox_fileno_id = rb_intern("fileno");
1412
+ ox_force_encoding_id = rb_intern("force_encoding");
1413
+ ox_inspect_id = rb_intern("inspect");
1414
+ ox_instruct_id = rb_intern("instruct");
1415
+ ox_jd_id = rb_intern("jd");
1416
+ ox_keys_id = rb_intern("keys");
1417
+ ox_local_id = rb_intern("local");
1418
+ ox_mesg_id = rb_intern("mesg");
1419
+ ox_message_id = rb_intern("message");
1420
+ ox_nodes_id = rb_intern("@nodes");
1421
+ ox_new_id = rb_intern("new");
1422
+ ox_num_id = rb_intern("@num");
1423
+ ox_parse_id = rb_intern("parse");
1424
+ ox_pos_id = rb_intern("pos");
1425
+ ox_read_id = rb_intern("read");
1426
+ ox_readpartial_id = rb_intern("readpartial");
1427
+ ox_start_element_id = rb_intern("start_element");
1428
+ ox_string_id = rb_intern("string");
1429
+ ox_text_id = rb_intern("text");
1430
+ ox_to_c_id = rb_intern("to_c");
1431
+ ox_to_s_id = rb_intern("to_s");
1432
+ ox_to_sym_id = rb_intern("to_sym");
1433
+ ox_tv_nsec_id = rb_intern("tv_nsec");
1434
+ ox_tv_sec_id = rb_intern("tv_sec");
1435
+ ox_tv_usec_id = rb_intern("tv_usec");
1436
+ ox_value_id = rb_intern("value");
1437
+
1438
+ encoding_id = rb_intern("encoding");
1439
+ has_key_id = rb_intern("has_key?");
1440
+
1441
+ rb_require("ox/version");
1442
+ rb_require("ox/error");
1443
+ rb_require("ox/hasattrs");
1444
+ rb_require("ox/node");
1445
+ rb_require("ox/comment");
1446
+ rb_require("ox/instruct");
1447
+ rb_require("ox/cdata");
1448
+ rb_require("ox/doctype");
1449
+ rb_require("ox/element");
1450
+ rb_require("ox/document");
1451
+ rb_require("ox/bag");
1452
+ rb_require("ox/sax");
1453
+
1454
+ ox_time_class = rb_const_get(rb_cObject, rb_intern("Time"));
1455
+ ox_date_class = rb_const_get(rb_cObject, rb_intern("Date"));
1456
+ ox_parse_error_class = rb_const_get_at(Ox, rb_intern("ParseError"));
1457
+ ox_arg_error_class = rb_const_get_at(Ox, rb_intern("ArgError"));
1458
+ ox_struct_class = rb_const_get(rb_cObject, rb_intern("Struct"));
1459
+ ox_stringio_class = rb_const_get(rb_cObject, rb_intern("StringIO"));
1460
+ ox_bigdecimal_class = rb_const_get(rb_cObject, rb_intern("BigDecimal"));
1461
+
1462
+ abort_sym = ID2SYM(rb_intern("abort")); rb_gc_register_address(&abort_sym);
1463
+ active_sym = ID2SYM(rb_intern("active")); rb_gc_register_address(&active_sym);
1464
+ attr_key_mod_sym = ID2SYM(rb_intern("attr_key_mod")); rb_gc_register_address(&attr_key_mod_sym);
1465
+ auto_define_sym = ID2SYM(rb_intern("auto_define")); rb_gc_register_address(&auto_define_sym);
1466
+ auto_sym = ID2SYM(rb_intern("auto")); rb_gc_register_address(&auto_sym);
1467
+ block_sym = ID2SYM(rb_intern("block")); rb_gc_register_address(&block_sym);
1468
+ circular_sym = ID2SYM(rb_intern("circular")); rb_gc_register_address(&circular_sym);
1469
+ convert_special_sym = ID2SYM(rb_intern("convert_special")); rb_gc_register_address(&convert_special_sym);
1470
+ effort_sym = ID2SYM(rb_intern("effort")); rb_gc_register_address(&effort_sym);
1471
+ element_key_mod_sym = ID2SYM(rb_intern("element_key_mod")); rb_gc_register_address(&element_key_mod_sym);
1472
+ generic_sym = ID2SYM(rb_intern("generic")); rb_gc_register_address(&generic_sym);
1473
+ hash_no_attrs_sym = ID2SYM(rb_intern("hash_no_attrs")); rb_gc_register_address(&hash_no_attrs_sym);
1474
+ hash_sym = ID2SYM(rb_intern("hash")); rb_gc_register_address(&hash_sym);
1475
+ inactive_sym = ID2SYM(rb_intern("inactive")); rb_gc_register_address(&inactive_sym);
1476
+ invalid_replace_sym = ID2SYM(rb_intern("invalid_replace")); rb_gc_register_address(&invalid_replace_sym);
1477
+ limited_sym = ID2SYM(rb_intern("limited")); rb_gc_register_address(&limited_sym);
1478
+ margin_sym = ID2SYM(rb_intern("margin")); rb_gc_register_address(&margin_sym);
1479
+ mode_sym = ID2SYM(rb_intern("mode")); rb_gc_register_address(&mode_sym);
1480
+ nest_ok_sym = ID2SYM(rb_intern("nest_ok")); rb_gc_register_address(&nest_ok_sym);
1481
+ object_sym = ID2SYM(rb_intern("object")); rb_gc_register_address(&object_sym);
1482
+ off_sym = ID2SYM(rb_intern("off")); rb_gc_register_address(&off_sym);
1483
+ opt_format_sym = ID2SYM(rb_intern("opt_format")); rb_gc_register_address(&opt_format_sym);
1484
+ optimized_sym = ID2SYM(rb_intern("optimized")); rb_gc_register_address(&optimized_sym);
1485
+ overlay_sym = ID2SYM(rb_intern("overlay")); rb_gc_register_address(&overlay_sym);
1486
+ ox_encoding_sym = ID2SYM(rb_intern("encoding")); rb_gc_register_address(&ox_encoding_sym);
1487
+ ox_indent_sym = ID2SYM(rb_intern("indent")); rb_gc_register_address(&ox_indent_sym);
1488
+ ox_size_sym = ID2SYM(rb_intern("size")); rb_gc_register_address(&ox_size_sym);
1489
+ ox_standalone_sym = ID2SYM(rb_intern("standalone")); rb_gc_register_address(&ox_standalone_sym);
1490
+ ox_version_sym = ID2SYM(rb_intern("version")); rb_gc_register_address(&ox_version_sym);
1491
+ skip_none_sym = ID2SYM(rb_intern("skip_none")); rb_gc_register_address(&skip_none_sym);
1492
+ skip_off_sym = ID2SYM(rb_intern("skip_off")); rb_gc_register_address(&skip_off_sym);
1493
+ skip_return_sym = ID2SYM(rb_intern("skip_return")); rb_gc_register_address(&skip_return_sym);
1494
+ skip_sym = ID2SYM(rb_intern("skip")); rb_gc_register_address(&skip_sym);
1495
+ skip_white_sym = ID2SYM(rb_intern("skip_white")); rb_gc_register_address(&skip_white_sym);
1496
+ smart_sym = ID2SYM(rb_intern("smart")); rb_gc_register_address(&smart_sym);
1497
+ strict_sym = ID2SYM(rb_intern("strict")); rb_gc_register_address(&strict_sym);
1498
+ strip_namespace_sym = ID2SYM(rb_intern("strip_namespace")); rb_gc_register_address(&strip_namespace_sym);
1499
+ symbolize_keys_sym = ID2SYM(rb_intern("symbolize_keys")); rb_gc_register_address(&symbolize_keys_sym);
1500
+ symbolize_sym = ID2SYM(rb_intern("symbolize")); rb_gc_register_address(&symbolize_sym);
1501
+ tolerant_sym = ID2SYM(rb_intern("tolerant")); rb_gc_register_address(&tolerant_sym);
1502
+ trace_sym = ID2SYM(rb_intern("trace")); rb_gc_register_address(&trace_sym);
1503
+ with_dtd_sym = ID2SYM(rb_intern("with_dtd")); rb_gc_register_address(&with_dtd_sym);
1504
+ with_instruct_sym = ID2SYM(rb_intern("with_instructions")); rb_gc_register_address(&with_instruct_sym);
1505
+ with_xml_sym = ID2SYM(rb_intern("with_xml")); rb_gc_register_address(&with_xml_sym);
1506
+ xsd_date_sym = ID2SYM(rb_intern("xsd_date")); rb_gc_register_address(&xsd_date_sym);
1507
+
1508
+ ox_empty_string = rb_str_new2(""); rb_gc_register_address(&ox_empty_string);
1509
+ ox_zero_fixnum = INT2NUM(0); rb_gc_register_address(&ox_zero_fixnum);
1510
+ ox_sym_bank = rb_ary_new(); rb_gc_register_address(&ox_sym_bank);
1511
+
1512
+ ox_document_clas = rb_const_get_at(Ox, rb_intern("Document"));
1513
+ ox_element_clas = rb_const_get_at(Ox, rb_intern("Element"));
1514
+ ox_instruct_clas = rb_const_get_at(Ox, rb_intern("Instruct"));
1515
+ ox_comment_clas = rb_const_get_at(Ox, rb_intern("Comment"));
1516
+ ox_raw_clas = rb_const_get_at(Ox, rb_intern("Raw"));
1517
+ ox_doctype_clas = rb_const_get_at(Ox, rb_intern("DocType"));
1518
+ ox_cdata_clas = rb_const_get_at(Ox, rb_intern("CData"));
1519
+ ox_bag_clas = rb_const_get_at(Ox, rb_intern("Bag"));
1520
+
1521
+ ox_cache_new(&ox_symbol_cache);
1522
+ ox_cache_new(&ox_class_cache);
1523
+ ox_cache_new(&ox_attr_cache);
1524
+
1525
+ ox_sax_define();
1526
+
1527
+ #if WITH_CACHE_TESTS
1528
+ // space added to stop yardoc from trying to document
1529
+ rb_define _module_function(Ox, "cache_test", cache_test, 0);
1530
+ rb_define _module_function(Ox, "cache8_test", cache8_test, 0);
1531
+ #endif
1532
+
1533
+ #if HAS_ENCODING_SUPPORT
1534
+ ox_utf8_encoding = rb_enc_find("UTF-8");
1535
+ #elif HAS_PRIVATE_ENCODING
1536
+ ox_utf8_encoding = rb_str_new2("UTF-8");
1537
+ rb_gc_register_address(&ox_utf8_encoding);
1538
+ #endif
1539
+ }
1540
+
1541
+ #if __GNUC__ > 4
1542
+ _Noreturn void
1543
+ #else
1544
+ void
1545
+ #endif
1546
+ _ox_raise_error(const char *msg, const char *xml, const char *current, const char* file, int line) {
1547
+ int xline = 1;
1548
+ int col = 1;
1549
+
1550
+ for (; xml < current && '\n' != *current; current--) {
1551
+ col++;
1552
+ }
1553
+ for (; xml < current; current--) {
1554
+ if ('\n' == *current) {
1555
+ xline++;
1556
+ }
1557
+ }
1558
+ #if HAS_GC_GUARD
1559
+ rb_gc_enable();
1560
+ #endif
1561
+ rb_raise(ox_parse_error_class, "%s at line %d, column %d [%s:%d]\n", msg, xline, col, file, line);
1562
+ }