xaiml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.reek.yml +95 -0
- data/.rspec +2 -0
- data/.rubocop.yml +21 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/README.md +35 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/xaiml/document.rb +87 -0
- data/lib/xaiml/element/base.rb +19 -0
- data/lib/xaiml/element/category.rb +12 -0
- data/lib/xaiml/element/condition.rb +7 -0
- data/lib/xaiml/element/conditional_random.rb +7 -0
- data/lib/xaiml/element/ext.rb +7 -0
- data/lib/xaiml/element/topic.rb +7 -0
- data/lib/xaiml/element.rb +28 -0
- data/lib/xaiml/exceptions.rb +4 -0
- data/lib/xaiml/version.rb +3 -0
- data/lib/xaiml.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/bin/coderay +27 -0
- data/vendor/bundle/ruby/2.5.0/bin/htmldiff +29 -0
- data/vendor/bundle/ruby/2.5.0/bin/ldiff +29 -0
- data/vendor/bundle/ruby/2.5.0/bin/pry +27 -0
- data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
- data/vendor/bundle/ruby/2.5.0/bin/rspec +27 -0
- data/vendor/bundle/ruby/2.5.0/cache/coderay-1.1.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/diff-lcs-1.3.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/method_source-0.9.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/ox-2.10.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/pry-0.11.3.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rake-10.5.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.8.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.8.0.gem +0 -0
- 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
- 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
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/ox-2.10.0/ox.bundle +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/MIT-LICENSE +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/README_INDEX.rdoc +123 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/bin/coderay +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/duo.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +190 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +108 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +166 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +333 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +59 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +95 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +195 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +111 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +95 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +151 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +221 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +189 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +217 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +217 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +196 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +144 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +221 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +208 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +268 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +168 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +421 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +174 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +237 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +280 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +527 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +287 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +178 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +477 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +232 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +337 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +169 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +140 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +153 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles/style.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/styles.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens.rb +161 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay.rb +284 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/.rspec +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Contributing.md +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/History.md +220 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/License.md +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/README.rdoc +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Rakefile +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.gemtest +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.travis.yml +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/.yardopts +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Gemfile +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/LICENSE +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/README.markdown +91 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/Rakefile +80 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/code_helpers.rb +154 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/source_location.rb +138 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/lib/method_source.rb +141 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/method_source.gemspec +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source/code_helpers_spec.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/method_source_spec.rb +143 -0
- data/vendor/bundle/ruby/2.5.0/gems/method_source-0.9.0/spec/spec_helper.rb +101 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/CHANGELOG.md +455 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/LICENSE +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/README.md +307 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/.sitearchdir.time +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/Makefile +264 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/attr.h +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.c +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.h +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/base64.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/buf.h +160 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.c +937 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/builder.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.c +160 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.h +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.c +109 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.h +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/cache8.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.c +1321 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/dump.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.c +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/extconf.rb +67 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.c +492 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/gen_load.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.c +228 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/hash_load.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/helper.h +91 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.c +986 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/obj_load.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.bundle +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.c +1562 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.h +279 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/ox.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.c +1177 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/parse.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.c +1750 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.h +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.c +276 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_as.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.c +228 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.h +222 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_buf.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_has.h +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.c +216 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.h +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_hint.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/sax_stack.h +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.c +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.h +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/special.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/type.h +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/bag.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/cdata.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/comment.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/doctype.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/document.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/element.rb +319 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/error.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/hasattrs.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/instruct.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/node.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/raw.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/sax.rb +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox/xmlrpc_adapter.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.bundle +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/lib/ox.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/CHANGELOG.md +797 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/LICENSE +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/README.md +407 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/bin/pry +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/basic_object.rb +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/cli.rb +225 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_file.rb +109 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/code_range.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code/loc.rb +92 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code.rb +353 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/code_object.rb +195 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/color_printer.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command.rb +716 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/command_set.rb +450 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/amend_line.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/bang_pry.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/abstract_formatter.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/exception_formatter.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/file_formatter.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat/input_expression_formatter.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cat.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/cd.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_inspector.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/change_prompt.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/code_collector.rb +167 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disable_pry.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/disabled_commands.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/easter_eggs.rb +112 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/exception_patcher.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit/file_and_line_locator.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/edit.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_all.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/exit_program.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/find_method.rb +193 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/fix_indent.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_cd.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_install.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_list.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_readme.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_search.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gist.rb +101 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/help.rb +164 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/hist.rb +180 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/import_set.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/install_command.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/jump_to.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_inspectors.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/list_prompts.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/constants.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/formatter.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/globals.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/grep.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/instance_vars.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/interrogatable.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/jruby_hacks.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_names.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/local_vars.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/ls_entity.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/methods_helper.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/nesting.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/play.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_backtrace.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/pry_version.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/raise_up.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reload_code.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/reset.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ri.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/save_file.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_command.rb +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/shell_mode.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_doc.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_info.rb +209 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_input.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/show_source.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/simple_prompt.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/stat.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/switch_to.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/toggle_color.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression/expression.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/watch_expression.rb +105 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/whereami.rb +197 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/wtf.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands.rb +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/behavior.rb +231 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/convenience.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/default.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config/memoization.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/config.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/core_extensions.rb +141 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/editor.rb +135 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/exceptions.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/forwardable.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/base_helpers.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/command_helpers.rb +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/documentation_helpers.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/options_helpers.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/table.rb +109 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers/text.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/helpers.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history.rb +148 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/history_array.rb +121 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/hooks.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/indent.rb +410 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_completer.rb +260 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/input_lock.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/inspector.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/last_exception.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/disowned.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/patcher.rb +122 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method/weird_method_locator.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/method.rb +546 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/object_path.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/output.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pager.rb +242 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/platform.rb +93 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/plugins.rb +118 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/prompt.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb +401 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/pry_instance.rb +666 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rbx_path.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl.rb +232 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/repl_file_loader.rb +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/rubygem.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/LICENSE +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/commands.rb +196 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop/option.rb +208 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/slop.rb +661 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/terminal.rb +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/mockable.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/pry_tester.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/utility.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/variables.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module/candidate.rb +131 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/wrapped_module.rb +378 -0
- data/vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry.rb +162 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.autotest +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.togglerc +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/History.rdoc +659 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Manifest.txt +166 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/README.rdoc +139 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Rakefile +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/bin/rake +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/helper.rb +129 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/README.md +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.document +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/.yardopts +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/README.md +384 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/.rspec +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.document +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/.yardopts +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/Changelog.md +1110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/README.md +305 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/configuration.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/all.rb +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be.rb +288 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb +271 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/include.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/respond_to.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- 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
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/yield.rb +432 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/dsl.rb +527 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers.rb +1034 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.document +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/.yardopts +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/README.md +460 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/README.md +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/specifications/coderay-1.1.2.gemspec +26 -0
- data/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec +61 -0
- data/vendor/bundle/ruby/2.5.0/specifications/method_source-0.9.0.gemspec +34 -0
- data/vendor/bundle/ruby/2.5.0/specifications/ox-2.10.0.gemspec +0 -0
- data/vendor/bundle/ruby/2.5.0/specifications/pry-0.11.3.gemspec +41 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rake-10.5.0.gemspec +43 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.8.0.gemspec +42 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.8.0.gemspec +62 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.8.1.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.8.0.gemspec +41 -0
- data/xaiml.gemspec +25 -0
- metadata +891 -0
@@ -0,0 +1,1750 @@
|
|
1
|
+
/* sax.c
|
2
|
+
* Copyright (c) 2011, Peter Ohler
|
3
|
+
* All rights reserved.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include <ctype.h>
|
7
|
+
#include <stdlib.h>
|
8
|
+
#include <errno.h>
|
9
|
+
#include <stdio.h>
|
10
|
+
#include <strings.h>
|
11
|
+
#include <sys/types.h>
|
12
|
+
#if NEEDS_UIO
|
13
|
+
#include <sys/uio.h>
|
14
|
+
#endif
|
15
|
+
#include <unistd.h>
|
16
|
+
#include <time.h>
|
17
|
+
|
18
|
+
#include "ruby.h"
|
19
|
+
#include "ox.h"
|
20
|
+
#include "sax.h"
|
21
|
+
#include "sax_stack.h"
|
22
|
+
#include "sax_buf.h"
|
23
|
+
#include "special.h"
|
24
|
+
|
25
|
+
#define NAME_MISMATCH 1
|
26
|
+
|
27
|
+
#define START_STATE 1
|
28
|
+
#define BODY_STATE 2
|
29
|
+
#define AFTER_STATE 3
|
30
|
+
|
31
|
+
// error prefixes
|
32
|
+
#define BAD_BOM "Bad BOM: "
|
33
|
+
#define NO_TERM "Not Terminated: "
|
34
|
+
#define INVALID_FORMAT "Invalid Format: "
|
35
|
+
#define CASE_ERROR "Case Error: "
|
36
|
+
#define OUT_OF_ORDER "Out of Order: "
|
37
|
+
#define WRONG_CHAR "Unexpected Character: "
|
38
|
+
#define EL_MISMATCH "Start End Mismatch: "
|
39
|
+
#define INV_ELEMENT "Invalid Element: "
|
40
|
+
|
41
|
+
#define UTF8_STR "UTF-8"
|
42
|
+
|
43
|
+
static void sax_drive_init(SaxDrive dr, VALUE handler, VALUE io, SaxOptions options);
|
44
|
+
static void parse(SaxDrive dr);
|
45
|
+
// All read functions should return the next character after the 'thing' that was read and leave dr->cur one after that.
|
46
|
+
static char read_instruction(SaxDrive dr);
|
47
|
+
static char read_doctype(SaxDrive dr);
|
48
|
+
static char read_cdata(SaxDrive dr);
|
49
|
+
static char read_comment(SaxDrive dr);
|
50
|
+
static char read_element_start(SaxDrive dr);
|
51
|
+
static char read_element_end(SaxDrive dr);
|
52
|
+
static char read_text(SaxDrive dr);
|
53
|
+
static char read_jump(SaxDrive dr, const char *pat);
|
54
|
+
static char read_attrs(SaxDrive dr, char c, char termc, char term2, int is_xml, int eq_req, Hint h);
|
55
|
+
static char read_name_token(SaxDrive dr);
|
56
|
+
static char read_quoted_value(SaxDrive dr);
|
57
|
+
|
58
|
+
static void end_element_cb(SaxDrive dr, VALUE name, int pos, int line, int col, Hint h);
|
59
|
+
|
60
|
+
static void hint_clear_empty(SaxDrive dr);
|
61
|
+
static Nv hint_try_close(SaxDrive dr, const char *name);
|
62
|
+
|
63
|
+
VALUE ox_sax_value_class = Qnil;
|
64
|
+
|
65
|
+
static VALUE protect_parse(VALUE drp) {
|
66
|
+
parse((SaxDrive)drp);
|
67
|
+
|
68
|
+
return Qnil;
|
69
|
+
}
|
70
|
+
|
71
|
+
#if HAS_ENCODING_SUPPORT || HAS_PRIVATE_ENCODING
|
72
|
+
static int
|
73
|
+
strIsAscii(const char *s) {
|
74
|
+
for (; '\0' != *s; s++) {
|
75
|
+
if (*s < ' ' || '~' < *s) {
|
76
|
+
return 0;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
return 1;
|
80
|
+
}
|
81
|
+
#endif
|
82
|
+
|
83
|
+
VALUE
|
84
|
+
str2sym(SaxDrive dr, const char *str, const char **strp) {
|
85
|
+
VALUE *slot;
|
86
|
+
VALUE sym;
|
87
|
+
|
88
|
+
if (dr->options.symbolize) {
|
89
|
+
if (Qundef == (sym = ox_cache_get(ox_symbol_cache, str, &slot, strp))) {
|
90
|
+
#if HAS_ENCODING_SUPPORT
|
91
|
+
if (0 != dr->encoding && !strIsAscii(str)) {
|
92
|
+
VALUE rstr = rb_str_new2(str);
|
93
|
+
|
94
|
+
// TBD if sym can be pinned down then use this all the time
|
95
|
+
rb_enc_associate(rstr, dr->encoding);
|
96
|
+
sym = rb_funcall(rstr, ox_to_sym_id, 0);
|
97
|
+
*slot = Qundef;
|
98
|
+
} else {
|
99
|
+
sym = ID2SYM(rb_intern(str));
|
100
|
+
*slot = sym;
|
101
|
+
}
|
102
|
+
#elif HAS_PRIVATE_ENCODING
|
103
|
+
if (Qnil != dr->encoding && !strIsAscii(str)) {
|
104
|
+
VALUE rstr = rb_str_new2(str);
|
105
|
+
|
106
|
+
rb_funcall(rstr, ox_force_encoding_id, 1, dr->encoding);
|
107
|
+
sym = rb_funcall(rstr, ox_to_sym_id, 0);
|
108
|
+
// Needed for Ruby 2.2 to get around the GC of symbols created
|
109
|
+
// with to_sym which is needed for encoded symbols.
|
110
|
+
rb_ary_push(ox_sym_bank, sym);
|
111
|
+
*slot = Qundef;
|
112
|
+
} else {
|
113
|
+
sym = ID2SYM(rb_intern(str));
|
114
|
+
*slot = sym;
|
115
|
+
}
|
116
|
+
#else
|
117
|
+
sym = ID2SYM(rb_intern(str));
|
118
|
+
*slot = sym;
|
119
|
+
#endif
|
120
|
+
}
|
121
|
+
} else {
|
122
|
+
sym = rb_str_new2(str);
|
123
|
+
#if HAS_ENCODING_SUPPORT
|
124
|
+
if (0 != dr->encoding) {
|
125
|
+
rb_enc_associate(sym, dr->encoding);
|
126
|
+
}
|
127
|
+
#elif HAS_PRIVATE_ENCODING
|
128
|
+
if (Qnil != dr->encoding) {
|
129
|
+
rb_funcall(sym, ox_force_encoding_id, 1, dr->encoding);
|
130
|
+
}
|
131
|
+
#endif
|
132
|
+
if (0 != strp) {
|
133
|
+
*strp = StringValuePtr(sym);
|
134
|
+
}
|
135
|
+
}
|
136
|
+
return sym;
|
137
|
+
}
|
138
|
+
|
139
|
+
void
|
140
|
+
ox_sax_parse(VALUE handler, VALUE io, SaxOptions options) {
|
141
|
+
struct _SaxDrive dr;
|
142
|
+
int line = 0;
|
143
|
+
|
144
|
+
sax_drive_init(&dr, handler, io, options);
|
145
|
+
#if 0
|
146
|
+
printf("*** sax_parse with these flags\n");
|
147
|
+
printf(" has_instruct = %s\n", dr.has.instruct ? "true" : "false");
|
148
|
+
printf(" has_end_instruct = %s\n", dr.has.end_instruct ? "true" : "false");
|
149
|
+
printf(" has_attr = %s\n", dr.has.attr ? "true" : "false");
|
150
|
+
printf(" has_attr_value = %s\n", dr.has.attr_value ? "true" : "false");
|
151
|
+
printf(" has_attrs_done = %s\n", dr.has.attrs_done ? "true" : "false");
|
152
|
+
printf(" has_doctype = %s\n", dr.has.doctype ? "true" : "false");
|
153
|
+
printf(" has_comment = %s\n", dr.has.comment ? "true" : "false");
|
154
|
+
printf(" has_cdata = %s\n", dr.has.cdata ? "true" : "false");
|
155
|
+
printf(" has_text = %s\n", dr.has.text ? "true" : "false");
|
156
|
+
printf(" has_value = %s\n", dr.has.value ? "true" : "false");
|
157
|
+
printf(" has_start_element = %s\n", dr.has.start_element ? "true" : "false");
|
158
|
+
printf(" has_end_element = %s\n", dr.has.end_element ? "true" : "false");
|
159
|
+
printf(" has_error = %s\n", dr.has.error ? "true" : "false");
|
160
|
+
printf(" has_pos = %s\n", dr.has.pos ? "true" : "false");
|
161
|
+
printf(" has_line = %s\n", dr.has.line ? "true" : "false");
|
162
|
+
printf(" has_column = %s\n", dr.has.column ? "true" : "false");
|
163
|
+
#endif
|
164
|
+
//parse(&dr);
|
165
|
+
rb_protect(protect_parse, (VALUE)&dr, &line);
|
166
|
+
ox_sax_drive_cleanup(&dr);
|
167
|
+
if (0 != line) {
|
168
|
+
rb_jump_tag(line);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
static void
|
173
|
+
sax_drive_init(SaxDrive dr, VALUE handler, VALUE io, SaxOptions options) {
|
174
|
+
ox_sax_buf_init(&dr->buf, io);
|
175
|
+
dr->buf.dr = dr;
|
176
|
+
stack_init(&dr->stack);
|
177
|
+
dr->handler = handler;
|
178
|
+
dr->value_obj = Data_Wrap_Struct(ox_sax_value_class, 0, 0, dr);
|
179
|
+
rb_gc_register_address(&dr->value_obj);
|
180
|
+
dr->options = *options;
|
181
|
+
dr->err = 0;
|
182
|
+
dr->blocked = 0;
|
183
|
+
dr->abort = false;
|
184
|
+
has_init(&dr->has, handler);
|
185
|
+
#if HAS_ENCODING_SUPPORT
|
186
|
+
if ('\0' == *ox_default_options.encoding) {
|
187
|
+
VALUE encoding;
|
188
|
+
|
189
|
+
dr->encoding = 0;
|
190
|
+
if (rb_respond_to(io, ox_external_encoding_id) && Qnil != (encoding = rb_funcall(io, ox_external_encoding_id, 0))) {
|
191
|
+
int e = rb_enc_get_index(encoding);
|
192
|
+
if (0 <= e) {
|
193
|
+
dr->encoding = rb_enc_from_index(e);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
} else {
|
197
|
+
dr->encoding = rb_enc_find(ox_default_options.encoding);
|
198
|
+
}
|
199
|
+
#elif HAS_PRIVATE_ENCODING
|
200
|
+
if ('\0' == *ox_default_options.encoding) {
|
201
|
+
VALUE encoding;
|
202
|
+
|
203
|
+
if (rb_respond_to(io, ox_external_encoding_id) && Qnil != (encoding = rb_funcall(io, ox_external_encoding_id, 0))) {
|
204
|
+
dr->encoding = encoding;
|
205
|
+
} else {
|
206
|
+
dr->encoding = Qnil;
|
207
|
+
}
|
208
|
+
} else {
|
209
|
+
dr->encoding = rb_str_new2(ox_default_options.encoding);
|
210
|
+
}
|
211
|
+
#else
|
212
|
+
dr->encoding = 0;
|
213
|
+
#endif
|
214
|
+
}
|
215
|
+
|
216
|
+
void
|
217
|
+
ox_sax_drive_cleanup(SaxDrive dr) {
|
218
|
+
rb_gc_unregister_address(&dr->value_obj);
|
219
|
+
buf_cleanup(&dr->buf);
|
220
|
+
stack_cleanup(&dr->stack);
|
221
|
+
}
|
222
|
+
|
223
|
+
static void
|
224
|
+
ox_sax_drive_error_at(SaxDrive dr, const char *msg, int pos, int line, int col) {
|
225
|
+
if (dr->has.error) {
|
226
|
+
VALUE args[3];
|
227
|
+
|
228
|
+
args[0] = rb_str_new2(msg);
|
229
|
+
args[1] = LONG2NUM(line);
|
230
|
+
args[2] = LONG2NUM(col);
|
231
|
+
if (dr->has.pos) {
|
232
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
233
|
+
}
|
234
|
+
if (dr->has.pos) {
|
235
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
236
|
+
}
|
237
|
+
if (dr->has.line) {
|
238
|
+
rb_ivar_set(dr->handler, ox_at_line_id, args[1]);
|
239
|
+
}
|
240
|
+
if (dr->has.column) {
|
241
|
+
rb_ivar_set(dr->handler, ox_at_column_id, args[2]);
|
242
|
+
}
|
243
|
+
rb_funcall2(dr->handler, ox_error_id, 3, args);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
void
|
248
|
+
ox_sax_drive_error(SaxDrive dr, const char *msg) {
|
249
|
+
ox_sax_drive_error_at(dr, msg, dr->buf.pos, dr->buf.line, dr->buf.col);
|
250
|
+
}
|
251
|
+
|
252
|
+
static char
|
253
|
+
skipBOM(SaxDrive dr) {
|
254
|
+
char c = buf_get(&dr->buf);
|
255
|
+
|
256
|
+
if (0xEF == (uint8_t)c) { /* only UTF8 is supported */
|
257
|
+
if (0xBB == (uint8_t)buf_get(&dr->buf) && 0xBF == (uint8_t)buf_get(&dr->buf)) {
|
258
|
+
#if HAS_ENCODING_SUPPORT
|
259
|
+
dr->encoding = ox_utf8_encoding;
|
260
|
+
#elif HAS_PRIVATE_ENCODING
|
261
|
+
dr->encoding = ox_utf8_encoding;
|
262
|
+
#else
|
263
|
+
dr->encoding = UTF8_STR;
|
264
|
+
#endif
|
265
|
+
c = buf_get(&dr->buf);
|
266
|
+
} else {
|
267
|
+
ox_sax_drive_error(dr, BAD_BOM "invalid BOM or a binary file.");
|
268
|
+
c = '\0';
|
269
|
+
}
|
270
|
+
}
|
271
|
+
return c;
|
272
|
+
}
|
273
|
+
|
274
|
+
static void
|
275
|
+
parse(SaxDrive dr) {
|
276
|
+
char c = skipBOM(dr);
|
277
|
+
int state = START_STATE;
|
278
|
+
Nv parent;
|
279
|
+
|
280
|
+
while ('\0' != c) {
|
281
|
+
buf_protect(&dr->buf);
|
282
|
+
if ('<' == c) {
|
283
|
+
c = buf_get(&dr->buf);
|
284
|
+
switch (c) {
|
285
|
+
case '?': /* instructions (xml or otherwise) */
|
286
|
+
c = read_instruction(dr);
|
287
|
+
break;
|
288
|
+
case '!': /* comment or doctype */
|
289
|
+
buf_protect(&dr->buf);
|
290
|
+
c = buf_get(&dr->buf);
|
291
|
+
if ('\0' == c) {
|
292
|
+
ox_sax_drive_error(dr, NO_TERM "DOCTYPE or comment not terminated");
|
293
|
+
|
294
|
+
goto DONE;
|
295
|
+
} else if ('-' == c) {
|
296
|
+
c = buf_get(&dr->buf); /* skip first - and get next character */
|
297
|
+
if ('-' != c) {
|
298
|
+
ox_sax_drive_error(dr, INVALID_FORMAT "bad comment format, expected <!--");
|
299
|
+
} else {
|
300
|
+
c = buf_get(&dr->buf); /* skip second - */
|
301
|
+
}
|
302
|
+
c = read_comment(dr);
|
303
|
+
} else {
|
304
|
+
int i;
|
305
|
+
int spaced = 0;
|
306
|
+
int pos = dr->buf.pos + 1;
|
307
|
+
int line = dr->buf.line;
|
308
|
+
int col = dr->buf.col + 1;
|
309
|
+
|
310
|
+
if (is_white(c)) {
|
311
|
+
spaced = 1;
|
312
|
+
c = buf_next_non_white(&dr->buf);
|
313
|
+
}
|
314
|
+
dr->buf.str = dr->buf.tail - 1;
|
315
|
+
for (i = 7; 0 < i; i--) {
|
316
|
+
c = buf_get(&dr->buf);
|
317
|
+
}
|
318
|
+
if (0 == strncmp("DOCTYPE", dr->buf.str, 7)) {
|
319
|
+
if (spaced) {
|
320
|
+
ox_sax_drive_error_at(dr, WRONG_CHAR "<!DOCTYPE can not included spaces", pos, line, col);
|
321
|
+
}
|
322
|
+
if (START_STATE != state) {
|
323
|
+
ox_sax_drive_error(dr, OUT_OF_ORDER "DOCTYPE can not come after an element");
|
324
|
+
}
|
325
|
+
c = read_doctype(dr);
|
326
|
+
} else if (0 == strncasecmp("DOCTYPE", dr->buf.str, 7)) {
|
327
|
+
if (!dr->options.smart) {
|
328
|
+
ox_sax_drive_error(dr, CASE_ERROR "expected DOCTYPE all in caps");
|
329
|
+
}
|
330
|
+
if (START_STATE != state) {
|
331
|
+
ox_sax_drive_error(dr, OUT_OF_ORDER "DOCTYPE can not come after an element");
|
332
|
+
}
|
333
|
+
c = read_doctype(dr);
|
334
|
+
} else if (0 == strncmp("[CDATA[", dr->buf.str, 7)) {
|
335
|
+
if (spaced) {
|
336
|
+
ox_sax_drive_error_at(dr, WRONG_CHAR "<![CDATA[ can not included spaces", pos, line, col);
|
337
|
+
}
|
338
|
+
c = read_cdata(dr);
|
339
|
+
} else if (0 == strncasecmp("[CDATA[", dr->buf.str, 7)) {
|
340
|
+
if (!dr->options.smart) {
|
341
|
+
ox_sax_drive_error(dr, CASE_ERROR "expected CDATA all in caps");
|
342
|
+
}
|
343
|
+
c = read_cdata(dr);
|
344
|
+
} else {
|
345
|
+
Nv parent = stack_peek(&dr->stack);
|
346
|
+
|
347
|
+
if (0 != parent) {
|
348
|
+
parent->childCnt++;
|
349
|
+
}
|
350
|
+
ox_sax_drive_error_at(dr, WRONG_CHAR "DOCTYPE, CDATA, or comment expected", pos, line, col);
|
351
|
+
c = read_name_token(dr);
|
352
|
+
if ('>' == c) {
|
353
|
+
c = buf_get(&dr->buf);
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
break;
|
358
|
+
case '/': /* element end */
|
359
|
+
parent = stack_peek(&dr->stack);
|
360
|
+
if (0 != parent && 0 == parent->childCnt && dr->has.text && !dr->blocked) {
|
361
|
+
VALUE args[1];
|
362
|
+
int pos = dr->buf.pos;
|
363
|
+
int line = dr->buf.line;
|
364
|
+
int col = dr->buf.col - 1;
|
365
|
+
|
366
|
+
args[0] = rb_str_new2("");
|
367
|
+
#if HAS_ENCODING_SUPPORT
|
368
|
+
if (0 != dr->encoding) {
|
369
|
+
rb_enc_associate(args[0], dr->encoding);
|
370
|
+
}
|
371
|
+
#elif HAS_PRIVATE_ENCODING
|
372
|
+
if (Qnil != dr->encoding) {
|
373
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
374
|
+
}
|
375
|
+
#endif
|
376
|
+
if (dr->has.pos) {
|
377
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
378
|
+
}
|
379
|
+
if (dr->has.line) {
|
380
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
381
|
+
}
|
382
|
+
if (dr->has.column) {
|
383
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
384
|
+
}
|
385
|
+
rb_funcall2(dr->handler, ox_text_id, 1, args);
|
386
|
+
}
|
387
|
+
c = read_element_end(dr);
|
388
|
+
if (0 == stack_peek(&dr->stack)) {
|
389
|
+
state = AFTER_STATE;
|
390
|
+
}
|
391
|
+
break;
|
392
|
+
case '\0':
|
393
|
+
goto DONE;
|
394
|
+
default:
|
395
|
+
buf_backup(&dr->buf);
|
396
|
+
if (AFTER_STATE == state) {
|
397
|
+
ox_sax_drive_error(dr, OUT_OF_ORDER "multiple top level elements");
|
398
|
+
}
|
399
|
+
state = BODY_STATE;
|
400
|
+
c = read_element_start(dr);
|
401
|
+
if (0 == stack_peek(&dr->stack)) {
|
402
|
+
state = AFTER_STATE;
|
403
|
+
}
|
404
|
+
break;
|
405
|
+
}
|
406
|
+
} else {
|
407
|
+
buf_reset(&dr->buf);
|
408
|
+
c = read_text(dr);
|
409
|
+
}
|
410
|
+
}
|
411
|
+
DONE:
|
412
|
+
if (dr->abort) {
|
413
|
+
return;
|
414
|
+
}
|
415
|
+
if (dr->stack.head < dr->stack.tail) {
|
416
|
+
char msg[256];
|
417
|
+
Nv sp;
|
418
|
+
|
419
|
+
if (dr->has.pos) {
|
420
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(dr->buf.pos));
|
421
|
+
}
|
422
|
+
if (dr->has.line) {
|
423
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(dr->buf.line));
|
424
|
+
}
|
425
|
+
if (dr->has.column) {
|
426
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(dr->buf.col));
|
427
|
+
}
|
428
|
+
for (sp = dr->stack.tail - 1; dr->stack.head <= sp; sp--) {
|
429
|
+
snprintf(msg, sizeof(msg) - 1, "%selement '%s' not closed", EL_MISMATCH, sp->name);
|
430
|
+
ox_sax_drive_error_at(dr, msg, dr->buf.pos, dr->buf.line, dr->buf.col);
|
431
|
+
if (dr->has.end_element && 0 >= dr->blocked &&
|
432
|
+
(NULL == sp->hint || ActiveOverlay == sp->hint->overlay || NestOverlay == sp->hint->overlay)) {
|
433
|
+
VALUE args[1];
|
434
|
+
|
435
|
+
args[0] = sp->val;
|
436
|
+
rb_funcall2(dr->handler, ox_end_element_id, 1, args);
|
437
|
+
}
|
438
|
+
if (dr->blocked && NULL != sp->hint && BlockOverlay == sp->hint->overlay) {
|
439
|
+
dr->blocked--;
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
445
|
+
static void
|
446
|
+
read_content(SaxDrive dr, char *content, size_t len) {
|
447
|
+
char c;
|
448
|
+
char *end = content + len;
|
449
|
+
|
450
|
+
while ('\0' != (c = buf_get(&dr->buf))) {
|
451
|
+
if (end <= content) {
|
452
|
+
*content = '\0';
|
453
|
+
ox_sax_drive_error(dr, "processing instruction content too large");
|
454
|
+
return;
|
455
|
+
}
|
456
|
+
if ('?' == c) {
|
457
|
+
if ('\0' == (c = buf_get(&dr->buf))) {
|
458
|
+
ox_sax_drive_error(dr, NO_TERM "document not terminated");
|
459
|
+
}
|
460
|
+
if ('>' == c) {
|
461
|
+
*content = '\0';
|
462
|
+
return;
|
463
|
+
} else {
|
464
|
+
*content++ = c;
|
465
|
+
}
|
466
|
+
} else {
|
467
|
+
*content++ = c;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
*content = '\0';
|
471
|
+
}
|
472
|
+
|
473
|
+
/* Entered after the "<?" sequence. Ready to read the rest.
|
474
|
+
*/
|
475
|
+
static char
|
476
|
+
read_instruction(SaxDrive dr) {
|
477
|
+
char content[4096];
|
478
|
+
char c;
|
479
|
+
int coff;
|
480
|
+
VALUE target = Qnil;
|
481
|
+
int is_xml;
|
482
|
+
int pos = dr->buf.pos - 1;
|
483
|
+
int line = dr->buf.line;
|
484
|
+
int col = dr->buf.col - 1;
|
485
|
+
|
486
|
+
buf_protect(&dr->buf);
|
487
|
+
if ('\0' == (c = read_name_token(dr))) {
|
488
|
+
return c;
|
489
|
+
}
|
490
|
+
is_xml = (0 == (dr->options.smart ? strcasecmp("xml", dr->buf.str) : strcmp("xml", dr->buf.str)));
|
491
|
+
if (dr->has.instruct || dr->has.end_instruct) {
|
492
|
+
target = rb_str_new2(dr->buf.str);
|
493
|
+
}
|
494
|
+
if (dr->has.instruct) {
|
495
|
+
VALUE args[1];
|
496
|
+
|
497
|
+
if (dr->has.pos) {
|
498
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
499
|
+
}
|
500
|
+
if (dr->has.line) {
|
501
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
502
|
+
}
|
503
|
+
if (dr->has.column) {
|
504
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
505
|
+
}
|
506
|
+
args[0] = target;
|
507
|
+
rb_funcall2(dr->handler, ox_instruct_id, 1, args);
|
508
|
+
}
|
509
|
+
buf_protect(&dr->buf);
|
510
|
+
pos = dr->buf.pos;
|
511
|
+
line = dr->buf.line;
|
512
|
+
col = dr->buf.col;
|
513
|
+
read_content(dr, content, sizeof(content) - 1);
|
514
|
+
coff = dr->buf.tail - dr->buf.head;
|
515
|
+
buf_reset(&dr->buf);
|
516
|
+
dr->err = 0;
|
517
|
+
c = read_attrs(dr, c, '?', '?', is_xml, 1, NULL);
|
518
|
+
if (dr->has.attrs_done) {
|
519
|
+
rb_funcall(dr->handler, ox_attrs_done_id, 0);
|
520
|
+
}
|
521
|
+
if (dr->err) {
|
522
|
+
if (dr->has.text) {
|
523
|
+
VALUE args[1];
|
524
|
+
|
525
|
+
if (dr->options.convert_special) {
|
526
|
+
ox_sax_collapse_special(dr, content, pos, line, col);
|
527
|
+
}
|
528
|
+
args[0] = rb_str_new2(content);
|
529
|
+
#if HAS_ENCODING_SUPPORT
|
530
|
+
if (0 != dr->encoding) {
|
531
|
+
rb_enc_associate(args[0], dr->encoding);
|
532
|
+
}
|
533
|
+
#elif HAS_PRIVATE_ENCODING
|
534
|
+
if (Qnil != dr->encoding) {
|
535
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
536
|
+
}
|
537
|
+
#endif
|
538
|
+
if (dr->has.line) {
|
539
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
540
|
+
}
|
541
|
+
if (dr->has.pos) {
|
542
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
543
|
+
}
|
544
|
+
if (dr->has.column) {
|
545
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
546
|
+
}
|
547
|
+
rb_funcall2(dr->handler, ox_text_id, 1, args);
|
548
|
+
}
|
549
|
+
dr->buf.tail = dr->buf.head + coff;
|
550
|
+
c = buf_get(&dr->buf);
|
551
|
+
} else {
|
552
|
+
pos = dr->buf.pos;
|
553
|
+
line = dr->buf.line;
|
554
|
+
col = dr->buf.col;
|
555
|
+
c = buf_next_non_white(&dr->buf);
|
556
|
+
if ('>' == c) {
|
557
|
+
c = buf_get(&dr->buf);
|
558
|
+
} else {
|
559
|
+
ox_sax_drive_error_at(dr, NO_TERM "instruction not terminated", pos, line, col);
|
560
|
+
if ('>' == c) {
|
561
|
+
c = buf_get(&dr->buf);
|
562
|
+
}
|
563
|
+
}
|
564
|
+
}
|
565
|
+
if (dr->has.end_instruct) {
|
566
|
+
VALUE args[1];
|
567
|
+
|
568
|
+
if (dr->has.pos) {
|
569
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
570
|
+
}
|
571
|
+
if (dr->has.line) {
|
572
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
573
|
+
}
|
574
|
+
if (dr->has.column) {
|
575
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
576
|
+
}
|
577
|
+
args[0] = target;
|
578
|
+
rb_funcall2(dr->handler, ox_end_instruct_id, 1, args);
|
579
|
+
}
|
580
|
+
dr->buf.str = 0;
|
581
|
+
|
582
|
+
return c;
|
583
|
+
}
|
584
|
+
|
585
|
+
static char
|
586
|
+
read_delimited(SaxDrive dr, char end) {
|
587
|
+
char c;
|
588
|
+
|
589
|
+
if ('"' == end || '\'' == end) {
|
590
|
+
while (end != (c = buf_get(&dr->buf))) {
|
591
|
+
if ('\0' == c) {
|
592
|
+
ox_sax_drive_error(dr, NO_TERM "doctype not terminated");
|
593
|
+
return c;
|
594
|
+
}
|
595
|
+
}
|
596
|
+
} else {
|
597
|
+
while (1) {
|
598
|
+
c = buf_get(&dr->buf);
|
599
|
+
if (end == c) {
|
600
|
+
return c;
|
601
|
+
}
|
602
|
+
switch (c) {
|
603
|
+
case '\0':
|
604
|
+
ox_sax_drive_error(dr, NO_TERM "doctype not terminated");
|
605
|
+
return c;
|
606
|
+
case '"':
|
607
|
+
c = read_delimited(dr, c);
|
608
|
+
break;
|
609
|
+
case '\'':
|
610
|
+
c = read_delimited(dr, c);
|
611
|
+
break;
|
612
|
+
case '[':
|
613
|
+
c = read_delimited(dr, ']');
|
614
|
+
break;
|
615
|
+
case '<':
|
616
|
+
c = read_delimited(dr, '>');
|
617
|
+
break;
|
618
|
+
default:
|
619
|
+
break;
|
620
|
+
}
|
621
|
+
}
|
622
|
+
}
|
623
|
+
return c;
|
624
|
+
}
|
625
|
+
|
626
|
+
/* Entered after the "<!DOCTYPE " sequence. Ready to read the rest.
|
627
|
+
*/
|
628
|
+
static char
|
629
|
+
read_doctype(SaxDrive dr) {
|
630
|
+
int pos = dr->buf.pos - 9;
|
631
|
+
int line = dr->buf.line;
|
632
|
+
int col = dr->buf.col - 9;
|
633
|
+
char *s;
|
634
|
+
Nv parent = stack_peek(&dr->stack);
|
635
|
+
|
636
|
+
buf_backup(&dr->buf); /* back up to the start in case the doctype is empty */
|
637
|
+
buf_protect(&dr->buf);
|
638
|
+
read_delimited(dr, '>');
|
639
|
+
if (dr->options.smart && 0 == dr->options.hints) {
|
640
|
+
for (s = dr->buf.str; is_white(*s); s++) { }
|
641
|
+
if (0 == strncasecmp("HTML", s, 4)) {
|
642
|
+
dr->options.hints = ox_hints_html();
|
643
|
+
}
|
644
|
+
}
|
645
|
+
*(dr->buf.tail - 1) = '\0';
|
646
|
+
if (0 != parent) {
|
647
|
+
parent->childCnt++;
|
648
|
+
}
|
649
|
+
if (dr->has.doctype) {
|
650
|
+
VALUE args[1];
|
651
|
+
|
652
|
+
if (dr->has.pos) {
|
653
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
654
|
+
}
|
655
|
+
if (dr->has.line) {
|
656
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
657
|
+
}
|
658
|
+
if (dr->has.column) {
|
659
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
660
|
+
}
|
661
|
+
args[0] = rb_str_new2(dr->buf.str);
|
662
|
+
rb_funcall2(dr->handler, ox_doctype_id, 1, args);
|
663
|
+
}
|
664
|
+
dr->buf.str = 0;
|
665
|
+
|
666
|
+
return buf_get(&dr->buf);
|
667
|
+
}
|
668
|
+
|
669
|
+
/* Entered after the "<![CDATA[" sequence. Ready to read the rest.
|
670
|
+
*/
|
671
|
+
static char
|
672
|
+
read_cdata(SaxDrive dr) {
|
673
|
+
char c;
|
674
|
+
char zero = '\0';
|
675
|
+
int end = 0;
|
676
|
+
int pos = dr->buf.pos - 9;
|
677
|
+
int line = dr->buf.line;
|
678
|
+
int col = dr->buf.col - 9;
|
679
|
+
struct _CheckPt cp = CHECK_PT_INIT;
|
680
|
+
Nv parent = stack_peek(&dr->stack);
|
681
|
+
|
682
|
+
// TBD check parent overlay
|
683
|
+
if (0 != parent) {
|
684
|
+
parent->childCnt++;
|
685
|
+
}
|
686
|
+
buf_backup(&dr->buf); /* back up to the start in case the cdata is empty */
|
687
|
+
buf_protect(&dr->buf);
|
688
|
+
while (1) {
|
689
|
+
c = buf_get(&dr->buf);
|
690
|
+
switch (c) {
|
691
|
+
case ']':
|
692
|
+
end++;
|
693
|
+
break;
|
694
|
+
case '>':
|
695
|
+
if (2 <= end) {
|
696
|
+
*(dr->buf.tail - 3) = '\0';
|
697
|
+
c = buf_get(&dr->buf);
|
698
|
+
goto CB;
|
699
|
+
}
|
700
|
+
if (!buf_checkset(&cp)) {
|
701
|
+
buf_checkpoint(&dr->buf, &cp);
|
702
|
+
}
|
703
|
+
end = 0;
|
704
|
+
break;
|
705
|
+
case '<':
|
706
|
+
if (!buf_checkset(&cp)) {
|
707
|
+
buf_checkpoint(&dr->buf, &cp);
|
708
|
+
}
|
709
|
+
end = 0;
|
710
|
+
break;
|
711
|
+
case '\0':
|
712
|
+
if (buf_checkset(&cp)) {
|
713
|
+
c = buf_checkback(&dr->buf, &cp);
|
714
|
+
ox_sax_drive_error(dr, NO_TERM "CDATA not terminated");
|
715
|
+
zero = c;
|
716
|
+
*(dr->buf.tail - 1) = '\0';
|
717
|
+
goto CB;
|
718
|
+
}
|
719
|
+
ox_sax_drive_error(dr, NO_TERM "CDATA not terminated");
|
720
|
+
return '\0';
|
721
|
+
default:
|
722
|
+
if (1 < end && !buf_checkset(&cp)) {
|
723
|
+
buf_checkpoint(&dr->buf, &cp);
|
724
|
+
}
|
725
|
+
end = 0;
|
726
|
+
break;
|
727
|
+
}
|
728
|
+
}
|
729
|
+
CB:
|
730
|
+
if (!dr->blocked && (NULL == parent || NULL == parent->hint || OffOverlay != parent->hint->overlay)) {
|
731
|
+
if (dr->has.cdata) {
|
732
|
+
VALUE args[1];
|
733
|
+
|
734
|
+
args[0] = rb_str_new2(dr->buf.str);
|
735
|
+
#if HAS_ENCODING_SUPPORT
|
736
|
+
if (0 != dr->encoding) {
|
737
|
+
rb_enc_associate(args[0], dr->encoding);
|
738
|
+
}
|
739
|
+
#elif HAS_PRIVATE_ENCODING
|
740
|
+
if (Qnil != dr->encoding) {
|
741
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
742
|
+
}
|
743
|
+
#endif
|
744
|
+
if (dr->has.pos) {
|
745
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
746
|
+
}
|
747
|
+
if (dr->has.line) {
|
748
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
749
|
+
}
|
750
|
+
if (dr->has.column) {
|
751
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
752
|
+
}
|
753
|
+
rb_funcall2(dr->handler, ox_cdata_id, 1, args);
|
754
|
+
}
|
755
|
+
}
|
756
|
+
if ('\0' != zero) {
|
757
|
+
*(dr->buf.tail - 1) = zero;
|
758
|
+
}
|
759
|
+
dr->buf.str = 0;
|
760
|
+
|
761
|
+
return c;
|
762
|
+
}
|
763
|
+
|
764
|
+
/* Entered after the "<!--" sequence. Ready to read the rest.
|
765
|
+
*/
|
766
|
+
static char
|
767
|
+
read_comment(SaxDrive dr) {
|
768
|
+
char c;
|
769
|
+
char zero = '\0';
|
770
|
+
int end = 0;
|
771
|
+
int pos = dr->buf.pos - 4;
|
772
|
+
int line = dr->buf.line;
|
773
|
+
int col = dr->buf.col - 4;
|
774
|
+
struct _CheckPt cp = CHECK_PT_INIT;
|
775
|
+
|
776
|
+
buf_backup(&dr->buf); /* back up to the start in case the cdata is empty */
|
777
|
+
buf_protect(&dr->buf);
|
778
|
+
while (1) {
|
779
|
+
c = buf_get(&dr->buf);
|
780
|
+
switch (c) {
|
781
|
+
case '-':
|
782
|
+
end++;
|
783
|
+
break;
|
784
|
+
case '>':
|
785
|
+
if (2 <= end) {
|
786
|
+
*(dr->buf.tail - 3) = '\0';
|
787
|
+
c = buf_get(&dr->buf);
|
788
|
+
goto CB;
|
789
|
+
}
|
790
|
+
if (!buf_checkset(&cp)) {
|
791
|
+
buf_checkpoint(&dr->buf, &cp);
|
792
|
+
}
|
793
|
+
end = 0;
|
794
|
+
break;
|
795
|
+
case '<':
|
796
|
+
if (!buf_checkset(&cp)) {
|
797
|
+
buf_checkpoint(&dr->buf, &cp);
|
798
|
+
}
|
799
|
+
end = 0;
|
800
|
+
break;
|
801
|
+
case '\0':
|
802
|
+
if (buf_checkset(&cp)) {
|
803
|
+
c = buf_checkback(&dr->buf, &cp);
|
804
|
+
ox_sax_drive_error(dr, NO_TERM "comment not terminated");
|
805
|
+
zero = c;
|
806
|
+
*(dr->buf.tail - 1) = '\0';
|
807
|
+
goto CB;
|
808
|
+
}
|
809
|
+
ox_sax_drive_error(dr, NO_TERM "comment not terminated");
|
810
|
+
return '\0';
|
811
|
+
default:
|
812
|
+
if (1 < end && !buf_checkset(&cp)) {
|
813
|
+
buf_checkpoint(&dr->buf, &cp);
|
814
|
+
}
|
815
|
+
end = 0;
|
816
|
+
break;
|
817
|
+
}
|
818
|
+
}
|
819
|
+
CB:
|
820
|
+
if (dr->has.comment && !dr->blocked) {
|
821
|
+
VALUE args[1];
|
822
|
+
Nv parent = stack_peek(&dr->stack);
|
823
|
+
Hint h = ox_hint_find(dr->options.hints, "!--");
|
824
|
+
|
825
|
+
if (NULL == parent || NULL == parent->hint || OffOverlay != parent->hint->overlay ||
|
826
|
+
(NULL != h && (ActiveOverlay == h->overlay || ActiveOverlay == h->overlay))) {
|
827
|
+
|
828
|
+
args[0] = rb_str_new2(dr->buf.str);
|
829
|
+
#if HAS_ENCODING_SUPPORT
|
830
|
+
if (0 != dr->encoding) {
|
831
|
+
rb_enc_associate(args[0], dr->encoding);
|
832
|
+
}
|
833
|
+
#elif HAS_PRIVATE_ENCODING
|
834
|
+
if (Qnil != dr->encoding) {
|
835
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
836
|
+
}
|
837
|
+
#endif
|
838
|
+
if (dr->has.pos) {
|
839
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
840
|
+
}
|
841
|
+
if (dr->has.line) {
|
842
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
843
|
+
}
|
844
|
+
if (dr->has.column) {
|
845
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
846
|
+
}
|
847
|
+
rb_funcall2(dr->handler, ox_comment_id, 1, args);
|
848
|
+
}
|
849
|
+
}
|
850
|
+
if ('\0' != zero) {
|
851
|
+
*(dr->buf.tail - 1) = zero;
|
852
|
+
}
|
853
|
+
dr->buf.str = 0;
|
854
|
+
|
855
|
+
return c;
|
856
|
+
}
|
857
|
+
|
858
|
+
/* Entered after the '<' and the first character after that. Returns status
|
859
|
+
* code.
|
860
|
+
*/
|
861
|
+
static char
|
862
|
+
read_element_start(SaxDrive dr) {
|
863
|
+
const char *ename = 0;
|
864
|
+
volatile VALUE name = Qnil;
|
865
|
+
char c;
|
866
|
+
int closed;
|
867
|
+
int pos = dr->buf.pos;
|
868
|
+
int line = dr->buf.line;
|
869
|
+
int col = dr->buf.col;
|
870
|
+
Hint h = NULL;
|
871
|
+
int stackless = 0;
|
872
|
+
Nv parent = stack_peek(&dr->stack);
|
873
|
+
|
874
|
+
if ('\0' == (c = read_name_token(dr))) {
|
875
|
+
return '\0';
|
876
|
+
}
|
877
|
+
if ('\0' == *dr->buf.str) {
|
878
|
+
char msg[256];
|
879
|
+
|
880
|
+
snprintf(msg, sizeof(msg) - 1, "%sempty element", INVALID_FORMAT);
|
881
|
+
ox_sax_drive_error_at(dr, msg, pos, line, col);
|
882
|
+
|
883
|
+
return buf_get(&dr->buf);
|
884
|
+
}
|
885
|
+
if (0 != parent) {
|
886
|
+
parent->childCnt++;
|
887
|
+
}
|
888
|
+
if (dr->options.smart && 0 == dr->options.hints && stack_empty(&dr->stack) && 0 == strcasecmp("html", dr->buf.str)) {
|
889
|
+
dr->options.hints = ox_hints_html();
|
890
|
+
}
|
891
|
+
if (NULL != dr->options.hints) {
|
892
|
+
hint_clear_empty(dr);
|
893
|
+
h = ox_hint_find(dr->options.hints, dr->buf.str);
|
894
|
+
if (NULL == h) {
|
895
|
+
char msg[256];
|
896
|
+
|
897
|
+
snprintf(msg, sizeof(msg), "%s%s is not a valid element type for a %s document type.", INV_ELEMENT, dr->buf.str, dr->options.hints->name);
|
898
|
+
ox_sax_drive_error(dr, msg);
|
899
|
+
} else {
|
900
|
+
Nv top_nv = stack_peek(&dr->stack);
|
901
|
+
|
902
|
+
if (AbortOverlay == h->overlay) {
|
903
|
+
if (rb_respond_to(dr->handler, ox_abort_id)) {
|
904
|
+
VALUE args[1];
|
905
|
+
|
906
|
+
args[0] = str2sym(dr, dr->buf.str, NULL);
|
907
|
+
rb_funcall2(dr->handler, ox_abort_id, 1, args);
|
908
|
+
}
|
909
|
+
dr->abort = true;
|
910
|
+
return '\0';
|
911
|
+
}
|
912
|
+
if (BlockOverlay == h->overlay) {
|
913
|
+
dr->blocked++;
|
914
|
+
}
|
915
|
+
if (h->empty) {
|
916
|
+
stackless = 1;
|
917
|
+
}
|
918
|
+
if (0 != top_nv) {
|
919
|
+
char msg[256];
|
920
|
+
|
921
|
+
if (!h->nest && NestOverlay != h->overlay && 0 == strcasecmp(top_nv->name, h->name)) {
|
922
|
+
snprintf(msg, sizeof(msg) - 1, "%s%s can not be nested in a %s document, closing previous.",
|
923
|
+
INV_ELEMENT, dr->buf.str, dr->options.hints->name);
|
924
|
+
ox_sax_drive_error(dr, msg);
|
925
|
+
stack_pop(&dr->stack);
|
926
|
+
end_element_cb(dr, top_nv->val, pos, line, col, top_nv->hint);
|
927
|
+
top_nv = stack_peek(&dr->stack);
|
928
|
+
}
|
929
|
+
if (NULL != top_nv && 0 != h->parents && NestOverlay != h->overlay) {
|
930
|
+
const char **p;
|
931
|
+
int ok = 0;
|
932
|
+
|
933
|
+
for (p = h->parents; 0 != *p; p++) {
|
934
|
+
if (0 == strcasecmp(*p, top_nv->name)) {
|
935
|
+
ok = 1;
|
936
|
+
break;
|
937
|
+
}
|
938
|
+
}
|
939
|
+
if (!ok) {
|
940
|
+
snprintf(msg, sizeof(msg) - 1, "%s%s can not be a child of a %s in a %s document.",
|
941
|
+
INV_ELEMENT, h->name, top_nv->name, dr->options.hints->name);
|
942
|
+
ox_sax_drive_error(dr, msg);
|
943
|
+
}
|
944
|
+
}
|
945
|
+
}
|
946
|
+
}
|
947
|
+
}
|
948
|
+
name = str2sym(dr, dr->buf.str, &ename);
|
949
|
+
if (dr->has.start_element && 0 >= dr->blocked && (NULL == h || ActiveOverlay == h->overlay || NestOverlay == h->overlay)) {
|
950
|
+
VALUE args[1];
|
951
|
+
|
952
|
+
if (dr->has.pos) {
|
953
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
954
|
+
}
|
955
|
+
if (dr->has.line) {
|
956
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
957
|
+
}
|
958
|
+
if (dr->has.column) {
|
959
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
960
|
+
}
|
961
|
+
args[0] = name;
|
962
|
+
rb_funcall2(dr->handler, ox_start_element_id, 1, args);
|
963
|
+
}
|
964
|
+
if ('/' == c) {
|
965
|
+
closed = 1;
|
966
|
+
} else if ('>' == c) {
|
967
|
+
closed = 0;
|
968
|
+
} else {
|
969
|
+
buf_protect(&dr->buf);
|
970
|
+
c = read_attrs(dr, c, '/', '>', 0, 0, h);
|
971
|
+
if (is_white(c)) {
|
972
|
+
c = buf_next_non_white(&dr->buf);
|
973
|
+
}
|
974
|
+
closed = ('/' == c);
|
975
|
+
}
|
976
|
+
if (dr->has.attrs_done && 0 >= dr->blocked && (NULL == h || ActiveOverlay == h->overlay || NestOverlay == h->overlay)) {
|
977
|
+
rb_funcall(dr->handler, ox_attrs_done_id, 0);
|
978
|
+
}
|
979
|
+
if (closed) {
|
980
|
+
c = buf_next_non_white(&dr->buf);
|
981
|
+
pos = dr->buf.pos;
|
982
|
+
line = dr->buf.line;
|
983
|
+
col = dr->buf.col;
|
984
|
+
end_element_cb(dr, name, pos, line, col, h);
|
985
|
+
} else if (stackless) {
|
986
|
+
end_element_cb(dr, name, pos, line, col, h);
|
987
|
+
} else if (NULL != h && h->jump) {
|
988
|
+
stack_push(&dr->stack, ename, name, h);
|
989
|
+
if ('>' != c) {
|
990
|
+
ox_sax_drive_error(dr, WRONG_CHAR "element not closed");
|
991
|
+
return c;
|
992
|
+
}
|
993
|
+
read_jump(dr, h->name);
|
994
|
+
return '<';
|
995
|
+
} else {
|
996
|
+
stack_push(&dr->stack, ename, name, h);
|
997
|
+
}
|
998
|
+
if ('>' != c) {
|
999
|
+
ox_sax_drive_error(dr, WRONG_CHAR "element not closed");
|
1000
|
+
return c;
|
1001
|
+
}
|
1002
|
+
dr->buf.str = 0;
|
1003
|
+
|
1004
|
+
return buf_get(&dr->buf);
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
static Nv
|
1008
|
+
stack_rev_find(SaxDrive dr, const char *name) {
|
1009
|
+
Nv nv;
|
1010
|
+
|
1011
|
+
for (nv = dr->stack.tail - 1; dr->stack.head <= nv; nv--) {
|
1012
|
+
if (0 == (dr->options.smart ? strcasecmp(name, nv->name) : strcmp(name, nv->name))) {
|
1013
|
+
return nv;
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
return 0;
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
static char
|
1020
|
+
read_element_end(SaxDrive dr) {
|
1021
|
+
VALUE name = Qnil;
|
1022
|
+
char c;
|
1023
|
+
int pos = dr->buf.pos - 1;
|
1024
|
+
int line = dr->buf.line;
|
1025
|
+
int col = dr->buf.col - 1;
|
1026
|
+
Nv nv;
|
1027
|
+
Hint h = NULL;
|
1028
|
+
|
1029
|
+
if ('\0' == (c = read_name_token(dr))) {
|
1030
|
+
return '\0';
|
1031
|
+
}
|
1032
|
+
if (is_white(c)) {
|
1033
|
+
c = buf_next_non_white(&dr->buf);
|
1034
|
+
}
|
1035
|
+
// c should be > and current is one past so read another char
|
1036
|
+
c = buf_get(&dr->buf);
|
1037
|
+
nv = stack_peek(&dr->stack);
|
1038
|
+
if (0 != nv &&
|
1039
|
+
0 == (dr->options.smart ? strcasecmp(dr->buf.str, nv->name) : strcmp(dr->buf.str, nv->name))) {
|
1040
|
+
name = nv->val;
|
1041
|
+
h = nv->hint;
|
1042
|
+
stack_pop(&dr->stack);
|
1043
|
+
} else {
|
1044
|
+
// Mismatched start and end
|
1045
|
+
char msg[256];
|
1046
|
+
Nv match = stack_rev_find(dr, dr->buf.str);
|
1047
|
+
|
1048
|
+
if (0 == match) {
|
1049
|
+
// Not found so open and close element.
|
1050
|
+
h = ox_hint_find(dr->options.hints, dr->buf.str);
|
1051
|
+
if (NULL != h && h->empty) {
|
1052
|
+
// Just close normally
|
1053
|
+
name = str2sym(dr, dr->buf.str, 0);
|
1054
|
+
snprintf(msg, sizeof(msg) - 1, "%selement '%s' should not have a separate close element", EL_MISMATCH, dr->buf.str);
|
1055
|
+
ox_sax_drive_error_at(dr, msg, pos, line, col);
|
1056
|
+
return c;
|
1057
|
+
} else {
|
1058
|
+
snprintf(msg, sizeof(msg) - 1, "%selement '%s' closed but not opened", EL_MISMATCH, dr->buf.str);
|
1059
|
+
ox_sax_drive_error_at(dr, msg, pos, line, col);
|
1060
|
+
name = str2sym(dr, dr->buf.str, 0);
|
1061
|
+
if (dr->has.start_element && 0 >= dr->blocked && (NULL == h || ActiveOverlay == h->overlay || NestOverlay == h->overlay)) {
|
1062
|
+
VALUE args[1];
|
1063
|
+
|
1064
|
+
if (dr->has.pos) {
|
1065
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1066
|
+
}
|
1067
|
+
if (dr->has.line) {
|
1068
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1069
|
+
}
|
1070
|
+
if (dr->has.column) {
|
1071
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1072
|
+
}
|
1073
|
+
args[0] = name;
|
1074
|
+
rb_funcall2(dr->handler, ox_start_element_id, 1, args);
|
1075
|
+
}
|
1076
|
+
if (NULL != h && BlockOverlay == h->overlay && 0 < dr->blocked) {
|
1077
|
+
dr->blocked--;
|
1078
|
+
}
|
1079
|
+
}
|
1080
|
+
} else {
|
1081
|
+
// Found a match so close all up to the found element in stack.
|
1082
|
+
Nv n2;
|
1083
|
+
|
1084
|
+
if (0 != (n2 = hint_try_close(dr, dr->buf.str))) {
|
1085
|
+
name = n2->val;
|
1086
|
+
h = n2->hint;
|
1087
|
+
} else {
|
1088
|
+
snprintf(msg, sizeof(msg) - 1, "%selement '%s' close does not match '%s' open", EL_MISMATCH, dr->buf.str, nv->name);
|
1089
|
+
ox_sax_drive_error_at(dr, msg, pos, line, col);
|
1090
|
+
if (dr->has.pos) {
|
1091
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1092
|
+
}
|
1093
|
+
if (dr->has.line) {
|
1094
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1095
|
+
}
|
1096
|
+
if (dr->has.column) {
|
1097
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1098
|
+
}
|
1099
|
+
for (nv = stack_pop(&dr->stack); match < nv; nv = stack_pop(&dr->stack)) {
|
1100
|
+
if (dr->has.end_element && 0 >= dr->blocked && (NULL == nv->hint || ActiveOverlay == nv->hint->overlay || NestOverlay == nv->hint->overlay)) {
|
1101
|
+
rb_funcall(dr->handler, ox_end_element_id, 1, nv->val);
|
1102
|
+
}
|
1103
|
+
if (NULL != nv->hint && BlockOverlay == nv->hint->overlay && 0 < dr->blocked) {
|
1104
|
+
dr->blocked--;
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
name = nv->val;
|
1108
|
+
h = nv->hint;
|
1109
|
+
}
|
1110
|
+
}
|
1111
|
+
}
|
1112
|
+
end_element_cb(dr, name, pos, line, col, h);
|
1113
|
+
|
1114
|
+
return c;
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
static char
|
1118
|
+
read_text(SaxDrive dr) {
|
1119
|
+
VALUE args[1];
|
1120
|
+
char c;
|
1121
|
+
int pos = dr->buf.pos;
|
1122
|
+
int line = dr->buf.line;
|
1123
|
+
int col = dr->buf.col - 1;
|
1124
|
+
Nv parent = stack_peek(&dr->stack);
|
1125
|
+
int allWhite = 1;
|
1126
|
+
|
1127
|
+
buf_backup(&dr->buf);
|
1128
|
+
buf_protect(&dr->buf);
|
1129
|
+
while ('<' != (c = buf_get(&dr->buf))) {
|
1130
|
+
switch(c) {
|
1131
|
+
case ' ':
|
1132
|
+
case '\t':
|
1133
|
+
case '\f':
|
1134
|
+
case '\n':
|
1135
|
+
case '\r':
|
1136
|
+
break;
|
1137
|
+
case '\0':
|
1138
|
+
if (allWhite) {
|
1139
|
+
return c;
|
1140
|
+
}
|
1141
|
+
ox_sax_drive_error(dr, NO_TERM "text not terminated");
|
1142
|
+
goto END_OF_BUF;
|
1143
|
+
break;
|
1144
|
+
default:
|
1145
|
+
allWhite = 0;
|
1146
|
+
break;
|
1147
|
+
}
|
1148
|
+
}
|
1149
|
+
END_OF_BUF:
|
1150
|
+
if ('\0' != c) {
|
1151
|
+
*(dr->buf.tail - 1) = '\0';
|
1152
|
+
}
|
1153
|
+
if (allWhite) {
|
1154
|
+
int isEnd = ('/' == buf_get(&dr->buf));
|
1155
|
+
|
1156
|
+
buf_backup(&dr->buf);
|
1157
|
+
if (dr->has.text &&
|
1158
|
+
((NoSkip == dr->options.skip && !isEnd) ||
|
1159
|
+
(OffSkip == dr->options.skip))) {
|
1160
|
+
args[0] = rb_str_new2(dr->buf.str);
|
1161
|
+
#if HAS_ENCODING_SUPPORT
|
1162
|
+
if (0 != dr->encoding) {
|
1163
|
+
rb_enc_associate(args[0], dr->encoding);
|
1164
|
+
}
|
1165
|
+
#elif HAS_PRIVATE_ENCODING
|
1166
|
+
if (Qnil != dr->encoding) {
|
1167
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
1168
|
+
}
|
1169
|
+
#endif
|
1170
|
+
if (dr->has.pos) {
|
1171
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1172
|
+
}
|
1173
|
+
if (dr->has.line) {
|
1174
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1175
|
+
}
|
1176
|
+
if (dr->has.column) {
|
1177
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1178
|
+
}
|
1179
|
+
rb_funcall2(dr->handler, ox_text_id, 1, args);
|
1180
|
+
}
|
1181
|
+
if (!isEnd || 0 == parent || 0 < parent->childCnt) {
|
1182
|
+
return c;
|
1183
|
+
}
|
1184
|
+
}
|
1185
|
+
if (0 != parent) {
|
1186
|
+
parent->childCnt++;
|
1187
|
+
}
|
1188
|
+
if (!dr->blocked && (NULL == parent || NULL == parent->hint || OffOverlay != parent->hint->overlay)) {
|
1189
|
+
if (dr->has.value) {
|
1190
|
+
if (dr->has.pos) {
|
1191
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1192
|
+
}
|
1193
|
+
if (dr->has.line) {
|
1194
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1195
|
+
}
|
1196
|
+
if (dr->has.column) {
|
1197
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1198
|
+
}
|
1199
|
+
*args = dr->value_obj;
|
1200
|
+
rb_funcall2(dr->handler, ox_value_id, 1, args);
|
1201
|
+
} else if (dr->has.text) {
|
1202
|
+
if (dr->options.convert_special) {
|
1203
|
+
ox_sax_collapse_special(dr, dr->buf.str, pos, line, col);
|
1204
|
+
}
|
1205
|
+
switch (dr->options.skip) {
|
1206
|
+
case CrSkip:
|
1207
|
+
buf_collapse_return(dr->buf.str);
|
1208
|
+
break;
|
1209
|
+
case SpcSkip:
|
1210
|
+
buf_collapse_white(dr->buf.str);
|
1211
|
+
break;
|
1212
|
+
default:
|
1213
|
+
break;
|
1214
|
+
}
|
1215
|
+
args[0] = rb_str_new2(dr->buf.str);
|
1216
|
+
#if HAS_ENCODING_SUPPORT
|
1217
|
+
if (0 != dr->encoding) {
|
1218
|
+
rb_enc_associate(args[0], dr->encoding);
|
1219
|
+
}
|
1220
|
+
#elif HAS_PRIVATE_ENCODING
|
1221
|
+
if (Qnil != dr->encoding) {
|
1222
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
1223
|
+
}
|
1224
|
+
#endif
|
1225
|
+
if (dr->has.pos) {
|
1226
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1227
|
+
}
|
1228
|
+
if (dr->has.line) {
|
1229
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1230
|
+
}
|
1231
|
+
if (dr->has.column) {
|
1232
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1233
|
+
}
|
1234
|
+
rb_funcall2(dr->handler, ox_text_id, 1, args);
|
1235
|
+
}
|
1236
|
+
}
|
1237
|
+
dr->buf.str = 0;
|
1238
|
+
|
1239
|
+
return c;
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
static int
|
1243
|
+
read_jump_term(Buf buf, const char *pat) {
|
1244
|
+
struct _CheckPt cp;
|
1245
|
+
|
1246
|
+
buf_checkpoint(buf, &cp); // right after <
|
1247
|
+
if ('/' != buf_next_non_white(buf)) {
|
1248
|
+
return 0;
|
1249
|
+
}
|
1250
|
+
if (*pat != tolower(buf_next_non_white(buf))) {
|
1251
|
+
return 0;
|
1252
|
+
}
|
1253
|
+
for (pat++; '\0' != *pat; pat++) {
|
1254
|
+
if (*pat != tolower(buf_get(buf))) {
|
1255
|
+
return 0;
|
1256
|
+
}
|
1257
|
+
}
|
1258
|
+
if ('>' != buf_next_non_white(buf)) {
|
1259
|
+
return 0;
|
1260
|
+
}
|
1261
|
+
buf_checkback(buf, &cp);
|
1262
|
+
return 1;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
static char
|
1266
|
+
read_jump(SaxDrive dr, const char *pat) {
|
1267
|
+
VALUE args[1];
|
1268
|
+
char c;
|
1269
|
+
int pos = dr->buf.pos;
|
1270
|
+
int line = dr->buf.line;
|
1271
|
+
int col = dr->buf.col - 1;
|
1272
|
+
Nv parent = stack_peek(&dr->stack);
|
1273
|
+
|
1274
|
+
buf_protect(&dr->buf);
|
1275
|
+
while (1) {
|
1276
|
+
c = buf_get(&dr->buf);
|
1277
|
+
switch(c) {
|
1278
|
+
case '<':
|
1279
|
+
if (read_jump_term(&dr->buf, pat)) {
|
1280
|
+
goto END_OF_BUF;
|
1281
|
+
break;
|
1282
|
+
}
|
1283
|
+
break;
|
1284
|
+
case '\0':
|
1285
|
+
ox_sax_drive_error(dr, NO_TERM "not terminated");
|
1286
|
+
goto END_OF_BUF;
|
1287
|
+
break;
|
1288
|
+
default:
|
1289
|
+
break;
|
1290
|
+
}
|
1291
|
+
}
|
1292
|
+
END_OF_BUF:
|
1293
|
+
if ('\0' != c) {
|
1294
|
+
*(dr->buf.tail - 1) = '\0';
|
1295
|
+
}
|
1296
|
+
if (0 != parent) {
|
1297
|
+
parent->childCnt++;
|
1298
|
+
}
|
1299
|
+
// TBD check parent overlay
|
1300
|
+
if (dr->has.text && !dr->blocked) {
|
1301
|
+
args[0] = rb_str_new2(dr->buf.str);
|
1302
|
+
#if HAS_ENCODING_SUPPORT
|
1303
|
+
if (0 != dr->encoding) {
|
1304
|
+
rb_enc_associate(args[0], dr->encoding);
|
1305
|
+
}
|
1306
|
+
#elif HAS_PRIVATE_ENCODING
|
1307
|
+
if (Qnil != dr->encoding) {
|
1308
|
+
rb_funcall(args[0], ox_force_encoding_id, 1, dr->encoding);
|
1309
|
+
}
|
1310
|
+
#endif
|
1311
|
+
if (dr->has.pos) {
|
1312
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1313
|
+
}
|
1314
|
+
if (dr->has.line) {
|
1315
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1316
|
+
}
|
1317
|
+
if (dr->has.column) {
|
1318
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1319
|
+
}
|
1320
|
+
rb_funcall2(dr->handler, ox_text_id, 1, args);
|
1321
|
+
}
|
1322
|
+
dr->buf.str = 0;
|
1323
|
+
if ('\0' != c) {
|
1324
|
+
*(dr->buf.tail - 1) = '<';
|
1325
|
+
}
|
1326
|
+
return c;
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
static char
|
1330
|
+
read_attrs(SaxDrive dr, char c, char termc, char term2, int is_xml, int eq_req, Hint h) {
|
1331
|
+
VALUE name = Qnil;
|
1332
|
+
int is_encoding = 0;
|
1333
|
+
int pos;
|
1334
|
+
int line;
|
1335
|
+
int col;
|
1336
|
+
char *attr_value;
|
1337
|
+
|
1338
|
+
// already protected by caller
|
1339
|
+
dr->buf.str = dr->buf.tail;
|
1340
|
+
if (is_white(c)) {
|
1341
|
+
c = buf_next_non_white(&dr->buf);
|
1342
|
+
}
|
1343
|
+
while (termc != c && term2 != c) {
|
1344
|
+
buf_backup(&dr->buf);
|
1345
|
+
if ('\0' == c) {
|
1346
|
+
ox_sax_drive_error(dr, NO_TERM "attributes not terminated");
|
1347
|
+
return '\0';
|
1348
|
+
}
|
1349
|
+
pos = dr->buf.pos + 1;
|
1350
|
+
line = dr->buf.line;
|
1351
|
+
col = dr->buf.col + 1;
|
1352
|
+
if ('\0' == (c = read_name_token(dr))) {
|
1353
|
+
ox_sax_drive_error(dr, NO_TERM "error reading token");
|
1354
|
+
return '\0';
|
1355
|
+
}
|
1356
|
+
if (is_xml && 0 == strcasecmp("encoding", dr->buf.str)) {
|
1357
|
+
is_encoding = 1;
|
1358
|
+
}
|
1359
|
+
if (dr->has.attr || dr->has.attr_value) {
|
1360
|
+
name = str2sym(dr, dr->buf.str, 0);
|
1361
|
+
}
|
1362
|
+
if (is_white(c)) {
|
1363
|
+
c = buf_next_non_white(&dr->buf);
|
1364
|
+
}
|
1365
|
+
if ('=' != c) {
|
1366
|
+
if (eq_req) {
|
1367
|
+
dr->err = 1;
|
1368
|
+
return c;
|
1369
|
+
} else {
|
1370
|
+
ox_sax_drive_error(dr, WRONG_CHAR "no attribute value");
|
1371
|
+
attr_value = (char*)"";
|
1372
|
+
}
|
1373
|
+
} else {
|
1374
|
+
pos = dr->buf.pos + 1;
|
1375
|
+
line = dr->buf.line;
|
1376
|
+
col = dr->buf.col + 1;
|
1377
|
+
c = read_quoted_value(dr);
|
1378
|
+
attr_value = dr->buf.str;
|
1379
|
+
if (is_encoding) {
|
1380
|
+
#if HAS_ENCODING_SUPPORT
|
1381
|
+
dr->encoding = rb_enc_find(dr->buf.str);
|
1382
|
+
#elif HAS_PRIVATE_ENCODING
|
1383
|
+
dr->encoding = rb_str_new2(dr->buf.str);
|
1384
|
+
#else
|
1385
|
+
dr->encoding = dr->buf.str;
|
1386
|
+
#endif
|
1387
|
+
is_encoding = 0;
|
1388
|
+
}
|
1389
|
+
}
|
1390
|
+
if (0 >= dr->blocked && (NULL == h || ActiveOverlay == h->overlay || NestOverlay == h->overlay)) {
|
1391
|
+
if (dr->has.attr_value) {
|
1392
|
+
VALUE args[2];
|
1393
|
+
|
1394
|
+
if (dr->has.pos) {
|
1395
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1396
|
+
}
|
1397
|
+
if (dr->has.line) {
|
1398
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1399
|
+
}
|
1400
|
+
if (dr->has.column) {
|
1401
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1402
|
+
}
|
1403
|
+
args[0] = name;
|
1404
|
+
args[1] = dr->value_obj;
|
1405
|
+
rb_funcall2(dr->handler, ox_attr_value_id, 2, args);
|
1406
|
+
} else if (dr->has.attr) {
|
1407
|
+
VALUE args[2];
|
1408
|
+
|
1409
|
+
args[0] = name;
|
1410
|
+
if (dr->options.convert_special) {
|
1411
|
+
ox_sax_collapse_special(dr, dr->buf.str, pos, line, col);
|
1412
|
+
}
|
1413
|
+
args[1] = rb_str_new2(attr_value);
|
1414
|
+
#if HAS_ENCODING_SUPPORT
|
1415
|
+
if (0 != dr->encoding) {
|
1416
|
+
rb_enc_associate(args[1], dr->encoding);
|
1417
|
+
}
|
1418
|
+
#elif HAS_PRIVATE_ENCODING
|
1419
|
+
if (Qnil != dr->encoding) {
|
1420
|
+
rb_funcall(args[1], ox_force_encoding_id, 1, dr->encoding);
|
1421
|
+
}
|
1422
|
+
#endif
|
1423
|
+
if (dr->has.pos) {
|
1424
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1425
|
+
}
|
1426
|
+
if (dr->has.line) {
|
1427
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1428
|
+
}
|
1429
|
+
if (dr->has.column) {
|
1430
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1431
|
+
}
|
1432
|
+
rb_funcall2(dr->handler, ox_attr_id, 2, args);
|
1433
|
+
}
|
1434
|
+
}
|
1435
|
+
if (is_white(c)) {
|
1436
|
+
c = buf_next_non_white(&dr->buf);
|
1437
|
+
}
|
1438
|
+
}
|
1439
|
+
dr->buf.str = 0;
|
1440
|
+
|
1441
|
+
return c;
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
/* The character after the word is returned. dr->buf.tail is one past
|
1445
|
+
* that. dr->buf.str will point to the token which will be '\0' terminated.
|
1446
|
+
*/
|
1447
|
+
static char
|
1448
|
+
read_name_token(SaxDrive dr) {
|
1449
|
+
char c;
|
1450
|
+
|
1451
|
+
dr->buf.str = dr->buf.tail;
|
1452
|
+
c = buf_get(&dr->buf);
|
1453
|
+
if (is_white(c)) {
|
1454
|
+
c = buf_next_non_white(&dr->buf);
|
1455
|
+
dr->buf.str = dr->buf.tail - 1;
|
1456
|
+
}
|
1457
|
+
while (1) {
|
1458
|
+
switch (c) {
|
1459
|
+
case ' ':
|
1460
|
+
case '\t':
|
1461
|
+
case '\f':
|
1462
|
+
case '?':
|
1463
|
+
case '=':
|
1464
|
+
case '/':
|
1465
|
+
case '>':
|
1466
|
+
case '<':
|
1467
|
+
case '\n':
|
1468
|
+
case '\r':
|
1469
|
+
*(dr->buf.tail - 1) = '\0';
|
1470
|
+
return c;
|
1471
|
+
case '\0':
|
1472
|
+
/* documents never terminate after a name token */
|
1473
|
+
ox_sax_drive_error(dr, NO_TERM "document not terminated");
|
1474
|
+
return '\0';
|
1475
|
+
case ':':
|
1476
|
+
if ('\0' == *dr->options.strip_ns) {
|
1477
|
+
break;
|
1478
|
+
} else if ('*' == *dr->options.strip_ns && '\0' == dr->options.strip_ns[1]) {
|
1479
|
+
dr->buf.str = dr->buf.tail;
|
1480
|
+
} else if (dr->options.smart && 0 == strncasecmp(dr->options.strip_ns, dr->buf.str, dr->buf.tail - dr->buf.str - 1)) {
|
1481
|
+
dr->buf.str = dr->buf.tail;
|
1482
|
+
} else if (0 == strncmp(dr->options.strip_ns, dr->buf.str, dr->buf.tail - dr->buf.str - 1)) {
|
1483
|
+
dr->buf.str = dr->buf.tail;
|
1484
|
+
}
|
1485
|
+
break;
|
1486
|
+
default:
|
1487
|
+
break;
|
1488
|
+
}
|
1489
|
+
c = buf_get(&dr->buf);
|
1490
|
+
}
|
1491
|
+
return '\0';
|
1492
|
+
}
|
1493
|
+
|
1494
|
+
/* The character after the quote or if there is no quote, the character after the word is returned. dr->buf.tail is one past
|
1495
|
+
* that. dr->buf.str will point to the token which will be '\0' terminated.
|
1496
|
+
*/
|
1497
|
+
static char
|
1498
|
+
read_quoted_value(SaxDrive dr) {
|
1499
|
+
char c;
|
1500
|
+
|
1501
|
+
c = buf_get(&dr->buf);
|
1502
|
+
if (is_white(c)) {
|
1503
|
+
c = buf_next_non_white(&dr->buf);
|
1504
|
+
}
|
1505
|
+
if ('"' == c || '\'' == c) {
|
1506
|
+
char term = c;
|
1507
|
+
|
1508
|
+
dr->buf.str = dr->buf.tail;
|
1509
|
+
while (term != (c = buf_get(&dr->buf))) {
|
1510
|
+
if ('\0' == c) {
|
1511
|
+
ox_sax_drive_error(dr, NO_TERM "quoted value not terminated");
|
1512
|
+
return '\0';
|
1513
|
+
}
|
1514
|
+
}
|
1515
|
+
// dr->buf.tail is one past quote char
|
1516
|
+
*(dr->buf.tail - 1) = '\0'; /* terminate value */
|
1517
|
+
c = buf_get(&dr->buf);
|
1518
|
+
return c;
|
1519
|
+
}
|
1520
|
+
// not quoted, look for something that terminates the string
|
1521
|
+
dr->buf.str = dr->buf.tail - 1;
|
1522
|
+
ox_sax_drive_error(dr, WRONG_CHAR "attribute value not in quotes");
|
1523
|
+
while ('\0' != (c = buf_get(&dr->buf))) {
|
1524
|
+
switch (c) {
|
1525
|
+
case ' ':
|
1526
|
+
//case '/':
|
1527
|
+
case '>':
|
1528
|
+
case '?': // for instructions
|
1529
|
+
case '\t':
|
1530
|
+
case '\n':
|
1531
|
+
case '\r':
|
1532
|
+
*(dr->buf.tail - 1) = '\0'; /* terminate value */
|
1533
|
+
// dr->buf.tail is in the correct position, one after the word terminator
|
1534
|
+
return c;
|
1535
|
+
default:
|
1536
|
+
break;
|
1537
|
+
}
|
1538
|
+
}
|
1539
|
+
return '\0'; // should never get here
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
static char*
|
1543
|
+
read_hex_uint64(char *b, uint64_t *up) {
|
1544
|
+
uint64_t u = 0;
|
1545
|
+
char c;
|
1546
|
+
|
1547
|
+
for (; ';' != *b; b++) {
|
1548
|
+
c = *b;
|
1549
|
+
if ('0' <= c && c <= '9') {
|
1550
|
+
u = (u << 4) | (uint64_t)(c - '0');
|
1551
|
+
} else if ('a' <= c && c <= 'f') {
|
1552
|
+
u = (u << 4) | (uint64_t)(c - 'a' + 10);
|
1553
|
+
} else if ('A' <= c && c <= 'F') {
|
1554
|
+
u = (u << 4) | (uint64_t)(c - 'A' + 10);
|
1555
|
+
} else {
|
1556
|
+
return 0;
|
1557
|
+
}
|
1558
|
+
}
|
1559
|
+
*up = u;
|
1560
|
+
|
1561
|
+
return b;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
static char*
|
1565
|
+
read_10_uint64(char *b, uint64_t *up) {
|
1566
|
+
uint64_t u = 0;
|
1567
|
+
char c;
|
1568
|
+
|
1569
|
+
for (; ';' != *b; b++) {
|
1570
|
+
c = *b;
|
1571
|
+
if ('0' <= c && c <= '9') {
|
1572
|
+
u = (u * 10) + (uint64_t)(c - '0');
|
1573
|
+
} else {
|
1574
|
+
return 0;
|
1575
|
+
}
|
1576
|
+
}
|
1577
|
+
*up = u;
|
1578
|
+
|
1579
|
+
return b;
|
1580
|
+
}
|
1581
|
+
|
1582
|
+
int
|
1583
|
+
ox_sax_collapse_special(SaxDrive dr, char *str, int pos, int line, int col) {
|
1584
|
+
char *s = str;
|
1585
|
+
char *b = str;
|
1586
|
+
|
1587
|
+
while ('\0' != *s) {
|
1588
|
+
if ('&' == *s) {
|
1589
|
+
int c = 0;
|
1590
|
+
char *end;
|
1591
|
+
|
1592
|
+
s++;
|
1593
|
+
if ('#' == *s) {
|
1594
|
+
uint64_t u = 0;
|
1595
|
+
char x;
|
1596
|
+
|
1597
|
+
s++;
|
1598
|
+
if ('x' == *s || 'X' == *s) {
|
1599
|
+
x = *s;
|
1600
|
+
s++;
|
1601
|
+
end = read_hex_uint64(s, &u);
|
1602
|
+
} else {
|
1603
|
+
x = '\0';
|
1604
|
+
end = read_10_uint64(s, &u);
|
1605
|
+
}
|
1606
|
+
if (0 == end) {
|
1607
|
+
ox_sax_drive_error(dr, NO_TERM "special character does not end with a semicolon");
|
1608
|
+
*b++ = '&';
|
1609
|
+
*b++ = '#';
|
1610
|
+
if ('\0' != x) {
|
1611
|
+
*b++ = x;
|
1612
|
+
}
|
1613
|
+
continue;
|
1614
|
+
}
|
1615
|
+
if (u <= 0x000000000000007FULL) {
|
1616
|
+
*b++ = (char)u;
|
1617
|
+
#if HAS_ENCODING_SUPPORT
|
1618
|
+
} else if (ox_utf8_encoding == dr->encoding) {
|
1619
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1620
|
+
} else if (0 == dr->encoding) {
|
1621
|
+
dr->encoding = ox_utf8_encoding;
|
1622
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1623
|
+
#elif HAS_PRIVATE_ENCODING
|
1624
|
+
} else if (ox_utf8_encoding == dr->encoding ||
|
1625
|
+
0 == strcasecmp(rb_str_ptr(rb_String(ox_utf8_encoding)), rb_str_ptr(rb_String(dr->encoding)))) {
|
1626
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1627
|
+
} else if (Qnil == dr->encoding) {
|
1628
|
+
dr->encoding = ox_utf8_encoding;
|
1629
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1630
|
+
#else
|
1631
|
+
} else if (0 == dr->encoding) {
|
1632
|
+
dr->encoding = UTF8_STR;
|
1633
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1634
|
+
} else if (0 == strcasecmp(UTF8_STR, dr->encoding)) {
|
1635
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1636
|
+
#endif
|
1637
|
+
} else {
|
1638
|
+
b = ox_ucs_to_utf8_chars(b, u);
|
1639
|
+
/*
|
1640
|
+
ox_sax_drive_error(dr, NO_TERM "Invalid encoding, need UTF-8 encoding to parse &#nnnn; character sequences.");
|
1641
|
+
*b++ = '&';
|
1642
|
+
*b++ = '#';
|
1643
|
+
if ('\0' != x) {
|
1644
|
+
*b++ = x;
|
1645
|
+
}
|
1646
|
+
continue;
|
1647
|
+
*/
|
1648
|
+
}
|
1649
|
+
s = end + 1;
|
1650
|
+
continue;
|
1651
|
+
} else if (0 == strncasecmp(s, "lt;", 3)) {
|
1652
|
+
c = '<';
|
1653
|
+
s += 3;
|
1654
|
+
col += 3;
|
1655
|
+
} else if (0 == strncasecmp(s, "gt;", 3)) {
|
1656
|
+
c = '>';
|
1657
|
+
s += 3;
|
1658
|
+
col += 3;
|
1659
|
+
} else if (0 == strncasecmp(s, "amp;", 4)) {
|
1660
|
+
c = '&';
|
1661
|
+
s += 4;
|
1662
|
+
col += 4;
|
1663
|
+
} else if (0 == strncasecmp(s, "quot;", 5)) {
|
1664
|
+
c = '"';
|
1665
|
+
s += 5;
|
1666
|
+
col += 5;
|
1667
|
+
} else if (0 == strncasecmp(s, "apos;", 5)) {
|
1668
|
+
c = '\'';
|
1669
|
+
s += 5;
|
1670
|
+
} else {
|
1671
|
+
ox_sax_drive_error_at(dr, INVALID_FORMAT "Invalid special character sequence", pos, line, col);
|
1672
|
+
c = '&';
|
1673
|
+
}
|
1674
|
+
*b++ = (char)c;
|
1675
|
+
col++;
|
1676
|
+
} else {
|
1677
|
+
if ('\n' == *s) {
|
1678
|
+
line++;
|
1679
|
+
col = 0;
|
1680
|
+
}
|
1681
|
+
col++;
|
1682
|
+
*b++ = *s++;
|
1683
|
+
}
|
1684
|
+
}
|
1685
|
+
*b = '\0';
|
1686
|
+
|
1687
|
+
return 0;
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
static void
|
1691
|
+
hint_clear_empty(SaxDrive dr) {
|
1692
|
+
Nv nv;
|
1693
|
+
|
1694
|
+
for (nv = stack_peek(&dr->stack); 0 != nv; nv = stack_peek(&dr->stack)) {
|
1695
|
+
if (0 == nv->hint) {
|
1696
|
+
break;
|
1697
|
+
}
|
1698
|
+
if (nv->hint->empty) {
|
1699
|
+
end_element_cb(dr, nv->val, dr->buf.pos, dr->buf.line, dr->buf.col, nv->hint);
|
1700
|
+
stack_pop(&dr->stack);
|
1701
|
+
} else {
|
1702
|
+
break;
|
1703
|
+
}
|
1704
|
+
}
|
1705
|
+
}
|
1706
|
+
|
1707
|
+
static Nv
|
1708
|
+
hint_try_close(SaxDrive dr, const char *name) {
|
1709
|
+
Hint h = ox_hint_find(dr->options.hints, name);
|
1710
|
+
Nv nv;
|
1711
|
+
|
1712
|
+
if (0 == h) {
|
1713
|
+
return 0;
|
1714
|
+
}
|
1715
|
+
for (nv = stack_peek(&dr->stack); 0 != nv; nv = stack_peek(&dr->stack)) {
|
1716
|
+
if (0 == strcasecmp(name, nv->name)) {
|
1717
|
+
stack_pop(&dr->stack);
|
1718
|
+
return nv;
|
1719
|
+
}
|
1720
|
+
if (0 == nv->hint) {
|
1721
|
+
break;
|
1722
|
+
}
|
1723
|
+
if (nv->hint->empty) {
|
1724
|
+
end_element_cb(dr, nv->val, dr->buf.pos, dr->buf.line, dr->buf.col, nv->hint);
|
1725
|
+
dr->stack.tail = nv;
|
1726
|
+
} else {
|
1727
|
+
break;
|
1728
|
+
}
|
1729
|
+
}
|
1730
|
+
return 0;
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
static void
|
1734
|
+
end_element_cb(SaxDrive dr, VALUE name, int pos, int line, int col, Hint h) {
|
1735
|
+
if (dr->has.end_element && 0 >= dr->blocked && (NULL == h || ActiveOverlay == h->overlay || NestOverlay == h->overlay)) {
|
1736
|
+
if (dr->has.pos) {
|
1737
|
+
rb_ivar_set(dr->handler, ox_at_pos_id, LONG2NUM(pos));
|
1738
|
+
}
|
1739
|
+
if (dr->has.line) {
|
1740
|
+
rb_ivar_set(dr->handler, ox_at_line_id, LONG2NUM(line));
|
1741
|
+
}
|
1742
|
+
if (dr->has.column) {
|
1743
|
+
rb_ivar_set(dr->handler, ox_at_column_id, LONG2NUM(col));
|
1744
|
+
}
|
1745
|
+
rb_funcall(dr->handler, ox_end_element_id, 1, name);
|
1746
|
+
}
|
1747
|
+
if (NULL != h && BlockOverlay == h->overlay && 0 < dr->blocked) {
|
1748
|
+
dr->blocked--;
|
1749
|
+
}
|
1750
|
+
}
|