akamai_bookmarklet 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/bin/nokogiri +3 -0
- data/bin/rackup +3 -0
- data/config.ru +6 -0
- data/lib/akamai_bookmarklet.rb +2 -0
- data/lib/application/application.rb +34 -0
- data/lib/application/views/bookmarklet.html.erb +22 -0
- data/lib/application/views/purge.js.erb +32 -0
- data/test/helper.rb +10 -0
- data/test/test_akamai_bookmarklet.rb +7 -0
- data/vendor/gems/environment.rb +4 -0
- data/vendor/gems/ruby/1.8/cache/akamai-0.0.1.gem +0 -0
- data/vendor/gems/ruby/1.8/cache/casrack_the_authenticator-1.6.0.gem +0 -0
- data/vendor/gems/ruby/1.8/cache/nokogiri-1.3.3.gem +0 -0
- data/vendor/gems/ruby/1.8/cache/rack-1.1.0.gem +0 -0
- data/vendor/gems/ruby/1.8/cache/sinatra-0.9.4.gem +0 -0
- data/vendor/gems/ruby/1.8/environment.rb +112 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/.document +5 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/.gitignore +21 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/LICENSE +20 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/README.rdoc +17 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/Rakefile +53 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/VERSION +1 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/lib/akamai.rb +54 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/test/helper.rb +10 -0
- data/vendor/gems/ruby/1.8/gems/akamai-0.0.1/test/test_akamai.rb +7 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/.gitignore +3 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/README.rdoc +87 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/Rakefile +7 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/VERSION +1 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/casrack_the_authenticator.gemspec +83 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/developer_tasks/doc.rake +22 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/developer_tasks/gem.rake +20 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/developer_tasks/test.rake +24 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/fake.feature +34 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/require_cas.feature +19 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/simple.feature +32 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/step_definitions/fake_cas_steps.rb +14 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/step_definitions/rack_steps.rb +69 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/support/assertions.rb +3 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/features/support/rack_support.rb +89 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator/configuration.rb +88 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator/fake.rb +49 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator/require_cas.rb +36 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator/service_ticket_validator.rb +55 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator/simple.rb +82 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/lib/casrack_the_authenticator.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/test/configuration_test.rb +83 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/test/fake_test.rb +94 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/test/service_ticket_validator_test.rb +85 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/test/simple_test.rb +131 -0
- data/vendor/gems/ruby/1.8/gems/casrack_the_authenticator-1.6.0/test/test_helper.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/.autotest +27 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/.require_paths +3 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/CHANGELOG.ja.rdoc +285 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/CHANGELOG.rdoc +272 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/Manifest.txt +254 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/README.ja.rdoc +107 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/README.rdoc +121 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/Rakefile +208 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/bin/nokogiri +47 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/Makefile +150 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/conftest.dSYM/Contents/Info.plist +25 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/conftest.dSYM/Contents/Resources/DWARF/conftest +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/extconf.rb +161 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_document.c +181 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_document.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_document.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_element_description.c +272 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_element_description.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_element_description.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_entity_lookup.c +30 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_entity_lookup.h +8 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_entity_lookup.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_sax_parser.c +57 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_sax_parser.h +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/html_sax_parser.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/mkmf.log +248 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.bundle +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.c +83 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.h +149 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_attr.c +92 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_attr.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_attr.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_cdata.c +53 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_cdata.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_cdata.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_comment.c +51 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_comment.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_comment.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document.c +318 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document.h +24 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document_fragment.c +48 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document_fragment.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_document_fragment.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_dtd.c +135 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_dtd.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_dtd.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_entity_reference.c +50 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_entity_reference.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_entity_reference.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_io.c +24 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_io.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_io.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_namespace.c +74 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_namespace.h +12 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_namespace.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node.c +955 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node.h +14 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node_set.c +390 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node_set.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_node_set.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_processing_instruction.c +54 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_processing_instruction.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_processing_instruction.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_reader.c +565 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_reader.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_reader.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_relax_ng.c +159 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_relax_ng.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_relax_ng.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_parser.c +345 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_parser.h +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_parser.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_push_parser.c +86 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_push_parser.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_sax_push_parser.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_schema.c +156 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_schema.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_schema.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_syntax_error.c +210 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_syntax_error.h +13 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_syntax_error.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_text.c +47 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_text.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_text.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath.c +53 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath.h +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath_context.c +252 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath_context.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xml_xpath_context.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xslt_stylesheet.c +131 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xslt_stylesheet.h +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/ext/nokogiri/xslt_stylesheet.o +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/action-nokogiri.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/generated_parser.rb +646 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/generated_tokenizer.rb +142 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/node.rb +107 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/parser.rb +82 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/parser.y +227 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/syntax_error.rb +7 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/tokenizer.rb +7 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/tokenizer.rex +54 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css/xpath_visitor.rb +172 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/css.rb +25 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators/hpricot/node.rb +56 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators/hpricot/node_set.rb +54 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators/hpricot/xpath_visitor.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators/hpricot.rb +3 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators/slop.rb +33 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/decorators.rb +2 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/html/document.rb +37 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/html/element_description.rb +85 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/html/entity_lookup.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/html/sax/parser.rb +21 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/io_callbacks.rb +40 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/libxml.rb +322 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/common_node.rb +26 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/html_elem_desc.rb +24 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/html_entity_desc.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_alloc.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_attr.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_buffer.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_document.rb +108 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_dtd.rb +26 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_node.rb +28 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_node_set.rb +53 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_notation.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_ns.rb +15 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_relax_ng.rb +14 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_sax_handler.rb +51 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +14 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_schema.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_syntax_error.rb +31 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_text_reader.rb +12 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_xpath_context.rb +37 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_xpath_object.rb +35 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +20 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/attr.rb +41 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/cdata.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/comment.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/document.rb +118 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/document_fragment.rb +26 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/dtd.rb +58 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/entity_reference.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/namespace.rb +44 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/node.rb +404 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/node_set.rb +133 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/processing_instruction.rb +20 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/reader.rb +206 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/relax_ng.rb +85 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/sax/parser.rb +149 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/sax/push_parser.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/schema.rb +92 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/syntax_error.rb +76 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/text.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/xpath.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xml/xpath_context.rb +135 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/ffi/xslt/stylesheet.rb +47 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/hpricot.rb +92 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/builder.rb +35 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/document.rb +73 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/document_fragment.rb +15 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/element_description.rb +23 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/entity_lookup.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html/sax/parser.rb +48 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/html.rb +34 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle +0 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/syntax_error.rb +4 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/version.rb +33 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/version_warning.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/attr.rb +9 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/builder.rb +297 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/cdata.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/document.rb +117 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/document_fragment.rb +49 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/dtd.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/entity_declaration.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/fragment_handler.rb +60 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/namespace.rb +7 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/node/save_options.rb +42 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/node.rb +647 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/node_set.rb +285 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/notation.rb +6 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/parse_options.rb +85 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/processing_instruction.rb +8 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/reader.rb +66 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/relax_ng.rb +32 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/sax/document.rb +143 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/sax/legacy_handlers.rb +65 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/sax/parser.rb +108 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/sax/push_parser.rb +63 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/sax.rb +4 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/schema.rb +61 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/syntax_error.rb +34 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/xpath/syntax_error.rb +8 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/xpath.rb +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml/xpath_context.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xml.rb +62 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xslt/stylesheet.rb +25 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/xslt.rb +48 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri.rb +116 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/lib/xsd/xmlparser/nokogiri.rb +71 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/tasks/test.rb +100 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/css/test_nthiness.rb +159 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/css/test_parser.rb +277 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/css/test_tokenizer.rb +183 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/css/test_xpath_visitor.rb +76 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/ffi/test_document.rb +35 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/2ch.html +108 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/address_book.rlx +12 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/address_book.xml +10 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/bar/bar.xsd +4 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/dont_hurt_em_why.xml +422 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/exslt.xml +8 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/exslt.xslt +35 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/foo/foo.xsd +4 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/po.xml +32 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/po.xsd +66 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/shift_jis.xml +5 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/snuggles.xml +3 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/staff.xml +59 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/staff.xslt +32 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/tlm.html +850 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/files/valid_bar.xml +2 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/helper.rb +127 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/basic.xhtml +17 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/boingboing.html +2266 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/cy0.html +3653 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/immob.html +400 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/pace_application.html +1320 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/tenderlove.html +16 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/uswebgen.html +220 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/utf8.html +1054 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/week9.html +1723 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/files/why.xml +19 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/load_files.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_alter.rb +68 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_builder.rb +20 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_parser.rb +350 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_paths.rb +15 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_preserved.rb +77 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/hpricot/test_xml.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/sax/test_parser.rb +64 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_builder.rb +158 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_document.rb +368 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_document_encoding.rb +63 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_document_fragment.rb +123 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_element_description.rb +95 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_named_characters.rb +14 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/html/test_node.rb +168 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_convert_xpath.rb +137 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_css_cache.rb +45 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_gc.rb +15 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_memory_leak.rb +77 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_nokogiri.rb +134 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_reader.rb +330 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/test_xslt_transforms.rb +131 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/node/test_save_options.rb +20 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/node/test_subclass.rb +44 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/sax/test_parser.rb +246 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/sax/test_push_parser.rb +96 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_attr.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_builder.rb +73 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_cdata.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_comment.rb +23 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_document.rb +466 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_document_encoding.rb +26 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_document_fragment.rb +88 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_dtd.rb +47 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_dtd_encoding.rb +31 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_entity_reference.rb +21 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_namespace.rb +48 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_node.rb +823 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_node_attributes.rb +34 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_node_encoding.rb +107 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_node_set.rb +397 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_parse_options.rb +52 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_processing_instruction.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_reader_encoding.rb +126 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_relax_ng.rb +60 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_schema.rb +89 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_text.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_unparented_node.rb +381 -0
- data/vendor/gems/ruby/1.8/gems/nokogiri-1.3.3/test/xml/test_xpath.rb +106 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/COPYING +18 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/KNOWN-ISSUES +21 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/RDOX +0 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/README +399 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/SPEC +171 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/bin/rackup +4 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/contrib/rack_logo.svg +111 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/example/lobster.ru +4 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/example/protectedlobster.rb +14 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/example/protectedlobster.ru +8 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/adapter/camping.rb +22 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/abstract/handler.rb +37 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/abstract/request.rb +37 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/basic.rb +58 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/digest/md5.rb +124 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/digest/nonce.rb +51 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/digest/params.rb +55 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/auth/digest/request.rb +40 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/builder.rb +80 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/cascade.rb +41 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/chunked.rb +49 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb +49 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/conditionalget.rb +47 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/config.rb +15 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/content_length.rb +29 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/content_type.rb +23 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/deflater.rb +96 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/directory.rb +157 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/etag.rb +23 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/file.rb +90 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/cgi.rb +61 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/evented_mongrel.rb +8 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/fastcgi.rb +89 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/lsws.rb +63 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb +90 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/scgi.rb +62 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/swiftiplied_mongrel.rb +8 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/thin.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb +69 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/handler.rb +88 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/head.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/lint.rb +575 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/lobster.rb +65 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/lock.rb +16 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/logger.rb +20 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb +27 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/mime.rb +206 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/mock.rb +189 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/nulllogger.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/recursive.rb +57 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/reloader.rb +109 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/request.rb +271 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/response.rb +149 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/rewindable_input.rb +100 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/runtime.rb +27 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/sendfile.rb +142 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/server.rb +212 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/session/abstract/id.rb +140 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb +90 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/session/memcache.rb +119 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/session/pool.rb +100 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb +349 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/showstatus.rb +106 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/static.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb +56 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/utils.rb +620 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack.rb +92 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/rack.gemspec +38 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_auth_basic.rb +73 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_auth_digest.rb +226 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_builder.rb +84 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_camping.rb +51 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_cascade.rb +48 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_cgi.rb +89 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_chunked.rb +62 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_commonlogger.rb +61 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_conditionalget.rb +41 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_config.rb +24 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_content_length.rb +43 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_content_type.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_deflater.rb +127 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_directory.rb +61 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_etag.rb +17 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_fastcgi.rb +89 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_file.rb +75 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_handler.rb +43 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_head.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_lint.rb +528 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_lobster.rb +45 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_lock.rb +38 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_logger.rb +21 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_methodoverride.rb +60 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_mock.rb +243 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_mongrel.rb +189 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_nulllogger.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_recursive.rb +77 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_request.rb +545 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_response.rb +221 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_rewindable_input.rb +118 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_runtime.rb +35 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_sendfile.rb +86 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_session_cookie.rb +73 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_session_memcache.rb +273 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_session_pool.rb +172 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_showexceptions.rb +21 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_showstatus.rb +72 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_static.rb +37 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_thin.rb +91 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_urlmap.rb +215 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_utils.rb +552 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rack_webrick.rb +130 -0
- data/vendor/gems/ruby/1.8/gems/rack-1.1.0/test/spec_rackup.rb +154 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/AUTHORS +41 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/CHANGES +385 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/LICENSE +22 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/README.rdoc +573 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/Rakefile +138 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/app_test.rb +282 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/application_test.rb +262 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/builder_test.rb +101 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/compat_test.rb +12 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/custom_error_test.rb +62 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/erb_test.rb +136 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/events_test.rb +78 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/filter_test.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/haml_test.rb +236 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/helper.rb +33 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/mapped_error_test.rb +72 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/pipeline_test.rb +45 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/public/foo.xml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/sass_test.rb +67 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/sessions_test.rb +42 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/streaming_test.rb +133 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/sym_params_test.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/template_test.rb +30 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/use_in_file_templates_test.rb +47 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo.builder +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo.erb +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo.haml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo.sass +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo_layout.erb +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/foo_layout.haml +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/foo.builder +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/foo.erb +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/foo.haml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/foo.sass +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/layout.builder +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/layout.erb +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/layout.haml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/layout_test/layout.sass +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/no_layout/no_layout.builder +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/compat/views/no_layout/no_layout.haml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb +1119 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/compat.rb +266 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/images/404.png +0 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/images/500.png +0 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb +35 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/showexceptions.rb +303 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/test/bacon.rb +19 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/test/rspec.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/test/spec.rb +11 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/test/unit.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra/test.rb +128 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra.rb +8 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/sinatra.gemspec +125 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/base_test.rb +160 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/builder_test.rb +65 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/contest.rb +64 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/data/reload_app_file.rb +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/erb_test.rb +81 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/extensions_test.rb +100 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/filter_test.rb +99 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/haml_test.rb +90 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/helper.rb +76 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/helpers_test.rb +503 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/mapped_error_test.rb +155 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/middleware_test.rb +68 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/options_test.rb +372 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/render_backtrace_test.rb +145 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/request_test.rb +18 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/response_test.rb +42 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/result_test.rb +98 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/route_added_hook_test.rb +59 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/routing_test.rb +784 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/sass_test.rb +79 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/server_test.rb +47 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/sinatra_test.rb +13 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/static_test.rb +80 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/templates_test.rb +122 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/test_test.rb +152 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/error.builder +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/error.erb +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/error.haml +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/error.sass +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/foo/hello.test +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/hello.builder +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/hello.erb +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/hello.haml +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/hello.sass +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/hello.test +1 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/layout2.builder +3 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/layout2.erb +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/layout2.haml +2 -0
- data/vendor/gems/ruby/1.8/gems/sinatra-0.9.4/test/views/layout2.test +1 -0
- data/vendor/gems/ruby/1.8/specifications/akamai-0.0.1.gemspec +33 -0
- data/vendor/gems/ruby/1.8/specifications/casrack_the_authenticator-1.6.0.gemspec +45 -0
- data/vendor/gems/ruby/1.8/specifications/nokogiri-1.3.3.gemspec +50 -0
- data/vendor/gems/ruby/1.8/specifications/rack-1.1.0.gemspec +57 -0
- data/vendor/gems/ruby/1.8/specifications/sinatra-0.9.4.gemspec +40 -0
- metadata +621 -0
@@ -0,0 +1,647 @@
|
|
1
|
+
require 'stringio'
|
2
|
+
require 'nokogiri/xml/node/save_options'
|
3
|
+
|
4
|
+
module Nokogiri
|
5
|
+
module XML
|
6
|
+
####
|
7
|
+
# Nokogiri::XML::Node is your window to the fun filled world of dealing
|
8
|
+
# with XML and HTML tags. A Nokogiri::XML::Node may be treated similarly
|
9
|
+
# to a hash with regard to attributes. For example (from irb):
|
10
|
+
#
|
11
|
+
# irb(main):004:0> node
|
12
|
+
# => <a href="#foo" id="link">link</a>
|
13
|
+
# irb(main):005:0> node['href']
|
14
|
+
# => "#foo"
|
15
|
+
# irb(main):006:0> node.keys
|
16
|
+
# => ["href", "id"]
|
17
|
+
# irb(main):007:0> node.values
|
18
|
+
# => ["#foo", "link"]
|
19
|
+
# irb(main):008:0> node['class'] = 'green'
|
20
|
+
# => "green"
|
21
|
+
# irb(main):009:0> node
|
22
|
+
# => <a href="#foo" id="link" class="green">link</a>
|
23
|
+
# irb(main):010:0>
|
24
|
+
#
|
25
|
+
# See Nokogiri::XML::Node#[] and Nokogiri::XML#[]= for more information.
|
26
|
+
#
|
27
|
+
# Nokogiri::XML::Node also has methods that let you move around your
|
28
|
+
# tree. For navigating your tree, see:
|
29
|
+
#
|
30
|
+
# * Nokogiri::XML::Node#parent
|
31
|
+
# * Nokogiri::XML::Node#children
|
32
|
+
# * Nokogiri::XML::Node#next
|
33
|
+
# * Nokogiri::XML::Node#previous
|
34
|
+
#
|
35
|
+
# You may search this node's subtree using Node#xpath and Node#css
|
36
|
+
class Node
|
37
|
+
# Element node type, see Nokogiri::XML::Node#element?
|
38
|
+
ELEMENT_NODE = 1
|
39
|
+
# Attribute node type
|
40
|
+
ATTRIBUTE_NODE = 2
|
41
|
+
# Text node type, see Nokogiri::XML::Node#text?
|
42
|
+
TEXT_NODE = 3
|
43
|
+
# CDATA node type, see Nokogiri::XML::Node#cdata?
|
44
|
+
CDATA_SECTION_NODE = 4
|
45
|
+
# Entity reference node type
|
46
|
+
ENTITY_REF_NODE = 5
|
47
|
+
# Entity node type
|
48
|
+
ENTITY_NODE = 6
|
49
|
+
# PI node type
|
50
|
+
PI_NODE = 7
|
51
|
+
# Comment node type, see Nokogiri::XML::Node#comment?
|
52
|
+
COMMENT_NODE = 8
|
53
|
+
# Document node type, see Nokogiri::XML::Node#xml?
|
54
|
+
DOCUMENT_NODE = 9
|
55
|
+
# Document type node type
|
56
|
+
DOCUMENT_TYPE_NODE = 10
|
57
|
+
# Document fragment node type
|
58
|
+
DOCUMENT_FRAG_NODE = 11
|
59
|
+
# Notation node type
|
60
|
+
NOTATION_NODE = 12
|
61
|
+
# HTML document node type, see Nokogiri::XML::Node#html?
|
62
|
+
HTML_DOCUMENT_NODE = 13
|
63
|
+
# DTD node type
|
64
|
+
DTD_NODE = 14
|
65
|
+
# Element declaration type
|
66
|
+
ELEMENT_DECL = 15
|
67
|
+
# Attribute declaration type
|
68
|
+
ATTRIBUTE_DECL = 16
|
69
|
+
# Entity declaration type
|
70
|
+
ENTITY_DECL = 17
|
71
|
+
# Namespace declaration type
|
72
|
+
NAMESPACE_DECL = 18
|
73
|
+
# XInclude start type
|
74
|
+
XINCLUDE_START = 19
|
75
|
+
# XInclude end type
|
76
|
+
XINCLUDE_END = 20
|
77
|
+
# DOCB document node type
|
78
|
+
DOCB_DOCUMENT_NODE = 21
|
79
|
+
|
80
|
+
def initialize name, document
|
81
|
+
# ... Ya. This is empty on purpose.
|
82
|
+
end
|
83
|
+
|
84
|
+
###
|
85
|
+
# Decorate this node with the decorators set up in this node's Document
|
86
|
+
def decorate!
|
87
|
+
document.decorate(self)
|
88
|
+
end
|
89
|
+
|
90
|
+
###
|
91
|
+
# Search this node for +paths+. +paths+ can be XPath or CSS, and an
|
92
|
+
# optional hash of namespaces may be appended.
|
93
|
+
# See Node#xpath and Node#css.
|
94
|
+
def search *paths
|
95
|
+
ns = paths.last.is_a?(Hash) ? paths.pop :
|
96
|
+
(document.root ? document.root.namespaces : {})
|
97
|
+
xpath(*(paths.map { |path|
|
98
|
+
path = path.to_s
|
99
|
+
path =~ /^(\.\/|\/)/ ? path : CSS.xpath_for(
|
100
|
+
path,
|
101
|
+
:prefix => ".//",
|
102
|
+
:ns => ns
|
103
|
+
)
|
104
|
+
}.flatten.uniq) + [ns])
|
105
|
+
end
|
106
|
+
alias :/ :search
|
107
|
+
|
108
|
+
###
|
109
|
+
# Search this node for XPath +paths+. +paths+ must be one or more XPath
|
110
|
+
# queries. A hash of namespaces may be appended. For example:
|
111
|
+
#
|
112
|
+
# node.xpath('.//title')
|
113
|
+
# node.xpath('.//foo:name', { 'foo' => 'http://example.org/' })
|
114
|
+
# node.xpath('.//xmlns:name', node.root.namespaces)
|
115
|
+
#
|
116
|
+
# Custom XPath functions may also be defined. To define custom functions
|
117
|
+
# create a class and implement the # function you want to define.
|
118
|
+
# For example:
|
119
|
+
#
|
120
|
+
# node.xpath('.//title[regex(., "\w+")]', Class.new {
|
121
|
+
# def regex node_set, regex
|
122
|
+
# node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ }
|
123
|
+
# end
|
124
|
+
# }.new)
|
125
|
+
#
|
126
|
+
def xpath *paths
|
127
|
+
# Pop off our custom function handler if it exists
|
128
|
+
handler = ![
|
129
|
+
Hash, String, Symbol
|
130
|
+
].include?(paths.last.class) ? paths.pop : nil
|
131
|
+
|
132
|
+
ns = paths.last.is_a?(Hash) ? paths.pop :
|
133
|
+
(document.root ? document.root.namespaces : {})
|
134
|
+
|
135
|
+
return NodeSet.new(document) unless document
|
136
|
+
|
137
|
+
sets = paths.map { |path|
|
138
|
+
ctx = XPathContext.new(self)
|
139
|
+
ctx.register_namespaces(ns)
|
140
|
+
set = ctx.evaluate(path, handler).node_set
|
141
|
+
set.document = document
|
142
|
+
document.decorate(set)
|
143
|
+
set
|
144
|
+
}
|
145
|
+
return sets.first if sets.length == 1
|
146
|
+
|
147
|
+
NodeSet.new(document) do |combined|
|
148
|
+
document.decorate(combined)
|
149
|
+
sets.each do |set|
|
150
|
+
set.each do |node|
|
151
|
+
combined << node
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
###
|
158
|
+
# Search this node for CSS +rules+. +rules+ must be one or more CSS
|
159
|
+
# selectors. For example:
|
160
|
+
#
|
161
|
+
# node.css('title')
|
162
|
+
# node.css('body h1.bold')
|
163
|
+
# node.css('div + p.green', 'div#one')
|
164
|
+
#
|
165
|
+
# Custom CSS pseudo classes may also be defined. To define custom pseudo
|
166
|
+
# classes, create a class and implement the custom pseudo class you
|
167
|
+
# want defined. The first argument to the method will be the current
|
168
|
+
# matching NodeSet. Any other arguments are ones that you pass in.
|
169
|
+
# For example:
|
170
|
+
#
|
171
|
+
# node.css('title:regex("\w+")', Class.new {
|
172
|
+
# def regex node_set, regex
|
173
|
+
# node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ }
|
174
|
+
# end
|
175
|
+
# }.new)
|
176
|
+
#
|
177
|
+
def css *rules
|
178
|
+
# Pop off our custom function handler if it exists
|
179
|
+
handler = ![
|
180
|
+
Hash, String, Symbol
|
181
|
+
].include?(rules.last.class) ? rules.pop : nil
|
182
|
+
|
183
|
+
ns = rules.last.is_a?(Hash) ? rules.pop :
|
184
|
+
(document.root ? document.root.namespaces : {})
|
185
|
+
|
186
|
+
rules = rules.map { |rule|
|
187
|
+
CSS.xpath_for(rule, :prefix => ".//", :ns => ns)
|
188
|
+
}.flatten.uniq + [ns, handler].compact
|
189
|
+
|
190
|
+
xpath(*rules)
|
191
|
+
end
|
192
|
+
|
193
|
+
###
|
194
|
+
# Search for the first occurrence of +path+.
|
195
|
+
# Returns nil if nothing is found, otherwise a Node.
|
196
|
+
def at path, ns = document.root ? document.root.namespaces : {}
|
197
|
+
search(path, ns).first
|
198
|
+
end
|
199
|
+
alias :% :at
|
200
|
+
|
201
|
+
###
|
202
|
+
# Get the attribute value for the attribute +name+
|
203
|
+
def [] name
|
204
|
+
return nil unless key?(name.to_s)
|
205
|
+
get(name.to_s)
|
206
|
+
end
|
207
|
+
|
208
|
+
alias :next :next_sibling
|
209
|
+
alias :previous :previous_sibling
|
210
|
+
alias :remove :unlink
|
211
|
+
alias :get_attribute :[]
|
212
|
+
alias :set_attribute :[]=
|
213
|
+
alias :text :content
|
214
|
+
alias :inner_text :content
|
215
|
+
alias :has_attribute? :key?
|
216
|
+
alias :<< :add_child
|
217
|
+
alias :name :node_name
|
218
|
+
alias :name= :node_name=
|
219
|
+
alias :type :node_type
|
220
|
+
alias :to_str :text
|
221
|
+
alias :clone :dup
|
222
|
+
|
223
|
+
####
|
224
|
+
# Returns a hash containing the node's attributes. The key is the
|
225
|
+
# attribute name, the value is the string value of the attribute.
|
226
|
+
def attributes
|
227
|
+
Hash[*(attribute_nodes.map { |node|
|
228
|
+
[node.node_name, node]
|
229
|
+
}.flatten)]
|
230
|
+
end
|
231
|
+
|
232
|
+
###
|
233
|
+
# Get the attribute values for this Node.
|
234
|
+
def values
|
235
|
+
attribute_nodes.map { |node| node.value }
|
236
|
+
end
|
237
|
+
|
238
|
+
###
|
239
|
+
# Get the attribute names for this Node.
|
240
|
+
def keys
|
241
|
+
attribute_nodes.map { |node| node.node_name }
|
242
|
+
end
|
243
|
+
|
244
|
+
###
|
245
|
+
# Iterate over each attribute name and value pair for this Node.
|
246
|
+
def each &block
|
247
|
+
attribute_nodes.each { |node|
|
248
|
+
block.call(node.node_name, node.value)
|
249
|
+
}
|
250
|
+
end
|
251
|
+
|
252
|
+
###
|
253
|
+
# Remove the attribute named +name+
|
254
|
+
def remove_attribute name
|
255
|
+
attributes[name].remove if key? name
|
256
|
+
end
|
257
|
+
alias :delete :remove_attribute
|
258
|
+
|
259
|
+
###
|
260
|
+
# Returns true if this Node matches +selector+
|
261
|
+
def matches? selector
|
262
|
+
document.search(selector).include?(self)
|
263
|
+
end
|
264
|
+
|
265
|
+
####
|
266
|
+
# Create nodes from +data+ and insert them before this node
|
267
|
+
# (as a sibling).
|
268
|
+
def before data
|
269
|
+
fragment(data).children.each do |node|
|
270
|
+
add_previous_sibling node
|
271
|
+
end
|
272
|
+
self
|
273
|
+
end
|
274
|
+
|
275
|
+
####
|
276
|
+
# Create nodes from +data+ and insert them after this node
|
277
|
+
# (as a sibling).
|
278
|
+
def after data
|
279
|
+
fragment(data).children.to_a.reverse.each do |node|
|
280
|
+
add_next_sibling node
|
281
|
+
end
|
282
|
+
self
|
283
|
+
end
|
284
|
+
|
285
|
+
####
|
286
|
+
# Swap this Node for new nodes made from +data+
|
287
|
+
def swap data
|
288
|
+
before(data)
|
289
|
+
remove
|
290
|
+
self
|
291
|
+
end
|
292
|
+
|
293
|
+
####
|
294
|
+
# Set the inner_html for this Node to +tags+
|
295
|
+
def inner_html= tags
|
296
|
+
children.each { |x| x.remove}
|
297
|
+
|
298
|
+
fragment(tags).children.to_a.each do |node|
|
299
|
+
add_child node
|
300
|
+
end
|
301
|
+
self
|
302
|
+
end
|
303
|
+
|
304
|
+
def fragment tags # :nodoc:
|
305
|
+
# TODO: deprecate?
|
306
|
+
document.fragment(tags)
|
307
|
+
end
|
308
|
+
|
309
|
+
####
|
310
|
+
# Set the Node content to +string+. The content gets XML escaped.
|
311
|
+
def content= string
|
312
|
+
self.native_content = encode_special_chars(string.to_s)
|
313
|
+
end
|
314
|
+
|
315
|
+
###
|
316
|
+
# Set the parent Node for this Node
|
317
|
+
def parent= parent_node
|
318
|
+
parent_node.add_child(self)
|
319
|
+
parent_node
|
320
|
+
end
|
321
|
+
|
322
|
+
###
|
323
|
+
# Get a hash containing the Namespace definitions for this Node
|
324
|
+
def namespaces
|
325
|
+
Hash[*namespace_definitions.map { |nd|
|
326
|
+
key = ['xmlns', nd.prefix].compact.join(':')
|
327
|
+
if RUBY_VERSION >= '1.9' && document.encoding
|
328
|
+
begin
|
329
|
+
key.force_encoding document.encoding
|
330
|
+
rescue ArgumentError
|
331
|
+
end
|
332
|
+
end
|
333
|
+
[key, nd.href]
|
334
|
+
}.flatten]
|
335
|
+
end
|
336
|
+
|
337
|
+
# Returns true if this is a Comment
|
338
|
+
def comment?
|
339
|
+
type == COMMENT_NODE
|
340
|
+
end
|
341
|
+
|
342
|
+
# Returns true if this is a CDATA
|
343
|
+
def cdata?
|
344
|
+
type == CDATA_SECTION_NODE
|
345
|
+
end
|
346
|
+
|
347
|
+
# Returns true if this is an XML::Document node
|
348
|
+
def xml?
|
349
|
+
type == DOCUMENT_NODE
|
350
|
+
end
|
351
|
+
|
352
|
+
# Returns true if this is an HTML::Document node
|
353
|
+
def html?
|
354
|
+
type == HTML_DOCUMENT_NODE
|
355
|
+
end
|
356
|
+
|
357
|
+
# Returns true if this is a Text node
|
358
|
+
def text?
|
359
|
+
type == TEXT_NODE
|
360
|
+
end
|
361
|
+
|
362
|
+
###
|
363
|
+
# Fetch the Nokogiri::HTML::ElementDescription for this node. Returns
|
364
|
+
# nil on XML documents and on unknown tags.
|
365
|
+
def description
|
366
|
+
return nil if document.xml?
|
367
|
+
Nokogiri::HTML::ElementDescription[name]
|
368
|
+
end
|
369
|
+
|
370
|
+
###
|
371
|
+
# Is this a read only node?
|
372
|
+
def read_only?
|
373
|
+
# According to gdome2, these are read-only node types
|
374
|
+
[NOTATION_NODE, ENTITY_NODE, ENTITY_DECL].include?(type)
|
375
|
+
end
|
376
|
+
|
377
|
+
# Returns true if this is an Element node
|
378
|
+
def element?
|
379
|
+
type == ELEMENT_NODE
|
380
|
+
end
|
381
|
+
alias :elem? :element?
|
382
|
+
|
383
|
+
###
|
384
|
+
# Turn this node in to a string. If the document is HTML, this method
|
385
|
+
# returns html. If the document is XML, this method returns XML.
|
386
|
+
def to_s
|
387
|
+
document.xml? ? to_xml : to_html
|
388
|
+
end
|
389
|
+
|
390
|
+
# Get the inner_html for this node's Node#children
|
391
|
+
def inner_html
|
392
|
+
children.map { |x| x.to_html }.join
|
393
|
+
end
|
394
|
+
|
395
|
+
# Get the path to this node as a CSS expression
|
396
|
+
def css_path
|
397
|
+
path.split(/\//).map { |part|
|
398
|
+
part.length == 0 ? nil : part.gsub(/\[(\d+)\]/, ':nth-of-type(\1)')
|
399
|
+
}.compact.join(' > ')
|
400
|
+
end
|
401
|
+
|
402
|
+
# recursively get all namespaces from this node and its subtree
|
403
|
+
def collect_namespaces
|
404
|
+
# TODO: print warning message if a prefix refers to more than one URI in the document?
|
405
|
+
ns = {}
|
406
|
+
traverse {|j| ns.merge!(j.namespaces)}
|
407
|
+
ns
|
408
|
+
end
|
409
|
+
|
410
|
+
###
|
411
|
+
# Get a list of ancestor Node for this Node. If +selector+ is given,
|
412
|
+
# the ancestors must match +selector+
|
413
|
+
def ancestors selector = nil
|
414
|
+
return NodeSet.new(document) unless respond_to?(:parent)
|
415
|
+
return NodeSet.new(document) unless parent
|
416
|
+
|
417
|
+
parents = [parent]
|
418
|
+
|
419
|
+
while parents.last.respond_to?(:parent)
|
420
|
+
break unless ctx_parent = parents.last.parent
|
421
|
+
parents << ctx_parent
|
422
|
+
end
|
423
|
+
|
424
|
+
return NodeSet.new(document, parents) unless selector
|
425
|
+
|
426
|
+
NodeSet.new(document, parents.find_all { |parent|
|
427
|
+
parent.matches?(selector)
|
428
|
+
})
|
429
|
+
end
|
430
|
+
|
431
|
+
###
|
432
|
+
# Set the default namespace for this node to +url+
|
433
|
+
def default_namespace= url
|
434
|
+
add_namespace_definition(nil, url)
|
435
|
+
end
|
436
|
+
alias :add_namespace :add_namespace_definition
|
437
|
+
|
438
|
+
###
|
439
|
+
# Set the namespace for this node to +ns+
|
440
|
+
def namespace= ns
|
441
|
+
if ns.document != document
|
442
|
+
raise ArgumentError, 'namespace must be declared on the same document'
|
443
|
+
end
|
444
|
+
unless ns.is_a? Nokogiri::XML::Namespace
|
445
|
+
raise TypeError, "#{ns.class} can't be coerced into Nokogiri::XML::Namespace"
|
446
|
+
end
|
447
|
+
set_namespace ns
|
448
|
+
end
|
449
|
+
|
450
|
+
####
|
451
|
+
# Yields self and all children to +block+ recursively.
|
452
|
+
def traverse &block
|
453
|
+
children.each{|j| j.traverse(&block) }
|
454
|
+
block.call(self)
|
455
|
+
end
|
456
|
+
|
457
|
+
###
|
458
|
+
# Accept a visitor. This method calls "visit" on +visitor+ with self.
|
459
|
+
def accept visitor
|
460
|
+
visitor.visit(self)
|
461
|
+
end
|
462
|
+
|
463
|
+
####
|
464
|
+
# replace this Node with the +new_node+ in the Document.
|
465
|
+
def replace new_node
|
466
|
+
if new_node.is_a?(Document) || !new_node.is_a?(XML::Node)
|
467
|
+
raise ArgumentError, <<-EOERR
|
468
|
+
Node.replace requires a Node argument, and cannot accept a Document.
|
469
|
+
(You probably want to select a node from the Document with at() or search(), or create a new Node via Node.new().)
|
470
|
+
EOERR
|
471
|
+
end
|
472
|
+
replace_with_node new_node
|
473
|
+
end
|
474
|
+
|
475
|
+
###
|
476
|
+
# Test to see if this Node is equal to +other+
|
477
|
+
def == other
|
478
|
+
return false unless other
|
479
|
+
return false unless other.respond_to?(:pointer_id)
|
480
|
+
pointer_id == other.pointer_id
|
481
|
+
end
|
482
|
+
|
483
|
+
###
|
484
|
+
# Serialize Node using +options+. Save options can also be set using a
|
485
|
+
# block. See SaveOptions.
|
486
|
+
#
|
487
|
+
# These two statements are equivalent:
|
488
|
+
#
|
489
|
+
# node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML)
|
490
|
+
#
|
491
|
+
# or
|
492
|
+
#
|
493
|
+
# node.serialize(:encoding => 'UTF-8') do |config|
|
494
|
+
# config.format.as_xml
|
495
|
+
# end
|
496
|
+
#
|
497
|
+
def serialize *args, &block
|
498
|
+
options = args.first.is_a?(Hash) ? args.shift : {
|
499
|
+
:encoding => args[0],
|
500
|
+
:save_with => args[1] || SaveOptions::FORMAT
|
501
|
+
}
|
502
|
+
|
503
|
+
outstring = ""
|
504
|
+
if document.encoding && outstring.respond_to?(:force_encoding)
|
505
|
+
outstring.force_encoding(Encoding.find(document.encoding))
|
506
|
+
end
|
507
|
+
io = StringIO.new(outstring)
|
508
|
+
write_to io, options, &block
|
509
|
+
io.string
|
510
|
+
end
|
511
|
+
|
512
|
+
###
|
513
|
+
# Serialize this Node to HTML
|
514
|
+
#
|
515
|
+
# doc.to_html
|
516
|
+
#
|
517
|
+
# See Node#write_to for a list of +options+. For formatted output,
|
518
|
+
# use Node#to_xhtml instead.
|
519
|
+
def to_html options = {}
|
520
|
+
# FIXME: this is a hack around broken libxml versions
|
521
|
+
return dump_html if %w[2 6] === LIBXML_VERSION.split('.')[0..1]
|
522
|
+
|
523
|
+
options[:save_with] ||= SaveOptions::FORMAT |
|
524
|
+
SaveOptions::NO_DECLARATION |
|
525
|
+
SaveOptions::NO_EMPTY_TAGS |
|
526
|
+
SaveOptions::AS_HTML
|
527
|
+
|
528
|
+
serialize(options)
|
529
|
+
end
|
530
|
+
|
531
|
+
###
|
532
|
+
# Serialize this Node to XML using +options+
|
533
|
+
#
|
534
|
+
# doc.to_xml(:indent => 5, :encoding => 'UTF-8')
|
535
|
+
#
|
536
|
+
# See Node#write_to for a list of +options+
|
537
|
+
def to_xml options = {}
|
538
|
+
encoding = nil
|
539
|
+
|
540
|
+
options[:save_with] ||= SaveOptions::FORMAT | SaveOptions::AS_XML
|
541
|
+
|
542
|
+
serialize(options)
|
543
|
+
end
|
544
|
+
|
545
|
+
###
|
546
|
+
# Serialize this Node to XHTML using +options+
|
547
|
+
#
|
548
|
+
# doc.to_xhtml(:indent => 5, :encoding => 'UTF-8')
|
549
|
+
#
|
550
|
+
# See Node#write_to for a list of +options+
|
551
|
+
def to_xhtml options = {}
|
552
|
+
# FIXME: this is a hack around broken libxml versions
|
553
|
+
return dump_html if %w[2 6] === LIBXML_VERSION.split('.')[0..1]
|
554
|
+
|
555
|
+
options[:save_with] ||= SaveOptions::FORMAT |
|
556
|
+
SaveOptions::NO_DECLARATION |
|
557
|
+
SaveOptions::NO_EMPTY_TAGS |
|
558
|
+
SaveOptions::AS_XHTML
|
559
|
+
|
560
|
+
serialize(options)
|
561
|
+
end
|
562
|
+
|
563
|
+
###
|
564
|
+
# Write Node to +io+ with +options+. +options+ modify the output of
|
565
|
+
# this method. Valid options are:
|
566
|
+
#
|
567
|
+
# * +:encoding+ for changing the encoding
|
568
|
+
# * +:indent_text+ the indentation text, defaults to one space
|
569
|
+
# * +:indent+ the number of +:indent_text+ to use, defaults to 2
|
570
|
+
# * +:save_with+ a combination of SaveOptions constants.
|
571
|
+
#
|
572
|
+
# To save with UTF-8 indented twice:
|
573
|
+
#
|
574
|
+
# node.write_to(io, :encoding => 'UTF-8', :indent => 2)
|
575
|
+
#
|
576
|
+
# To save indented with two dashes:
|
577
|
+
#
|
578
|
+
# node.write_to(io, :indent_text => '-', :indent => 2
|
579
|
+
#
|
580
|
+
def write_to io, *options
|
581
|
+
options = options.first.is_a?(Hash) ? options.shift : {}
|
582
|
+
encoding = options[:encoding] || options[0]
|
583
|
+
save_options = options[:save_with] || options[1] || SaveOptions::FORMAT
|
584
|
+
indent_text = options[:indent_text] || ' '
|
585
|
+
indent_times = options[:indent] || 2
|
586
|
+
|
587
|
+
|
588
|
+
config = SaveOptions.new(save_options)
|
589
|
+
yield config if block_given?
|
590
|
+
|
591
|
+
native_write_to(io, encoding, indent_text * indent_times, config.options)
|
592
|
+
end
|
593
|
+
|
594
|
+
###
|
595
|
+
# Write Node as HTML to +io+ with +options+
|
596
|
+
#
|
597
|
+
# See Node#write_to for a list of +options+
|
598
|
+
def write_html_to io, options = {}
|
599
|
+
# FIXME: this is a hack around broken libxml versions
|
600
|
+
return (io << dump_html) if %w[2 6] === LIBXML_VERSION.split('.')[0..1]
|
601
|
+
|
602
|
+
options[:save_with] ||= SaveOptions::FORMAT |
|
603
|
+
SaveOptions::NO_DECLARATION |
|
604
|
+
SaveOptions::NO_EMPTY_TAGS |
|
605
|
+
SaveOptions::AS_HTML
|
606
|
+
write_to io, options
|
607
|
+
end
|
608
|
+
|
609
|
+
###
|
610
|
+
# Write Node as XHTML to +io+ with +options+
|
611
|
+
#
|
612
|
+
# See Node#write_to for a list of +options+
|
613
|
+
def write_xhtml_to io, options = {}
|
614
|
+
# FIXME: this is a hack around broken libxml versions
|
615
|
+
return (io << dump_html) if %w[2 6] === LIBXML_VERSION.split('.')[0..1]
|
616
|
+
|
617
|
+
options[:save_with] ||= SaveOptions::FORMAT |
|
618
|
+
SaveOptions::NO_DECLARATION |
|
619
|
+
SaveOptions::NO_EMPTY_TAGS |
|
620
|
+
SaveOptions::AS_XHTML
|
621
|
+
write_to io, options
|
622
|
+
end
|
623
|
+
|
624
|
+
###
|
625
|
+
# Write Node as XML to +io+ with +options+
|
626
|
+
#
|
627
|
+
# doc.write_xml_to io, :encoding => 'UTF-8'
|
628
|
+
#
|
629
|
+
# See Node#write_to for a list of options
|
630
|
+
def write_xml_to io, options = {}
|
631
|
+
options[:save_with] ||= SaveOptions::FORMAT | SaveOptions::AS_XML
|
632
|
+
write_to io, options
|
633
|
+
end
|
634
|
+
|
635
|
+
###
|
636
|
+
# Compare two Node objects with respect to their Document. Nodes from
|
637
|
+
# different documents cannot be compared.
|
638
|
+
def <=> other
|
639
|
+
return nil unless other.is_a?(Nokogiri::XML::Node)
|
640
|
+
return nil unless document == other.document
|
641
|
+
compare other
|
642
|
+
end
|
643
|
+
end
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
class Nokogiri::XML::Element < Nokogiri::XML::Node ; end
|