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,180 @@
|
|
1
|
+
CHANGELOG.rdoc
|
2
|
+
EXAMPLES.rdoc
|
3
|
+
FAQ.rdoc
|
4
|
+
GUIDE.rdoc
|
5
|
+
LICENSE.rdoc
|
6
|
+
Manifest.txt
|
7
|
+
README.rdoc
|
8
|
+
Rakefile
|
9
|
+
examples/flickr_upload.rb
|
10
|
+
examples/mech-dump.rb
|
11
|
+
examples/proxy_req.rb
|
12
|
+
examples/rubyforge.rb
|
13
|
+
examples/spider.rb
|
14
|
+
lib/mechanize.rb
|
15
|
+
lib/mechanize/chain.rb
|
16
|
+
lib/mechanize/chain/auth_headers.rb
|
17
|
+
lib/mechanize/chain/body_decoding_handler.rb
|
18
|
+
lib/mechanize/chain/connection_resolver.rb
|
19
|
+
lib/mechanize/chain/custom_headers.rb
|
20
|
+
lib/mechanize/chain/handler.rb
|
21
|
+
lib/mechanize/chain/header_resolver.rb
|
22
|
+
lib/mechanize/chain/parameter_resolver.rb
|
23
|
+
lib/mechanize/chain/post_connect_hook.rb
|
24
|
+
lib/mechanize/chain/pre_connect_hook.rb
|
25
|
+
lib/mechanize/chain/request_resolver.rb
|
26
|
+
lib/mechanize/chain/response_body_parser.rb
|
27
|
+
lib/mechanize/chain/response_header_handler.rb
|
28
|
+
lib/mechanize/chain/response_reader.rb
|
29
|
+
lib/mechanize/chain/ssl_resolver.rb
|
30
|
+
lib/mechanize/chain/uri_resolver.rb
|
31
|
+
lib/mechanize/content_type_error.rb
|
32
|
+
lib/mechanize/cookie.rb
|
33
|
+
lib/mechanize/cookie_jar.rb
|
34
|
+
lib/mechanize/file.rb
|
35
|
+
lib/mechanize/file_response.rb
|
36
|
+
lib/mechanize/file_saver.rb
|
37
|
+
lib/mechanize/form.rb
|
38
|
+
lib/mechanize/form/button.rb
|
39
|
+
lib/mechanize/form/check_box.rb
|
40
|
+
lib/mechanize/form/field.rb
|
41
|
+
lib/mechanize/form/file_upload.rb
|
42
|
+
lib/mechanize/form/image_button.rb
|
43
|
+
lib/mechanize/form/multi_select_list.rb
|
44
|
+
lib/mechanize/form/option.rb
|
45
|
+
lib/mechanize/form/radio_button.rb
|
46
|
+
lib/mechanize/form/select_list.rb
|
47
|
+
lib/mechanize/headers.rb
|
48
|
+
lib/mechanize/history.rb
|
49
|
+
lib/mechanize/inspect.rb
|
50
|
+
lib/mechanize/monkey_patch.rb
|
51
|
+
lib/mechanize/page.rb
|
52
|
+
lib/mechanize/page/base.rb
|
53
|
+
lib/mechanize/page/frame.rb
|
54
|
+
lib/mechanize/page/image.rb
|
55
|
+
lib/mechanize/page/label.rb
|
56
|
+
lib/mechanize/page/link.rb
|
57
|
+
lib/mechanize/page/meta.rb
|
58
|
+
lib/mechanize/pluggable_parsers.rb
|
59
|
+
lib/mechanize/redirect_limit_reached_error.rb
|
60
|
+
lib/mechanize/redirect_not_get_or_head_error.rb
|
61
|
+
lib/mechanize/response_code_error.rb
|
62
|
+
lib/mechanize/unsupported_scheme_error.rb
|
63
|
+
lib/mechanize/util.rb
|
64
|
+
test/chain/test_argument_validator.rb
|
65
|
+
test/chain/test_auth_headers.rb
|
66
|
+
test/chain/test_custom_headers.rb
|
67
|
+
test/chain/test_header_resolver.rb
|
68
|
+
test/chain/test_parameter_resolver.rb
|
69
|
+
test/chain/test_request_resolver.rb
|
70
|
+
test/chain/test_response_reader.rb
|
71
|
+
test/data/htpasswd
|
72
|
+
test/data/server.crt
|
73
|
+
test/data/server.csr
|
74
|
+
test/data/server.key
|
75
|
+
test/data/server.pem
|
76
|
+
test/helper.rb
|
77
|
+
test/htdocs/alt_text.html
|
78
|
+
test/htdocs/bad_form_test.html
|
79
|
+
test/htdocs/button.jpg
|
80
|
+
test/htdocs/empty_form.html
|
81
|
+
test/htdocs/file_upload.html
|
82
|
+
test/htdocs/find_link.html
|
83
|
+
test/htdocs/form_multi_select.html
|
84
|
+
test/htdocs/form_multival.html
|
85
|
+
test/htdocs/form_no_action.html
|
86
|
+
test/htdocs/form_no_input_name.html
|
87
|
+
test/htdocs/form_select.html
|
88
|
+
test/htdocs/form_select_all.html
|
89
|
+
test/htdocs/form_select_none.html
|
90
|
+
test/htdocs/form_select_noopts.html
|
91
|
+
test/htdocs/form_set_fields.html
|
92
|
+
test/htdocs/form_test.html
|
93
|
+
test/htdocs/frame_test.html
|
94
|
+
test/htdocs/google.html
|
95
|
+
test/htdocs/iframe_test.html
|
96
|
+
test/htdocs/index.html
|
97
|
+
test/htdocs/link with space.html
|
98
|
+
test/htdocs/meta_cookie.html
|
99
|
+
test/htdocs/no_title_test.html
|
100
|
+
test/htdocs/relative/tc_relative_links.html
|
101
|
+
test/htdocs/tc_bad_charset.html
|
102
|
+
test/htdocs/tc_bad_links.html
|
103
|
+
test/htdocs/tc_base_link.html
|
104
|
+
test/htdocs/tc_blank_form.html
|
105
|
+
test/htdocs/tc_charset.html
|
106
|
+
test/htdocs/tc_checkboxes.html
|
107
|
+
test/htdocs/tc_encoded_links.html
|
108
|
+
test/htdocs/tc_field_precedence.html
|
109
|
+
test/htdocs/tc_follow_meta.html
|
110
|
+
test/htdocs/tc_form_action.html
|
111
|
+
test/htdocs/tc_links.html
|
112
|
+
test/htdocs/tc_meta_in_body.html
|
113
|
+
test/htdocs/tc_no_attributes.html
|
114
|
+
test/htdocs/tc_pretty_print.html
|
115
|
+
test/htdocs/tc_radiobuttons.html
|
116
|
+
test/htdocs/tc_referer.html
|
117
|
+
test/htdocs/tc_relative_links.html
|
118
|
+
test/htdocs/tc_textarea.html
|
119
|
+
test/htdocs/test_bad_encoding.html
|
120
|
+
test/htdocs/unusual______.html
|
121
|
+
test/servlets.rb
|
122
|
+
test/ssl_server.rb
|
123
|
+
test/test_authenticate.rb
|
124
|
+
test/test_bad_links.rb
|
125
|
+
test/test_blank_form.rb
|
126
|
+
test/test_checkboxes.rb
|
127
|
+
test/test_content_type.rb
|
128
|
+
test/test_cookie_class.rb
|
129
|
+
test/test_cookie_jar.rb
|
130
|
+
test/test_cookies.rb
|
131
|
+
test/test_encoded_links.rb
|
132
|
+
test/test_errors.rb
|
133
|
+
test/test_field_precedence.rb
|
134
|
+
test/test_follow_meta.rb
|
135
|
+
test/test_form_action.rb
|
136
|
+
test/test_form_as_hash.rb
|
137
|
+
test/test_form_button.rb
|
138
|
+
test/test_form_no_inputname.rb
|
139
|
+
test/test_forms.rb
|
140
|
+
test/test_frames.rb
|
141
|
+
test/test_get_headers.rb
|
142
|
+
test/test_gzipping.rb
|
143
|
+
test/test_hash_api.rb
|
144
|
+
test/test_history.rb
|
145
|
+
test/test_history_added.rb
|
146
|
+
test/test_html_unscape_forms.rb
|
147
|
+
test/test_if_modified_since.rb
|
148
|
+
test/test_keep_alive.rb
|
149
|
+
test/test_links.rb
|
150
|
+
test/test_mech.rb
|
151
|
+
test/test_mech_proxy.rb
|
152
|
+
test/test_mechanize_file.rb
|
153
|
+
test/test_meta.rb
|
154
|
+
test/test_multi_select.rb
|
155
|
+
test/test_no_attributes.rb
|
156
|
+
test/test_option.rb
|
157
|
+
test/test_page.rb
|
158
|
+
test/test_pluggable_parser.rb
|
159
|
+
test/test_post_form.rb
|
160
|
+
test/test_pretty_print.rb
|
161
|
+
test/test_radiobutton.rb
|
162
|
+
test/test_redirect_limit_reached.rb
|
163
|
+
test/test_redirect_verb_handling.rb
|
164
|
+
test/test_referer.rb
|
165
|
+
test/test_relative_links.rb
|
166
|
+
test/test_request.rb
|
167
|
+
test/test_response_code.rb
|
168
|
+
test/test_save_file.rb
|
169
|
+
test/test_scheme.rb
|
170
|
+
test/test_select.rb
|
171
|
+
test/test_select_all.rb
|
172
|
+
test/test_select_none.rb
|
173
|
+
test/test_select_noopts.rb
|
174
|
+
test/test_set_fields.rb
|
175
|
+
test/test_ssl_server.rb
|
176
|
+
test/test_subclass.rb
|
177
|
+
test/test_textarea.rb
|
178
|
+
test/test_upload.rb
|
179
|
+
test/test_util.rb
|
180
|
+
test/test_verbs.rb
|
@@ -0,0 +1,60 @@
|
|
1
|
+
= Mechanize
|
2
|
+
|
3
|
+
* http://mechanize.rubyforge.org
|
4
|
+
* http://github.com/tenderlove/mechanize/tree/master
|
5
|
+
|
6
|
+
== DESCRIPTION
|
7
|
+
|
8
|
+
The Mechanize library is used for automating interaction with websites.
|
9
|
+
Mechanize automatically stores and sends cookies, follows redirects,
|
10
|
+
can follow links, and submit forms. Form fields can be populated and
|
11
|
+
submitted. Mechanize also keeps track of the sites that you have visited as
|
12
|
+
a history.
|
13
|
+
|
14
|
+
== Dependencies
|
15
|
+
|
16
|
+
* ruby 1.8.6
|
17
|
+
* nokogiri[http://nokogiri.rubyforge.org]
|
18
|
+
|
19
|
+
== SUPPORT:
|
20
|
+
|
21
|
+
The mechanize mailing list is available here:
|
22
|
+
|
23
|
+
* http://rubyforge.org/mailman/listinfo/mechanize-users
|
24
|
+
|
25
|
+
The bug tracker is available here:
|
26
|
+
|
27
|
+
* http://github.com/tenderlove/mechanize/issues
|
28
|
+
|
29
|
+
== Examples
|
30
|
+
|
31
|
+
If you are just starting, check out the GUIDE.
|
32
|
+
Also, check out the EXAMPLES file.
|
33
|
+
|
34
|
+
== Authors
|
35
|
+
|
36
|
+
Copyright (c) 2005 by Michael Neumann (mneumann@ntecs.de)
|
37
|
+
|
38
|
+
Copyright (c) 2006-2010:
|
39
|
+
|
40
|
+
* {Aaron Patterson}[http://tenderlovemaking.com] (aaronp@rubyforge.org)
|
41
|
+
* {Mike Dalessio}[http://mike.daless.io] (mike@csa.net)
|
42
|
+
|
43
|
+
This library comes with a shameless plug for employing me
|
44
|
+
(Aaron[http://tenderlovemaking.com/]) programming
|
45
|
+
Ruby, my favorite language!
|
46
|
+
|
47
|
+
== Acknowledgments
|
48
|
+
|
49
|
+
This library was heavily influenced by its namesake in the perl world. A big
|
50
|
+
thanks goes to Andy Lester (andy@petdance.com), the author of the original
|
51
|
+
perl Mechanize which is available here[http://search.cpan.org/~petdance/WWW-Mechanize-1.20/]. Ruby Mechanize would not be around without you!
|
52
|
+
|
53
|
+
Thank you to Michael Neumann for starting the Ruby version. Thanks to everyone
|
54
|
+
who's helped out in various ways. Finally, thank you to the people using this
|
55
|
+
library!
|
56
|
+
|
57
|
+
== License
|
58
|
+
|
59
|
+
This library is distributed under the GPL. Please see the LICENSE file.
|
60
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'hoe'
|
3
|
+
|
4
|
+
Hoe.spec 'mechanize' do
|
5
|
+
developer 'Aaron Patterson', 'aaronp@rubyforge.org'
|
6
|
+
developer 'Mike Dalessio', 'mike.dalessio@gmail.com'
|
7
|
+
|
8
|
+
self.readme_file = 'README.rdoc'
|
9
|
+
self.history_file = 'CHANGELOG.rdoc'
|
10
|
+
self.extra_rdoc_files += Dir['*.rdoc']
|
11
|
+
self.extra_deps << ['nokogiri', '>= 1.2.1']
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Update SSL Certificate"
|
15
|
+
task('ssl_cert') do |p|
|
16
|
+
sh "openssl genrsa -des3 -out server.key 1024"
|
17
|
+
sh "openssl req -new -key server.key -out server.csr"
|
18
|
+
sh "cp server.key server.key.org"
|
19
|
+
sh "openssl rsa -in server.key.org -out server.key"
|
20
|
+
sh "openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"
|
21
|
+
sh "cp server.key server.pem"
|
22
|
+
sh "mv server.key server.csr server.crt server.pem test/data/"
|
23
|
+
sh "rm server.key.org"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc 'Generate a gem spec'
|
27
|
+
task "gem:spec" do
|
28
|
+
File.open("mechanize.gemspec", 'w') do |f|
|
29
|
+
now = Time.now.strftime("%Y%m%d%H%M%S")
|
30
|
+
f.write `rake debug_gem`.sub(/(s.version = ".*)(")/) { "#{$1}.#{now}#{$2}" }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'mechanize'
|
5
|
+
|
6
|
+
agent = Mechanize.new
|
7
|
+
|
8
|
+
# Get the flickr sign in page
|
9
|
+
page = agent.get('http://flickr.com/signin/flickr/')
|
10
|
+
|
11
|
+
# Fill out the login form
|
12
|
+
form = page.form_with(:name => 'flickrloginform')
|
13
|
+
form.email = ARGV[0]
|
14
|
+
form.password = ARGV[1]
|
15
|
+
page = agent.submit(form)
|
16
|
+
|
17
|
+
# Go to the upload page
|
18
|
+
page = agent.click page.link_with(:text => 'Upload')
|
19
|
+
|
20
|
+
# Fill out the form
|
21
|
+
form = page.forms.action('/photos_upload_process.gne').first
|
22
|
+
form.file_uploads.name('file1').first.file_name = ARGV[2]
|
23
|
+
agent.submit(form)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
# This example logs a user in to rubyforge and prints out the body of the
|
4
|
+
# page after logging the user in.
|
5
|
+
require 'rubygems'
|
6
|
+
require 'mechanize'
|
7
|
+
require 'logger'
|
8
|
+
|
9
|
+
# Create a new mechanize object
|
10
|
+
agent = Mechanize.new { |a| a.log = Logger.new(STDERR) }
|
11
|
+
|
12
|
+
# Load the rubyforge website
|
13
|
+
page = agent.get('http://rubyforge.org/')
|
14
|
+
page = agent.click page.link_with(:text => /Log In/) # Click the login link
|
15
|
+
form = page.forms[1] # Select the first form
|
16
|
+
form.form_loginname = ARGV[0]
|
17
|
+
form.form_pw = ARGV[1]
|
18
|
+
|
19
|
+
# Submit the form
|
20
|
+
page = agent.submit(form, form.buttons.first)
|
21
|
+
|
22
|
+
puts page.body # Print out the body
|
@@ -0,0 +1,11 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'mechanize'
|
5
|
+
|
6
|
+
agent = Mechanize.new
|
7
|
+
stack = agent.get(ARGV[0]).links
|
8
|
+
while l = stack.pop
|
9
|
+
next unless l.uri.host == agent.history.first.uri.host
|
10
|
+
stack.push(*(agent.click(l).links)) unless agent.visited? l.href
|
11
|
+
end
|
@@ -0,0 +1,660 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'net/https'
|
3
|
+
require 'uri'
|
4
|
+
require 'webrick/httputils'
|
5
|
+
require 'zlib'
|
6
|
+
require 'stringio'
|
7
|
+
require 'digest/md5'
|
8
|
+
require 'fileutils'
|
9
|
+
require 'nokogiri'
|
10
|
+
require 'forwardable'
|
11
|
+
require 'iconv'
|
12
|
+
require 'nkf'
|
13
|
+
require 'mutex_m'
|
14
|
+
|
15
|
+
require 'mechanize/util'
|
16
|
+
require 'mechanize/content_type_error'
|
17
|
+
require 'mechanize/response_code_error'
|
18
|
+
require 'mechanize/unsupported_scheme_error'
|
19
|
+
require 'mechanize/redirect_limit_reached_error'
|
20
|
+
require 'mechanize/redirect_not_get_or_head_error'
|
21
|
+
require 'mechanize/cookie'
|
22
|
+
require 'mechanize/cookie_jar'
|
23
|
+
require 'mechanize/history'
|
24
|
+
require 'mechanize/form'
|
25
|
+
require 'mechanize/pluggable_parsers'
|
26
|
+
require 'mechanize/file_response'
|
27
|
+
require 'mechanize/inspect'
|
28
|
+
require 'mechanize/chain'
|
29
|
+
require 'mechanize/monkey_patch'
|
30
|
+
|
31
|
+
# = Synopsis
|
32
|
+
# The Mechanize library is used for automating interaction with a website. It
|
33
|
+
# can follow links, and submit forms. Form fields can be populated and
|
34
|
+
# submitted. A history of URL's is maintained and can be queried.
|
35
|
+
#
|
36
|
+
# == Example
|
37
|
+
# require 'rubygems'
|
38
|
+
# require 'mechanize'
|
39
|
+
# require 'logger'
|
40
|
+
#
|
41
|
+
# agent = Mechanize.new { |a| a.log = Logger.new("mech.log") }
|
42
|
+
# agent.user_agent_alias = 'Mac Safari'
|
43
|
+
# page = agent.get("http://www.google.com/")
|
44
|
+
# search_form = page.form_with(:name => "f")
|
45
|
+
# search_form.field_with(:name => "q").value = "Hello"
|
46
|
+
# search_results = agent.submit(search_form)
|
47
|
+
# puts search_results.body
|
48
|
+
class Mechanize
|
49
|
+
##
|
50
|
+
# The version of Mechanize you are using.
|
51
|
+
VERSION = '1.0.0'
|
52
|
+
|
53
|
+
##
|
54
|
+
# User Agent aliases
|
55
|
+
AGENT_ALIASES = {
|
56
|
+
'Windows IE 6' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
|
57
|
+
'Windows IE 7' => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
|
58
|
+
'Windows Mozilla' => 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6',
|
59
|
+
'Mac Safari' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; de-at) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10',
|
60
|
+
'Mac FireFox' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6',
|
61
|
+
'Mac Mozilla' => 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a) Gecko/20030401',
|
62
|
+
'Linux Mozilla' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624',
|
63
|
+
'Linux Firefox' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.1) Gecko/20100122 firefox/3.6.1',
|
64
|
+
'Linux Konqueror' => 'Mozilla/5.0 (compatible; Konqueror/3; Linux)',
|
65
|
+
'iPhone' => 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3',
|
66
|
+
'Mechanize' => "WWW-Mechanize/#{VERSION} (http://rubyforge.org/projects/mechanize/)"
|
67
|
+
}
|
68
|
+
|
69
|
+
attr_accessor :cookie_jar
|
70
|
+
attr_accessor :open_timeout, :read_timeout
|
71
|
+
attr_accessor :user_agent
|
72
|
+
attr_accessor :watch_for_set
|
73
|
+
attr_accessor :ca_file
|
74
|
+
attr_accessor :key
|
75
|
+
attr_accessor :cert
|
76
|
+
attr_accessor :pass
|
77
|
+
attr_accessor :redirect_ok
|
78
|
+
attr_accessor :gzip_enabled
|
79
|
+
attr_accessor :keep_alive_time
|
80
|
+
attr_accessor :keep_alive
|
81
|
+
attr_accessor :conditional_requests
|
82
|
+
attr_accessor :follow_meta_refresh
|
83
|
+
attr_accessor :verify_callback
|
84
|
+
attr_accessor :history_added
|
85
|
+
attr_accessor :scheme_handlers
|
86
|
+
attr_accessor :redirection_limit
|
87
|
+
|
88
|
+
# A hash of custom request headers
|
89
|
+
attr_accessor :request_headers
|
90
|
+
|
91
|
+
# Proxy settings
|
92
|
+
attr_reader :proxy_addr
|
93
|
+
attr_reader :proxy_pass
|
94
|
+
attr_reader :proxy_port
|
95
|
+
attr_reader :proxy_user
|
96
|
+
|
97
|
+
# The HTML parser to be used when parsing documents
|
98
|
+
attr_accessor :html_parser
|
99
|
+
|
100
|
+
attr_reader :history
|
101
|
+
attr_reader :pluggable_parser
|
102
|
+
|
103
|
+
alias :follow_redirect? :redirect_ok
|
104
|
+
|
105
|
+
@html_parser = Nokogiri::HTML
|
106
|
+
class << self
|
107
|
+
attr_accessor :html_parser, :log
|
108
|
+
|
109
|
+
def inherited(child)
|
110
|
+
child.html_parser ||= html_parser
|
111
|
+
child.log ||= log
|
112
|
+
super
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def initialize
|
117
|
+
# attr_accessors
|
118
|
+
@cookie_jar = CookieJar.new
|
119
|
+
@log = nil
|
120
|
+
@open_timeout = nil
|
121
|
+
@read_timeout = nil
|
122
|
+
@user_agent = AGENT_ALIASES['Mechanize']
|
123
|
+
@watch_for_set = nil
|
124
|
+
@history_added = nil
|
125
|
+
@ca_file = nil # OpenSSL server certificate file
|
126
|
+
|
127
|
+
# callback for OpenSSL errors while verifying the server certificate
|
128
|
+
# chain, can be used for debugging or to ignore errors by always
|
129
|
+
# returning _true_
|
130
|
+
@verify_callback = nil
|
131
|
+
@cert = nil # OpenSSL Certificate
|
132
|
+
@key = nil # OpenSSL Private Key
|
133
|
+
@pass = nil # OpenSSL Password
|
134
|
+
@redirect_ok = true # Should we follow redirects?
|
135
|
+
@gzip_enabled = true
|
136
|
+
|
137
|
+
# attr_readers
|
138
|
+
@history = Mechanize::History.new
|
139
|
+
@pluggable_parser = PluggableParser.new
|
140
|
+
|
141
|
+
# Auth variables
|
142
|
+
@user = nil # Auth User
|
143
|
+
@password = nil # Auth Password
|
144
|
+
@digest = nil # DigestAuth Digest
|
145
|
+
@auth_hash = {} # Keep track of urls for sending auth
|
146
|
+
@request_headers= {} # A hash of request headers to be used
|
147
|
+
|
148
|
+
# Proxy settings
|
149
|
+
@proxy_addr = nil
|
150
|
+
@proxy_pass = nil
|
151
|
+
@proxy_port = nil
|
152
|
+
@proxy_user = nil
|
153
|
+
|
154
|
+
@conditional_requests = true
|
155
|
+
|
156
|
+
@follow_meta_refresh = false
|
157
|
+
@redirection_limit = 20
|
158
|
+
|
159
|
+
# Connection Cache & Keep alive
|
160
|
+
@connection_cache = {}
|
161
|
+
@keep_alive_time = 300
|
162
|
+
@keep_alive = true
|
163
|
+
|
164
|
+
@scheme_handlers = Hash.new { |h,k|
|
165
|
+
h[k] = lambda { |link, page|
|
166
|
+
raise UnsupportedSchemeError.new(k)
|
167
|
+
}
|
168
|
+
}
|
169
|
+
@scheme_handlers['http'] = lambda { |link, page| link }
|
170
|
+
@scheme_handlers['https'] = @scheme_handlers['http']
|
171
|
+
@scheme_handlers['relative'] = @scheme_handlers['http']
|
172
|
+
@scheme_handlers['file'] = @scheme_handlers['http']
|
173
|
+
|
174
|
+
@pre_connect_hook = Chain::PreConnectHook.new
|
175
|
+
@post_connect_hook = Chain::PostConnectHook.new
|
176
|
+
|
177
|
+
@html_parser = self.class.html_parser
|
178
|
+
|
179
|
+
yield self if block_given?
|
180
|
+
end
|
181
|
+
|
182
|
+
def max_history=(length); @history.max_size = length end
|
183
|
+
def max_history; @history.max_size end
|
184
|
+
def log=(l); self.class.log = l end
|
185
|
+
def log; self.class.log end
|
186
|
+
|
187
|
+
def pre_connect_hooks
|
188
|
+
@pre_connect_hook.hooks
|
189
|
+
end
|
190
|
+
|
191
|
+
def post_connect_hooks
|
192
|
+
@post_connect_hook.hooks
|
193
|
+
end
|
194
|
+
|
195
|
+
# Sets the proxy address, port, user, and password
|
196
|
+
# +addr+ should be a host, with no "http://"
|
197
|
+
def set_proxy(addr, port, user = nil, pass = nil)
|
198
|
+
@proxy_addr, @proxy_port, @proxy_user, @proxy_pass = addr, port, user, pass
|
199
|
+
end
|
200
|
+
|
201
|
+
# Set the user agent for the Mechanize object.
|
202
|
+
# See AGENT_ALIASES
|
203
|
+
def user_agent_alias=(al)
|
204
|
+
self.user_agent = AGENT_ALIASES[al] || raise("unknown agent alias")
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns a list of cookies stored in the cookie jar.
|
208
|
+
def cookies
|
209
|
+
@cookie_jar.to_a
|
210
|
+
end
|
211
|
+
|
212
|
+
# Sets the user and password to be used for authentication.
|
213
|
+
def auth(user, password)
|
214
|
+
@user = user
|
215
|
+
@password = password
|
216
|
+
end
|
217
|
+
alias :basic_auth :auth
|
218
|
+
|
219
|
+
# Fetches the URL passed in and returns a page.
|
220
|
+
def get(options, parameters = [], referer = nil)
|
221
|
+
verb = :get
|
222
|
+
|
223
|
+
unless options.is_a? Hash
|
224
|
+
url = options
|
225
|
+
unless parameters.respond_to?(:each) # FIXME: Remove this in 0.8.0
|
226
|
+
referer = parameters
|
227
|
+
parameters = []
|
228
|
+
end
|
229
|
+
else
|
230
|
+
raise ArgumentError.new("url must be specified") unless url = options[:url]
|
231
|
+
parameters = options[:params] || []
|
232
|
+
referer = options[:referer]
|
233
|
+
headers = options[:headers]
|
234
|
+
verb = options[:verb] || verb
|
235
|
+
end
|
236
|
+
|
237
|
+
unless referer
|
238
|
+
if url.to_s =~ /^http/
|
239
|
+
referer = Page.new(nil, {'content-type'=>'text/html'})
|
240
|
+
else
|
241
|
+
referer = current_page || Page.new(nil, {'content-type'=>'text/html'})
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# FIXME: Huge hack so that using a URI as a referer works. I need to
|
246
|
+
# refactor everything to pass around URIs but still support
|
247
|
+
# Mechanize::Page#base
|
248
|
+
unless referer.is_a?(Mechanize::File)
|
249
|
+
referer = referer.is_a?(String) ?
|
250
|
+
Page.new(URI.parse(referer), {'content-type' => 'text/html'}) :
|
251
|
+
Page.new(referer, {'content-type' => 'text/html'})
|
252
|
+
end
|
253
|
+
|
254
|
+
# fetch the page
|
255
|
+
page = fetch_page( :uri => url,
|
256
|
+
:referer => referer,
|
257
|
+
:headers => headers || {},
|
258
|
+
:verb => verb,
|
259
|
+
:params => parameters
|
260
|
+
)
|
261
|
+
add_to_history(page)
|
262
|
+
yield page if block_given?
|
263
|
+
page
|
264
|
+
end
|
265
|
+
|
266
|
+
####
|
267
|
+
# PUT to +url+ with +entity+, and setting +options+:
|
268
|
+
#
|
269
|
+
# put('http://tenderlovemaking.com/', 'new content', :headers => {'Content-Type' => 'text/plain'})
|
270
|
+
#
|
271
|
+
def put(url, entity, options = {})
|
272
|
+
request_with_entity(:put, url, entity, options)
|
273
|
+
end
|
274
|
+
|
275
|
+
####
|
276
|
+
# DELETE to +url+ with +query_params+, and setting +options+:
|
277
|
+
#
|
278
|
+
# delete('http://tenderlovemaking.com/', {'q' => 'foo'}, :headers => {})
|
279
|
+
#
|
280
|
+
def delete(url, query_params = {}, options = {})
|
281
|
+
page = head(url, query_params, options.merge({:verb => :delete}))
|
282
|
+
add_to_history(page)
|
283
|
+
page
|
284
|
+
end
|
285
|
+
|
286
|
+
####
|
287
|
+
# HEAD to +url+ with +query_params+, and setting +options+:
|
288
|
+
#
|
289
|
+
# head('http://tenderlovemaking.com/', {'q' => 'foo'}, :headers => {})
|
290
|
+
#
|
291
|
+
def head(url, query_params = {}, options = {})
|
292
|
+
options = {
|
293
|
+
:uri => url,
|
294
|
+
:headers => {},
|
295
|
+
:params => query_params,
|
296
|
+
:verb => :head
|
297
|
+
}.merge(options)
|
298
|
+
# fetch the page
|
299
|
+
page = fetch_page(options)
|
300
|
+
yield page if block_given?
|
301
|
+
page
|
302
|
+
end
|
303
|
+
|
304
|
+
# Fetch a file and return the contents of the file.
|
305
|
+
def get_file(url)
|
306
|
+
get(url).body
|
307
|
+
end
|
308
|
+
|
309
|
+
# Clicks the Mechanize::Link object passed in and returns the
|
310
|
+
# page fetched.
|
311
|
+
def click(link)
|
312
|
+
referer = link.page rescue referer = nil
|
313
|
+
href = link.respond_to?(:href) ? link.href :
|
314
|
+
(link['href'] || link['src'])
|
315
|
+
get(:url => href, :referer => (referer || current_page()))
|
316
|
+
end
|
317
|
+
|
318
|
+
# Equivalent to the browser back button. Returns the most recent page
|
319
|
+
# visited.
|
320
|
+
def back
|
321
|
+
@history.pop
|
322
|
+
end
|
323
|
+
|
324
|
+
# Posts to the given URL with the request entity. The request
|
325
|
+
# entity is specified by either a string, or a list of key-value
|
326
|
+
# pairs represented by a hash or an array of arrays.
|
327
|
+
#
|
328
|
+
# Examples:
|
329
|
+
# agent.post('http://example.com/', "foo" => "bar")
|
330
|
+
#
|
331
|
+
# agent.post('http://example.com/', [ ["foo", "bar"] ])
|
332
|
+
#
|
333
|
+
# agent.post('http://example.com/', "<message>hello</message>", 'Content-Type' => 'application/xml')
|
334
|
+
def post(url, query={}, headers={})
|
335
|
+
if query.is_a?(String)
|
336
|
+
return request_with_entity(:post, url, query, :headers => headers)
|
337
|
+
end
|
338
|
+
node = {}
|
339
|
+
# Create a fake form
|
340
|
+
class << node
|
341
|
+
def search(*args); []; end
|
342
|
+
end
|
343
|
+
node['method'] = 'POST'
|
344
|
+
node['enctype'] = 'application/x-www-form-urlencoded'
|
345
|
+
|
346
|
+
form = Form.new(node)
|
347
|
+
query.each { |k,v|
|
348
|
+
if v.is_a?(IO)
|
349
|
+
form.enctype = 'multipart/form-data'
|
350
|
+
ul = Form::FileUpload.new({'name' => k.to_s},::File.basename(v.path))
|
351
|
+
ul.file_data = v.read
|
352
|
+
form.file_uploads << ul
|
353
|
+
else
|
354
|
+
form.fields << Form::Field.new({'name' => k.to_s},v)
|
355
|
+
end
|
356
|
+
}
|
357
|
+
post_form(url, form, headers)
|
358
|
+
end
|
359
|
+
|
360
|
+
# Submit a form with an optional button.
|
361
|
+
# Without a button:
|
362
|
+
# page = agent.get('http://example.com')
|
363
|
+
# agent.submit(page.forms.first)
|
364
|
+
# With a button
|
365
|
+
# agent.submit(page.forms.first, page.forms.first.buttons.first)
|
366
|
+
def submit(form, button=nil, headers={})
|
367
|
+
form.add_button_to_query(button) if button
|
368
|
+
case form.method.upcase
|
369
|
+
when 'POST'
|
370
|
+
post_form(form.action, form, headers)
|
371
|
+
when 'GET'
|
372
|
+
get( :url => form.action.gsub(/\?[^\?]*$/, ''),
|
373
|
+
:params => form.build_query,
|
374
|
+
:headers => headers,
|
375
|
+
:referer => form.page
|
376
|
+
)
|
377
|
+
else
|
378
|
+
raise "unsupported method: #{form.method.upcase}"
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
def request_with_entity(verb, url, entity, options={})
|
383
|
+
cur_page = current_page || Page.new( nil, {'content-type'=>'text/html'})
|
384
|
+
|
385
|
+
options = {
|
386
|
+
:uri => url,
|
387
|
+
:referer => cur_page,
|
388
|
+
:headers => {},
|
389
|
+
}.update(options)
|
390
|
+
|
391
|
+
headers = {
|
392
|
+
'Content-Type' => 'application/octet-stream',
|
393
|
+
'Content-Length' => entity.size.to_s,
|
394
|
+
}.update(options[:headers])
|
395
|
+
|
396
|
+
options.update({
|
397
|
+
:verb => verb,
|
398
|
+
:params => [entity],
|
399
|
+
:headers => headers,
|
400
|
+
})
|
401
|
+
|
402
|
+
page = fetch_page(options)
|
403
|
+
add_to_history(page)
|
404
|
+
page
|
405
|
+
end
|
406
|
+
|
407
|
+
# Returns the current page loaded by Mechanize
|
408
|
+
def current_page
|
409
|
+
@history.last
|
410
|
+
end
|
411
|
+
|
412
|
+
# Returns whether or not a url has been visited
|
413
|
+
def visited?(url)
|
414
|
+
! visited_page(url).nil?
|
415
|
+
end
|
416
|
+
|
417
|
+
# Returns a visited page for the url passed in, otherwise nil
|
418
|
+
def visited_page(url)
|
419
|
+
if url.respond_to? :href
|
420
|
+
url = url.href
|
421
|
+
end
|
422
|
+
@history.visited_page(resolve(url))
|
423
|
+
end
|
424
|
+
|
425
|
+
# Runs given block, then resets the page history as it was before. self is
|
426
|
+
# given as a parameter to the block. Returns the value of the block.
|
427
|
+
def transact
|
428
|
+
history_backup = @history.dup
|
429
|
+
begin
|
430
|
+
yield self
|
431
|
+
ensure
|
432
|
+
@history = history_backup
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
alias :page :current_page
|
437
|
+
|
438
|
+
private
|
439
|
+
|
440
|
+
def resolve(url, referer = current_page())
|
441
|
+
hash = { :uri => url, :referer => referer }
|
442
|
+
chain = Chain.new([
|
443
|
+
Chain::URIResolver.new(@scheme_handlers)
|
444
|
+
]).handle(hash)
|
445
|
+
hash[:uri].to_s
|
446
|
+
end
|
447
|
+
|
448
|
+
def post_form(url, form, headers = {})
|
449
|
+
cur_page = form.page || current_page ||
|
450
|
+
Page.new( nil, {'content-type'=>'text/html'})
|
451
|
+
|
452
|
+
request_data = form.request_data
|
453
|
+
|
454
|
+
log.debug("query: #{ request_data.inspect }") if log
|
455
|
+
|
456
|
+
# fetch the page
|
457
|
+
page = fetch_page( :uri => url,
|
458
|
+
:referer => cur_page,
|
459
|
+
:verb => :post,
|
460
|
+
:params => [request_data],
|
461
|
+
:headers => {
|
462
|
+
'Content-Type' => form.enctype,
|
463
|
+
'Content-Length' => request_data.size.to_s,
|
464
|
+
}.merge(headers))
|
465
|
+
add_to_history(page)
|
466
|
+
page
|
467
|
+
end
|
468
|
+
|
469
|
+
# uri is an absolute URI
|
470
|
+
def fetch_page(params)
|
471
|
+
options = {
|
472
|
+
:request => nil,
|
473
|
+
:response => nil,
|
474
|
+
:connection => nil,
|
475
|
+
:referer => current_page(),
|
476
|
+
:uri => nil,
|
477
|
+
:verb => :get,
|
478
|
+
:agent => self,
|
479
|
+
:redirects => 0,
|
480
|
+
:params => [],
|
481
|
+
:headers => {},
|
482
|
+
}.merge(params)
|
483
|
+
|
484
|
+
before_connect = Chain.new([
|
485
|
+
Chain::URIResolver.new(@scheme_handlers),
|
486
|
+
Chain::ParameterResolver.new,
|
487
|
+
Chain::RequestResolver.new,
|
488
|
+
Chain::ConnectionResolver.new(
|
489
|
+
@connection_cache,
|
490
|
+
@keep_alive,
|
491
|
+
@proxy_addr,
|
492
|
+
@proxy_port,
|
493
|
+
@proxy_user,
|
494
|
+
@proxy_pass
|
495
|
+
),
|
496
|
+
Chain::SSLResolver.new(@ca_file, @verify_callback, @cert, @key, @pass),
|
497
|
+
Chain::AuthHeaders.new(@auth_hash, @user, @password, @digest),
|
498
|
+
Chain::HeaderResolver.new(
|
499
|
+
@keep_alive,
|
500
|
+
@keep_alive_time,
|
501
|
+
@cookie_jar,
|
502
|
+
@user_agent,
|
503
|
+
@gzip_enabled,
|
504
|
+
@request_headers
|
505
|
+
),
|
506
|
+
Chain::CustomHeaders.new,
|
507
|
+
@pre_connect_hook,
|
508
|
+
])
|
509
|
+
before_connect.handle(options)
|
510
|
+
|
511
|
+
uri = options[:uri]
|
512
|
+
request = options[:request]
|
513
|
+
cur_page = options[:referer]
|
514
|
+
request_data = options[:params]
|
515
|
+
redirects = options[:redirects]
|
516
|
+
http_obj = options[:connection]
|
517
|
+
|
518
|
+
# Add If-Modified-Since if page is in history
|
519
|
+
if( (page = visited_page(uri)) && page.response['Last-Modified'] )
|
520
|
+
request['If-Modified-Since'] = page.response['Last-Modified']
|
521
|
+
end if(@conditional_requests)
|
522
|
+
|
523
|
+
http_obj.mu_lock
|
524
|
+
# Specify timeouts if given
|
525
|
+
http_obj.open_timeout = @open_timeout if @open_timeout
|
526
|
+
http_obj.read_timeout = @read_timeout if @read_timeout
|
527
|
+
http_obj.start unless http_obj.started?
|
528
|
+
|
529
|
+
# Log specified headers for the request
|
530
|
+
log.info("#{ request.class }: #{ request.path }") if log
|
531
|
+
request.each_header do |k, v|
|
532
|
+
log.debug("request-header: #{ k } => #{ v }")
|
533
|
+
end if log
|
534
|
+
|
535
|
+
# Send the request
|
536
|
+
attempts = 0
|
537
|
+
begin
|
538
|
+
response = http_obj.request(request, *request_data) { |r|
|
539
|
+
connection_chain = Chain.new([
|
540
|
+
Chain::ResponseReader.new(r),
|
541
|
+
Chain::BodyDecodingHandler.new,
|
542
|
+
])
|
543
|
+
connection_chain.handle(options)
|
544
|
+
}
|
545
|
+
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE => x
|
546
|
+
log.error("Rescuing EOF error") if log
|
547
|
+
http_obj.finish
|
548
|
+
raise x if attempts >= 2
|
549
|
+
request.body = nil
|
550
|
+
http_obj.start
|
551
|
+
attempts += 1
|
552
|
+
retry
|
553
|
+
end
|
554
|
+
|
555
|
+
after_connect = Chain.new([
|
556
|
+
@post_connect_hook,
|
557
|
+
Chain::ResponseBodyParser.new(@pluggable_parser, @watch_for_set),
|
558
|
+
Chain::ResponseHeaderHandler.new(@cookie_jar, @connection_cache),
|
559
|
+
])
|
560
|
+
after_connect.handle(options)
|
561
|
+
http_obj.mu_unlock
|
562
|
+
|
563
|
+
res_klass = options[:res_klass]
|
564
|
+
response_body = options[:response_body]
|
565
|
+
page = options[:page]
|
566
|
+
|
567
|
+
log.info("status: #{ page.code }") if log
|
568
|
+
|
569
|
+
if follow_meta_refresh
|
570
|
+
redirect_uri = nil
|
571
|
+
referer = page
|
572
|
+
if (page.respond_to?(:meta) && (redirect = page.meta.first))
|
573
|
+
redirect_uri = redirect.uri.to_s
|
574
|
+
sleep redirect.node['delay'].to_f
|
575
|
+
referer = Page.new(nil, {'content-type'=>'text/html'})
|
576
|
+
elsif refresh = response['refresh']
|
577
|
+
delay, redirect_uri = Page::Meta.parse(refresh, uri)
|
578
|
+
raise StandardError, "Invalid refresh http header" unless delay
|
579
|
+
if redirects + 1 > redirection_limit
|
580
|
+
raise RedirectLimitReachedError.new(page, redirects)
|
581
|
+
end
|
582
|
+
sleep delay.to_f
|
583
|
+
end
|
584
|
+
if redirect_uri
|
585
|
+
@history.push(page, page.uri)
|
586
|
+
return fetch_page(
|
587
|
+
:uri => redirect_uri,
|
588
|
+
:referer => referer,
|
589
|
+
:params => [],
|
590
|
+
:verb => :get,
|
591
|
+
:redirects => redirects + 1
|
592
|
+
)
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
return page if res_klass <= Net::HTTPSuccess
|
597
|
+
|
598
|
+
if res_klass == Net::HTTPNotModified
|
599
|
+
log.debug("Got cached page") if log
|
600
|
+
return visited_page(uri) || page
|
601
|
+
elsif res_klass <= Net::HTTPRedirection
|
602
|
+
return page unless follow_redirect?
|
603
|
+
log.info("follow redirect to: #{ response['Location'] }") if log
|
604
|
+
from_uri = page.uri
|
605
|
+
raise RedirectLimitReachedError.new(page, redirects) if redirects + 1 > redirection_limit
|
606
|
+
redirect_verb = options[:verb] == :head ? :head : :get
|
607
|
+
page = fetch_page( :uri => response['Location'].to_s,
|
608
|
+
:referer => page,
|
609
|
+
:params => [],
|
610
|
+
:verb => redirect_verb,
|
611
|
+
:redirects => redirects + 1
|
612
|
+
)
|
613
|
+
@history.push(page, from_uri)
|
614
|
+
return page
|
615
|
+
elsif res_klass <= Net::HTTPUnauthorized
|
616
|
+
raise ResponseCodeError.new(page) unless @user || @password
|
617
|
+
raise ResponseCodeError.new(page) if @auth_hash.has_key?(uri.host)
|
618
|
+
if response['www-authenticate'] =~ /Digest/i
|
619
|
+
@auth_hash[uri.host] = :digest
|
620
|
+
if response['server'] =~ /Microsoft-IIS/
|
621
|
+
@auth_hash[uri.host] = :iis_digest
|
622
|
+
end
|
623
|
+
@digest = response['www-authenticate']
|
624
|
+
else
|
625
|
+
@auth_hash[uri.host] = :basic
|
626
|
+
end
|
627
|
+
return fetch_page( :uri => uri,
|
628
|
+
:referer => cur_page,
|
629
|
+
:verb => request.method.downcase.to_sym,
|
630
|
+
:params => request_data,
|
631
|
+
:headers => options[:headers]
|
632
|
+
)
|
633
|
+
end
|
634
|
+
|
635
|
+
raise ResponseCodeError.new(page), "Unhandled response", caller
|
636
|
+
end
|
637
|
+
|
638
|
+
def add_to_history(page)
|
639
|
+
@history.push(page, resolve(page.uri))
|
640
|
+
history_added.call(page) if history_added
|
641
|
+
end
|
642
|
+
end
|
643
|
+
|
644
|
+
module WWW
|
645
|
+
def self.const_missing klass
|
646
|
+
warn <<eomsg
|
647
|
+
!!!!! DEPRECATION NOTICE !!!!!
|
648
|
+
The WWW constant is deprecated, please switch to the new top-level Mechanize
|
649
|
+
constant. WWW will be removed in Mechanize version 2.0
|
650
|
+
|
651
|
+
You've referenced the WWW constant from #{caller.first}, please
|
652
|
+
switch the "WWW" to "Mechanize". Thanks!
|
653
|
+
|
654
|
+
Sincerely,
|
655
|
+
|
656
|
+
Pew Pew Pew
|
657
|
+
eomsg
|
658
|
+
Object.const_get(klass)
|
659
|
+
end
|
660
|
+
end
|