domo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +24 -0
- data/VERSION +1 -1
- data/bin/domo +1 -1
- data/domo.gemspec +5 -5
- data/jobs/0-1.restore_cif_code_map.xml +0 -0
- data/lib/domo.rb +2 -0
- data/lib/domo/cli.rb +1 -1
- data/lib/domo/core.rb +0 -3
- data/pkg/domo-0.0.3.gem +0 -0
- data/pkg/domo-0.0.4.gem +0 -0
- data/test.lst +2 -0
- data/vendor/bundle/ruby/1.9.1/bin/domo +21 -0
- data/vendor/bundle/ruby/1.9.1/bin/nokogiri +19 -0
- data/vendor/bundle/ruby/1.9.1/bin/rake2thor +19 -0
- data/vendor/bundle/ruby/1.9.1/bin/thor +19 -0
- data/vendor/bundle/ruby/1.9.1/cache/highline-1.6.2.gem +0 -0
- data/vendor/bundle/ruby/1.9.1/cache/mechanize-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/1.9.1/cache/nokogiri-1.4.4.gem +0 -0
- data/vendor/bundle/ruby/1.9.1/cache/thor-0.14.6.gem +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/CHANGELOG +251 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/INSTALL +55 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/LICENSE +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/README +63 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/Rakefile +82 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/TODO +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/ansi_colors.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/asking_for_arrays.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/basic_usage.rb +75 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/color_scheme.rb +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/limit.rb +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/menus.rb +65 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/overwrite.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/page_and_wrap.rb +322 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/password.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/trapping_eof.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/examples/using_readline.rb +17 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline.rb +763 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/color_scheme.rb +118 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/compatibility.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/import.rb +43 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/menu.rb +398 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/question.rb +462 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/lib/highline/system_extensions.rb +186 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/setup.rb +1360 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/test/tc_color_scheme.rb +56 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/test/tc_highline.rb +823 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/test/tc_import.rb +54 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/test/tc_menu.rb +429 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.2/test/ts_all.rb +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/CHANGELOG.rdoc +516 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/EXAMPLES.rdoc +185 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/FAQ.rdoc +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/GUIDE.rdoc +123 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/LICENSE.rdoc +340 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/Manifest.txt +180 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/README.rdoc +60 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/Rakefile +33 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/examples/flickr_upload.rb +23 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/examples/mech-dump.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/examples/proxy_req.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/examples/rubyforge.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/examples/spider.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb +660 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain.rb +33 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/auth_headers.rb +78 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/body_decoding_handler.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/connection_resolver.rb +77 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/custom_headers.rb +21 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/handler.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/header_resolver.rb +57 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/parameter_resolver.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/post_connect_hook.rb +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/pre_connect_hook.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/request_resolver.rb +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/response_body_parser.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/response_header_handler.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/response_reader.rb +39 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/ssl_resolver.rb +40 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/chain/uri_resolver.rb +75 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/content_type_error.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/cookie.rb +78 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/cookie_jar.rb +186 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/file.rb +71 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/file_response.rb +60 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/file_saver.rb +37 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form.rb +455 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/button.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/check_box.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/field.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/file_upload.rb +23 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/image_button.rb +21 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/multi_select_list.rb +67 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/option.rb +49 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/radio_button.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/select_list.rb +68 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/headers.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/history.rb +65 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/inspect.rb +88 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/monkey_patch.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page.rb +300 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/base.rb +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/frame.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/image.rb +26 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/label.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/link.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/page/meta.rb +50 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/pluggable_parsers.rb +101 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/redirect_limit_reached_error.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/redirect_not_get_or_head_error.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/response_code_error.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/unsupported_scheme_error.rb +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/util.rb +69 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_argument_validator.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_auth_headers.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_custom_headers.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_header_resolver.rb +29 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_parameter_resolver.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_request_resolver.rb +29 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/chain/test_response_reader.rb +24 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/data/htpasswd +1 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/data/server.crt +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/data/server.csr +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/data/server.key +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/data/server.pem +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/helper.rb +132 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/alt_text.html +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/bad_form_test.html +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/button.jpg +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/empty_form.html +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/file_upload.html +26 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/find_link.html +41 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_multi_select.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_multival.html +37 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_no_action.html +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_no_input_name.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_select.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_select_all.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_select_none.html +17 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_select_noopts.html +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_set_fields.html +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/form_test.html +188 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/frame_test.html +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/google.html +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/iframe_test.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/index.html +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/link with space.html +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/meta_cookie.html +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/no_title_test.html +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/relative/tc_relative_links.html +21 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_bad_charset.html +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_bad_links.html +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_base_link.html +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_blank_form.html +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_charset.html +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_checkboxes.html +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_encoded_links.html +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_field_precedence.html +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_follow_meta.html +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_form_action.html +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_links.html +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_meta_in_body.html +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_no_attributes.html +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_pretty_print.html +17 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_radiobuttons.html +17 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_referer.html +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_relative_links.html +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/tc_textarea.html +23 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/test_bad_encoding.html +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/htdocs/unusual______.html +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/servlets.rb +365 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/ssl_server.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_authenticate.rb +71 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_bad_links.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_blank_form.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_checkboxes.rb +61 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_content_type.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_cookie_class.rb +338 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_cookie_jar.rb +324 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_cookies.rb +123 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_encoded_links.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_errors.rb +49 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_field_precedence.rb +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_follow_meta.rb +119 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_form_action.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_form_as_hash.rb +61 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_form_button.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_form_no_inputname.rb +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_forms.rb +571 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_frames.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_get_headers.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_gzipping.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_hash_api.rb +45 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_history.rb +142 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_history_added.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_html_unscape_forms.rb +46 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_if_modified_since.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_keep_alive.rb +31 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_links.rb +128 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_mech.rb +268 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_mech_proxy.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_mechanize_file.rb +47 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_meta.rb +65 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_multi_select.rb +106 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_no_attributes.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_option.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_page.rb +124 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_pluggable_parser.rb +145 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_post_form.rb +34 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_pretty_print.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_radiobutton.rb +75 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_redirect_limit_reached.rb +39 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_redirect_verb_handling.rb +49 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_referer.rb +39 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_relative_links.rb +40 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_request.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_response_code.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_save_file.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_scheme.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_select.rb +116 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_select_all.rb +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_select_none.rb +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_select_noopts.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_set_fields.rb +44 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_ssl_server.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_subclass.rb +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_textarea.rb +45 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_upload.rb +109 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_util.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_verbs.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/CHANGELOG.ja.rdoc +457 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/CHANGELOG.rdoc +446 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/Manifest.txt +282 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/README.ja.rdoc +102 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/README.rdoc +146 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/Rakefile +187 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/bin/nokogiri +54 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/deps.rip +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/Makefile +545 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/depend +358 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/extconf.rb +118 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_document.c +154 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_document.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_document.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_element_description.c +276 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_element_description.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_element_description.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_entity_lookup.c +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_entity_lookup.h +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_entity_lookup.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_sax_parser_context.c +94 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_sax_parser_context.h +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/html_sax_parser_context.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/mkmf.log +377 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/nokogiri.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/nokogiri.c +97 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/nokogiri.h +162 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/nokogiri.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attr.c +94 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attr.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attr.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attribute_decl.c +70 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attribute_decl.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_attribute_decl.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_cdata.c +56 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_cdata.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_cdata.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_comment.c +54 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_comment.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_comment.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document.c +469 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document.h +23 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document_fragment.c +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document_fragment.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_document_fragment.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_dtd.c +202 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_dtd.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_dtd.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_content.c +123 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_content.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_content.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_decl.c +69 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_decl.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_element_decl.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_encoding_handler.c +79 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_encoding_handler.h +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_encoding_handler.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_decl.c +110 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_decl.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_decl.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_reference.c +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_reference.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_entity_reference.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_io.c +31 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_io.h +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_io.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_libxml2_hacks.c +112 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_libxml2_hacks.h +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_libxml2_hacks.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_namespace.c +84 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_namespace.h +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_namespace.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node.c +1390 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node.h +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node_set.c +418 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node_set.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_node_set.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_processing_instruction.c +56 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_processing_instruction.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_processing_instruction.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_reader.c +684 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_reader.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_reader.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_relax_ng.c +168 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_relax_ng.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_relax_ng.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser.c +286 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser.h +39 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser_context.c +199 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser_context.h +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_parser_context.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_push_parser.c +115 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_push_parser.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_sax_push_parser.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_schema.c +205 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_schema.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_schema.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_syntax_error.c +58 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_syntax_error.h +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_syntax_error.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_text.c +50 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_text.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_text.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_xpath_context.c +309 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_xpath_context.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xml_xpath_context.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xslt_stylesheet.c +254 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xslt_stylesheet.h +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/ext/nokogiri/xslt_stylesheet.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri.rb +133 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/generated_parser.rb +676 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/generated_tokenizer.rb +145 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/node.rb +99 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/parser.rb +82 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/parser.y +235 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/syntax_error.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/tokenizer.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/tokenizer.rex +55 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/css/xpath_visitor.rb +171 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/decorators/slop.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/encoding_handler.rb +42 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/html/document.rb +28 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/html/element_description.rb +81 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/html/entity_lookup.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/html/sax/parser_context.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/io_callbacks.rb +42 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/libxml.rb +420 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/common_node.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/html_elem_desc.rb +24 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/html_entity_desc.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_alloc.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_attr.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_attribute.rb +27 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_buffer.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_document.rb +117 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_dtd.rb +28 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_element.rb +26 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_element_content.rb +17 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_entity.rb +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_enumeration.rb +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_node.rb +28 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_node_set.rb +53 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_notation.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_ns.rb +15 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_parser_context.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_parser_input.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_relax_ng.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_sax_handler.rb +51 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +124 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_schema.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_syntax_error.rb +31 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_text_reader.rb +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_xpath_context.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_xpath_object.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/weak_bucket.rb +40 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/attr.rb +41 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/attribute_decl.rb +27 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/cdata.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/comment.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/document.rb +166 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/document_fragment.rb +21 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/dtd.rb +67 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/element_content.rb +43 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/element_decl.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/entity_decl.rb +36 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/entity_reference.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/namespace.rb +44 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/node.rb +559 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/node_set.rb +149 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/processing_instruction.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/reader.rb +236 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/relax_ng.rb +85 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/sax/parser.rb +135 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/sax/parser_context.rb +79 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/sax/push_parser.rb +51 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/schema.rb +109 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/syntax_error.rb +98 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/text.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/xpath.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xml/xpath_context.rb +153 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/ffi/xslt/stylesheet.rb +73 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/builder.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/document.rb +90 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/document_fragment.rb +41 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/element_description.rb +23 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/entity_lookup.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/sax/parser.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/html/sax/parser_context.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/nokogiri.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/syntax_error.rb +4 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/version.rb +38 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/version_warning.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml.rb +67 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/attr.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/attribute_decl.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb +418 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/cdata.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/character_data.rb +7 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/document.rb +218 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/document_fragment.rb +84 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/dtd.rb +22 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/element_content.rb +36 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/element_decl.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/entity_decl.rb +19 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/namespace.rb +13 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb +906 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/node/save_options.rb +42 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb +350 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/notation.rb +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/parse_options.rb +85 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/pp.rb +2 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/pp/character_data.rb +18 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/pp/node.rb +56 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/processing_instruction.rb +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/reader.rb +112 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/relax_ng.rb +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/sax.rb +4 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/sax/document.rb +164 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/sax/parser.rb +115 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/sax/parser_context.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/sax/push_parser.rb +60 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/schema.rb +57 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/syntax_error.rb +47 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/text.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/xpath.rb +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xml/xpath_context.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xslt.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/xslt/stylesheet.rb +25 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/lib/xsd/xmlparser/nokogiri.rb +90 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/tasks/cross_compile.rb +180 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/tasks/test.rb +94 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/css/test_nthiness.rb +159 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/css/test_parser.rb +303 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/css/test_tokenizer.rb +190 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/css/test_xpath_visitor.rb +85 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/decorators/test_slop.rb +16 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/ffi/test_document.rb +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/2ch.html +108 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/address_book.rlx +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/address_book.xml +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/bar/bar.xsd +4 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/dont_hurt_em_why.xml +422 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/exslt.xml +8 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/exslt.xslt +35 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/foo/foo.xsd +4 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/po.xml +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/po.xsd +66 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/shift_jis.html +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/shift_jis.xml +5 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/snuggles.xml +3 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/staff.dtd +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/staff.xml +59 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/staff.xslt +32 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/tlm.html +850 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/files/valid_bar.xml +2 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/helper.rb +169 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/sax/test_parser.rb +74 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/sax/test_parser_context.rb +48 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_builder.rb +164 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_document.rb +398 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_document_encoding.rb +77 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_document_fragment.rb +253 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_element_description.rb +98 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_named_characters.rb +14 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_node.rb +190 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/html/test_node_encoding.rb +27 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_convert_xpath.rb +135 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_css_cache.rb +45 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_encoding_handler.rb +46 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_memory_leak.rb +87 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_nokogiri.rb +138 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_reader.rb +408 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_soap4r_sax.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/test_xslt_transforms.rb +189 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/node/test_save_options.rb +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/node/test_subclass.rb +44 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/sax/test_parser.rb +315 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/sax/test_parser_context.rb +113 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/sax/test_push_parser.rb +156 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_attr.rb +65 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_attribute_decl.rb +82 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_builder.rb +210 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_cdata.rb +50 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_comment.rb +29 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_document.rb +668 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_document_encoding.rb +26 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_document_fragment.rb +192 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_dtd.rb +97 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_dtd_encoding.rb +33 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_element_content.rb +56 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_element_decl.rb +73 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_entity_decl.rb +120 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_entity_reference.rb +21 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_namespace.rb +68 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_node.rb +894 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_node_attributes.rb +34 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_node_encoding.rb +107 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_node_reparenting.rb +321 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_node_set.rb +698 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_parse_options.rb +52 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_processing_instruction.rb +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_reader_encoding.rb +126 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_relax_ng.rb +60 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_schema.rb +89 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_syntax_error.rb +12 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_text.rb +47 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_unparented_node.rb +381 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xml/test_xpath.rb +237 -0
- data/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.4.4/test/xslt/test_custom_functions.rb +94 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/CHANGELOG.rdoc +103 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/LICENSE +20 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/README.md +307 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/Thorfile +24 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/bin/rake2thor +86 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/bin/thor +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor.rb +334 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions.rb +314 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/create_file.rb +105 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/create_link.rb +57 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/directory.rb +93 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb +134 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb +270 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb +109 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/base.rb +579 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/core_ext/file_binary_read.rb +9 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/core_ext/hash_with_indifferent_access.rb +75 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb +100 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/error.rb +30 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/group.rb +273 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb +168 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/parser.rb +4 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/parser/argument.rb +67 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/parser/arguments.rb +161 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/parser/option.rb +120 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/parser/options.rb +173 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/rake_compat.rb +66 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/runner.rb +309 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/shell.rb +88 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/shell/basic.rb +290 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/shell/color.rb +108 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/shell/html.rb +121 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/task.rb +114 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/util.rb +229 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/version.rb +3 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions/create_file_spec.rb +170 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions/directory_spec.rb +136 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions/empty_directory_spec.rb +98 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions/file_manipulation_spec.rb +310 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions/inject_into_file_spec.rb +135 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/actions_spec.rb +322 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/base_spec.rb +269 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/core_ext/hash_with_indifferent_access_spec.rb +43 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/core_ext/ordered_hash_spec.rb +115 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/application.rb +2 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/bundle/execute.rb +6 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/bundle/main.thor +1 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/doc/%file_name%.rb.tt +1 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/doc/README +3 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/doc/block_helper.rb +3 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/doc/config.rb +1 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/group.thor +114 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/invoke.thor +112 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/path with spaces b/data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/path with → spaces +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/script.thor +184 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/fixtures/task.thor +10 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/group_spec.rb +178 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/invocation_spec.rb +100 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/parser/argument_spec.rb +47 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/parser/arguments_spec.rb +64 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/parser/option_spec.rb +202 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/parser/options_spec.rb +319 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/rake_compat_spec.rb +68 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/register_spec.rb +92 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/runner_spec.rb +210 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/shell/basic_spec.rb +223 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/shell/color_spec.rb +41 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/shell/html_spec.rb +27 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/shell_spec.rb +47 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/spec_helper.rb +54 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/task_spec.rb +69 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/thor_spec.rb +334 -0
- data/vendor/bundle/ruby/1.9.1/gems/thor-0.14.6/spec/util_spec.rb +163 -0
- data/vendor/bundle/ruby/1.9.1/specifications/highline-1.6.2.gemspec +29 -0
- data/vendor/bundle/ruby/1.9.1/specifications/mechanize-1.0.0.gemspec +35 -0
- data/vendor/bundle/ruby/1.9.1/specifications/nokogiri-1.4.4.gemspec +49 -0
- data/vendor/bundle/ruby/1.9.1/specifications/thor-0.14.6.gemspec +47 -0
- metadata +679 -68
@@ -0,0 +1,12 @@
|
|
1
|
+
#ifndef HAVE_XMLFIRSTELEMENTCHILD
|
2
|
+
|
3
|
+
#ifndef XML_LIBXML2_HACKS
|
4
|
+
#define XML_LIBXML2_HACKS
|
5
|
+
|
6
|
+
xmlNodePtr xmlFirstElementChild(xmlNodePtr parent);
|
7
|
+
xmlNodePtr xmlNextElementSibling(xmlNodePtr node);
|
8
|
+
xmlNodePtr xmlLastElementChild(xmlNodePtr parent);
|
9
|
+
|
10
|
+
#endif
|
11
|
+
|
12
|
+
#endif
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
#include <xml_namespace.h>
|
2
|
+
|
3
|
+
VALUE cNokogiriXmlNamespace ;
|
4
|
+
|
5
|
+
/*
|
6
|
+
* call-seq:
|
7
|
+
* prefix
|
8
|
+
*
|
9
|
+
* Get the prefix for this namespace. Returns +nil+ if there is no prefix.
|
10
|
+
*/
|
11
|
+
static VALUE prefix(VALUE self)
|
12
|
+
{
|
13
|
+
xmlNsPtr ns;
|
14
|
+
xmlDocPtr doc;
|
15
|
+
|
16
|
+
Data_Get_Struct(self, xmlNs, ns);
|
17
|
+
if(!ns->prefix) return Qnil;
|
18
|
+
|
19
|
+
Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc);
|
20
|
+
|
21
|
+
return NOKOGIRI_STR_NEW2(ns->prefix);
|
22
|
+
}
|
23
|
+
|
24
|
+
/*
|
25
|
+
* call-seq:
|
26
|
+
* href
|
27
|
+
*
|
28
|
+
* Get the href for this namespace
|
29
|
+
*/
|
30
|
+
static VALUE href(VALUE self)
|
31
|
+
{
|
32
|
+
xmlNsPtr ns;
|
33
|
+
xmlDocPtr doc;
|
34
|
+
|
35
|
+
Data_Get_Struct(self, xmlNs, ns);
|
36
|
+
if(!ns->href) return Qnil;
|
37
|
+
|
38
|
+
Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc);
|
39
|
+
|
40
|
+
return NOKOGIRI_STR_NEW2(ns->href);
|
41
|
+
}
|
42
|
+
|
43
|
+
VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node)
|
44
|
+
{
|
45
|
+
VALUE ns, document, node_cache;
|
46
|
+
|
47
|
+
assert(doc->_private);
|
48
|
+
|
49
|
+
if(node->_private)
|
50
|
+
return (VALUE)node->_private;
|
51
|
+
|
52
|
+
ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, node);
|
53
|
+
|
54
|
+
document = DOC_RUBY_OBJECT(doc);
|
55
|
+
|
56
|
+
node_cache = rb_iv_get(document, "@node_cache");
|
57
|
+
rb_ary_push(node_cache, ns);
|
58
|
+
|
59
|
+
rb_iv_set(ns, "@document", DOC_RUBY_OBJECT(doc));
|
60
|
+
|
61
|
+
node->_private = (void *)ns;
|
62
|
+
|
63
|
+
return ns;
|
64
|
+
}
|
65
|
+
|
66
|
+
VALUE Nokogiri_wrap_xml_namespace2(VALUE document, xmlNsPtr node)
|
67
|
+
{
|
68
|
+
xmlDocPtr doc;
|
69
|
+
Data_Get_Struct(document, xmlDoc, doc) ;
|
70
|
+
return Nokogiri_wrap_xml_namespace(doc, node);
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
void init_xml_namespace()
|
75
|
+
{
|
76
|
+
VALUE nokogiri = rb_define_module("Nokogiri");
|
77
|
+
VALUE xml = rb_define_module_under(nokogiri, "XML");
|
78
|
+
VALUE klass = rb_define_class_under(xml, "Namespace", rb_cObject);
|
79
|
+
|
80
|
+
cNokogiriXmlNamespace = klass;
|
81
|
+
|
82
|
+
rb_define_method(klass, "prefix", prefix, 0);
|
83
|
+
rb_define_method(klass, "href", href, 0);
|
84
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#ifndef NOKOGIRI_XML_NAMESPACE
|
2
|
+
#define NOKOGIRI_XML_NAMESPACE
|
3
|
+
|
4
|
+
#include <nokogiri.h>
|
5
|
+
|
6
|
+
void init_xml_namespace();
|
7
|
+
|
8
|
+
extern VALUE cNokogiriXmlNamespace ;
|
9
|
+
|
10
|
+
VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node) ;
|
11
|
+
VALUE Nokogiri_wrap_xml_namespace2(VALUE document, xmlNsPtr node) ;
|
12
|
+
|
13
|
+
#endif
|
@@ -0,0 +1,1390 @@
|
|
1
|
+
#include <xml_node.h>
|
2
|
+
|
3
|
+
static ID decorate, decorate_bang;
|
4
|
+
|
5
|
+
#ifdef DEBUG
|
6
|
+
static void debug_node_dealloc(xmlNodePtr x)
|
7
|
+
{
|
8
|
+
NOKOGIRI_DEBUG_START(x)
|
9
|
+
NOKOGIRI_DEBUG_END(x)
|
10
|
+
}
|
11
|
+
#else
|
12
|
+
# define debug_node_dealloc 0
|
13
|
+
#endif
|
14
|
+
|
15
|
+
static void mark(xmlNodePtr node)
|
16
|
+
{
|
17
|
+
/* it's OK if the document isn't fully realized (as in XML::Reader). */
|
18
|
+
/* see http://github.com/tenderlove/nokogiri/issues/closed/#issue/95 */
|
19
|
+
if (DOC_RUBY_OBJECT_TEST(node->doc) && DOC_RUBY_OBJECT(node->doc))
|
20
|
+
rb_gc_mark(DOC_RUBY_OBJECT(node->doc));
|
21
|
+
}
|
22
|
+
|
23
|
+
/* :nodoc: */
|
24
|
+
typedef xmlNodePtr (*pivot_reparentee_func)(xmlNodePtr, xmlNodePtr);
|
25
|
+
|
26
|
+
/* :nodoc: */
|
27
|
+
static void relink_namespace(xmlNodePtr reparented)
|
28
|
+
{
|
29
|
+
xmlNodePtr child;
|
30
|
+
|
31
|
+
/* Avoid segv when relinking against unlinked nodes. */
|
32
|
+
if(!reparented->parent) return;
|
33
|
+
|
34
|
+
/* Make sure that our reparented node has the correct namespaces */
|
35
|
+
if(!reparented->ns && reparented->doc != (xmlDocPtr)reparented->parent)
|
36
|
+
xmlSetNs(reparented, reparented->parent->ns);
|
37
|
+
|
38
|
+
/* Search our parents for an existing definition */
|
39
|
+
if(reparented->nsDef) {
|
40
|
+
xmlNsPtr curr = reparented->nsDef;
|
41
|
+
xmlNsPtr prev = NULL;
|
42
|
+
|
43
|
+
while(curr) {
|
44
|
+
xmlNsPtr ns = xmlSearchNsByHref(
|
45
|
+
reparented->doc,
|
46
|
+
reparented->parent,
|
47
|
+
curr->href
|
48
|
+
);
|
49
|
+
/* If we find the namespace is already declared, remove it from this
|
50
|
+
* definition list. */
|
51
|
+
if(ns && ns != curr) {
|
52
|
+
if (prev) {
|
53
|
+
prev->next = curr->next;
|
54
|
+
} else {
|
55
|
+
reparented->nsDef = curr->next;
|
56
|
+
}
|
57
|
+
NOKOGIRI_ROOT_NSDEF(curr, reparented->doc);
|
58
|
+
} else {
|
59
|
+
prev = curr;
|
60
|
+
}
|
61
|
+
curr = curr->next;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
/* Only walk all children if there actually is a namespace we need to */
|
66
|
+
/* reparent. */
|
67
|
+
if(NULL == reparented->ns) return;
|
68
|
+
|
69
|
+
/* When a node gets reparented, walk it's children to make sure that */
|
70
|
+
/* their namespaces are reparented as well. */
|
71
|
+
child = reparented->children;
|
72
|
+
while(NULL != child) {
|
73
|
+
relink_namespace(child);
|
74
|
+
child = child->next;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
/* :nodoc: */
|
79
|
+
static xmlNodePtr xmlReplaceNodeWrapper(xmlNodePtr pivot, xmlNodePtr new_node)
|
80
|
+
{
|
81
|
+
xmlNodePtr retval ;
|
82
|
+
|
83
|
+
retval = xmlReplaceNode(pivot, new_node) ;
|
84
|
+
|
85
|
+
if (retval == pivot) {
|
86
|
+
retval = new_node ; /* return semantics for reparent_node_with */
|
87
|
+
}
|
88
|
+
|
89
|
+
/* work around libxml2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=615612 */
|
90
|
+
if (retval->type == XML_TEXT_NODE) {
|
91
|
+
if (retval->prev && retval->prev->type == XML_TEXT_NODE) {
|
92
|
+
retval = xmlTextMerge(retval->prev, retval);
|
93
|
+
}
|
94
|
+
if (retval->next && retval->next->type == XML_TEXT_NODE) {
|
95
|
+
retval = xmlTextMerge(retval, retval->next);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
return retval ;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* :nodoc: */
|
103
|
+
static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_reparentee_func prf)
|
104
|
+
{
|
105
|
+
VALUE reparented_obj ;
|
106
|
+
xmlNodePtr reparentee, pivot, reparented, next_text, new_next_text ;
|
107
|
+
|
108
|
+
if(!rb_obj_is_kind_of(reparentee_obj, cNokogiriXmlNode))
|
109
|
+
rb_raise(rb_eArgError, "node must be a Nokogiri::XML::Node");
|
110
|
+
if(rb_obj_is_kind_of(reparentee_obj, cNokogiriXmlDocument))
|
111
|
+
rb_raise(rb_eArgError, "node must be a Nokogiri::XML::Node");
|
112
|
+
|
113
|
+
Data_Get_Struct(reparentee_obj, xmlNode, reparentee);
|
114
|
+
Data_Get_Struct(pivot_obj, xmlNode, pivot);
|
115
|
+
|
116
|
+
if(XML_DOCUMENT_NODE == reparentee->type || XML_HTML_DOCUMENT_NODE == reparentee->type)
|
117
|
+
rb_raise(rb_eArgError, "cannot reparent a document node");
|
118
|
+
|
119
|
+
xmlUnlinkNode(reparentee);
|
120
|
+
|
121
|
+
if (reparentee->doc != pivot->doc || reparentee->type == XML_TEXT_NODE) {
|
122
|
+
/*
|
123
|
+
* if the reparentee is a text node, there's a very good chance it will be
|
124
|
+
* merged with an adjacent text node after being reparented, and in that case
|
125
|
+
* libxml will free the underlying C struct.
|
126
|
+
*
|
127
|
+
* since we clearly have a ruby object which references the underlying
|
128
|
+
* memory, we can't let the C struct get freed. let's pickle the original
|
129
|
+
* reparentee by rooting it; and then we'll reparent a duplicate of the
|
130
|
+
* node that we don't care about preserving.
|
131
|
+
*
|
132
|
+
* alternatively, if the reparentee is from a different document than the
|
133
|
+
* pivot node, libxml2 is going to get confused about which document's
|
134
|
+
* "dictionary" the node's strings belong to (this is an otherwise
|
135
|
+
* uninteresting libxml2 implementation detail). as a result, we cannot
|
136
|
+
* reparent the actual reparentee, so we reparent a duplicate.
|
137
|
+
*/
|
138
|
+
NOKOGIRI_ROOT_NODE(reparentee);
|
139
|
+
if (!(reparentee = xmlDocCopyNode(reparentee, pivot->doc, 1))) {
|
140
|
+
rb_raise(rb_eRuntimeError, "Could not reparent node (xmlDocCopyNode)");
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
if (reparentee->type == XML_TEXT_NODE && pivot->next && pivot->next->type == XML_TEXT_NODE) {
|
145
|
+
/*
|
146
|
+
* libxml merges text nodes in a right-to-left fashion, meaning that if
|
147
|
+
* there are two text nodes who would be adjacent, the right (or following,
|
148
|
+
* or next) node will be merged into the left (or preceding, or previous)
|
149
|
+
* node.
|
150
|
+
*
|
151
|
+
* and by "merged" I mean the string contents will be concatenated onto the
|
152
|
+
* left node's contents, and then the node will be freed.
|
153
|
+
*
|
154
|
+
* which means that if we have a ruby object wrapped around the right node,
|
155
|
+
* its memory would be freed out from under it.
|
156
|
+
*
|
157
|
+
* so, we detect this edge case and unlink-and-root the text node before it gets
|
158
|
+
* merged. then we dup the node and insert that duplicate back into the
|
159
|
+
* document where the real node was.
|
160
|
+
*
|
161
|
+
* yes, this is totally lame.
|
162
|
+
*/
|
163
|
+
next_text = pivot->next ;
|
164
|
+
new_next_text = xmlDocCopyNode(next_text, pivot->doc, 1) ;
|
165
|
+
|
166
|
+
xmlUnlinkNode(next_text);
|
167
|
+
NOKOGIRI_ROOT_NODE(next_text);
|
168
|
+
|
169
|
+
xmlAddNextSibling(pivot, new_next_text);
|
170
|
+
}
|
171
|
+
|
172
|
+
/* TODO: I really want to remove this. We shouldn't support 2.6.16 anymore */
|
173
|
+
if ( reparentee->type == XML_TEXT_NODE && pivot->type == XML_TEXT_NODE && is_2_6_16() ) {
|
174
|
+
/* work around a string-handling bug in libxml 2.6.16. we'd rather leak than segfault. */
|
175
|
+
pivot->content = xmlStrdup(pivot->content);
|
176
|
+
}
|
177
|
+
|
178
|
+
if(!(reparented = (*prf)(pivot, reparentee))) {
|
179
|
+
rb_raise(rb_eRuntimeError, "Could not reparent node");
|
180
|
+
}
|
181
|
+
|
182
|
+
/*
|
183
|
+
* make sure the ruby object is pointed at the just-reparented node, which
|
184
|
+
* might be a duplicate (see above) or might be the result of merging
|
185
|
+
* adjacent text nodes.
|
186
|
+
*/
|
187
|
+
DATA_PTR(reparentee_obj) = reparented ;
|
188
|
+
|
189
|
+
relink_namespace(reparented);
|
190
|
+
|
191
|
+
reparented_obj = Nokogiri_wrap_xml_node(Qnil, reparented);
|
192
|
+
|
193
|
+
rb_funcall(reparented_obj, decorate_bang, 0);
|
194
|
+
|
195
|
+
return reparented_obj ;
|
196
|
+
}
|
197
|
+
|
198
|
+
|
199
|
+
/*
|
200
|
+
* call-seq:
|
201
|
+
* document
|
202
|
+
*
|
203
|
+
* Get the document for this Node
|
204
|
+
*/
|
205
|
+
static VALUE document(VALUE self)
|
206
|
+
{
|
207
|
+
xmlNodePtr node;
|
208
|
+
Data_Get_Struct(self, xmlNode, node);
|
209
|
+
return DOC_RUBY_OBJECT(node->doc);
|
210
|
+
}
|
211
|
+
|
212
|
+
/*
|
213
|
+
* call-seq:
|
214
|
+
* pointer_id
|
215
|
+
*
|
216
|
+
* Get the internal pointer number
|
217
|
+
*/
|
218
|
+
static VALUE pointer_id(VALUE self)
|
219
|
+
{
|
220
|
+
xmlNodePtr node;
|
221
|
+
Data_Get_Struct(self, xmlNode, node);
|
222
|
+
|
223
|
+
return INT2NUM((long)(node));
|
224
|
+
}
|
225
|
+
|
226
|
+
/*
|
227
|
+
* call-seq:
|
228
|
+
* encode_special_chars(string)
|
229
|
+
*
|
230
|
+
* Encode any special characters in +string+
|
231
|
+
*/
|
232
|
+
static VALUE encode_special_chars(VALUE self, VALUE string)
|
233
|
+
{
|
234
|
+
xmlNodePtr node;
|
235
|
+
xmlChar *encoded;
|
236
|
+
VALUE encoded_str;
|
237
|
+
|
238
|
+
Data_Get_Struct(self, xmlNode, node);
|
239
|
+
encoded = xmlEncodeSpecialChars(
|
240
|
+
node->doc,
|
241
|
+
(const xmlChar *)StringValuePtr(string)
|
242
|
+
);
|
243
|
+
|
244
|
+
encoded_str = NOKOGIRI_STR_NEW2(encoded);
|
245
|
+
xmlFree(encoded);
|
246
|
+
|
247
|
+
return encoded_str;
|
248
|
+
}
|
249
|
+
|
250
|
+
/*
|
251
|
+
* call-seq:
|
252
|
+
* create_internal_subset(name, external_id, system_id)
|
253
|
+
*
|
254
|
+
* Create the internal subset of a document.
|
255
|
+
*
|
256
|
+
* doc.create_internal_subset("chapter", "-//OASIS//DTD DocBook XML//EN", "chapter.dtd")
|
257
|
+
* # => <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML//EN" "chapter.dtd">
|
258
|
+
*
|
259
|
+
* doc.create_internal_subset("chapter", nil, "chapter.dtd")
|
260
|
+
* # => <!DOCTYPE chapter SYSTEM "chapter.dtd">
|
261
|
+
*/
|
262
|
+
static VALUE create_internal_subset(VALUE self, VALUE name, VALUE external_id, VALUE system_id)
|
263
|
+
{
|
264
|
+
xmlNodePtr node;
|
265
|
+
xmlDocPtr doc;
|
266
|
+
xmlDtdPtr dtd;
|
267
|
+
|
268
|
+
Data_Get_Struct(self, xmlNode, node);
|
269
|
+
|
270
|
+
doc = node->doc;
|
271
|
+
|
272
|
+
if(xmlGetIntSubset(doc))
|
273
|
+
rb_raise(rb_eRuntimeError, "Document already has an internal subset");
|
274
|
+
|
275
|
+
dtd = xmlCreateIntSubset(
|
276
|
+
doc,
|
277
|
+
NIL_P(name) ? NULL : (const xmlChar *)StringValuePtr(name),
|
278
|
+
NIL_P(external_id) ? NULL : (const xmlChar *)StringValuePtr(external_id),
|
279
|
+
NIL_P(system_id) ? NULL : (const xmlChar *)StringValuePtr(system_id)
|
280
|
+
);
|
281
|
+
|
282
|
+
if(!dtd) return Qnil;
|
283
|
+
|
284
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd);
|
285
|
+
}
|
286
|
+
|
287
|
+
/*
|
288
|
+
* call-seq:
|
289
|
+
* create_external_subset(name, external_id, system_id)
|
290
|
+
*
|
291
|
+
* Create an external subset
|
292
|
+
*/
|
293
|
+
static VALUE create_external_subset(VALUE self, VALUE name, VALUE external_id, VALUE system_id)
|
294
|
+
{
|
295
|
+
xmlNodePtr node;
|
296
|
+
xmlDocPtr doc;
|
297
|
+
xmlDtdPtr dtd;
|
298
|
+
|
299
|
+
Data_Get_Struct(self, xmlNode, node);
|
300
|
+
|
301
|
+
doc = node->doc;
|
302
|
+
|
303
|
+
if(doc->extSubset)
|
304
|
+
rb_raise(rb_eRuntimeError, "Document already has an external subset");
|
305
|
+
|
306
|
+
dtd = xmlNewDtd(
|
307
|
+
doc,
|
308
|
+
NIL_P(name) ? NULL : (const xmlChar *)StringValuePtr(name),
|
309
|
+
NIL_P(external_id) ? NULL : (const xmlChar *)StringValuePtr(external_id),
|
310
|
+
NIL_P(system_id) ? NULL : (const xmlChar *)StringValuePtr(system_id)
|
311
|
+
);
|
312
|
+
|
313
|
+
if(!dtd) return Qnil;
|
314
|
+
|
315
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd);
|
316
|
+
}
|
317
|
+
|
318
|
+
/*
|
319
|
+
* call-seq:
|
320
|
+
* external_subset
|
321
|
+
*
|
322
|
+
* Get the external subset
|
323
|
+
*/
|
324
|
+
static VALUE external_subset(VALUE self)
|
325
|
+
{
|
326
|
+
xmlNodePtr node;
|
327
|
+
xmlDocPtr doc;
|
328
|
+
xmlDtdPtr dtd;
|
329
|
+
|
330
|
+
Data_Get_Struct(self, xmlNode, node);
|
331
|
+
|
332
|
+
if(!node->doc) return Qnil;
|
333
|
+
|
334
|
+
doc = node->doc;
|
335
|
+
dtd = doc->extSubset;
|
336
|
+
|
337
|
+
if(!dtd) return Qnil;
|
338
|
+
|
339
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd);
|
340
|
+
}
|
341
|
+
|
342
|
+
/*
|
343
|
+
* call-seq:
|
344
|
+
* internal_subset
|
345
|
+
*
|
346
|
+
* Get the internal subset
|
347
|
+
*/
|
348
|
+
static VALUE internal_subset(VALUE self)
|
349
|
+
{
|
350
|
+
xmlNodePtr node;
|
351
|
+
xmlDocPtr doc;
|
352
|
+
xmlDtdPtr dtd;
|
353
|
+
|
354
|
+
Data_Get_Struct(self, xmlNode, node);
|
355
|
+
|
356
|
+
if(!node->doc) return Qnil;
|
357
|
+
|
358
|
+
doc = node->doc;
|
359
|
+
dtd = xmlGetIntSubset(doc);
|
360
|
+
|
361
|
+
if(!dtd) return Qnil;
|
362
|
+
|
363
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd);
|
364
|
+
}
|
365
|
+
|
366
|
+
/*
|
367
|
+
* call-seq:
|
368
|
+
* dup
|
369
|
+
*
|
370
|
+
* Copy this node. An optional depth may be passed in, but it defaults
|
371
|
+
* to a deep copy. 0 is a shallow copy, 1 is a deep copy.
|
372
|
+
*/
|
373
|
+
static VALUE duplicate_node(int argc, VALUE *argv, VALUE self)
|
374
|
+
{
|
375
|
+
VALUE level;
|
376
|
+
xmlNodePtr node, dup;
|
377
|
+
|
378
|
+
if(rb_scan_args(argc, argv, "01", &level) == 0)
|
379
|
+
level = INT2NUM((long)1);
|
380
|
+
|
381
|
+
Data_Get_Struct(self, xmlNode, node);
|
382
|
+
|
383
|
+
dup = xmlDocCopyNode(node, node->doc, (int)NUM2INT(level));
|
384
|
+
if(dup == NULL) return Qnil;
|
385
|
+
|
386
|
+
NOKOGIRI_ROOT_NODE(dup);
|
387
|
+
|
388
|
+
return Nokogiri_wrap_xml_node(rb_obj_class(self), dup);
|
389
|
+
}
|
390
|
+
|
391
|
+
/*
|
392
|
+
* call-seq:
|
393
|
+
* unlink
|
394
|
+
*
|
395
|
+
* Unlink this node from its current context.
|
396
|
+
*/
|
397
|
+
static VALUE unlink_node(VALUE self)
|
398
|
+
{
|
399
|
+
xmlNodePtr node;
|
400
|
+
Data_Get_Struct(self, xmlNode, node);
|
401
|
+
xmlUnlinkNode(node);
|
402
|
+
NOKOGIRI_ROOT_NODE(node);
|
403
|
+
return self;
|
404
|
+
}
|
405
|
+
|
406
|
+
/*
|
407
|
+
* call-seq:
|
408
|
+
* blank?
|
409
|
+
*
|
410
|
+
* Is this node blank?
|
411
|
+
*/
|
412
|
+
static VALUE blank_eh(VALUE self)
|
413
|
+
{
|
414
|
+
xmlNodePtr node;
|
415
|
+
Data_Get_Struct(self, xmlNode, node);
|
416
|
+
return (1 == xmlIsBlankNode(node)) ? Qtrue : Qfalse ;
|
417
|
+
}
|
418
|
+
|
419
|
+
/*
|
420
|
+
* call-seq:
|
421
|
+
* next_sibling
|
422
|
+
*
|
423
|
+
* Returns the next sibling node
|
424
|
+
*/
|
425
|
+
static VALUE next_sibling(VALUE self)
|
426
|
+
{
|
427
|
+
xmlNodePtr node, sibling;
|
428
|
+
Data_Get_Struct(self, xmlNode, node);
|
429
|
+
|
430
|
+
sibling = node->next;
|
431
|
+
if(!sibling) return Qnil;
|
432
|
+
|
433
|
+
return Nokogiri_wrap_xml_node(Qnil, sibling) ;
|
434
|
+
}
|
435
|
+
|
436
|
+
/*
|
437
|
+
* call-seq:
|
438
|
+
* previous_sibling
|
439
|
+
*
|
440
|
+
* Returns the previous sibling node
|
441
|
+
*/
|
442
|
+
static VALUE previous_sibling(VALUE self)
|
443
|
+
{
|
444
|
+
xmlNodePtr node, sibling;
|
445
|
+
Data_Get_Struct(self, xmlNode, node);
|
446
|
+
|
447
|
+
sibling = node->prev;
|
448
|
+
if(!sibling) return Qnil;
|
449
|
+
|
450
|
+
return Nokogiri_wrap_xml_node(Qnil, sibling);
|
451
|
+
}
|
452
|
+
|
453
|
+
/*
|
454
|
+
* call-seq:
|
455
|
+
* next_element
|
456
|
+
*
|
457
|
+
* Returns the next Nokogiri::XML::Element type sibling node.
|
458
|
+
*/
|
459
|
+
static VALUE next_element(VALUE self)
|
460
|
+
{
|
461
|
+
xmlNodePtr node, sibling;
|
462
|
+
Data_Get_Struct(self, xmlNode, node);
|
463
|
+
|
464
|
+
sibling = xmlNextElementSibling(node);
|
465
|
+
if(!sibling) return Qnil;
|
466
|
+
|
467
|
+
return Nokogiri_wrap_xml_node(Qnil, sibling);
|
468
|
+
}
|
469
|
+
|
470
|
+
/*
|
471
|
+
* call-seq:
|
472
|
+
* previous_element
|
473
|
+
*
|
474
|
+
* Returns the previous Nokogiri::XML::Element type sibling node.
|
475
|
+
*/
|
476
|
+
static VALUE previous_element(VALUE self)
|
477
|
+
{
|
478
|
+
xmlNodePtr node, sibling;
|
479
|
+
Data_Get_Struct(self, xmlNode, node);
|
480
|
+
|
481
|
+
/*
|
482
|
+
* note that we don't use xmlPreviousElementSibling here because it's buggy pre-2.7.7.
|
483
|
+
*/
|
484
|
+
sibling = node->prev;
|
485
|
+
if(!sibling) return Qnil;
|
486
|
+
|
487
|
+
while(sibling && sibling->type != XML_ELEMENT_NODE)
|
488
|
+
sibling = sibling->prev;
|
489
|
+
|
490
|
+
return sibling ? Nokogiri_wrap_xml_node(Qnil, sibling) : Qnil ;
|
491
|
+
}
|
492
|
+
|
493
|
+
/* :nodoc: */
|
494
|
+
static VALUE replace(VALUE self, VALUE new_node)
|
495
|
+
{
|
496
|
+
return reparent_node_with(self, new_node, xmlReplaceNodeWrapper) ;
|
497
|
+
}
|
498
|
+
|
499
|
+
/*
|
500
|
+
* call-seq:
|
501
|
+
* children
|
502
|
+
*
|
503
|
+
* Get the list of children for this node as a NodeSet
|
504
|
+
*/
|
505
|
+
static VALUE children(VALUE self)
|
506
|
+
{
|
507
|
+
xmlNodePtr node;
|
508
|
+
xmlNodePtr child;
|
509
|
+
xmlNodeSetPtr set;
|
510
|
+
VALUE document;
|
511
|
+
VALUE node_set;
|
512
|
+
|
513
|
+
Data_Get_Struct(self, xmlNode, node);
|
514
|
+
|
515
|
+
child = node->children;
|
516
|
+
set = xmlXPathNodeSetCreate(child);
|
517
|
+
|
518
|
+
document = DOC_RUBY_OBJECT(node->doc);
|
519
|
+
|
520
|
+
if(!child) return Nokogiri_wrap_xml_node_set(set, document);
|
521
|
+
|
522
|
+
child = child->next;
|
523
|
+
while(NULL != child) {
|
524
|
+
xmlXPathNodeSetAddUnique(set, child);
|
525
|
+
child = child->next;
|
526
|
+
}
|
527
|
+
|
528
|
+
node_set = Nokogiri_wrap_xml_node_set(set, document);
|
529
|
+
|
530
|
+
return node_set;
|
531
|
+
}
|
532
|
+
|
533
|
+
/*
|
534
|
+
* call-seq:
|
535
|
+
* element_children
|
536
|
+
*
|
537
|
+
* Get the list of children for this node as a NodeSet. All nodes will be
|
538
|
+
* element nodes.
|
539
|
+
*
|
540
|
+
* Example:
|
541
|
+
*
|
542
|
+
* @doc.root.element_children.all? { |x| x.element? } # => true
|
543
|
+
*/
|
544
|
+
static VALUE element_children(VALUE self)
|
545
|
+
{
|
546
|
+
xmlNodePtr node;
|
547
|
+
xmlNodePtr child;
|
548
|
+
xmlNodeSetPtr set;
|
549
|
+
VALUE document;
|
550
|
+
VALUE node_set;
|
551
|
+
|
552
|
+
Data_Get_Struct(self, xmlNode, node);
|
553
|
+
|
554
|
+
child = xmlFirstElementChild(node);
|
555
|
+
set = xmlXPathNodeSetCreate(child);
|
556
|
+
|
557
|
+
document = DOC_RUBY_OBJECT(node->doc);
|
558
|
+
|
559
|
+
if(!child) return Nokogiri_wrap_xml_node_set(set, document);
|
560
|
+
|
561
|
+
child = xmlNextElementSibling(child);
|
562
|
+
while(NULL != child) {
|
563
|
+
xmlXPathNodeSetAddUnique(set, child);
|
564
|
+
child = xmlNextElementSibling(child);
|
565
|
+
}
|
566
|
+
|
567
|
+
node_set = Nokogiri_wrap_xml_node_set(set, document);
|
568
|
+
|
569
|
+
return node_set;
|
570
|
+
}
|
571
|
+
|
572
|
+
/*
|
573
|
+
* call-seq:
|
574
|
+
* child
|
575
|
+
*
|
576
|
+
* Returns the child node
|
577
|
+
*/
|
578
|
+
static VALUE child(VALUE self)
|
579
|
+
{
|
580
|
+
xmlNodePtr node, child;
|
581
|
+
Data_Get_Struct(self, xmlNode, node);
|
582
|
+
|
583
|
+
child = node->children;
|
584
|
+
if(!child) return Qnil;
|
585
|
+
|
586
|
+
return Nokogiri_wrap_xml_node(Qnil, child);
|
587
|
+
}
|
588
|
+
|
589
|
+
/*
|
590
|
+
* call-seq:
|
591
|
+
* first_element_child
|
592
|
+
*
|
593
|
+
* Returns the first child node of this node that is an element.
|
594
|
+
*
|
595
|
+
* Example:
|
596
|
+
*
|
597
|
+
* @doc.root.first_element_child.element? # => true
|
598
|
+
*/
|
599
|
+
static VALUE first_element_child(VALUE self)
|
600
|
+
{
|
601
|
+
xmlNodePtr node, child;
|
602
|
+
Data_Get_Struct(self, xmlNode, node);
|
603
|
+
|
604
|
+
child = xmlFirstElementChild(node);
|
605
|
+
if(!child) return Qnil;
|
606
|
+
|
607
|
+
return Nokogiri_wrap_xml_node(Qnil, child);
|
608
|
+
}
|
609
|
+
|
610
|
+
/*
|
611
|
+
* call-seq:
|
612
|
+
* last_element_child
|
613
|
+
*
|
614
|
+
* Returns the last child node of this node that is an element.
|
615
|
+
*
|
616
|
+
* Example:
|
617
|
+
*
|
618
|
+
* @doc.root.last_element_child.element? # => true
|
619
|
+
*/
|
620
|
+
static VALUE last_element_child(VALUE self)
|
621
|
+
{
|
622
|
+
xmlNodePtr node, child;
|
623
|
+
Data_Get_Struct(self, xmlNode, node);
|
624
|
+
|
625
|
+
child = xmlLastElementChild(node);
|
626
|
+
if(!child) return Qnil;
|
627
|
+
|
628
|
+
return Nokogiri_wrap_xml_node(Qnil, child);
|
629
|
+
}
|
630
|
+
|
631
|
+
/*
|
632
|
+
* call-seq:
|
633
|
+
* key?(attribute)
|
634
|
+
*
|
635
|
+
* Returns true if +attribute+ is set
|
636
|
+
*/
|
637
|
+
static VALUE key_eh(VALUE self, VALUE attribute)
|
638
|
+
{
|
639
|
+
xmlNodePtr node;
|
640
|
+
Data_Get_Struct(self, xmlNode, node);
|
641
|
+
if(xmlHasProp(node, (xmlChar *)StringValuePtr(attribute)))
|
642
|
+
return Qtrue;
|
643
|
+
return Qfalse;
|
644
|
+
}
|
645
|
+
|
646
|
+
/*
|
647
|
+
* call-seq:
|
648
|
+
* namespaced_key?(attribute, namespace)
|
649
|
+
*
|
650
|
+
* Returns true if +attribute+ is set with +namespace+
|
651
|
+
*/
|
652
|
+
static VALUE namespaced_key_eh(VALUE self, VALUE attribute, VALUE namespace)
|
653
|
+
{
|
654
|
+
xmlNodePtr node;
|
655
|
+
Data_Get_Struct(self, xmlNode, node);
|
656
|
+
if(xmlHasNsProp(node, (xmlChar *)StringValuePtr(attribute),
|
657
|
+
NIL_P(namespace) ? NULL : (xmlChar *)StringValuePtr(namespace)))
|
658
|
+
return Qtrue;
|
659
|
+
return Qfalse;
|
660
|
+
}
|
661
|
+
|
662
|
+
/*
|
663
|
+
* call-seq:
|
664
|
+
* []=(property, value)
|
665
|
+
*
|
666
|
+
* Set the +property+ to +value+
|
667
|
+
*/
|
668
|
+
static VALUE set(VALUE self, VALUE property, VALUE value)
|
669
|
+
{
|
670
|
+
xmlNodePtr node;
|
671
|
+
Data_Get_Struct(self, xmlNode, node);
|
672
|
+
|
673
|
+
xmlSetProp(node, (xmlChar *)StringValuePtr(property),
|
674
|
+
(xmlChar *)StringValuePtr(value));
|
675
|
+
|
676
|
+
return value;
|
677
|
+
}
|
678
|
+
|
679
|
+
/*
|
680
|
+
* call-seq:
|
681
|
+
* get(attribute)
|
682
|
+
*
|
683
|
+
* Get the value for +attribute+
|
684
|
+
*/
|
685
|
+
static VALUE get(VALUE self, VALUE attribute)
|
686
|
+
{
|
687
|
+
xmlNodePtr node;
|
688
|
+
xmlChar* propstr ;
|
689
|
+
VALUE rval ;
|
690
|
+
Data_Get_Struct(self, xmlNode, node);
|
691
|
+
|
692
|
+
if(NIL_P(attribute)) return Qnil;
|
693
|
+
|
694
|
+
propstr = xmlGetProp(node, (xmlChar *)StringValuePtr(attribute));
|
695
|
+
|
696
|
+
if(!propstr) return Qnil;
|
697
|
+
|
698
|
+
rval = NOKOGIRI_STR_NEW2(propstr);
|
699
|
+
|
700
|
+
xmlFree(propstr);
|
701
|
+
return rval ;
|
702
|
+
}
|
703
|
+
|
704
|
+
/*
|
705
|
+
* call-seq:
|
706
|
+
* set_namespace(namespace)
|
707
|
+
*
|
708
|
+
* Set the namespace to +namespace+
|
709
|
+
*/
|
710
|
+
static VALUE set_namespace(VALUE self, VALUE namespace)
|
711
|
+
{
|
712
|
+
xmlNodePtr node;
|
713
|
+
xmlNsPtr ns = NULL;
|
714
|
+
|
715
|
+
Data_Get_Struct(self, xmlNode, node);
|
716
|
+
|
717
|
+
if(!NIL_P(namespace))
|
718
|
+
Data_Get_Struct(namespace, xmlNs, ns);
|
719
|
+
|
720
|
+
xmlSetNs(node, ns);
|
721
|
+
|
722
|
+
return self;
|
723
|
+
}
|
724
|
+
|
725
|
+
/*
|
726
|
+
* call-seq:
|
727
|
+
* attribute(name)
|
728
|
+
*
|
729
|
+
* Get the attribute node with +name+
|
730
|
+
*/
|
731
|
+
static VALUE attr(VALUE self, VALUE name)
|
732
|
+
{
|
733
|
+
xmlNodePtr node;
|
734
|
+
xmlAttrPtr prop;
|
735
|
+
Data_Get_Struct(self, xmlNode, node);
|
736
|
+
prop = xmlHasProp(node, (xmlChar *)StringValuePtr(name));
|
737
|
+
|
738
|
+
if(! prop) return Qnil;
|
739
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop);
|
740
|
+
}
|
741
|
+
|
742
|
+
/*
|
743
|
+
* call-seq:
|
744
|
+
* attribute_with_ns(name, namespace)
|
745
|
+
*
|
746
|
+
* Get the attribute node with +name+ and +namespace+
|
747
|
+
*/
|
748
|
+
static VALUE attribute_with_ns(VALUE self, VALUE name, VALUE namespace)
|
749
|
+
{
|
750
|
+
xmlNodePtr node;
|
751
|
+
xmlAttrPtr prop;
|
752
|
+
Data_Get_Struct(self, xmlNode, node);
|
753
|
+
prop = xmlHasNsProp(node, (xmlChar *)StringValuePtr(name),
|
754
|
+
NIL_P(namespace) ? NULL : (xmlChar *)StringValuePtr(namespace));
|
755
|
+
|
756
|
+
if(! prop) return Qnil;
|
757
|
+
return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop);
|
758
|
+
}
|
759
|
+
|
760
|
+
/*
|
761
|
+
* call-seq:
|
762
|
+
* attribute_nodes()
|
763
|
+
*
|
764
|
+
* returns a list containing the Node attributes.
|
765
|
+
*/
|
766
|
+
static VALUE attribute_nodes(VALUE self)
|
767
|
+
{
|
768
|
+
/* this code in the mode of xmlHasProp() */
|
769
|
+
xmlNodePtr node;
|
770
|
+
VALUE attr;
|
771
|
+
|
772
|
+
Data_Get_Struct(self, xmlNode, node);
|
773
|
+
|
774
|
+
attr = rb_ary_new();
|
775
|
+
Nokogiri_xml_node_properties(node, attr);
|
776
|
+
|
777
|
+
return attr ;
|
778
|
+
}
|
779
|
+
|
780
|
+
|
781
|
+
/*
|
782
|
+
* call-seq:
|
783
|
+
* namespace()
|
784
|
+
*
|
785
|
+
* returns the default namespace set on this node (as with an "xmlns="
|
786
|
+
* attribute), as a Namespace object.
|
787
|
+
*/
|
788
|
+
static VALUE namespace(VALUE self)
|
789
|
+
{
|
790
|
+
xmlNodePtr node ;
|
791
|
+
Data_Get_Struct(self, xmlNode, node);
|
792
|
+
|
793
|
+
if (node->ns)
|
794
|
+
return Nokogiri_wrap_xml_namespace(node->doc, node->ns);
|
795
|
+
|
796
|
+
return Qnil ;
|
797
|
+
}
|
798
|
+
|
799
|
+
/*
|
800
|
+
* call-seq:
|
801
|
+
* namespace_definitions()
|
802
|
+
*
|
803
|
+
* returns namespaces defined on self element directly, as an array of Namespace objects. Includes both a default namespace (as in"xmlns="), and prefixed namespaces (as in "xmlns:prefix=").
|
804
|
+
*/
|
805
|
+
static VALUE namespace_definitions(VALUE self)
|
806
|
+
{
|
807
|
+
/* this code in the mode of xmlHasProp() */
|
808
|
+
xmlNodePtr node ;
|
809
|
+
VALUE list;
|
810
|
+
xmlNsPtr ns;
|
811
|
+
|
812
|
+
Data_Get_Struct(self, xmlNode, node);
|
813
|
+
|
814
|
+
list = rb_ary_new();
|
815
|
+
|
816
|
+
ns = node->nsDef;
|
817
|
+
|
818
|
+
if(!ns) return list;
|
819
|
+
|
820
|
+
while(NULL != ns) {
|
821
|
+
rb_ary_push(list, Nokogiri_wrap_xml_namespace(node->doc, ns));
|
822
|
+
ns = ns->next;
|
823
|
+
}
|
824
|
+
|
825
|
+
return list;
|
826
|
+
}
|
827
|
+
|
828
|
+
/*
|
829
|
+
* call-seq:
|
830
|
+
* namespace_scopes()
|
831
|
+
*
|
832
|
+
* returns namespaces in scope for self -- those defined on self element
|
833
|
+
* directly or any ancestor node -- as an array of Namespace objects. Default
|
834
|
+
* namespaces ("xmlns=" style) for self are included in this array; Default
|
835
|
+
* namespaces for ancestors, however, are not. See also #namespaces
|
836
|
+
*/
|
837
|
+
static VALUE namespace_scopes(VALUE self)
|
838
|
+
{
|
839
|
+
xmlNodePtr node ;
|
840
|
+
VALUE list;
|
841
|
+
xmlNsPtr *ns_list;
|
842
|
+
int j;
|
843
|
+
|
844
|
+
Data_Get_Struct(self, xmlNode, node);
|
845
|
+
|
846
|
+
list = rb_ary_new();
|
847
|
+
ns_list = xmlGetNsList(node->doc, node);
|
848
|
+
|
849
|
+
if(!ns_list) return list;
|
850
|
+
|
851
|
+
for (j = 0 ; ns_list[j] != NULL ; ++j) {
|
852
|
+
rb_ary_push(list, Nokogiri_wrap_xml_namespace(node->doc, ns_list[j]));
|
853
|
+
}
|
854
|
+
|
855
|
+
xmlFree(ns_list);
|
856
|
+
return list;
|
857
|
+
}
|
858
|
+
|
859
|
+
/*
|
860
|
+
* call-seq:
|
861
|
+
* node_type
|
862
|
+
*
|
863
|
+
* Get the type for this Node
|
864
|
+
*/
|
865
|
+
static VALUE node_type(VALUE self)
|
866
|
+
{
|
867
|
+
xmlNodePtr node;
|
868
|
+
Data_Get_Struct(self, xmlNode, node);
|
869
|
+
return INT2NUM((long)node->type);
|
870
|
+
}
|
871
|
+
|
872
|
+
/*
|
873
|
+
* call-seq:
|
874
|
+
* content=
|
875
|
+
*
|
876
|
+
* Set the content for this Node
|
877
|
+
*/
|
878
|
+
static VALUE set_content(VALUE self, VALUE content)
|
879
|
+
{
|
880
|
+
xmlNodePtr node, child, next ;
|
881
|
+
Data_Get_Struct(self, xmlNode, node);
|
882
|
+
|
883
|
+
child = node->children;
|
884
|
+
while (NULL != child) {
|
885
|
+
next = child->next ;
|
886
|
+
xmlUnlinkNode(child) ;
|
887
|
+
NOKOGIRI_ROOT_NODE(child) ;
|
888
|
+
child = next ;
|
889
|
+
}
|
890
|
+
|
891
|
+
xmlNodeSetContent(node, (xmlChar *)StringValuePtr(content));
|
892
|
+
return content;
|
893
|
+
}
|
894
|
+
|
895
|
+
/*
|
896
|
+
* call-seq:
|
897
|
+
* content
|
898
|
+
*
|
899
|
+
* Returns the content for this Node
|
900
|
+
*/
|
901
|
+
static VALUE get_content(VALUE self)
|
902
|
+
{
|
903
|
+
xmlNodePtr node;
|
904
|
+
xmlChar * content;
|
905
|
+
|
906
|
+
Data_Get_Struct(self, xmlNode, node);
|
907
|
+
|
908
|
+
content = xmlNodeGetContent(node);
|
909
|
+
if(content) {
|
910
|
+
VALUE rval = NOKOGIRI_STR_NEW2(content);
|
911
|
+
xmlFree(content);
|
912
|
+
return rval;
|
913
|
+
}
|
914
|
+
return Qnil;
|
915
|
+
}
|
916
|
+
|
917
|
+
/* :nodoc: */
|
918
|
+
static VALUE add_child(VALUE self, VALUE new_child)
|
919
|
+
{
|
920
|
+
return reparent_node_with(self, new_child, xmlAddChild);
|
921
|
+
}
|
922
|
+
|
923
|
+
/*
|
924
|
+
* call-seq:
|
925
|
+
* parent
|
926
|
+
*
|
927
|
+
* Get the parent Node for this Node
|
928
|
+
*/
|
929
|
+
static VALUE get_parent(VALUE self)
|
930
|
+
{
|
931
|
+
xmlNodePtr node, parent;
|
932
|
+
Data_Get_Struct(self, xmlNode, node);
|
933
|
+
|
934
|
+
parent = node->parent;
|
935
|
+
if(!parent) return Qnil;
|
936
|
+
|
937
|
+
return Nokogiri_wrap_xml_node(Qnil, parent) ;
|
938
|
+
}
|
939
|
+
|
940
|
+
/*
|
941
|
+
* call-seq:
|
942
|
+
* name=(new_name)
|
943
|
+
*
|
944
|
+
* Set the name for this Node
|
945
|
+
*/
|
946
|
+
static VALUE set_name(VALUE self, VALUE new_name)
|
947
|
+
{
|
948
|
+
xmlNodePtr node;
|
949
|
+
Data_Get_Struct(self, xmlNode, node);
|
950
|
+
xmlNodeSetName(node, (xmlChar*)StringValuePtr(new_name));
|
951
|
+
return new_name;
|
952
|
+
}
|
953
|
+
|
954
|
+
/*
|
955
|
+
* call-seq:
|
956
|
+
* name
|
957
|
+
*
|
958
|
+
* Returns the name for this Node
|
959
|
+
*/
|
960
|
+
static VALUE get_name(VALUE self)
|
961
|
+
{
|
962
|
+
xmlNodePtr node;
|
963
|
+
Data_Get_Struct(self, xmlNode, node);
|
964
|
+
if(node->name)
|
965
|
+
return NOKOGIRI_STR_NEW2(node->name);
|
966
|
+
return Qnil;
|
967
|
+
}
|
968
|
+
|
969
|
+
/*
|
970
|
+
* call-seq:
|
971
|
+
* path
|
972
|
+
*
|
973
|
+
* Returns the path associated with this Node
|
974
|
+
*/
|
975
|
+
static VALUE path(VALUE self)
|
976
|
+
{
|
977
|
+
xmlNodePtr node;
|
978
|
+
xmlChar *path ;
|
979
|
+
VALUE rval;
|
980
|
+
|
981
|
+
Data_Get_Struct(self, xmlNode, node);
|
982
|
+
|
983
|
+
path = xmlGetNodePath(node);
|
984
|
+
rval = NOKOGIRI_STR_NEW2(path);
|
985
|
+
xmlFree(path);
|
986
|
+
return rval ;
|
987
|
+
}
|
988
|
+
|
989
|
+
/* :nodoc: */
|
990
|
+
static VALUE add_next_sibling(VALUE self, VALUE new_sibling)
|
991
|
+
{
|
992
|
+
return reparent_node_with(self, new_sibling, xmlAddNextSibling) ;
|
993
|
+
}
|
994
|
+
|
995
|
+
/* :nodoc: */
|
996
|
+
static VALUE add_previous_sibling(VALUE self, VALUE new_sibling)
|
997
|
+
{
|
998
|
+
return reparent_node_with(self, new_sibling, xmlAddPrevSibling) ;
|
999
|
+
}
|
1000
|
+
|
1001
|
+
/*
|
1002
|
+
* call-seq:
|
1003
|
+
* native_write_to(io, encoding, options)
|
1004
|
+
*
|
1005
|
+
* Write this Node to +io+ with +encoding+ and +options+
|
1006
|
+
*/
|
1007
|
+
static VALUE native_write_to(
|
1008
|
+
VALUE self,
|
1009
|
+
VALUE io,
|
1010
|
+
VALUE encoding,
|
1011
|
+
VALUE indent_string,
|
1012
|
+
VALUE options
|
1013
|
+
) {
|
1014
|
+
xmlNodePtr node;
|
1015
|
+
const char * before_indent;
|
1016
|
+
xmlSaveCtxtPtr savectx;
|
1017
|
+
|
1018
|
+
Data_Get_Struct(self, xmlNode, node);
|
1019
|
+
|
1020
|
+
xmlIndentTreeOutput = 1;
|
1021
|
+
|
1022
|
+
before_indent = xmlTreeIndentString;
|
1023
|
+
|
1024
|
+
xmlTreeIndentString = StringValuePtr(indent_string);
|
1025
|
+
|
1026
|
+
savectx = xmlSaveToIO(
|
1027
|
+
(xmlOutputWriteCallback)io_write_callback,
|
1028
|
+
(xmlOutputCloseCallback)io_close_callback,
|
1029
|
+
(void *)io,
|
1030
|
+
RTEST(encoding) ? StringValuePtr(encoding) : NULL,
|
1031
|
+
(int)NUM2INT(options)
|
1032
|
+
);
|
1033
|
+
|
1034
|
+
xmlSaveTree(savectx, node);
|
1035
|
+
xmlSaveClose(savectx);
|
1036
|
+
|
1037
|
+
xmlTreeIndentString = before_indent;
|
1038
|
+
return io;
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
/*
|
1042
|
+
* call-seq:
|
1043
|
+
* line
|
1044
|
+
*
|
1045
|
+
* Returns the line for this Node
|
1046
|
+
*/
|
1047
|
+
static VALUE line(VALUE self)
|
1048
|
+
{
|
1049
|
+
xmlNodePtr node;
|
1050
|
+
Data_Get_Struct(self, xmlNode, node);
|
1051
|
+
|
1052
|
+
return INT2NUM(xmlGetLineNo(node));
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
/*
|
1056
|
+
* call-seq:
|
1057
|
+
* add_namespace_definition(prefix, href)
|
1058
|
+
*
|
1059
|
+
* Adds a namespace definition with +prefix+ using +href+ value. The result is
|
1060
|
+
* as if parsed XML for this node had included an attribute
|
1061
|
+
* 'xmlns:prefix=value'. A default namespace for this node ("xmlns=") can be
|
1062
|
+
* added by passing 'nil' for prefix. Namespaces added this way will not
|
1063
|
+
* show up in #attributes, but they will be included as an xmlns attribute
|
1064
|
+
* when the node is serialized to XML.
|
1065
|
+
*/
|
1066
|
+
static VALUE add_namespace_definition(VALUE self, VALUE prefix, VALUE href)
|
1067
|
+
{
|
1068
|
+
xmlNodePtr node, namespacee;
|
1069
|
+
xmlNsPtr ns;
|
1070
|
+
|
1071
|
+
Data_Get_Struct(self, xmlNode, node);
|
1072
|
+
namespacee = node ;
|
1073
|
+
|
1074
|
+
ns = xmlSearchNs(
|
1075
|
+
node->doc,
|
1076
|
+
node,
|
1077
|
+
(const xmlChar *)(NIL_P(prefix) ? NULL : StringValuePtr(prefix))
|
1078
|
+
);
|
1079
|
+
|
1080
|
+
if(!ns) {
|
1081
|
+
if (node->type != XML_ELEMENT_NODE) {
|
1082
|
+
namespacee = node->parent;
|
1083
|
+
}
|
1084
|
+
ns = xmlNewNs(
|
1085
|
+
namespacee,
|
1086
|
+
(const xmlChar *)StringValuePtr(href),
|
1087
|
+
(const xmlChar *)(NIL_P(prefix) ? NULL : StringValuePtr(prefix))
|
1088
|
+
);
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
if (!ns) return Qnil ;
|
1092
|
+
|
1093
|
+
if(NIL_P(prefix) || node != namespacee) xmlSetNs(node, ns);
|
1094
|
+
|
1095
|
+
return Nokogiri_wrap_xml_namespace(node->doc, ns);
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
/*
|
1099
|
+
* call-seq:
|
1100
|
+
* new(name, document)
|
1101
|
+
*
|
1102
|
+
* Create a new node with +name+ sharing GC lifecycle with +document+
|
1103
|
+
*/
|
1104
|
+
static VALUE new(int argc, VALUE *argv, VALUE klass)
|
1105
|
+
{
|
1106
|
+
xmlDocPtr doc;
|
1107
|
+
xmlNodePtr node;
|
1108
|
+
VALUE name;
|
1109
|
+
VALUE document;
|
1110
|
+
VALUE rest;
|
1111
|
+
VALUE rb_node;
|
1112
|
+
|
1113
|
+
rb_scan_args(argc, argv, "2*", &name, &document, &rest);
|
1114
|
+
|
1115
|
+
Data_Get_Struct(document, xmlDoc, doc);
|
1116
|
+
|
1117
|
+
node = xmlNewNode(NULL, (xmlChar *)StringValuePtr(name));
|
1118
|
+
node->doc = doc->doc;
|
1119
|
+
NOKOGIRI_ROOT_NODE(node);
|
1120
|
+
|
1121
|
+
rb_node = Nokogiri_wrap_xml_node(
|
1122
|
+
klass == cNokogiriXmlNode ? (VALUE)NULL : klass,
|
1123
|
+
node
|
1124
|
+
);
|
1125
|
+
rb_obj_call_init(rb_node, argc, argv);
|
1126
|
+
|
1127
|
+
if(rb_block_given_p()) rb_yield(rb_node);
|
1128
|
+
|
1129
|
+
return rb_node;
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
/*
|
1133
|
+
* call-seq:
|
1134
|
+
* dump_html
|
1135
|
+
*
|
1136
|
+
* Returns the Node as html.
|
1137
|
+
*/
|
1138
|
+
static VALUE dump_html(VALUE self)
|
1139
|
+
{
|
1140
|
+
xmlBufferPtr buf ;
|
1141
|
+
xmlNodePtr node ;
|
1142
|
+
VALUE html;
|
1143
|
+
|
1144
|
+
Data_Get_Struct(self, xmlNode, node);
|
1145
|
+
|
1146
|
+
buf = xmlBufferCreate() ;
|
1147
|
+
htmlNodeDump(buf, node->doc, node);
|
1148
|
+
html = NOKOGIRI_STR_NEW2(buf->content);
|
1149
|
+
xmlBufferFree(buf);
|
1150
|
+
return html ;
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
/*
|
1154
|
+
* call-seq:
|
1155
|
+
* compare(other)
|
1156
|
+
*
|
1157
|
+
* Compare this Node to +other+ with respect to their Document
|
1158
|
+
*/
|
1159
|
+
static VALUE compare(VALUE self, VALUE _other)
|
1160
|
+
{
|
1161
|
+
xmlNodePtr node, other;
|
1162
|
+
Data_Get_Struct(self, xmlNode, node);
|
1163
|
+
Data_Get_Struct(_other, xmlNode, other);
|
1164
|
+
|
1165
|
+
return INT2NUM((long)xmlXPathCmpNodes(other, node));
|
1166
|
+
}
|
1167
|
+
|
1168
|
+
|
1169
|
+
/* TODO: DOCUMENT ME */
|
1170
|
+
static VALUE in_context(VALUE self, VALUE _str, VALUE _options)
|
1171
|
+
{
|
1172
|
+
xmlNodePtr node;
|
1173
|
+
xmlNodePtr list;
|
1174
|
+
xmlNodePtr child_iter;
|
1175
|
+
xmlNodeSetPtr set;
|
1176
|
+
xmlParserErrors error;
|
1177
|
+
VALUE doc, err;
|
1178
|
+
|
1179
|
+
Data_Get_Struct(self, xmlNode, node);
|
1180
|
+
|
1181
|
+
doc = DOC_RUBY_OBJECT(node->doc);
|
1182
|
+
err = rb_iv_get(doc, "@errors");
|
1183
|
+
|
1184
|
+
xmlSetStructuredErrorFunc((void *)err, Nokogiri_error_array_pusher);
|
1185
|
+
|
1186
|
+
/* Twiddle global variable because of a bug in libxml2.
|
1187
|
+
* http://git.gnome.org/browse/libxml2/commit/?id=e20fb5a72c83cbfc8e4a8aa3943c6be8febadab7
|
1188
|
+
*/
|
1189
|
+
#ifndef HTML_PARSE_NOIMPLIED
|
1190
|
+
htmlHandleOmittedElem(0);
|
1191
|
+
#endif
|
1192
|
+
|
1193
|
+
error = xmlParseInNodeContext(
|
1194
|
+
node,
|
1195
|
+
StringValuePtr(_str),
|
1196
|
+
(int)RSTRING_LEN(_str),
|
1197
|
+
(int)NUM2INT(_options),
|
1198
|
+
&list);
|
1199
|
+
|
1200
|
+
/* make sure parent/child pointers are coherent so an unlink will work properly (#331) */
|
1201
|
+
child_iter = node->doc->children ;
|
1202
|
+
while (child_iter) {
|
1203
|
+
if (child_iter->parent != (xmlNodePtr)node->doc)
|
1204
|
+
child_iter->parent = (xmlNodePtr)node->doc ;
|
1205
|
+
child_iter = child_iter->next ;
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
#ifndef HTML_PARSE_NOIMPLIED
|
1209
|
+
htmlHandleOmittedElem(1);
|
1210
|
+
#endif
|
1211
|
+
|
1212
|
+
xmlSetStructuredErrorFunc(NULL, NULL);
|
1213
|
+
|
1214
|
+
/* FIXME: This probably needs to handle more constants... */
|
1215
|
+
switch(error) {
|
1216
|
+
case XML_ERR_OK:
|
1217
|
+
break;
|
1218
|
+
|
1219
|
+
case XML_ERR_INTERNAL_ERROR:
|
1220
|
+
case XML_ERR_NO_MEMORY:
|
1221
|
+
rb_raise(rb_eRuntimeError, "error parsing fragment (%d)", error);
|
1222
|
+
break;
|
1223
|
+
|
1224
|
+
default:
|
1225
|
+
break;
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
set = xmlXPathNodeSetCreate(NULL);
|
1229
|
+
|
1230
|
+
while(list) {
|
1231
|
+
xmlXPathNodeSetAddUnique(set, list);
|
1232
|
+
list = list->next;
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
return Nokogiri_wrap_xml_node_set(set, doc);
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
|
1239
|
+
VALUE Nokogiri_wrap_xml_node(VALUE klass, xmlNodePtr node)
|
1240
|
+
{
|
1241
|
+
VALUE document = Qnil ;
|
1242
|
+
VALUE node_cache = Qnil ;
|
1243
|
+
VALUE rb_node = Qnil ;
|
1244
|
+
|
1245
|
+
assert(node);
|
1246
|
+
|
1247
|
+
if(node->type == XML_DOCUMENT_NODE || node->type == XML_HTML_DOCUMENT_NODE)
|
1248
|
+
return DOC_RUBY_OBJECT(node->doc);
|
1249
|
+
|
1250
|
+
if(NULL != node->_private) return (VALUE)node->_private;
|
1251
|
+
|
1252
|
+
if(RTEST(klass))
|
1253
|
+
rb_node = Data_Wrap_Struct(klass, mark, debug_node_dealloc, node) ;
|
1254
|
+
|
1255
|
+
else switch(node->type)
|
1256
|
+
{
|
1257
|
+
case XML_ELEMENT_NODE:
|
1258
|
+
klass = cNokogiriXmlElement;
|
1259
|
+
break;
|
1260
|
+
case XML_TEXT_NODE:
|
1261
|
+
klass = cNokogiriXmlText;
|
1262
|
+
break;
|
1263
|
+
case XML_ATTRIBUTE_NODE:
|
1264
|
+
klass = cNokogiriXmlAttr;
|
1265
|
+
break;
|
1266
|
+
case XML_ENTITY_REF_NODE:
|
1267
|
+
klass = cNokogiriXmlEntityReference;
|
1268
|
+
break;
|
1269
|
+
case XML_COMMENT_NODE:
|
1270
|
+
klass = cNokogiriXmlComment;
|
1271
|
+
break;
|
1272
|
+
case XML_DOCUMENT_FRAG_NODE:
|
1273
|
+
klass = cNokogiriXmlDocumentFragment;
|
1274
|
+
break;
|
1275
|
+
case XML_PI_NODE:
|
1276
|
+
klass = cNokogiriXmlProcessingInstruction;
|
1277
|
+
break;
|
1278
|
+
case XML_ENTITY_DECL:
|
1279
|
+
klass = cNokogiriXmlEntityDecl;
|
1280
|
+
break;
|
1281
|
+
case XML_CDATA_SECTION_NODE:
|
1282
|
+
klass = cNokogiriXmlCData;
|
1283
|
+
break;
|
1284
|
+
case XML_DTD_NODE:
|
1285
|
+
klass = cNokogiriXmlDtd;
|
1286
|
+
break;
|
1287
|
+
case XML_ATTRIBUTE_DECL:
|
1288
|
+
klass = cNokogiriXmlAttributeDecl;
|
1289
|
+
break;
|
1290
|
+
case XML_ELEMENT_DECL:
|
1291
|
+
klass = cNokogiriXmlElementDecl;
|
1292
|
+
break;
|
1293
|
+
default:
|
1294
|
+
klass = cNokogiriXmlNode;
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
rb_node = Data_Wrap_Struct(klass, mark, debug_node_dealloc, node) ;
|
1298
|
+
|
1299
|
+
node->_private = (void *)rb_node;
|
1300
|
+
|
1301
|
+
if (DOC_RUBY_OBJECT_TEST(node->doc) && DOC_RUBY_OBJECT(node->doc)) {
|
1302
|
+
/* it's OK if the document isn't fully realized (as in XML::Reader). */
|
1303
|
+
/* see http://github.com/tenderlove/nokogiri/issues/closed/#issue/95 */
|
1304
|
+
document = DOC_RUBY_OBJECT(node->doc);
|
1305
|
+
node_cache = DOC_NODE_CACHE(node->doc);
|
1306
|
+
rb_ary_push(node_cache, rb_node);
|
1307
|
+
rb_funcall(document, decorate, 1, rb_node);
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
return rb_node ;
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
|
1314
|
+
void Nokogiri_xml_node_properties(xmlNodePtr node, VALUE attr_list)
|
1315
|
+
{
|
1316
|
+
xmlAttrPtr prop;
|
1317
|
+
prop = node->properties ;
|
1318
|
+
while (prop != NULL) {
|
1319
|
+
rb_ary_push(attr_list, Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop));
|
1320
|
+
prop = prop->next ;
|
1321
|
+
}
|
1322
|
+
}
|
1323
|
+
|
1324
|
+
VALUE cNokogiriXmlNode ;
|
1325
|
+
VALUE cNokogiriXmlElement ;
|
1326
|
+
|
1327
|
+
void init_xml_node()
|
1328
|
+
{
|
1329
|
+
VALUE nokogiri = rb_define_module("Nokogiri");
|
1330
|
+
VALUE xml = rb_define_module_under(nokogiri, "XML");
|
1331
|
+
VALUE klass = rb_define_class_under(xml, "Node", rb_cObject);
|
1332
|
+
|
1333
|
+
cNokogiriXmlNode = klass;
|
1334
|
+
|
1335
|
+
cNokogiriXmlElement = rb_define_class_under(xml, "Element", klass);
|
1336
|
+
|
1337
|
+
rb_define_singleton_method(klass, "new", new, -1);
|
1338
|
+
|
1339
|
+
rb_define_method(klass, "add_namespace_definition", add_namespace_definition, 2);
|
1340
|
+
rb_define_method(klass, "node_name", get_name, 0);
|
1341
|
+
rb_define_method(klass, "document", document, 0);
|
1342
|
+
rb_define_method(klass, "node_name=", set_name, 1);
|
1343
|
+
rb_define_method(klass, "parent", get_parent, 0);
|
1344
|
+
rb_define_method(klass, "child", child, 0);
|
1345
|
+
rb_define_method(klass, "first_element_child", first_element_child, 0);
|
1346
|
+
rb_define_method(klass, "last_element_child", last_element_child, 0);
|
1347
|
+
rb_define_method(klass, "children", children, 0);
|
1348
|
+
rb_define_method(klass, "element_children", element_children, 0);
|
1349
|
+
rb_define_method(klass, "next_sibling", next_sibling, 0);
|
1350
|
+
rb_define_method(klass, "previous_sibling", previous_sibling, 0);
|
1351
|
+
rb_define_method(klass, "next_element", next_element, 0);
|
1352
|
+
rb_define_method(klass, "previous_element", previous_element, 0);
|
1353
|
+
rb_define_method(klass, "node_type", node_type, 0);
|
1354
|
+
rb_define_method(klass, "content", get_content, 0);
|
1355
|
+
rb_define_method(klass, "path", path, 0);
|
1356
|
+
rb_define_method(klass, "key?", key_eh, 1);
|
1357
|
+
rb_define_method(klass, "namespaced_key?", namespaced_key_eh, 2);
|
1358
|
+
rb_define_method(klass, "blank?", blank_eh, 0);
|
1359
|
+
rb_define_method(klass, "[]=", set, 2);
|
1360
|
+
rb_define_method(klass, "attribute_nodes", attribute_nodes, 0);
|
1361
|
+
rb_define_method(klass, "attribute", attr, 1);
|
1362
|
+
rb_define_method(klass, "attribute_with_ns", attribute_with_ns, 2);
|
1363
|
+
rb_define_method(klass, "namespace", namespace, 0);
|
1364
|
+
rb_define_method(klass, "namespace_definitions", namespace_definitions, 0);
|
1365
|
+
rb_define_method(klass, "namespace_scopes", namespace_scopes, 0);
|
1366
|
+
rb_define_method(klass, "encode_special_chars", encode_special_chars, 1);
|
1367
|
+
rb_define_method(klass, "dup", duplicate_node, -1);
|
1368
|
+
rb_define_method(klass, "unlink", unlink_node, 0);
|
1369
|
+
rb_define_method(klass, "internal_subset", internal_subset, 0);
|
1370
|
+
rb_define_method(klass, "external_subset", external_subset, 0);
|
1371
|
+
rb_define_method(klass, "create_internal_subset", create_internal_subset, 3);
|
1372
|
+
rb_define_method(klass, "create_external_subset", create_external_subset, 3);
|
1373
|
+
rb_define_method(klass, "pointer_id", pointer_id, 0);
|
1374
|
+
rb_define_method(klass, "line", line, 0);
|
1375
|
+
|
1376
|
+
rb_define_private_method(klass, "in_context", in_context, 2);
|
1377
|
+
rb_define_private_method(klass, "add_child_node", add_child, 1);
|
1378
|
+
rb_define_private_method(klass, "add_previous_sibling_node", add_previous_sibling, 1);
|
1379
|
+
rb_define_private_method(klass, "add_next_sibling_node", add_next_sibling, 1);
|
1380
|
+
rb_define_private_method(klass, "replace_node", replace, 1);
|
1381
|
+
rb_define_private_method(klass, "dump_html", dump_html, 0);
|
1382
|
+
rb_define_private_method(klass, "native_write_to", native_write_to, 4);
|
1383
|
+
rb_define_private_method(klass, "native_content=", set_content, 1);
|
1384
|
+
rb_define_private_method(klass, "get", get, 1);
|
1385
|
+
rb_define_private_method(klass, "set_namespace", set_namespace, 1);
|
1386
|
+
rb_define_private_method(klass, "compare", compare, 1);
|
1387
|
+
|
1388
|
+
decorate = rb_intern("decorate");
|
1389
|
+
decorate_bang = rb_intern("decorate!");
|
1390
|
+
}
|