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.
Files changed (288) hide show
  1. data/lib/gems.rb +13 -0
  2. data/lib/gems/tmail-1.2.3.1/ext/Makefile +20 -0
  3. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST +4 -0
  4. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/depend +1 -0
  5. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb +33 -0
  6. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c +583 -0
  7. data/lib/gems/tmail-1.2.3.1/lib/tmail.rb +5 -0
  8. data/lib/gems/tmail-1.2.3.1/lib/tmail/Makefile +18 -0
  9. data/lib/gems/tmail-1.2.3.1/lib/tmail/address.rb +426 -0
  10. data/lib/gems/tmail-1.2.3.1/lib/tmail/attachments.rb +46 -0
  11. data/lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb +46 -0
  12. data/lib/gems/tmail-1.2.3.1/lib/tmail/compat.rb +41 -0
  13. data/lib/gems/tmail-1.2.3.1/lib/tmail/config.rb +67 -0
  14. data/lib/gems/tmail-1.2.3.1/lib/tmail/core_extensions.rb +63 -0
  15. data/lib/gems/tmail-1.2.3.1/lib/tmail/encode.rb +581 -0
  16. data/lib/gems/tmail-1.2.3.1/lib/tmail/header.rb +960 -0
  17. data/lib/gems/tmail-1.2.3.1/lib/tmail/index.rb +9 -0
  18. data/lib/gems/tmail-1.2.3.1/lib/tmail/interface.rb +1125 -0
  19. data/lib/gems/tmail-1.2.3.1/lib/tmail/loader.rb +3 -0
  20. data/lib/gems/tmail-1.2.3.1/lib/tmail/mail.rb +578 -0
  21. data/lib/gems/tmail-1.2.3.1/lib/tmail/mailbox.rb +495 -0
  22. data/lib/gems/tmail-1.2.3.1/lib/tmail/main.rb +6 -0
  23. data/lib/gems/tmail-1.2.3.1/lib/tmail/mbox.rb +3 -0
  24. data/lib/gems/tmail-1.2.3.1/lib/tmail/net.rb +248 -0
  25. data/lib/gems/tmail-1.2.3.1/lib/tmail/obsolete.rb +132 -0
  26. data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.rb +1476 -0
  27. data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.y +381 -0
  28. data/lib/gems/tmail-1.2.3.1/lib/tmail/port.rb +379 -0
  29. data/lib/gems/tmail-1.2.3.1/lib/tmail/quoting.rb +118 -0
  30. data/lib/gems/tmail-1.2.3.1/lib/tmail/require_arch.rb +58 -0
  31. data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner.rb +49 -0
  32. data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb +261 -0
  33. data/lib/gems/tmail-1.2.3.1/lib/tmail/stringio.rb +280 -0
  34. data/lib/gems/tmail-1.2.3.1/lib/tmail/utils.rb +337 -0
  35. data/lib/gems/tmail-1.2.3.1/lib/tmail/version.rb +39 -0
  36. data/lib/gems/tmail-1.2.3.1/meta/MANIFEST +128 -0
  37. data/lib/gems/tmail-1.2.3.1/meta/VERSION +1 -0
  38. data/lib/gems/tmail-1.2.3.1/meta/project.yaml +30 -0
  39. data/lib/gems/tmail-1.2.3.1/meta/unixname +1 -0
  40. data/lib/gems/validatable-1.6.7/README +118 -0
  41. data/lib/gems/validatable-1.6.7/lib/child_validation.rb +15 -0
  42. data/lib/gems/validatable-1.6.7/lib/errors.rb +74 -0
  43. data/lib/gems/validatable-1.6.7/lib/included_validation.rb +9 -0
  44. data/lib/gems/validatable-1.6.7/lib/macros.rb +283 -0
  45. data/lib/gems/validatable-1.6.7/lib/object_extension.rb +21 -0
  46. data/lib/gems/validatable-1.6.7/lib/requireable.rb +26 -0
  47. data/lib/gems/validatable-1.6.7/lib/understandable.rb +31 -0
  48. data/lib/gems/validatable-1.6.7/lib/validatable.rb +19 -0
  49. data/lib/gems/validatable-1.6.7/lib/validatable_class_methods.rb +85 -0
  50. data/lib/gems/validatable-1.6.7/lib/validatable_instance_methods.rb +106 -0
  51. data/lib/gems/validatable-1.6.7/lib/validations/validates_acceptance_of.rb +11 -0
  52. data/lib/gems/validatable-1.6.7/lib/validations/validates_confirmation_of.rb +15 -0
  53. data/lib/gems/validatable-1.6.7/lib/validations/validates_each.rb +14 -0
  54. data/lib/gems/validatable-1.6.7/lib/validations/validates_format_of.rb +13 -0
  55. data/lib/gems/validatable-1.6.7/lib/validations/validates_length_of.rb +25 -0
  56. data/lib/gems/validatable-1.6.7/lib/validations/validates_numericality_of.rb +16 -0
  57. data/lib/gems/validatable-1.6.7/lib/validations/validates_presence_of.rb +13 -0
  58. data/lib/gems/validatable-1.6.7/lib/validations/validates_true_for.rb +13 -0
  59. data/lib/gems/validatable-1.6.7/lib/validations/validation_base.rb +88 -0
  60. data/lib/gems/validatable-1.6.7/rakefile.rb +50 -0
  61. data/lib/gems/validatable-1.6.7/test/all_tests.rb +1 -0
  62. data/lib/gems/validatable-1.6.7/test/functional/validatable_test.rb +437 -0
  63. data/lib/gems/validatable-1.6.7/test/functional/validates_acceptance_of_test.rb +16 -0
  64. data/lib/gems/validatable-1.6.7/test/functional/validates_confirmation_of_test.rb +56 -0
  65. data/lib/gems/validatable-1.6.7/test/functional/validates_each_test.rb +14 -0
  66. data/lib/gems/validatable-1.6.7/test/functional/validates_format_of_test.rb +34 -0
  67. data/lib/gems/validatable-1.6.7/test/functional/validates_length_of_test.rb +64 -0
  68. data/lib/gems/validatable-1.6.7/test/functional/validates_numericality_of_test.rb +57 -0
  69. data/lib/gems/validatable-1.6.7/test/functional/validates_presence_of_test.rb +16 -0
  70. data/lib/gems/validatable-1.6.7/test/functional/validates_true_for_test.rb +27 -0
  71. data/lib/gems/validatable-1.6.7/test/test_helper.rb +33 -0
  72. data/lib/gems/validatable-1.6.7/test/unit/errors_test.rb +64 -0
  73. data/lib/gems/validatable-1.6.7/test/unit/understandable_test.rb +19 -0
  74. data/lib/gems/validatable-1.6.7/test/unit/validatable_test.rb +38 -0
  75. data/lib/gems/validatable-1.6.7/test/unit/validates_acceptance_of_test.rb +21 -0
  76. data/lib/gems/validatable-1.6.7/test/unit/validates_confirmation_of_test.rb +64 -0
  77. data/lib/gems/validatable-1.6.7/test/unit/validates_format_of_test.rb +34 -0
  78. data/lib/gems/validatable-1.6.7/test/unit/validates_length_of_test.rb +75 -0
  79. data/lib/gems/validatable-1.6.7/test/unit/validates_numericality_of_test.rb +52 -0
  80. data/lib/gems/validatable-1.6.7/test/unit/validates_presence_of_test.rb +25 -0
  81. data/lib/gems/validatable-1.6.7/test/unit/validates_true_for_test.rb +29 -0
  82. data/lib/gems/validatable-1.6.7/test/unit/validation_base_test.rb +52 -0
  83. data/lib/gems/xmpp4r-0.4/CHANGELOG +83 -0
  84. data/lib/gems/xmpp4r-0.4/COPYING +340 -0
  85. data/lib/gems/xmpp4r-0.4/LICENSE +59 -0
  86. data/lib/gems/xmpp4r-0.4/README.rdoc +110 -0
  87. data/lib/gems/xmpp4r-0.4/README_ruby19.txt +43 -0
  88. data/lib/gems/xmpp4r-0.4/Rakefile +262 -0
  89. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/README +56 -0
  90. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb +23 -0
  91. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb +136 -0
  92. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/cube.xml +15 -0
  93. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/tower.xml +69 -0
  94. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/world.rb +424 -0
  95. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.conf +11 -0
  96. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.rb +346 -0
  97. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/getonline.rb +56 -0
  98. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb +315 -0
  99. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/migrate.rb +88 -0
  100. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/minimuc.rb +266 -0
  101. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/index.xsl +235 -0
  102. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/pep-aggregator.rb +147 -0
  103. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/recvfile.rb +84 -0
  104. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb +129 -0
  105. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.conf +10 -0
  106. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.rb +72 -0
  107. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb +51 -0
  108. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb +43 -0
  109. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb +10 -0
  110. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/versionpoll.rb +90 -0
  111. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmpping.rb +146 -0
  112. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmppingrc.sample +14 -0
  113. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/change_password.rb +41 -0
  114. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/client.rb +70 -0
  115. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/component.rb +11 -0
  116. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/echo.rb +37 -0
  117. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/jabbersend.rb +41 -0
  118. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mass_sender.rb +68 -0
  119. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/muc_owner_config.rb +12 -0
  120. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucinfo.rb +41 -0
  121. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucsimplebot.rb +82 -0
  122. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/register.rb +42 -0
  123. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/remove_registration.rb +18 -0
  124. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/roster.rb +44 -0
  125. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterprint.rb +50 -0
  126. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterrename.rb +34 -0
  127. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterwatch.rb +171 -0
  128. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/send_vcard.rb +67 -0
  129. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_client.rb +56 -0
  130. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_server.rb +58 -0
  131. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/versionbot.rb +75 -0
  132. data/lib/gems/xmpp4r-0.4/lib/xmpp4r.rb +116 -0
  133. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/base64.rb +32 -0
  134. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams.rb +15 -0
  135. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb +319 -0
  136. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/base.rb +257 -0
  137. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +31 -0
  138. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/target.rb +47 -0
  139. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +152 -0
  140. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +86 -0
  141. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +198 -0
  142. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +65 -0
  143. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +73 -0
  144. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb.orig +62 -0
  145. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb +170 -0
  146. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/si.rb +206 -0
  147. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/callbacks.rb +124 -0
  148. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps.rb +1 -0
  149. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/c.rb +53 -0
  150. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/generator.rb +160 -0
  151. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/helper.rb +87 -0
  152. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/client.rb +317 -0
  153. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/helper/responder.rb +53 -0
  154. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/iq/command.rb +154 -0
  155. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/component.rb +103 -0
  156. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/connection.rb +219 -0
  157. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms.rb +5 -0
  158. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms/x/data.rb +297 -0
  159. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/debuglog.rb +42 -0
  160. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay.rb +5 -0
  161. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay/x/delay.rb +99 -0
  162. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery.rb +7 -0
  163. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/helper/responder.rb +165 -0
  164. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb +211 -0
  165. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoitems.rb +147 -0
  166. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/errors.rb +281 -0
  167. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation.rb +5 -0
  168. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation/iq/feature.rb +28 -0
  169. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/base.rb +55 -0
  170. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/bot.rb +148 -0
  171. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding.rb +5 -0
  172. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb +285 -0
  173. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/idgenerator.rb +37 -0
  174. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/iq.rb +221 -0
  175. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/jid.rb +167 -0
  176. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/message.rb +148 -0
  177. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc.rb +14 -0
  178. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucbrowser.rb +92 -0
  179. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucclient.rb +462 -0
  180. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/simplemucclient.rb +332 -0
  181. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadmin.rb +23 -0
  182. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadminitem.rb +20 -0
  183. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucowner.rb +15 -0
  184. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/item.rb +143 -0
  185. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/muc.rb +70 -0
  186. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb +60 -0
  187. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuseritem.rb +36 -0
  188. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/presence.rb +232 -0
  189. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub.rb +8 -0
  190. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/configuration.rb +86 -0
  191. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb +49 -0
  192. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/item.rb +35 -0
  193. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/items.rb +44 -0
  194. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/node_config.rb +48 -0
  195. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/publish.rb +24 -0
  196. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription.rb +62 -0
  197. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription_config.rb +67 -0
  198. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/unsubscribe.rb +48 -0
  199. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodebrowser.rb +130 -0
  200. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodehelper.rb +156 -0
  201. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/servicehelper.rb +417 -0
  202. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/iq/pubsub.rb +19 -0
  203. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/query.rb +15 -0
  204. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rexmladdons.rb +151 -0
  205. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster.rb +7 -0
  206. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/helper/roster.rb +519 -0
  207. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/iq/roster.rb +215 -0
  208. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/x/roster.rb +138 -0
  209. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc.rb +2 -0
  210. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/client.rb +123 -0
  211. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/server.rb +74 -0
  212. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb +67 -0
  213. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/iq/rpc.rb +23 -0
  214. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/sasl.rb +237 -0
  215. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/semaphore.rb +38 -0
  216. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/stream.rb +497 -0
  217. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/streamparser.rb +77 -0
  218. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune.rb +2 -0
  219. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/helper/helper.rb +58 -0
  220. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/tune.rb +113 -0
  221. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard.rb +6 -0
  222. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/helper/vcard.rb +84 -0
  223. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/iq/vcard.rb +109 -0
  224. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version.rb +7 -0
  225. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/responder.rb +72 -0
  226. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/simpleresponder.rb +44 -0
  227. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/iq/version.rb +105 -0
  228. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/x.rb +37 -0
  229. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml.rb +1 -0
  230. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml/html.rb +115 -0
  231. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmpp4r.rb +18 -0
  232. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppelement.rb +168 -0
  233. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppstanza.rb +162 -0
  234. data/lib/gems/xmpp4r-0.4/setup.rb +1586 -0
  235. data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_ibb.rb +186 -0
  236. data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_socks5bytestreams.rb +113 -0
  237. data/lib/gems/xmpp4r-0.4/test/caps/tc_helper.rb +156 -0
  238. data/lib/gems/xmpp4r-0.4/test/dataforms/tc_data.rb +81 -0
  239. data/lib/gems/xmpp4r-0.4/test/delay/tc_xdelay.rb +51 -0
  240. data/lib/gems/xmpp4r-0.4/test/discovery/tc_responder.rb +91 -0
  241. data/lib/gems/xmpp4r-0.4/test/lib/assert_equal_xml.rb +14 -0
  242. data/lib/gems/xmpp4r-0.4/test/lib/clienttester.rb +120 -0
  243. data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_mucclient.rb +830 -0
  244. data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_simplemucclient.rb +114 -0
  245. data/lib/gems/xmpp4r-0.4/test/muc/tc_mucowner.rb +50 -0
  246. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_helper.rb +662 -0
  247. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_nodeconfig.rb +54 -0
  248. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_subscriptionconfig.rb +41 -0
  249. data/lib/gems/xmpp4r-0.4/test/roster/tc_helper.rb +514 -0
  250. data/lib/gems/xmpp4r-0.4/test/roster/tc_iqqueryroster.rb +173 -0
  251. data/lib/gems/xmpp4r-0.4/test/roster/tc_xroster.rb +73 -0
  252. data/lib/gems/xmpp4r-0.4/test/rpc/tc_helper.rb +96 -0
  253. data/lib/gems/xmpp4r-0.4/test/tc_callbacks.rb +129 -0
  254. data/lib/gems/xmpp4r-0.4/test/tc_class_names.rb +146 -0
  255. data/lib/gems/xmpp4r-0.4/test/tc_client.rb +30 -0
  256. data/lib/gems/xmpp4r-0.4/test/tc_errors.rb +146 -0
  257. data/lib/gems/xmpp4r-0.4/test/tc_idgenerator.rb +30 -0
  258. data/lib/gems/xmpp4r-0.4/test/tc_iq.rb +113 -0
  259. data/lib/gems/xmpp4r-0.4/test/tc_iqquery.rb +31 -0
  260. data/lib/gems/xmpp4r-0.4/test/tc_jid.rb +204 -0
  261. data/lib/gems/xmpp4r-0.4/test/tc_message.rb +116 -0
  262. data/lib/gems/xmpp4r-0.4/test/tc_presence.rb +150 -0
  263. data/lib/gems/xmpp4r-0.4/test/tc_rexml.rb +139 -0
  264. data/lib/gems/xmpp4r-0.4/test/tc_stream.rb +229 -0
  265. data/lib/gems/xmpp4r-0.4/test/tc_streamComponent.rb +95 -0
  266. data/lib/gems/xmpp4r-0.4/test/tc_streamError.rb +131 -0
  267. data/lib/gems/xmpp4r-0.4/test/tc_streamSend.rb +59 -0
  268. data/lib/gems/xmpp4r-0.4/test/tc_streamparser.rb +112 -0
  269. data/lib/gems/xmpp4r-0.4/test/tc_xmppstanza.rb +135 -0
  270. data/lib/gems/xmpp4r-0.4/test/ts_xmpp4r.rb +53 -0
  271. data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_recv.rb +84 -0
  272. data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_send.rb +74 -0
  273. data/lib/gems/xmpp4r-0.4/test/tune/tc_tune.rb +79 -0
  274. data/lib/gems/xmpp4r-0.4/test/vcard/tc_helper.rb +49 -0
  275. data/lib/gems/xmpp4r-0.4/test/vcard/tc_iqvcard.rb +62 -0
  276. data/lib/gems/xmpp4r-0.4/test/version/tc_helper.rb +60 -0
  277. data/lib/gems/xmpp4r-0.4/test/version/tc_iqqueryversion.rb +97 -0
  278. data/lib/gems/xmpp4r-0.4/test/xhtml/tc_html.rb +41 -0
  279. data/lib/gems/xmpp4r-0.4/tools/gen_requires.bash +31 -0
  280. data/lib/gems/xmpp4r-0.4/tools/xmpp4r-gemspec-test.rb +11 -0
  281. data/lib/gems/xmpp4r-0.4/xmpp4r.gemspec +291 -0
  282. data/lib/gems/xmpp4r-simple-0.8.8/CHANGELOG +73 -0
  283. data/lib/gems/xmpp4r-simple-0.8.8/COPYING +281 -0
  284. data/lib/gems/xmpp4r-simple-0.8.8/README +59 -0
  285. data/lib/gems/xmpp4r-simple-0.8.8/lib/xmpp4r-simple.rb +492 -0
  286. data/lib/gems/xmpp4r-simple-0.8.8/test/test_xmpp4r_simple.rb +242 -0
  287. data/lib/mack-notifier.rb +1 -3
  288. metadata +398 -46
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/ruby
2
+
3
+ $:.unshift File::dirname(__FILE__) + '/../lib'
4
+
5
+ require 'test/unit'
6
+ require 'xmpp4r/rexmladdons'
7
+
8
+ class REXMLTest < Test::Unit::TestCase
9
+ def test_simple
10
+ e = REXML::Element.new('e')
11
+ assert_kind_of(REXML::Element, e)
12
+ assert_nil(e.text)
13
+ assert_nil(e.attributes['x'])
14
+ end
15
+
16
+ def test_normalize
17
+ assert_equal('&amp;', REXML::Text::normalize('&'))
18
+ assert_equal('&amp;amp;', REXML::Text::normalize('&amp;'))
19
+ assert_equal('&amp;amp;amp;', REXML::Text::normalize('&amp;amp;'))
20
+ assert_equal('&amp;nbsp;', REXML::Text::normalize('&nbsp;'))
21
+ end
22
+
23
+ def test_unnormalize
24
+ assert_equal('&', REXML::Text::unnormalize('&amp;'))
25
+ assert_equal('&amp;', REXML::Text::unnormalize('&amp;amp;'))
26
+ assert_equal('&amp;amp;', REXML::Text::unnormalize('&amp;amp;amp;'))
27
+ assert_equal('&nbsp;', REXML::Text::unnormalize('&amp;nbsp;'))
28
+ assert_equal('&nbsp;', REXML::Text::unnormalize('&nbsp;')) # ?
29
+ end
30
+
31
+ def test_text_entities
32
+ e = REXML::Element.new('e')
33
+ e.text = '&'
34
+ assert_equal('<e>&amp;</e>', e.to_s)
35
+ e.text = '&amp;'
36
+ assert_equal('<e>&amp;amp;</e>', e.to_s)
37
+ e.text = '&nbsp'
38
+ assert_equal('<e>&amp;nbsp</e>', e.to_s)
39
+ e.text = '&nbsp;'
40
+ assert_equal('<e>&amp;nbsp;</e>', e.to_s)
41
+ e.text = '&<;'
42
+ assert_equal('<e>&amp;&lt;;</e>', e.to_s)
43
+ e.text = '<>"\''
44
+ assert_equal('<e>&lt;&gt;&quot;&apos;</e>', e.to_s)
45
+ e.text = '<x>&amp;</x>'
46
+ assert_equal('<e>&lt;x&gt;&amp;amp;&lt;/x&gt;</e>', e.to_s)
47
+ end
48
+
49
+ def test_attribute_entites
50
+ e = REXML::Element.new('e')
51
+ e.attributes['x'] = '&'
52
+ assert_equal('&', e.attributes['x'])
53
+ e.attributes['x'] = '&amp;'
54
+ # bug in REXML 3.1.6 unescaped the ampersand
55
+ # assert_equal('&', e.attributes['x'])
56
+ # substituting a test that works with 3.1.5, 3.1.6, and 3.1.7
57
+ assert_equal('&amp;amp;', e.attribute('x').to_s)
58
+ e.attributes['x'] = '&nbsp'
59
+ assert_equal('&nbsp', e.attributes['x'])
60
+ e.attributes['x'] = '&nbsp;'
61
+ assert_equal('&nbsp;', e.attributes['x'])
62
+ end
63
+
64
+ # test '==(o)'
65
+
66
+ def test_passing_in_non_rexml_element_as_self
67
+ o = Object.new
68
+ assert_not_equal(o, REXML::Element.new('foo'))
69
+ end
70
+
71
+ def test_passing_in_non_rexml_element_as_comparison_object
72
+ o = Object.new
73
+ assert_not_equal(REXML::Element.new('foo'), o)
74
+ end
75
+
76
+ def test_element_equal_simple
77
+ assert_equal(REXML::Element.new('foo'), REXML::Element.new('foo'))
78
+ end
79
+
80
+ def test_element_not_equal_simple
81
+ assert_not_equal(REXML::Element.new('foo'), REXML::Element.new('bar'))
82
+ end
83
+
84
+ def test_element_equal_when_all_are_same
85
+ e1 = REXML::Element.new('foo')
86
+ e1.add_namespace('a', 'urn:test:foo')
87
+ e1.attributes['a:bar'] = 'baz'
88
+ e2 = REXML::Element.new('foo')
89
+ e2.add_namespace('a', 'urn:test:foo')
90
+ e2.attributes['a:bar'] = 'baz'
91
+
92
+ assert_equal(e1, e2)
93
+ end
94
+
95
+ def test_element_not_equal_when_namespace_name_differs
96
+ e1 = REXML::Element.new('foo')
97
+ e1.add_namespace('a', 'urn:test:foo')
98
+ e1.attributes['a:bar'] = 'baz'
99
+ e2 = REXML::Element.new('foo')
100
+ e2.add_namespace('b', 'urn:test:foo')
101
+ e2.attributes['a:bar'] = 'baz'
102
+
103
+ assert_not_equal(e1, e2)
104
+ end
105
+
106
+ def test_element_not_equal_when_namespace_value_differs
107
+ e1 = REXML::Element.new('foo')
108
+ e1.add_namespace('a', 'urn:test:foo')
109
+ e1.attributes['a:bar'] = 'baz'
110
+ e2 = REXML::Element.new('foo')
111
+ e2.add_namespace('a', 'urn:test:bar')
112
+ e2.attributes['a:bar'] = 'baz'
113
+
114
+ assert_not_equal(e1, e2)
115
+ end
116
+
117
+ def test_element_not_equal_when_attribute_name_differs
118
+ e1 = REXML::Element.new('foo')
119
+ e1.add_namespace('a', 'urn:test:foo')
120
+ e1.attributes['a:bar'] = 'baz'
121
+ e2 = REXML::Element.new('foo')
122
+ e1.add_namespace('a', 'urn:test:foo')
123
+ e2.attributes['b:bar'] = 'baz'
124
+
125
+ assert_not_equal(e1, e2)
126
+ end
127
+
128
+ def test_element_not_equal_when_attribute_value_differs
129
+ e1 = REXML::Element.new('foo')
130
+ e1.add_namespace('a', 'urn:test:foo')
131
+ e1.attributes['a:bar'] = 'baz'
132
+ e2 = REXML::Element.new('foo')
133
+ e1.add_namespace('a', 'urn:test:foo')
134
+ e2.attributes['a:bar'] = 'bar'
135
+
136
+ assert_not_equal(e1, e2)
137
+ end
138
+
139
+ end
@@ -0,0 +1,229 @@
1
+ #!/usr/bin/ruby
2
+
3
+ $:.unshift '../lib'
4
+
5
+ require 'tempfile'
6
+ require 'test/unit'
7
+ require 'socket'
8
+ require 'xmpp4r/stream'
9
+ require 'xmpp4r/semaphore'
10
+ include Jabber
11
+
12
+ class StreamTest < Test::Unit::TestCase
13
+ STREAM = '<stream:stream xmlns:stream="http://etherx.jabber.org/streams">'
14
+
15
+ def setup
16
+ @tmpfile = Tempfile.new("StreamSendTest")
17
+ @tmpfilepath = @tmpfile.path()
18
+ @tmpfile.unlink
19
+ @servlisten = UNIXServer.new(@tmpfilepath)
20
+ thServer = Thread.new { @server = @servlisten.accept }
21
+ @iostream = UNIXSocket.new(@tmpfilepath)
22
+ n = 0
23
+ while not defined? @server and n < 10
24
+ sleep 0.1
25
+ n += 1
26
+ end
27
+ @stream = Stream.new
28
+ @stream.start(@iostream)
29
+ end
30
+
31
+ def teardown
32
+ @stream.close
33
+ @server.close
34
+ end
35
+
36
+ ##
37
+ # tests that connection really waits the call to process() to dispatch
38
+ # stanzas to filters
39
+ def test_process
40
+ called = false
41
+ @stream.add_xml_callback { called = true }
42
+ assert(!called)
43
+ @server.puts(STREAM)
44
+ @server.flush
45
+ assert(called)
46
+ end
47
+
48
+ def test_process100
49
+ @server.puts(STREAM)
50
+ @server.flush
51
+
52
+ done = Semaphore.new
53
+ n = 0
54
+ @stream.add_message_callback {
55
+ n += 1
56
+ done.run if n % 100 == 0
57
+ }
58
+
59
+ 100.times {
60
+ @server.puts('<message/>')
61
+ @server.flush
62
+ }
63
+
64
+ done.wait
65
+ assert_equal(100, n)
66
+
67
+ @server.puts('<message/>' * 100)
68
+ @server.flush
69
+
70
+ done.wait
71
+ assert_equal(200, n)
72
+ end
73
+
74
+ def test_send
75
+ @server.puts(STREAM)
76
+ @server.flush
77
+
78
+ Thread.new {
79
+ assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>'))
80
+ @stream.receive(Iq.new(:result))
81
+ }
82
+
83
+ called = 0
84
+ @stream.send(Iq.new(:get)) { |reply|
85
+ called += 1
86
+ if reply.kind_of? Iq and reply.type == :result
87
+ true
88
+ else
89
+ false
90
+ end
91
+ }
92
+
93
+ assert_equal(1, called)
94
+ end
95
+
96
+ def test_send_nested
97
+ @server.puts(STREAM)
98
+ @server.flush
99
+ finished = Semaphore.new
100
+
101
+ Thread.new {
102
+ assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>'))
103
+ @server.puts(Iq.new(:result).set_id('1').delete_namespace.to_s)
104
+ @server.flush
105
+ assert_equal(Iq.new(:set).delete_namespace.to_s, @server.gets('>'))
106
+ @server.puts(Iq.new(:result).set_id('2').delete_namespace.to_s)
107
+ @server.flush
108
+ assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>'))
109
+ @server.puts(Iq.new(:result).set_id('3').delete_namespace.to_s)
110
+ @server.flush
111
+
112
+ finished.run
113
+ }
114
+
115
+ called_outer = 0
116
+ called_inner = 0
117
+
118
+ @stream.send(Iq.new(:get)) do |reply|
119
+ called_outer += 1
120
+ assert_kind_of(Iq, reply)
121
+ assert_equal(:result, reply.type)
122
+
123
+ if reply.id == '1'
124
+ @stream.send(Iq.new(:set)) do |reply2|
125
+ called_inner += 1
126
+ assert_kind_of(Iq, reply2)
127
+ assert_equal(:result, reply2.type)
128
+ assert_equal('2', reply2.id)
129
+
130
+ @stream.send(Iq.new(:get))
131
+
132
+ true
133
+ end
134
+ false
135
+ elsif reply.id == '3'
136
+ true
137
+ else
138
+ false
139
+ end
140
+ end
141
+
142
+ assert_equal(2, called_outer)
143
+ assert_equal(1, called_inner)
144
+
145
+ finished.wait
146
+ end
147
+
148
+ def test_send_in_callback
149
+ @server.puts(STREAM)
150
+ @server.flush
151
+ finished = Semaphore.new
152
+
153
+ @stream.add_message_callback {
154
+ @stream.send_with_id(Iq.new(:get)) { |reply|
155
+ assert_equal(:result, reply.type)
156
+ }
157
+ }
158
+
159
+ Thread.new {
160
+ @server.gets('>')
161
+ @server.puts(Iq.new(:result))
162
+ finished.run
163
+ }
164
+
165
+ @server.puts(Message.new)
166
+ finished.wait
167
+ end
168
+
169
+ def test_bidi
170
+ @server.puts(STREAM)
171
+ @server.flush
172
+ finished = Semaphore.new
173
+ ok = true
174
+ n = 100
175
+
176
+ Thread.new {
177
+ n.times { |i|
178
+ ok &&= (Iq.new(:get).set_id(i).delete_namespace.to_s == @server.gets('>'))
179
+ @server.puts(Iq.new(:result).set_id(i).to_s)
180
+ @server.flush
181
+ }
182
+
183
+ finished.run
184
+ }
185
+
186
+ n.times { |i|
187
+ @stream.send(Iq.new(:get).set_id(i)) { |reply|
188
+ ok &&= reply.kind_of? Iq
189
+ ok &&= (:result == reply.type)
190
+ ok &&= (i.to_s == reply.id)
191
+ true
192
+ }
193
+ }
194
+
195
+ finished.wait
196
+ assert(ok)
197
+ end
198
+
199
+ def test_similar_children
200
+ delay = 0.1
201
+ n = 0
202
+ @stream.add_message_callback { n += 1 }
203
+ assert_equal(0, n)
204
+ @server.puts("#{STREAM}<message/>")
205
+ @server.flush
206
+ sleep delay
207
+ assert_equal(1, n)
208
+ @server.puts('<message>')
209
+ @server.flush
210
+ sleep delay
211
+ assert_equal(1, n)
212
+ @server.puts('<message/>')
213
+ @server.flush
214
+ sleep delay
215
+ assert_equal(1, n)
216
+ @server.puts('</message>')
217
+ @server.flush
218
+ sleep delay
219
+ assert_equal(2, n)
220
+ @server.puts("<message>#{STREAM}<message/></stream:stream>")
221
+ @server.flush
222
+ sleep delay
223
+ assert_equal(2, n)
224
+ @server.puts('</message>')
225
+ @server.flush
226
+ sleep delay
227
+ assert_equal(3, n)
228
+ end
229
+ end
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/ruby
2
+
3
+ $:.unshift '../lib'
4
+
5
+ require 'tempfile'
6
+ require 'test/unit'
7
+ require 'socket'
8
+ require 'xmpp4r/component'
9
+ require 'xmpp4r/bytestreams'
10
+ require 'xmpp4r/semaphore'
11
+ require 'xmpp4r'
12
+ include Jabber
13
+
14
+ class StreamComponentTest < Test::Unit::TestCase
15
+ @@SOCKET_PORT = 65224
16
+ STREAM = 'stream:stream xmlns:stream="http://etherx.jabber.org/streams"'
17
+
18
+ def setup
19
+ servlisten = TCPServer.new(@@SOCKET_PORT)
20
+ serverwait = Semaphore.new
21
+ Thread.new do
22
+ Thread.current.abort_on_exception = true
23
+ serversock = servlisten.accept
24
+ servlisten.close
25
+ serversock.sync = true
26
+ @server = Stream.new
27
+ @server.add_xml_callback do |xml|
28
+ if xml.prefix == 'stream' and xml.name == 'stream'
29
+ @server.send("<#{STREAM} xmlns='jabber:component:accept'>")
30
+ true
31
+ else
32
+ false
33
+ end
34
+ end
35
+ @server.start(serversock)
36
+
37
+ serverwait.run
38
+ end
39
+
40
+ @stream = Component.new('test')
41
+ @stream.connect('localhost', @@SOCKET_PORT)
42
+
43
+ serverwait.wait
44
+ end
45
+
46
+ def teardown
47
+ @stream.close
48
+ @server.close
49
+ end
50
+
51
+ def test_process
52
+ stanzas = 0
53
+ message_lock = Semaphore.new
54
+ iq_lock = Semaphore.new
55
+ presence_lock = Semaphore.new
56
+
57
+ @stream.add_message_callback { |msg|
58
+ assert_kind_of(Message, msg)
59
+ stanzas += 1
60
+ message_lock.run
61
+ }
62
+ @stream.add_iq_callback { |iq|
63
+ assert_kind_of(Iq, iq)
64
+ stanzas += 1
65
+ iq_lock.run
66
+ }
67
+ @stream.add_presence_callback { |pres|
68
+ assert_kind_of(Presence, pres)
69
+ stanzas += 1
70
+ presence_lock.run
71
+ }
72
+
73
+ @server.send('<message/>')
74
+ @server.send('<iq/>')
75
+ @server.send('<presence/>')
76
+
77
+ message_lock.wait
78
+ iq_lock.wait
79
+ presence_lock.wait
80
+
81
+ assert_equal(3, stanzas)
82
+ end
83
+
84
+ def test_outgoing
85
+ received_wait = Semaphore.new
86
+
87
+ @server.add_message_callback { |msg|
88
+ assert_kind_of(Message, msg)
89
+ received_wait.run
90
+ }
91
+
92
+ @stream.send(Message.new)
93
+ received_wait.wait
94
+ end
95
+ end