mack-notifier 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gems.rb +13 -0
- data/lib/gems/tmail-1.2.3.1/ext/Makefile +20 -0
- data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST +4 -0
- data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/depend +1 -0
- data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb +33 -0
- data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c +583 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail.rb +5 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/Makefile +18 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/address.rb +426 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/attachments.rb +46 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb +46 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/compat.rb +41 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/config.rb +67 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/core_extensions.rb +63 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/encode.rb +581 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/header.rb +960 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/index.rb +9 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/interface.rb +1125 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/loader.rb +3 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/mail.rb +578 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/mailbox.rb +495 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/main.rb +6 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/mbox.rb +3 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/net.rb +248 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/obsolete.rb +132 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.rb +1476 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.y +381 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/port.rb +379 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/quoting.rb +118 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/require_arch.rb +58 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner.rb +49 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb +261 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/stringio.rb +280 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/utils.rb +337 -0
- data/lib/gems/tmail-1.2.3.1/lib/tmail/version.rb +39 -0
- data/lib/gems/tmail-1.2.3.1/meta/MANIFEST +128 -0
- data/lib/gems/tmail-1.2.3.1/meta/VERSION +1 -0
- data/lib/gems/tmail-1.2.3.1/meta/project.yaml +30 -0
- data/lib/gems/tmail-1.2.3.1/meta/unixname +1 -0
- data/lib/gems/validatable-1.6.7/README +118 -0
- data/lib/gems/validatable-1.6.7/lib/child_validation.rb +15 -0
- data/lib/gems/validatable-1.6.7/lib/errors.rb +74 -0
- data/lib/gems/validatable-1.6.7/lib/included_validation.rb +9 -0
- data/lib/gems/validatable-1.6.7/lib/macros.rb +283 -0
- data/lib/gems/validatable-1.6.7/lib/object_extension.rb +21 -0
- data/lib/gems/validatable-1.6.7/lib/requireable.rb +26 -0
- data/lib/gems/validatable-1.6.7/lib/understandable.rb +31 -0
- data/lib/gems/validatable-1.6.7/lib/validatable.rb +19 -0
- data/lib/gems/validatable-1.6.7/lib/validatable_class_methods.rb +85 -0
- data/lib/gems/validatable-1.6.7/lib/validatable_instance_methods.rb +106 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_acceptance_of.rb +11 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_confirmation_of.rb +15 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_each.rb +14 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_format_of.rb +13 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_length_of.rb +25 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_numericality_of.rb +16 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_presence_of.rb +13 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validates_true_for.rb +13 -0
- data/lib/gems/validatable-1.6.7/lib/validations/validation_base.rb +88 -0
- data/lib/gems/validatable-1.6.7/rakefile.rb +50 -0
- data/lib/gems/validatable-1.6.7/test/all_tests.rb +1 -0
- data/lib/gems/validatable-1.6.7/test/functional/validatable_test.rb +437 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_acceptance_of_test.rb +16 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_confirmation_of_test.rb +56 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_each_test.rb +14 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_format_of_test.rb +34 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_length_of_test.rb +64 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_numericality_of_test.rb +57 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_presence_of_test.rb +16 -0
- data/lib/gems/validatable-1.6.7/test/functional/validates_true_for_test.rb +27 -0
- data/lib/gems/validatable-1.6.7/test/test_helper.rb +33 -0
- data/lib/gems/validatable-1.6.7/test/unit/errors_test.rb +64 -0
- data/lib/gems/validatable-1.6.7/test/unit/understandable_test.rb +19 -0
- data/lib/gems/validatable-1.6.7/test/unit/validatable_test.rb +38 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_acceptance_of_test.rb +21 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_confirmation_of_test.rb +64 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_format_of_test.rb +34 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_length_of_test.rb +75 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_numericality_of_test.rb +52 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_presence_of_test.rb +25 -0
- data/lib/gems/validatable-1.6.7/test/unit/validates_true_for_test.rb +29 -0
- data/lib/gems/validatable-1.6.7/test/unit/validation_base_test.rb +52 -0
- data/lib/gems/xmpp4r-0.4/CHANGELOG +83 -0
- data/lib/gems/xmpp4r-0.4/COPYING +340 -0
- data/lib/gems/xmpp4r-0.4/LICENSE +59 -0
- data/lib/gems/xmpp4r-0.4/README.rdoc +110 -0
- data/lib/gems/xmpp4r-0.4/README_ruby19.txt +43 -0
- data/lib/gems/xmpp4r-0.4/Rakefile +262 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/README +56 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb +23 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb +136 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/cube.xml +15 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/tower.xml +69 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/world.rb +424 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.conf +11 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.rb +346 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/getonline.rb +56 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb +315 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/migrate.rb +88 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/minimuc.rb +266 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/index.xsl +235 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/pep-aggregator.rb +147 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/recvfile.rb +84 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb +129 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.conf +10 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.rb +72 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb +51 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb +43 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb +10 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/versionpoll.rb +90 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmpping.rb +146 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmppingrc.sample +14 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/change_password.rb +41 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/client.rb +70 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/component.rb +11 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/echo.rb +37 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/jabbersend.rb +41 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mass_sender.rb +68 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/muc_owner_config.rb +12 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucinfo.rb +41 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucsimplebot.rb +82 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/register.rb +42 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/remove_registration.rb +18 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/roster.rb +44 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterprint.rb +50 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterrename.rb +34 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterwatch.rb +171 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/send_vcard.rb +67 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_client.rb +56 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_server.rb +58 -0
- data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/versionbot.rb +75 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r.rb +116 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/base64.rb +32 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams.rb +15 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb +319 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/base.rb +257 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +31 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/target.rb +47 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +152 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +86 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +198 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +65 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +73 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb.orig +62 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb +170 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/si.rb +206 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/callbacks.rb +124 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps.rb +1 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/c.rb +53 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/generator.rb +160 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/helper.rb +87 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/client.rb +317 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/helper/responder.rb +53 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/iq/command.rb +154 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/component.rb +103 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/connection.rb +219 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms.rb +5 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms/x/data.rb +297 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/debuglog.rb +42 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay.rb +5 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay/x/delay.rb +99 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery.rb +7 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/helper/responder.rb +165 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb +211 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoitems.rb +147 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/errors.rb +281 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation.rb +5 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation/iq/feature.rb +28 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/base.rb +55 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/bot.rb +148 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding.rb +5 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb +285 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/idgenerator.rb +37 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/iq.rb +221 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/jid.rb +167 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/message.rb +148 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc.rb +14 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucbrowser.rb +92 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucclient.rb +462 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/simplemucclient.rb +332 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadmin.rb +23 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadminitem.rb +20 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucowner.rb +15 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/item.rb +143 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/muc.rb +70 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb +60 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuseritem.rb +36 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/presence.rb +232 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub.rb +8 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/configuration.rb +86 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb +49 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/item.rb +35 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/items.rb +44 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/node_config.rb +48 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/publish.rb +24 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription.rb +62 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription_config.rb +67 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/unsubscribe.rb +48 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodebrowser.rb +130 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodehelper.rb +156 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/servicehelper.rb +417 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/iq/pubsub.rb +19 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/query.rb +15 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rexmladdons.rb +151 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster.rb +7 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/helper/roster.rb +519 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/iq/roster.rb +215 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/x/roster.rb +138 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc.rb +2 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/client.rb +123 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/server.rb +74 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb +67 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/iq/rpc.rb +23 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/sasl.rb +237 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/semaphore.rb +38 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/stream.rb +497 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/streamparser.rb +77 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune.rb +2 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/helper/helper.rb +58 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/tune.rb +113 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard.rb +6 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/helper/vcard.rb +84 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/iq/vcard.rb +109 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version.rb +7 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/responder.rb +72 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/simpleresponder.rb +44 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/iq/version.rb +105 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/x.rb +37 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml.rb +1 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml/html.rb +115 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmpp4r.rb +18 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppelement.rb +168 -0
- data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppstanza.rb +162 -0
- data/lib/gems/xmpp4r-0.4/setup.rb +1586 -0
- data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_ibb.rb +186 -0
- data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_socks5bytestreams.rb +113 -0
- data/lib/gems/xmpp4r-0.4/test/caps/tc_helper.rb +156 -0
- data/lib/gems/xmpp4r-0.4/test/dataforms/tc_data.rb +81 -0
- data/lib/gems/xmpp4r-0.4/test/delay/tc_xdelay.rb +51 -0
- data/lib/gems/xmpp4r-0.4/test/discovery/tc_responder.rb +91 -0
- data/lib/gems/xmpp4r-0.4/test/lib/assert_equal_xml.rb +14 -0
- data/lib/gems/xmpp4r-0.4/test/lib/clienttester.rb +120 -0
- data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_mucclient.rb +830 -0
- data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_simplemucclient.rb +114 -0
- data/lib/gems/xmpp4r-0.4/test/muc/tc_mucowner.rb +50 -0
- data/lib/gems/xmpp4r-0.4/test/pubsub/tc_helper.rb +662 -0
- data/lib/gems/xmpp4r-0.4/test/pubsub/tc_nodeconfig.rb +54 -0
- data/lib/gems/xmpp4r-0.4/test/pubsub/tc_subscriptionconfig.rb +41 -0
- data/lib/gems/xmpp4r-0.4/test/roster/tc_helper.rb +514 -0
- data/lib/gems/xmpp4r-0.4/test/roster/tc_iqqueryroster.rb +173 -0
- data/lib/gems/xmpp4r-0.4/test/roster/tc_xroster.rb +73 -0
- data/lib/gems/xmpp4r-0.4/test/rpc/tc_helper.rb +96 -0
- data/lib/gems/xmpp4r-0.4/test/tc_callbacks.rb +129 -0
- data/lib/gems/xmpp4r-0.4/test/tc_class_names.rb +146 -0
- data/lib/gems/xmpp4r-0.4/test/tc_client.rb +30 -0
- data/lib/gems/xmpp4r-0.4/test/tc_errors.rb +146 -0
- data/lib/gems/xmpp4r-0.4/test/tc_idgenerator.rb +30 -0
- data/lib/gems/xmpp4r-0.4/test/tc_iq.rb +113 -0
- data/lib/gems/xmpp4r-0.4/test/tc_iqquery.rb +31 -0
- data/lib/gems/xmpp4r-0.4/test/tc_jid.rb +204 -0
- data/lib/gems/xmpp4r-0.4/test/tc_message.rb +116 -0
- data/lib/gems/xmpp4r-0.4/test/tc_presence.rb +150 -0
- data/lib/gems/xmpp4r-0.4/test/tc_rexml.rb +139 -0
- data/lib/gems/xmpp4r-0.4/test/tc_stream.rb +229 -0
- data/lib/gems/xmpp4r-0.4/test/tc_streamComponent.rb +95 -0
- data/lib/gems/xmpp4r-0.4/test/tc_streamError.rb +131 -0
- data/lib/gems/xmpp4r-0.4/test/tc_streamSend.rb +59 -0
- data/lib/gems/xmpp4r-0.4/test/tc_streamparser.rb +112 -0
- data/lib/gems/xmpp4r-0.4/test/tc_xmppstanza.rb +135 -0
- data/lib/gems/xmpp4r-0.4/test/ts_xmpp4r.rb +53 -0
- data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_recv.rb +84 -0
- data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_send.rb +74 -0
- data/lib/gems/xmpp4r-0.4/test/tune/tc_tune.rb +79 -0
- data/lib/gems/xmpp4r-0.4/test/vcard/tc_helper.rb +49 -0
- data/lib/gems/xmpp4r-0.4/test/vcard/tc_iqvcard.rb +62 -0
- data/lib/gems/xmpp4r-0.4/test/version/tc_helper.rb +60 -0
- data/lib/gems/xmpp4r-0.4/test/version/tc_iqqueryversion.rb +97 -0
- data/lib/gems/xmpp4r-0.4/test/xhtml/tc_html.rb +41 -0
- data/lib/gems/xmpp4r-0.4/tools/gen_requires.bash +31 -0
- data/lib/gems/xmpp4r-0.4/tools/xmpp4r-gemspec-test.rb +11 -0
- data/lib/gems/xmpp4r-0.4/xmpp4r.gemspec +291 -0
- data/lib/gems/xmpp4r-simple-0.8.8/CHANGELOG +73 -0
- data/lib/gems/xmpp4r-simple-0.8.8/COPYING +281 -0
- data/lib/gems/xmpp4r-simple-0.8.8/README +59 -0
- data/lib/gems/xmpp4r-simple-0.8.8/lib/xmpp4r-simple.rb +492 -0
- data/lib/gems/xmpp4r-simple-0.8.8/test/test_xmpp4r_simple.rb +242 -0
- data/lib/mack-notifier.rb +1 -3
- metadata +398 -46
@@ -0,0 +1,131 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
$:.unshift '../lib'
|
4
|
+
|
5
|
+
require 'test/unit'
|
6
|
+
require 'socket'
|
7
|
+
require 'xmpp4r/client'
|
8
|
+
include Jabber
|
9
|
+
|
10
|
+
class ConnectionErrorTest < Test::Unit::TestCase
|
11
|
+
@@SOCKET_PORT = 65225
|
12
|
+
STREAM = '<stream:stream xmlns:stream="http://etherx.jabber.org/streams">'
|
13
|
+
|
14
|
+
def setup
|
15
|
+
servlisten = TCPServer.new(@@SOCKET_PORT)
|
16
|
+
serverwait = Semaphore.new
|
17
|
+
@server = nil
|
18
|
+
Thread.new do
|
19
|
+
Thread.current.abort_on_exception = true
|
20
|
+
@server = servlisten.accept
|
21
|
+
servlisten.close
|
22
|
+
@server.sync = true
|
23
|
+
|
24
|
+
serverwait.run
|
25
|
+
end
|
26
|
+
|
27
|
+
@conn = TCPSocket.new('localhost', @@SOCKET_PORT)
|
28
|
+
|
29
|
+
serverwait.wait
|
30
|
+
end
|
31
|
+
|
32
|
+
def teardown
|
33
|
+
@conn.close if not @conn.closed?
|
34
|
+
@server.close if not @conn.closed?
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_connectionError_start_withexcblock
|
38
|
+
@stream = Stream.new
|
39
|
+
error = false
|
40
|
+
@stream.on_exception do |e, o, w|
|
41
|
+
# strange exception, it's caused by REXML, actually
|
42
|
+
assert_kind_of(StandardError, e)
|
43
|
+
assert_equal(Jabber::Stream, o.class)
|
44
|
+
assert_equal(:start, w)
|
45
|
+
error = true
|
46
|
+
end
|
47
|
+
assert(!error)
|
48
|
+
begin
|
49
|
+
# wrong port on purpose
|
50
|
+
conn = TCPSocket.new('localhost', 1)
|
51
|
+
rescue
|
52
|
+
end
|
53
|
+
@stream.start(conn)
|
54
|
+
sleep 0.2
|
55
|
+
assert(error)
|
56
|
+
@server.close
|
57
|
+
@stream.close
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_connectionError_parse_withexcblock
|
61
|
+
@stream = Stream.new
|
62
|
+
error = false
|
63
|
+
@stream.start(@conn)
|
64
|
+
@stream.on_exception do |e, o, w|
|
65
|
+
if w == :disconnected
|
66
|
+
assert_equal(nil, e)
|
67
|
+
assert_equal(Jabber::Stream, o.class)
|
68
|
+
else
|
69
|
+
assert_equal(REXML::ParseException, e.class)
|
70
|
+
assert_equal(Jabber::Stream, o.class)
|
71
|
+
assert_equal(:parser, w)
|
72
|
+
error = true
|
73
|
+
end
|
74
|
+
end
|
75
|
+
@server.puts(STREAM)
|
76
|
+
@server.flush
|
77
|
+
assert(!error)
|
78
|
+
@server.puts('</blop>')
|
79
|
+
@server.flush
|
80
|
+
sleep 0.2
|
81
|
+
assert(error)
|
82
|
+
@server.close
|
83
|
+
@stream.close
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_connectionError_send_withexcblock
|
87
|
+
@stream = Stream.new
|
88
|
+
error = 0
|
89
|
+
@stream.start(@conn)
|
90
|
+
@stream.on_exception do |exc, o, w|
|
91
|
+
case w
|
92
|
+
when :sending
|
93
|
+
assert_equal(IOError, exc.class)
|
94
|
+
assert_equal(Jabber::Stream, o.class)
|
95
|
+
when :disconnected
|
96
|
+
assert_equal(nil, exc)
|
97
|
+
assert_equal(Jabber::Stream, o.class)
|
98
|
+
else
|
99
|
+
assert(false)
|
100
|
+
end
|
101
|
+
error += 1
|
102
|
+
end
|
103
|
+
@server.puts(STREAM)
|
104
|
+
@server.flush
|
105
|
+
assert_equal(0, error)
|
106
|
+
@server.close
|
107
|
+
sleep 0.1
|
108
|
+
assert_equal(1, error)
|
109
|
+
@stream.send('</test>')
|
110
|
+
sleep 0.1
|
111
|
+
@stream.send('</test>')
|
112
|
+
sleep 0.1
|
113
|
+
assert_equal(3, error)
|
114
|
+
@stream.close
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_connectionError_send_withoutexcblock
|
118
|
+
@stream = Stream.new
|
119
|
+
@stream.start(@conn)
|
120
|
+
@server.puts(STREAM)
|
121
|
+
@server.flush
|
122
|
+
assert_raise(Errno::EPIPE) do
|
123
|
+
@server.close
|
124
|
+
sleep 0.1
|
125
|
+
@stream.send('</test>')
|
126
|
+
sleep 0.1
|
127
|
+
@stream.send('</test>')
|
128
|
+
sleep 0.1
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
$:.unshift '../lib'
|
4
|
+
|
5
|
+
require 'test/unit'
|
6
|
+
require 'socket'
|
7
|
+
require 'tempfile'
|
8
|
+
require 'io/wait'
|
9
|
+
require 'xmpp4r'
|
10
|
+
include Jabber
|
11
|
+
|
12
|
+
class StreamSendTest < Test::Unit::TestCase
|
13
|
+
def setup
|
14
|
+
@tmpfile = Tempfile.new("StreamSendTest")
|
15
|
+
@tmpfilepath = @tmpfile.path()
|
16
|
+
@tmpfile.unlink
|
17
|
+
@servlisten = UNIXServer.new(@tmpfilepath)
|
18
|
+
thServer = Thread.new { @server = @servlisten.accept }
|
19
|
+
@iostream = UNIXSocket.new(@tmpfilepath)
|
20
|
+
@stream = Stream.new
|
21
|
+
@stream.start(@iostream)
|
22
|
+
|
23
|
+
thServer.join
|
24
|
+
end
|
25
|
+
|
26
|
+
def teardown
|
27
|
+
@stream.close
|
28
|
+
@server.close
|
29
|
+
@servlisten.close
|
30
|
+
end
|
31
|
+
|
32
|
+
def mysend(s)
|
33
|
+
@stream.send(s)
|
34
|
+
@stream.send("\n") #needed for easy test writing
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Tries to send a basic message
|
39
|
+
def test_sendbasic
|
40
|
+
mysend(Message.new)
|
41
|
+
assert_equal("<message/>\n", @server.gets)
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_sendmessage
|
45
|
+
mysend(Message.new('lucas@linux.ensimag.fr', 'coucou'))
|
46
|
+
assert_equal("<message to='lucas@linux.ensimag.fr'><body>coucou</body></message>\n", @server.gets)
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_sendpresence
|
50
|
+
mysend(Presence.new)
|
51
|
+
assert_equal("<presence/>\n", @server.gets)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_sendiq
|
55
|
+
mysend(Iq.new)
|
56
|
+
assert_equal("<iq/>\n", @server.gets)
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
$:.unshift '../lib'
|
4
|
+
|
5
|
+
require 'tempfile'
|
6
|
+
require 'test/unit'
|
7
|
+
require 'socket'
|
8
|
+
require 'xmpp4r/streamparser'
|
9
|
+
require 'xmpp4r/semaphore'
|
10
|
+
include Jabber
|
11
|
+
|
12
|
+
class MockListener
|
13
|
+
attr_reader :received
|
14
|
+
|
15
|
+
def receive(element)
|
16
|
+
@received = element
|
17
|
+
end
|
18
|
+
|
19
|
+
def parse_failure(exception)
|
20
|
+
raise exception
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class StreamParserTest < Test::Unit::TestCase
|
25
|
+
STREAM = '<stream:stream xmlns:stream="http://etherx.jabber.org/streams">'
|
26
|
+
|
27
|
+
def setup
|
28
|
+
@listener = MockListener.new
|
29
|
+
end
|
30
|
+
|
31
|
+
def teardown
|
32
|
+
@listener = nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def parse_simple_helper(fixture)
|
36
|
+
parser = StreamParser.new(STREAM + fixture, @listener)
|
37
|
+
|
38
|
+
parser.parse
|
39
|
+
|
40
|
+
yield parse_with_rexml(fixture)
|
41
|
+
end
|
42
|
+
|
43
|
+
def parse_with_rexml(fixture)
|
44
|
+
REXML::Document.new(fixture).root
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_simple_text
|
48
|
+
parse_simple_helper( "<a>text</a>" ) do |desired|
|
49
|
+
assert_equal desired.name, @listener.received.name
|
50
|
+
assert_equal desired.text, @listener.received.text
|
51
|
+
assert_equal desired.cdatas, @listener.received.cdatas
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_simple_cdata
|
56
|
+
parse_simple_helper( "<a><![CDATA[<cdata>]]></a>" ) do |desired|
|
57
|
+
assert_equal desired.name, @listener.received.name
|
58
|
+
assert_equal desired.text, @listener.received.text
|
59
|
+
assert_equal desired.cdatas, @listener.received.cdatas
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_composite_text_cdata
|
64
|
+
parse_simple_helper( "<a>text<![CDATA[<cdata>]]></a>" ) do |desired|
|
65
|
+
assert_equal desired.name, @listener.received.name
|
66
|
+
assert_equal desired.text, @listener.received.text
|
67
|
+
assert_equal desired.cdatas, @listener.received.cdatas
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_composite_cdata_text
|
72
|
+
parse_simple_helper( "<a><![CDATA[<cdata>]]>text</a>" ) do |desired|
|
73
|
+
assert_equal desired.name, @listener.received.name
|
74
|
+
assert_equal desired.text, @listener.received.text
|
75
|
+
assert_equal desired.cdatas, @listener.received.cdatas
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_complex_composite_cdata_text
|
80
|
+
parse_simple_helper( "<a><![CDATA[<cdata>]]>text<![CDATA[<cdata>]]>text</a>" ) do |desired|
|
81
|
+
assert_equal desired.name, @listener.received.name
|
82
|
+
assert_equal desired.text, @listener.received.text
|
83
|
+
assert_equal desired.cdatas, @listener.received.cdatas
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_entity_escaping1
|
88
|
+
parse_simple_helper( "<a>'&"</a>" ) do |desired|
|
89
|
+
assert_equal "'&\"", @listener.received.text
|
90
|
+
assert_equal "<a>'&"</a>", @listener.received.to_s
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_entity_escaping2
|
95
|
+
parse_simple_helper( "<a>&amp;amp;</a>" ) do |desired|
|
96
|
+
assert_equal "&amp;", @listener.received.text
|
97
|
+
assert_equal "<a>&amp;amp;</a>", @listener.received.to_s
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
=begin
|
102
|
+
**********
|
103
|
+
* FIXME! *
|
104
|
+
**********
|
105
|
+
|
106
|
+
def test_unbound_prefix
|
107
|
+
parse_simple_helper("<message><soe:instantMessage/></message>") do |desired|
|
108
|
+
assert_equal desired.first_element('*').name, 'instantMessage'
|
109
|
+
end
|
110
|
+
end
|
111
|
+
=end
|
112
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
$:.unshift '../lib'
|
4
|
+
|
5
|
+
require 'test/unit'
|
6
|
+
require 'socket'
|
7
|
+
require 'xmpp4r/rexmladdons'
|
8
|
+
require 'xmpp4r/xmppstanza'
|
9
|
+
require 'xmpp4r/iq'
|
10
|
+
require 'xmpp4r/feature_negotiation'
|
11
|
+
require 'xmpp4r/dataforms'
|
12
|
+
require 'xmpp4r/errors'
|
13
|
+
include Jabber
|
14
|
+
|
15
|
+
class XMPPStanzaTest < Test::Unit::TestCase
|
16
|
+
|
17
|
+
##
|
18
|
+
# Hack: XMPPStanza derives from XMPPElement
|
19
|
+
# which enforces element classes to be named at declaration time
|
20
|
+
class MyXMPPStanza < XMPPStanza
|
21
|
+
name_xmlns 'stanza', 'http://home.gna.org/xmpp4r'
|
22
|
+
end
|
23
|
+
|
24
|
+
class MyStanza < XMPPStanza
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_from
|
28
|
+
x = MyXMPPStanza.new
|
29
|
+
assert_equal(nil, x.from)
|
30
|
+
assert_equal(x, x.set_from("blop"))
|
31
|
+
assert_equal("blop", x.from.to_s)
|
32
|
+
x.from = "tada"
|
33
|
+
assert_equal("tada", x.from.to_s)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_to
|
37
|
+
x = MyXMPPStanza.new
|
38
|
+
assert_equal(nil, x.to)
|
39
|
+
assert_equal(x, x.set_to("blop"))
|
40
|
+
assert_equal("blop", x.to.to_s)
|
41
|
+
x.to = "tada"
|
42
|
+
assert_equal("tada", x.to.to_s)
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_id
|
46
|
+
x = MyXMPPStanza.new
|
47
|
+
assert_equal(nil, x.id)
|
48
|
+
assert_equal(x, x.set_id("blop"))
|
49
|
+
assert_equal("blop", x.id)
|
50
|
+
x.id = "tada"
|
51
|
+
assert_equal("tada", x.id)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_type
|
55
|
+
x = MyXMPPStanza.new
|
56
|
+
assert_equal(nil, x.type)
|
57
|
+
assert_equal(x, x.set_type("blop"))
|
58
|
+
assert_equal("blop", x.type)
|
59
|
+
x.type = "tada"
|
60
|
+
assert_equal("tada", x.type)
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_import
|
64
|
+
x = MyXMPPStanza.new
|
65
|
+
x.id = "heya"
|
66
|
+
q = x.add_element("query")
|
67
|
+
q.add_namespace("about:blank")
|
68
|
+
q.add_element("b").text = "I am b"
|
69
|
+
q.add_text("I am text")
|
70
|
+
q.add_element("a").add_attribute("href", "http://home.gna.org/xmpp4r/")
|
71
|
+
x.add_text("yow")
|
72
|
+
x.add_element("query")
|
73
|
+
|
74
|
+
assert_raise(RuntimeError) { iq = Iq.import(x) }
|
75
|
+
x.name = 'iq'
|
76
|
+
iq = Iq.import(x)
|
77
|
+
|
78
|
+
assert_equal(x.id, iq.id)
|
79
|
+
assert_equal(q.to_s, iq.query.to_s)
|
80
|
+
assert_equal(x.to_s, iq.to_s)
|
81
|
+
assert_equal(q.namespace, iq.queryns)
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_import2
|
85
|
+
feature = FeatureNegotiation::IqFeature.new
|
86
|
+
xdata = feature.add(Dataforms::XData.new(:form))
|
87
|
+
field = xdata.add(Dataforms::XDataField.new('stream-method', :list_single))
|
88
|
+
|
89
|
+
feature2 = FeatureNegotiation::IqFeature.new.import(feature)
|
90
|
+
assert_equal(field.var, feature2.x.fields.first.var)
|
91
|
+
assert_equal(field.type, feature2.x.fields.first.type)
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_import_xml_entities
|
95
|
+
e = REXML::Element.new('e')
|
96
|
+
e.text = '&'
|
97
|
+
assert_equal('<e>&</e>', e.to_s)
|
98
|
+
|
99
|
+
e2 = REXML::Element.new('e').import(e)
|
100
|
+
assert_equal('<e>&</e>', e2.to_s)
|
101
|
+
end
|
102
|
+
|
103
|
+
def test_error
|
104
|
+
x = MyXMPPStanza.new
|
105
|
+
assert_equal(nil, x.error)
|
106
|
+
x.typed_add(REXML::Element.new('error'))
|
107
|
+
assert_equal('<error/>', x.error.to_s)
|
108
|
+
assert_equal(ErrorResponse, x.error.class)
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_clone_and_dup
|
112
|
+
x = MyXMPPStanza.new
|
113
|
+
x.attributes['xyz'] = '123'
|
114
|
+
x.text = 'abc'
|
115
|
+
|
116
|
+
assert_equal(x.attributes['xyz'], '123')
|
117
|
+
assert_equal(x.text, 'abc')
|
118
|
+
|
119
|
+
x2 = x.clone
|
120
|
+
assert_kind_of(MyXMPPStanza, x2)
|
121
|
+
assert_equal('123', x2.attributes['xyz'])
|
122
|
+
assert_nil(x2.text)
|
123
|
+
|
124
|
+
x3 = x.dup
|
125
|
+
assert_kind_of(MyXMPPStanza, x3)
|
126
|
+
assert_equal('123', x3.attributes['xyz'])
|
127
|
+
assert_equal('abc', x3.text)
|
128
|
+
end
|
129
|
+
|
130
|
+
def test_raise
|
131
|
+
assert_raises(NoNameXmlnsRegistered) {
|
132
|
+
XMPPStanza.name_xmlns_for_class(MyStanza)
|
133
|
+
}
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
|
3
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
4
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'test')
|
5
|
+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
6
|
+
$:.unshift File.join(File.dirname(__FILE__), 'test')
|
7
|
+
|
8
|
+
# This is allowed here, to make sure it's enabled in all test.
|
9
|
+
Thread::abort_on_exception = true
|
10
|
+
|
11
|
+
require 'xmpp4r'
|
12
|
+
require 'find'
|
13
|
+
|
14
|
+
# List files' basenames, not full path!
|
15
|
+
# EXCLUDED_FILES = [ 'tc_muc_simplemucclient.rb' ]
|
16
|
+
EXCLUDED_FILES = []
|
17
|
+
|
18
|
+
tc_files = []
|
19
|
+
tc_subdirs = []
|
20
|
+
Find.find(File.dirname(__FILE__)) do |f|
|
21
|
+
if File::directory?(f)
|
22
|
+
if f == '.'
|
23
|
+
# do nothing
|
24
|
+
elsif File::basename(f) != '.svn'
|
25
|
+
tc_subdirs << f
|
26
|
+
Find.prune
|
27
|
+
end
|
28
|
+
elsif File::basename(f) =~ /^tc.*\.rb$/
|
29
|
+
tc_files << f
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
tc_subdirs.each do |dir|
|
34
|
+
Find.find(dir) do |f|
|
35
|
+
if File::file?(f) and File::basename(f) =~ /^tc.*\.rb$/
|
36
|
+
|
37
|
+
if (RUBY_VERSION.split('.').collect {|n| n.to_i} <=> [1,9,0]) >= 0
|
38
|
+
# TODO: at the moment, these two test cases have timing dependencies
|
39
|
+
# on threaded code. While they may pass with the green thread
|
40
|
+
# implementation in Ruby 1.8, they often fail with real threads.
|
41
|
+
next if f =~ /tc_helper.rb/
|
42
|
+
next if f =~ /tc_stream.rb/
|
43
|
+
end
|
44
|
+
|
45
|
+
tc_files << f
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
tc_files.each do |f|
|
51
|
+
next if EXCLUDED_FILES.include?(File::basename(f))
|
52
|
+
require f
|
53
|
+
end
|