cerberus 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/Authors.txt +4 -0
  2. data/Changelog.txt +11 -0
  3. data/Copyright.txt +16 -0
  4. data/Rakefile +16 -25
  5. data/Readme.markdown +1 -3
  6. data/bin/cerberus +5 -0
  7. data/lib/cerberus/builder/bjam.rb +1 -3
  8. data/lib/cerberus/builder/maven2.rb +0 -1
  9. data/lib/cerberus/builder/rake.rb +1 -1
  10. data/lib/cerberus/builder/rspec.rb +0 -1
  11. data/lib/cerberus/builder/ruby_base.rb +0 -1
  12. data/lib/cerberus/component_lazy_loader.rb +6 -2
  13. data/lib/cerberus/config.example.yml +1 -0
  14. data/lib/cerberus/constants.rb +2 -2
  15. data/lib/cerberus/manager.rb +7 -1
  16. data/lib/cerberus/publisher/mail.rb +4 -4
  17. data/lib/cerberus/publisher/twitter.rb +0 -1
  18. data/lib/cerberus/scm/base.rb +19 -0
  19. data/lib/cerberus/scm/bzr.rb +62 -0
  20. data/lib/cerberus/scm/cvs.rb +2 -7
  21. data/lib/cerberus/scm/darcs.rb +2 -11
  22. data/lib/cerberus/scm/git.rb +6 -14
  23. data/lib/cerberus/scm/perforce.rb +4 -4
  24. data/lib/cerberus/scm/svn.rb +2 -7
  25. data/lib/cerberus/utils.rb +5 -0
  26. data/lib/vendor/irc/README +23 -0
  27. data/lib/vendor/irc/lib/IRC.rb +164 -0
  28. data/lib/vendor/irc/lib/IRCChannel.rb +33 -0
  29. data/lib/vendor/irc/lib/IRCConnection.rb +134 -0
  30. data/lib/vendor/irc/lib/IRCEvent.rb +91 -0
  31. data/lib/vendor/irc/lib/IRCUser.rb +23 -0
  32. data/lib/vendor/irc/lib/IRCUtil.rb +49 -0
  33. data/lib/vendor/irc/lib/eventmap.yml +247 -0
  34. data/lib/vendor/twitter/CHANGES +129 -0
  35. data/lib/vendor/twitter/MIT-LICENSE +20 -0
  36. data/lib/vendor/twitter/README +37 -0
  37. data/lib/vendor/twitter/TODO +7 -0
  38. data/lib/vendor/twitter/lib/twitter.rb +34 -0
  39. data/lib/vendor/twitter/lib/twitter/client.rb +24 -0
  40. data/lib/vendor/twitter/lib/twitter/client/account.rb +24 -0
  41. data/lib/vendor/twitter/lib/twitter/client/auth.rb +27 -0
  42. data/lib/vendor/twitter/lib/twitter/client/base.rb +93 -0
  43. data/lib/vendor/twitter/lib/twitter/client/blocks.rb +35 -0
  44. data/lib/vendor/twitter/lib/twitter/client/favorites.rb +53 -0
  45. data/lib/vendor/twitter/lib/twitter/client/friendship.rb +35 -0
  46. data/lib/vendor/twitter/lib/twitter/client/graph.rb +37 -0
  47. data/lib/vendor/twitter/lib/twitter/client/messaging.rb +79 -0
  48. data/lib/vendor/twitter/lib/twitter/client/profile.rb +29 -0
  49. data/lib/vendor/twitter/lib/twitter/client/search.rb +27 -0
  50. data/lib/vendor/twitter/lib/twitter/client/status.rb +51 -0
  51. data/lib/vendor/twitter/lib/twitter/client/timeline.rb +72 -0
  52. data/lib/vendor/twitter/lib/twitter/client/user.rb +65 -0
  53. data/lib/vendor/twitter/lib/twitter/config.rb +77 -0
  54. data/lib/vendor/twitter/lib/twitter/console.rb +31 -0
  55. data/lib/vendor/twitter/lib/twitter/core.rb +137 -0
  56. data/lib/vendor/twitter/lib/twitter/ext.rb +2 -0
  57. data/lib/vendor/twitter/lib/twitter/ext/stdlib.rb +52 -0
  58. data/lib/vendor/twitter/lib/twitter/extras.rb +39 -0
  59. data/lib/vendor/twitter/lib/twitter/meta.rb +56 -0
  60. data/lib/vendor/twitter/lib/twitter/model.rb +360 -0
  61. data/lib/vendor/twitter/lib/twitter/version.rb +19 -0
  62. data/lib/vendor/twitter/spec/twitter/client/account_spec.rb +28 -0
  63. data/lib/vendor/twitter/spec/twitter/client/auth_spec.rb +34 -0
  64. data/lib/vendor/twitter/spec/twitter/client/base_spec.rb +242 -0
  65. data/lib/vendor/twitter/spec/twitter/client/blocks_spec.rb +76 -0
  66. data/lib/vendor/twitter/spec/twitter/client/favorites_spec.rb +183 -0
  67. data/lib/vendor/twitter/spec/twitter/client/friendship_spec.rb +76 -0
  68. data/lib/vendor/twitter/spec/twitter/client/graph_spec.rb +67 -0
  69. data/lib/vendor/twitter/spec/twitter/client/messaging_spec.rb +135 -0
  70. data/lib/vendor/twitter/spec/twitter/client/profile_spec.rb +91 -0
  71. data/lib/vendor/twitter/spec/twitter/client/search_spec.rb +68 -0
  72. data/lib/vendor/twitter/spec/twitter/client/status_spec.rb +119 -0
  73. data/lib/vendor/twitter/spec/twitter/client/timeline_spec.rb +79 -0
  74. data/lib/vendor/twitter/spec/twitter/client/user_spec.rb +203 -0
  75. data/lib/vendor/twitter/spec/twitter/client_spec.rb +2 -0
  76. data/lib/vendor/twitter/spec/twitter/config_spec.rb +86 -0
  77. data/lib/vendor/twitter/spec/twitter/console_spec.rb +15 -0
  78. data/lib/vendor/twitter/spec/twitter/core_spec.rb +127 -0
  79. data/lib/vendor/twitter/spec/twitter/ext/stdlib_spec.rb +59 -0
  80. data/lib/vendor/twitter/spec/twitter/extras_spec.rb +46 -0
  81. data/lib/vendor/twitter/spec/twitter/meta_spec.rb +90 -0
  82. data/lib/vendor/twitter/spec/twitter/model_spec.rb +508 -0
  83. data/lib/vendor/twitter/spec/twitter/version_spec.rb +19 -0
  84. data/lib/vendor/xmpp4r/CHANGELOG +83 -0
  85. data/lib/vendor/xmpp4r/COPYING +340 -0
  86. data/lib/vendor/xmpp4r/LICENSE +59 -0
  87. data/lib/vendor/xmpp4r/README.rdoc +110 -0
  88. data/lib/vendor/xmpp4r/README_ruby19.txt +43 -0
  89. data/lib/vendor/xmpp4r/Rakefile +262 -0
  90. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/README +56 -0
  91. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb +23 -0
  92. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb +136 -0
  93. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/cube.xml +15 -0
  94. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/tower.xml +69 -0
  95. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/adventure/world.rb +424 -0
  96. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/fileserve.conf +11 -0
  97. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/fileserve.rb +346 -0
  98. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/getonline.rb +56 -0
  99. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb +315 -0
  100. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/migrate.rb +88 -0
  101. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/minimuc.rb +266 -0
  102. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/pep-aggregator/index.xsl +235 -0
  103. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/pep-aggregator/pep-aggregator.rb +147 -0
  104. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/recvfile.rb +84 -0
  105. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb +129 -0
  106. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/sendfile.conf +10 -0
  107. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/sendfile.rb +72 -0
  108. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb +51 -0
  109. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb +43 -0
  110. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb +10 -0
  111. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/versionpoll.rb +90 -0
  112. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/xmpping.rb +146 -0
  113. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/advanced/xmppingrc.sample +14 -0
  114. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/change_password.rb +41 -0
  115. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/client.rb +70 -0
  116. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/component.rb +11 -0
  117. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/echo.rb +37 -0
  118. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/jabbersend.rb +41 -0
  119. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/mass_sender.rb +68 -0
  120. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/muc_owner_config.rb +12 -0
  121. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/mucinfo.rb +41 -0
  122. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/mucsimplebot.rb +82 -0
  123. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/register.rb +42 -0
  124. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/remove_registration.rb +18 -0
  125. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/roster.rb +44 -0
  126. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/rosterprint.rb +50 -0
  127. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/rosterrename.rb +34 -0
  128. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/rosterwatch.rb +171 -0
  129. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/send_vcard.rb +67 -0
  130. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/tune_client.rb +56 -0
  131. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/tune_server.rb +58 -0
  132. data/lib/vendor/xmpp4r/data/doc/xmpp4r/examples/basic/versionbot.rb +75 -0
  133. data/lib/vendor/xmpp4r/lib/xmpp4r.rb +116 -0
  134. data/lib/vendor/xmpp4r/lib/xmpp4r/base64.rb +32 -0
  135. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams.rb +15 -0
  136. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/filetransfer.rb +319 -0
  137. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/base.rb +257 -0
  138. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +31 -0
  139. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/target.rb +47 -0
  140. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +152 -0
  141. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +86 -0
  142. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +198 -0
  143. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +65 -0
  144. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +73 -0
  145. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb.orig +62 -0
  146. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/iq/bytestreams.rb +170 -0
  147. data/lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/iq/si.rb +206 -0
  148. data/lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb +124 -0
  149. data/lib/vendor/xmpp4r/lib/xmpp4r/caps.rb +1 -0
  150. data/lib/vendor/xmpp4r/lib/xmpp4r/caps/c.rb +53 -0
  151. data/lib/vendor/xmpp4r/lib/xmpp4r/caps/helper/generator.rb +160 -0
  152. data/lib/vendor/xmpp4r/lib/xmpp4r/caps/helper/helper.rb +87 -0
  153. data/lib/vendor/xmpp4r/lib/xmpp4r/client.rb +317 -0
  154. data/lib/vendor/xmpp4r/lib/xmpp4r/command/helper/responder.rb +53 -0
  155. data/lib/vendor/xmpp4r/lib/xmpp4r/command/iq/command.rb +154 -0
  156. data/lib/vendor/xmpp4r/lib/xmpp4r/component.rb +103 -0
  157. data/lib/vendor/xmpp4r/lib/xmpp4r/connection.rb +219 -0
  158. data/lib/vendor/xmpp4r/lib/xmpp4r/dataforms.rb +5 -0
  159. data/lib/vendor/xmpp4r/lib/xmpp4r/dataforms/x/data.rb +297 -0
  160. data/lib/vendor/xmpp4r/lib/xmpp4r/debuglog.rb +42 -0
  161. data/lib/vendor/xmpp4r/lib/xmpp4r/delay.rb +5 -0
  162. data/lib/vendor/xmpp4r/lib/xmpp4r/delay/x/delay.rb +99 -0
  163. data/lib/vendor/xmpp4r/lib/xmpp4r/discovery.rb +7 -0
  164. data/lib/vendor/xmpp4r/lib/xmpp4r/discovery/helper/responder.rb +165 -0
  165. data/lib/vendor/xmpp4r/lib/xmpp4r/discovery/iq/discoinfo.rb +211 -0
  166. data/lib/vendor/xmpp4r/lib/xmpp4r/discovery/iq/discoitems.rb +147 -0
  167. data/lib/vendor/xmpp4r/lib/xmpp4r/errors.rb +281 -0
  168. data/lib/vendor/xmpp4r/lib/xmpp4r/feature_negotiation.rb +5 -0
  169. data/lib/vendor/xmpp4r/lib/xmpp4r/feature_negotiation/iq/feature.rb +28 -0
  170. data/lib/vendor/xmpp4r/lib/xmpp4r/framework/base.rb +55 -0
  171. data/lib/vendor/xmpp4r/lib/xmpp4r/framework/bot.rb +148 -0
  172. data/lib/vendor/xmpp4r/lib/xmpp4r/httpbinding.rb +5 -0
  173. data/lib/vendor/xmpp4r/lib/xmpp4r/httpbinding/client.rb +285 -0
  174. data/lib/vendor/xmpp4r/lib/xmpp4r/idgenerator.rb +37 -0
  175. data/lib/vendor/xmpp4r/lib/xmpp4r/iq.rb +221 -0
  176. data/lib/vendor/xmpp4r/lib/xmpp4r/jid.rb +167 -0
  177. data/lib/vendor/xmpp4r/lib/xmpp4r/message.rb +148 -0
  178. data/lib/vendor/xmpp4r/lib/xmpp4r/muc.rb +14 -0
  179. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/helper/mucbrowser.rb +92 -0
  180. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/helper/mucclient.rb +462 -0
  181. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/helper/simplemucclient.rb +332 -0
  182. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/iq/mucadmin.rb +23 -0
  183. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/iq/mucadminitem.rb +20 -0
  184. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/iq/mucowner.rb +15 -0
  185. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/item.rb +143 -0
  186. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/x/muc.rb +70 -0
  187. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/x/mucuserinvite.rb +60 -0
  188. data/lib/vendor/xmpp4r/lib/xmpp4r/muc/x/mucuseritem.rb +36 -0
  189. data/lib/vendor/xmpp4r/lib/xmpp4r/presence.rb +232 -0
  190. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub.rb +8 -0
  191. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/configuration.rb +86 -0
  192. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/event.rb +49 -0
  193. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/item.rb +35 -0
  194. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/items.rb +44 -0
  195. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/node_config.rb +48 -0
  196. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/publish.rb +24 -0
  197. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/subscription.rb +62 -0
  198. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/subscription_config.rb +67 -0
  199. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/children/unsubscribe.rb +48 -0
  200. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/helper/nodebrowser.rb +130 -0
  201. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/helper/nodehelper.rb +156 -0
  202. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/helper/servicehelper.rb +417 -0
  203. data/lib/vendor/xmpp4r/lib/xmpp4r/pubsub/iq/pubsub.rb +19 -0
  204. data/lib/vendor/xmpp4r/lib/xmpp4r/query.rb +15 -0
  205. data/lib/vendor/xmpp4r/lib/xmpp4r/rexmladdons.rb +151 -0
  206. data/lib/vendor/xmpp4r/lib/xmpp4r/roster.rb +7 -0
  207. data/lib/vendor/xmpp4r/lib/xmpp4r/roster/helper/roster.rb +519 -0
  208. data/lib/vendor/xmpp4r/lib/xmpp4r/roster/iq/roster.rb +215 -0
  209. data/lib/vendor/xmpp4r/lib/xmpp4r/roster/x/roster.rb +138 -0
  210. data/lib/vendor/xmpp4r/lib/xmpp4r/rpc.rb +2 -0
  211. data/lib/vendor/xmpp4r/lib/xmpp4r/rpc/helper/client.rb +123 -0
  212. data/lib/vendor/xmpp4r/lib/xmpp4r/rpc/helper/server.rb +74 -0
  213. data/lib/vendor/xmpp4r/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb +67 -0
  214. data/lib/vendor/xmpp4r/lib/xmpp4r/rpc/iq/rpc.rb +23 -0
  215. data/lib/vendor/xmpp4r/lib/xmpp4r/sasl.rb +237 -0
  216. data/lib/vendor/xmpp4r/lib/xmpp4r/semaphore.rb +38 -0
  217. data/lib/vendor/xmpp4r/lib/xmpp4r/stream.rb +497 -0
  218. data/lib/vendor/xmpp4r/lib/xmpp4r/streamparser.rb +77 -0
  219. data/lib/vendor/xmpp4r/lib/xmpp4r/tune.rb +2 -0
  220. data/lib/vendor/xmpp4r/lib/xmpp4r/tune/helper/helper.rb +58 -0
  221. data/lib/vendor/xmpp4r/lib/xmpp4r/tune/tune.rb +113 -0
  222. data/lib/vendor/xmpp4r/lib/xmpp4r/vcard.rb +6 -0
  223. data/lib/vendor/xmpp4r/lib/xmpp4r/vcard/helper/vcard.rb +84 -0
  224. data/lib/vendor/xmpp4r/lib/xmpp4r/vcard/iq/vcard.rb +109 -0
  225. data/lib/vendor/xmpp4r/lib/xmpp4r/version.rb +7 -0
  226. data/lib/vendor/xmpp4r/lib/xmpp4r/version/helper/responder.rb +72 -0
  227. data/lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb +44 -0
  228. data/lib/vendor/xmpp4r/lib/xmpp4r/version/iq/version.rb +105 -0
  229. data/lib/vendor/xmpp4r/lib/xmpp4r/x.rb +37 -0
  230. data/lib/vendor/xmpp4r/lib/xmpp4r/xhtml.rb +1 -0
  231. data/lib/vendor/xmpp4r/lib/xmpp4r/xhtml/html.rb +115 -0
  232. data/lib/vendor/xmpp4r/lib/xmpp4r/xmpp4r.rb +18 -0
  233. data/lib/vendor/xmpp4r/lib/xmpp4r/xmppelement.rb +168 -0
  234. data/lib/vendor/xmpp4r/lib/xmpp4r/xmppstanza.rb +162 -0
  235. data/lib/vendor/xmpp4r/setup.rb +1586 -0
  236. data/lib/vendor/xmpp4r/test/bytestreams/tc_ibb.rb +186 -0
  237. data/lib/vendor/xmpp4r/test/bytestreams/tc_socks5bytestreams.rb +113 -0
  238. data/lib/vendor/xmpp4r/test/caps/tc_helper.rb +156 -0
  239. data/lib/vendor/xmpp4r/test/dataforms/tc_data.rb +81 -0
  240. data/lib/vendor/xmpp4r/test/delay/tc_xdelay.rb +51 -0
  241. data/lib/vendor/xmpp4r/test/discovery/tc_responder.rb +91 -0
  242. data/lib/vendor/xmpp4r/test/lib/assert_equal_xml.rb +14 -0
  243. data/lib/vendor/xmpp4r/test/lib/clienttester.rb +120 -0
  244. data/lib/vendor/xmpp4r/test/muc/tc_muc_mucclient.rb +830 -0
  245. data/lib/vendor/xmpp4r/test/muc/tc_muc_simplemucclient.rb +114 -0
  246. data/lib/vendor/xmpp4r/test/muc/tc_mucowner.rb +50 -0
  247. data/lib/vendor/xmpp4r/test/pubsub/tc_helper.rb +662 -0
  248. data/lib/vendor/xmpp4r/test/pubsub/tc_nodeconfig.rb +54 -0
  249. data/lib/vendor/xmpp4r/test/pubsub/tc_subscriptionconfig.rb +41 -0
  250. data/lib/vendor/xmpp4r/test/roster/tc_helper.rb +514 -0
  251. data/lib/vendor/xmpp4r/test/roster/tc_iqqueryroster.rb +173 -0
  252. data/lib/vendor/xmpp4r/test/roster/tc_xroster.rb +73 -0
  253. data/lib/vendor/xmpp4r/test/rpc/tc_helper.rb +96 -0
  254. data/lib/vendor/xmpp4r/test/tc_callbacks.rb +129 -0
  255. data/lib/vendor/xmpp4r/test/tc_class_names.rb +146 -0
  256. data/lib/vendor/xmpp4r/test/tc_client.rb +30 -0
  257. data/lib/vendor/xmpp4r/test/tc_errors.rb +146 -0
  258. data/lib/vendor/xmpp4r/test/tc_idgenerator.rb +30 -0
  259. data/lib/vendor/xmpp4r/test/tc_iq.rb +113 -0
  260. data/lib/vendor/xmpp4r/test/tc_iqquery.rb +31 -0
  261. data/lib/vendor/xmpp4r/test/tc_jid.rb +204 -0
  262. data/lib/vendor/xmpp4r/test/tc_message.rb +116 -0
  263. data/lib/vendor/xmpp4r/test/tc_presence.rb +150 -0
  264. data/lib/vendor/xmpp4r/test/tc_rexml.rb +139 -0
  265. data/lib/vendor/xmpp4r/test/tc_stream.rb +229 -0
  266. data/lib/vendor/xmpp4r/test/tc_streamComponent.rb +95 -0
  267. data/lib/vendor/xmpp4r/test/tc_streamError.rb +131 -0
  268. data/lib/vendor/xmpp4r/test/tc_streamSend.rb +59 -0
  269. data/lib/vendor/xmpp4r/test/tc_streamparser.rb +112 -0
  270. data/lib/vendor/xmpp4r/test/tc_xmppstanza.rb +135 -0
  271. data/lib/vendor/xmpp4r/test/ts_xmpp4r.rb +53 -0
  272. data/lib/vendor/xmpp4r/test/tune/tc_helper_recv.rb +84 -0
  273. data/lib/vendor/xmpp4r/test/tune/tc_helper_send.rb +74 -0
  274. data/lib/vendor/xmpp4r/test/tune/tc_tune.rb +79 -0
  275. data/lib/vendor/xmpp4r/test/vcard/tc_helper.rb +49 -0
  276. data/lib/vendor/xmpp4r/test/vcard/tc_iqvcard.rb +62 -0
  277. data/lib/vendor/xmpp4r/test/version/tc_helper.rb +60 -0
  278. data/lib/vendor/xmpp4r/test/version/tc_iqqueryversion.rb +97 -0
  279. data/lib/vendor/xmpp4r/test/xhtml/tc_html.rb +41 -0
  280. data/lib/vendor/xmpp4r/tools/gen_requires.bash +31 -0
  281. data/lib/vendor/xmpp4r/tools/xmpp4r-gemspec-test.rb +11 -0
  282. data/lib/vendor/xmpp4r/xmpp4r.gemspec +291 -0
  283. data/test/jabber_publisher_test.rb +1 -1
  284. data/test/mail_publisher_test.rb +2 -2
  285. data/test/mock/twitter.rb +0 -1
  286. data/test/rspec_builder_test.rb +39 -2
  287. data/test/rss_publisher_test.rb +1 -1
  288. data/test/twitter_publisher_test.rb +1 -1
  289. metadata +268 -53
  290. data/lib/cerberus/publisher/gmailer.rb +0 -17
@@ -0,0 +1,79 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe Twitter::Client, "Timeline API" do
4
+ before(:each) do
5
+ @client = client_context
6
+ @uris = Twitter::Client.class_eval("@@TIMELINE_URIS")
7
+ @user = Twitter::User.new(:screen_name => 'mylogin')
8
+ @status = Twitter::Status.new(:id => 23343443, :text => 'I love Lucy!', :user => @user)
9
+ @timeline = [@status]
10
+ @json = JSON.unparse([@status.to_hash])
11
+ @request = mas_net_http_get(:basic_auth => nil)
12
+ @response = mas_net_http_response(:success, @json)
13
+ @connection = mas_net_http(@response)
14
+ @params = {
15
+ :public => {:since_id => 3249328},
16
+ :friends => {:id => 'myfriend'},
17
+ :user => {:id => 'auser'},
18
+ :me => {},
19
+ }
20
+ end
21
+
22
+ it "should respond to instance method #timeline_for" do
23
+ @client.should respond_to(:timeline_for)
24
+ end
25
+
26
+ it "should call #http_get with expected parameters for :public case" do
27
+ @client.should_receive(:http_connect).and_return(mas_net_http_response(:success, @json))
28
+ @client.timeline_for(:public)
29
+ end
30
+
31
+ it "should yield to block for each status in timeline" do
32
+ @client.should_receive(:http_connect).and_return(mas_net_http_response(:success, @json))
33
+ Twitter::Status.should_receive(:unmarshal).and_return(@timeline)
34
+ count = 0
35
+ @client.timeline_for(:public) do |status|
36
+ status.should eql(@status)
37
+ count += 1
38
+ end
39
+ count.should eql(@timeline.size)
40
+ end
41
+
42
+ it "should generate expected HTTP GET request for generic :public case" do
43
+ @client.should_receive(:create_http_get_request).with(@uris[:public], {}).and_return(@request)
44
+ timeline = @client.timeline_for(:public)
45
+ timeline.should eql(@timeline)
46
+ end
47
+
48
+ it "should generate expected HTTP GET request for :public case with expected parameters" do
49
+ @client.should_receive(:create_http_get_request).with(@uris[:public], @params[:public]).and_return(@request)
50
+ timeline = @client.timeline_for(:public, @params[:public])
51
+ timeline.should eql(@timeline)
52
+ end
53
+
54
+ it "should generate expected HTTP GET request for generic :friends case" do
55
+ @client.should_receive(:create_http_get_request).with(@uris[:friends], {}).and_return(@request)
56
+ timeline = @client.timeline_for(:friends)
57
+ timeline.should eql(@timeline)
58
+ end
59
+
60
+ it "should generate expected HTTP GET request for :friends case with expected parameters" do
61
+ @client.should_receive(:create_http_get_request).with(@uris[:friends], @params[:friends]).and_return(@request)
62
+ timeline = @client.timeline_for(:friends, @params[:friends])
63
+ timeline.should eql(@timeline)
64
+ end
65
+
66
+ it "should raise an ArgumentError if type given is not valid" do
67
+ lambda {
68
+ @client.timeline_for(:crap)
69
+ }.should raise_error(ArgumentError)
70
+
71
+ lambda {
72
+ @client.timeline_for(:crap, @params[:friends])
73
+ }.should raise_error(ArgumentError)
74
+ end
75
+
76
+ after(:each) do
77
+ nilize(@client)
78
+ end
79
+ end
@@ -0,0 +1,203 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe Twitter::Client, "#user(id, :info)" do
4
+ before(:each) do
5
+ @twitter = client_context
6
+ @id = 395783
7
+ @screen_name = 'boris_johnson_is_funny_as_hell'
8
+ @user = Twitter::User.new(
9
+ :id => @id,
10
+ :screen_name => @screen_name,
11
+ :location => 'London'
12
+ )
13
+ @json = JSON.unparse(@user.to_hash)
14
+ @request = mas_net_http_get(:basic_auth => nil)
15
+ @response = mas_net_http_response(:success, @json)
16
+ @connection = mas_net_http(@response)
17
+ @uris = Twitter::Client.class_eval("@@USER_URIS")
18
+ @twitter.stub!(:create_http_get_request).and_return(@request)
19
+ Twitter::User.stub!(:unmarshal).and_return(@user)
20
+ Net::HTTP.stub!(:new).and_return(@connection)
21
+ end
22
+
23
+ it "should create expected HTTP GET request when giving numeric user id" do
24
+ @twitter.should_receive(:create_http_get_request).with(@uris[:info], {:id => @id}).and_return(@request)
25
+ @twitter.user(@id)
26
+ end
27
+
28
+ it "should create expected HTTP GET request when giving screen name" do
29
+ @twitter.should_receive(:create_http_get_request).with(@uris[:info], {:id => @screen_name}).and_return(@request)
30
+ @twitter.user(@screen_name)
31
+ end
32
+
33
+ it "should bless model returned when giving numeric user id" do
34
+ @twitter.should_receive(:bless_model).with(@user).and_return(@user)
35
+ @twitter.user(@id)
36
+ end
37
+
38
+ it "should bless model returned when giving screen name" do
39
+ @twitter.should_receive(:bless_model).with(@user).and_return(@user)
40
+ @twitter.user(@screen_name)
41
+ end
42
+
43
+ after(:each) do
44
+ nilize(@request, @response, @connection, @twitter, @id, @screen_name, @user)
45
+ end
46
+ end
47
+
48
+ # TODO: Add specs for new Twitter::Client#user(id, :friends) and
49
+ # Twitter::Client#user(id, :followers) use cases.
50
+ describe Twitter::Client, "#user(id, :friends)" do
51
+ before(:each) do
52
+ @twitter = client_context
53
+ @id = 395784
54
+ @screen_name = 'cafe_paradiso'
55
+ @user = Twitter::User.new(
56
+ :id => @id,
57
+ :screen_name => @screen_name,
58
+ :location => 'Urbana, IL'
59
+ )
60
+ @json = JSON.unparse(@user.to_hash)
61
+ @request = mas_net_http_get(:basic_auth => nil)
62
+ @response = mas_net_http_response(:success, @json)
63
+ @connection = mas_net_http(@response)
64
+ @uris = Twitter::Client.class_eval("@@USER_URIS")
65
+ @twitter.stub!(:create_http_get_request).and_return(@request)
66
+ Twitter::User.stub!(:unmarshal).and_return(@user)
67
+ Net::HTTP.stub!(:new).and_return(@connection)
68
+ end
69
+
70
+ it "should create expected HTTP GET request when giving numeric user id" do
71
+ @twitter.should_receive(:create_http_get_request).with(@uris[:friends], {:id => @id}).and_return(@request)
72
+ @twitter.user(@id, :friends)
73
+ end
74
+
75
+ it "should invoke #to_i on Twitter::User objecct given" do
76
+ @user.should_receive(:to_i).and_return(@id)
77
+ @twitter.user(@user, :friends)
78
+ end
79
+
80
+ it "should create expected HTTP GET request when giving Twitter::User object" do
81
+ @twitter.should_receive(:create_http_get_request).with(@uris[:friends], {:id => @user.to_i}).and_return(@request)
82
+ @twitter.user(@user, :friends)
83
+ end
84
+
85
+ it "should create expected HTTP GET request when giving screen name" do
86
+ @twitter.should_receive(:create_http_get_request).with(@uris[:friends], {:id => @screen_name}).and_return(@request)
87
+ @twitter.user(@screen_name, :friends)
88
+ end
89
+
90
+ it "should bless model returned when giving numeric id" do
91
+ @twitter.should_receive(:bless_model).with(@user).and_return(@user)
92
+ @twitter.user(@id, :friends)
93
+ end
94
+
95
+ it "should bless model returned when giving Twitter::User object" do
96
+ @twitter.should_receive(:bless_model).with(@user).and_return(@user)
97
+ @twitter.user(@user, :friends)
98
+ end
99
+
100
+ it "should bless model returned when giving screen name" do
101
+ @twitter.should_receive(:bless_model).with(@user).and_return(@user)
102
+ @twitter.user(@screen_name, :friends)
103
+ end
104
+
105
+ after(:each) do
106
+ nilize(@request, @response, @connection, @twitter, @id, @screen_name, @user)
107
+ end
108
+ end
109
+
110
+ describe Twitter::Client, "#my(:info)" do
111
+ before(:each) do
112
+ @twitter = client_context
113
+ @screen_name = @twitter.instance_eval("@login")
114
+ @user = Twitter::User.new(
115
+ :id => 2394393,
116
+ :screen_name => @screen_name,
117
+ :location => 'Glamorous Urbana'
118
+ )
119
+ @json = JSON.unparse(@user.to_hash)
120
+ @request = mas_net_http_get(:basic_auth => nil)
121
+ @response = mas_net_http_response(:success, @json)
122
+ @connection = mas_net_http(@response)
123
+ @uris = Twitter::Client.class_eval("@@USER_URIS")
124
+ @twitter.stub!(:create_http_get_request).and_return(@request)
125
+ Net::HTTP.stub!(:new).and_return(@connection)
126
+ Twitter::User.stub!(:unmarshal).and_return(@user)
127
+ end
128
+
129
+ it "should create expected HTTP GET request" do
130
+ @twitter.should_receive(:create_http_get_request).with(@uris[:info], :id => @screen_name).and_return(@request)
131
+ @twitter.my(:info)
132
+ end
133
+
134
+ it "should bless the model object returned" do
135
+ @twitter.should_receive(:bless_models).with(@user).and_return(@user)
136
+ @twitter.my(:info)
137
+ end
138
+
139
+ it "should return expected user object" do
140
+ user = @twitter.my(:info)
141
+ user.should eql(@user)
142
+ end
143
+
144
+ after(:each) do
145
+ nilize(@request, @response, @connection, @twitter, @user, @screen_name)
146
+ end
147
+ end
148
+
149
+ describe Twitter::Client, "#my(:friends)" do
150
+ before(:each) do
151
+ @twitter = client_context
152
+ @screen_name = @twitter.instance_eval("@login")
153
+ @friends = [
154
+ Twitter::User.new(:screen_name => 'lucy_snowe'),
155
+ Twitter::User.new(:screen_name => 'jane_eyre'),
156
+ Twitter::User.new(:screen_name => 'tess_derbyfield'),
157
+ Twitter::User.new(:screen_name => 'elizabeth_jane_newson'),
158
+ ]
159
+ @json = JSON.unparse(@friends.collect {|f| f.to_hash })
160
+ @request = mas_net_http_get(:basic_auth => nil)
161
+ @response = mas_net_http_response(:success, @json)
162
+ @connection = mas_net_http(@response)
163
+ @uris = Twitter::Client.class_eval("@@USER_URIS")
164
+ @twitter.stub!(:create_http_get_request).and_return(@request)
165
+ Twitter::User.stub!(:unmarshal).and_return(@friends)
166
+ Net::HTTP.stub!(:new).and_return(@connection)
167
+ end
168
+
169
+ it "should create expected HTTP GET request" do
170
+ @twitter.should_receive(:create_http_get_request).with(@uris[:friends], :id => @screen_name).and_return(@request)
171
+ @twitter.my(:friends)
172
+ end
173
+
174
+ it "should bless models returned" do
175
+ @twitter.should_receive(:bless_models).with(@friends).and_return(@friends)
176
+ @twitter.my(:friends)
177
+ end
178
+
179
+ it "should return expected Array of friends" do
180
+ friends = @twitter.my(:friends)
181
+ friends.should eql(@friends)
182
+ end
183
+
184
+ after(:each) do
185
+ nilize(@request, @response, @connection, @twitter, @friends, @screen_name)
186
+ end
187
+ end
188
+
189
+ describe Twitter::Client, "#my(:invalid_action)" do
190
+ before(:each) do
191
+ @twitter = client_context
192
+ end
193
+
194
+ it "should raise ArgumentError for invalid user action" do
195
+ lambda {
196
+ @twitter.my(:crap)
197
+ }.should raise_error(ArgumentError)
198
+ end
199
+
200
+ after(:each) do
201
+ nilize(@twitter)
202
+ end
203
+ end
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
@@ -0,0 +1,86 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
3
+ describe Twitter::Client, ".configure" do
4
+ it "should respond to :configure class method" do
5
+ Twitter::Client.respond_to?(:configure).should be(true)
6
+ end
7
+
8
+ it "should not accept calls that do not specify blocks" do
9
+ lambda {
10
+ Twitter::Client.configure()
11
+ }.should raise_error(ArgumentError)
12
+ end
13
+ end
14
+
15
+ describe Twitter::Client, ".configure with mocked @config" do
16
+ before(:each) do
17
+ @block_invoked = false
18
+ @conf_yielded = false
19
+ @conf = mock(Twitter::Config)
20
+ @block = Proc.new do |conf|
21
+ @block_invoked = true
22
+ @conf_yielded = true if conf.is_a?(Twitter::Config)
23
+ end
24
+ Twitter::Config.stub!(:new).and_return(@conf)
25
+ end
26
+
27
+ it "should not raise an error when passing block" do
28
+ lambda {
29
+ Twitter::Client.configure(&@block)
30
+ }.should_not raise_error
31
+ end
32
+
33
+ it "should yield a Twitter::Client object to block" do
34
+ Twitter::Client.configure(&@block)
35
+ @block_invoked.should be(true)
36
+ @conf_yielded.should be(true)
37
+ end
38
+
39
+ after(:each) do
40
+ nilize(@block, @block_invoked, @conf, @conf_yielded)
41
+ end
42
+ end
43
+
44
+ describe Twitter::Config, "#eql?" do
45
+ before(:each) do
46
+ @protocol = :ssl
47
+ @host = 'twitter.com'
48
+ @port = 443
49
+ @proxy_host = 'myproxy.host'
50
+ @proxy_port = 8080
51
+ attrs = {
52
+ :protocol => @protocol,
53
+ :host => @host,
54
+ :port => @port,
55
+ :proxy_host => @proxy_host,
56
+ :proxy_port => @proxy_port,
57
+ }
58
+ @obj = Twitter::Config.new(attrs)
59
+ @other = Twitter::Config.new(attrs)
60
+
61
+ @different = stubbed_twitter_config(Twitter::Config.new, attrs.merge(:proxy_host => 'different.proxy'))
62
+ @same = @obj
63
+ end
64
+
65
+ it "should return true for two logically equivalent objects" do
66
+ @obj.should be_eql(@other)
67
+ @other.should be_eql(@obj)
68
+ end
69
+
70
+ it "should return false for two logically different objects" do
71
+ @obj.should_not be_eql(@different)
72
+ @different.should_not be_eql(@obj)
73
+ @other.should_not be_eql(@different)
74
+ @different.should_not be_eql(@other)
75
+ end
76
+
77
+ it "should return true for references to the same object in memory" do
78
+ @obj.should eql(@same)
79
+ @same.should eql(@obj)
80
+ @other.should eql(@other)
81
+ end
82
+
83
+ after(:each) do
84
+ nilize(@protocol, @host, @port, @proxy_host, @proxy_port, @obj, @other, @different, @same)
85
+ end
86
+ end
@@ -0,0 +1,15 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
3
+ describe Twitter::Client, ".from_config" do
4
+ before(:each) do
5
+
6
+ end
7
+
8
+ it "should load YAML file for instance configuration" do
9
+
10
+ end
11
+
12
+ after(:each) do
13
+
14
+ end
15
+ end
@@ -0,0 +1,127 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
3
+ describe "Twitter::ClassUtilMixin mixed-in class" do
4
+ before(:each) do
5
+ class TestClass
6
+ include Twitter::ClassUtilMixin
7
+ attr_accessor :var1, :var2, :var3
8
+ end
9
+ @init_hash = { :var1 => 'val1', :var2 => 'val2', :var3 => 'val3' }
10
+ end
11
+
12
+ it "should have Twitter::ClassUtilMixin as an included module" do
13
+ TestClass.included_modules.member?(Twitter::ClassUtilMixin).should be(true)
14
+ end
15
+
16
+ it "should set attributes passed in the hash to TestClass.new" do
17
+ test = TestClass.new(@init_hash)
18
+ @init_hash.each do |key, val|
19
+ test.send(key).should eql(val)
20
+ end
21
+ end
22
+
23
+ it "should not set attributes passed in the hash that are not attributes in TestClass.new" do
24
+ test = nil
25
+ lambda { test = TestClass.new(@init_hash.merge(:var4 => 'val4')) }.should_not raise_error
26
+ test.respond_to?(:var4).should be(false)
27
+ end
28
+ end
29
+
30
+ describe "Twitter::RESTError#to_s" do
31
+ before(:each) do
32
+ @hash = { :code => 200, :message => 'OK', :uri => 'http://test.host/bla' }
33
+ @error = Twitter::RESTError.new(@hash)
34
+ @expected_message = "HTTP #{@hash[:code]}: #{@hash[:message]} at #{@hash[:uri]}"
35
+ end
36
+
37
+ it "should return @expected_message" do
38
+ @error.to_s.should eql(@expected_message)
39
+ end
40
+ end
41
+
42
+ describe "Twitter::Status#eql?" do
43
+ before(:each) do
44
+ @id = 34329594003
45
+ @attr_hash = { :text => 'Status', :id => @id,
46
+ :user => { :name => 'Tess',
47
+ :description => "Unfortunate D'Urberville",
48
+ :location => 'Dorset',
49
+ :url => nil,
50
+ :id => 34320304,
51
+ :screen_name => 'maiden_no_more' },
52
+ :created_at => 'Wed May 02 03:04:54 +0000 2007'}
53
+ @obj = Twitter::Status.new @attr_hash
54
+ @other = Twitter::Status.new @attr_hash
55
+ end
56
+
57
+ it "should return true when non-transient object attributes are eql?" do
58
+ @obj.should eql(@other)
59
+ end
60
+
61
+ it "should return false when not all non-transient object attributes are eql?" do
62
+ @other.created_at = Time.now.to_s
63
+ @obj.should_not eql(@other)
64
+ end
65
+
66
+ it "should return true when comparing same object to itself" do
67
+ @obj.should eql(@obj)
68
+ @other.should eql(@other)
69
+ end
70
+ end
71
+
72
+ describe "Twitter::User#eql?" do
73
+ before(:each) do
74
+ @attr_hash = { :name => 'Elizabeth Jane Newson-Henshard',
75
+ :description => "Wronged 'Daughter'",
76
+ :location => 'Casterbridge',
77
+ :url => nil,
78
+ :id => 6748302,
79
+ :screen_name => 'mayors_daughter_or_was_she?' }
80
+ @obj = Twitter::User.new @attr_hash
81
+ @other = Twitter::User.new @attr_hash
82
+ end
83
+
84
+ it "should return true when non-transient object attributes are eql?" do
85
+ @obj.should eql(@other)
86
+ end
87
+
88
+ it "should return false when not all non-transient object attributes are eql?" do
89
+ @other.id = 1
90
+ @obj.should_not eql(@other)
91
+ @obj.eql?(@other).should be(false)
92
+ end
93
+
94
+ it "should return true when comparing same object to itself" do
95
+ @obj.should eql(@obj)
96
+ @other.should eql(@other)
97
+ end
98
+ end
99
+
100
+ describe "Twitter::ClassUtilMixin#require_block" do
101
+ before(:each) do
102
+ class TestClass
103
+ include Twitter::ClassUtilMixin
104
+ end
105
+ @test_subject = TestClass.new
106
+ end
107
+
108
+ it "should respond to :require_block" do
109
+ @test_subject.should respond_to(:require_block)
110
+ end
111
+
112
+ it "should raise ArgumentError when block not given" do
113
+ lambda {
114
+ @test_subject.send(:require_block, false)
115
+ }.should raise_error(ArgumentError)
116
+ end
117
+
118
+ it "should not raise ArgumentError when block is given" do
119
+ lambda {
120
+ @test_subject.send(:require_block, true)
121
+ }.should_not raise_error(ArgumentError)
122
+ end
123
+
124
+ after(:each) do
125
+ @test_subject = nil
126
+ end
127
+ end