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
@@ -1,19 +1,14 @@
1
1
  require 'cerberus/utils'
2
+ require 'cerberus/scm/base'
2
3
 
3
- class Cerberus::SCM::Git
4
- def initialize(path, config = {})
5
- raise "Path can't be nil" unless path
6
-
7
- @path, @config = path.strip, config
8
- @encoded_path = (@path.include?(' ') ? "\"#{@path}\"" : @path)
9
- end
10
-
4
+ class Cerberus::SCM::Git < Cerberus::SCM::Base
5
+
11
6
  def installed?
12
7
  exec_successful? "#{@config[:bin_path]}git --version"
13
8
  end
14
9
 
15
10
  def update!
16
- if test(?d, @path + '/.git')
11
+ if test( ?d, File.join( @path,'.git' ) )
17
12
  get_updates
18
13
  execute("reset", "--hard #{remote_head}")
19
14
  else
@@ -21,6 +16,7 @@ class Cerberus::SCM::Git
21
16
  encoded_url = (@config[:scm, :url].include?(' ') ? "\"#{@config[:scm, :url]}\"" : @config[:scm, :url])
22
17
  @new = true
23
18
  @status = execute("clone", "#{encoded_url} #{@path}", false)
19
+ execute('config', 'pager.diff false') # turn off git-diff $PAGER by default
24
20
  if branch = @config[:scm, :branch]
25
21
  execute('branch', "--track #{branch} #{remote_head}")
26
22
  execute('checkout', branch)
@@ -41,10 +37,6 @@ class Cerberus::SCM::Git
41
37
  _full ? @revision : @revision.slice(0,8)
42
38
  end
43
39
 
44
- def url
45
- @path
46
- end
47
-
48
40
  def last_commit_message
49
41
  @message
50
42
  end
@@ -80,7 +72,7 @@ class Cerberus::SCM::Git
80
72
 
81
73
  def extract_commit_info( commit=remote_head )
82
74
  message = execute("show", "#{ commit } --pretty='format:%an(%ae)|%ai|%H|%s'").split("|")
83
- { :author => message[0], :date => message[1], :revision => message[2], :message => message[3] }
75
+ return { :author => message[0], :date => message[1], :revision => message[2], :message => message[3] }
84
76
  end
85
77
 
86
78
  def last_tested_revision
@@ -1,12 +1,12 @@
1
1
  require 'cerberus/utils'
2
+ require 'cerberus/scm/base'
2
3
 
3
- class Cerberus::SCM::Perforce
4
+ class Cerberus::SCM::Perforce < Cerberus::SCM::Base
5
+
4
6
  CHANGES_LOG_REGEXP = /^Change (\d+) on (.*) by (.*)\n\n(.*)/m
5
7
 
6
8
  def initialize(path, config = {})
7
- @config = config
8
- @path = path.strip
9
-
9
+ super
10
10
  @p4_view = @config[:scm, :view]
11
11
  @client_name = Socket.gethostname + ":" + @path.gsub(' ', ':')
12
12
  end
@@ -1,12 +1,7 @@
1
1
  require 'cerberus/utils'
2
+ require 'cerberus/scm/base'
2
3
 
3
- class Cerberus::SCM::SVN
4
- def initialize(path, config = {})
5
- raise "Path can't be nil" unless path
6
-
7
- @path, @config = path.strip, config
8
- @encoded_path = (@path.include?(' ') ? "\"#{@path}\"" : @path)
9
- end
4
+ class Cerberus::SCM::SVN < Cerberus::SCM::Base
10
5
 
11
6
  def installed?
12
7
  exec_successful? "#{@config[:bin_path]}svn --version"
@@ -1,5 +1,10 @@
1
1
  require 'yaml'
2
2
 
3
+ # Load in vendor libraries
4
+ for dir in Dir[File.join(File.dirname(__FILE__), '..', 'vendor', '*')]
5
+ $: << File.join(dir, 'lib')
6
+ end
7
+
3
8
  module Cerberus
4
9
  module Utils
5
10
  def say(msg)
@@ -0,0 +1,23 @@
1
+ = Ruby-IRC
2
+
3
+ Framework for IRC clients
4
+
5
+ == What is it?
6
+
7
+ Ruby-IRC is a simple framework for creating clients for IRC. It will
8
+ monitor multiple IO sockets for data. Allows user defined handlers
9
+ for IRC events.
10
+
11
+ == A simple usage example
12
+
13
+ bot = IRC.new("Nickname", "server.example.com", "6667", "Realname")
14
+ IRCEvent.add_callback('endofmotd') { |event| bot.add_channel('#eris') }
15
+ IRCEvent.add_callback('join') { |event|
16
+ bot.send_message(event.channel, "Hello #{event.from}")
17
+ }
18
+ bot.connect
19
+
20
+ == Author
21
+ Chris Boyer
22
+
23
+ email: cboyer@musiciansfriend.com
@@ -0,0 +1,164 @@
1
+
2
+ require 'socket'
3
+ require 'IRCConnection'
4
+ require 'IRCEvent'
5
+ require 'IRCChannel'
6
+ require 'IRCUser'
7
+ require 'IRCUtil'
8
+
9
+
10
+
11
+ # Class IRC is a master class that handles connection to the irc
12
+ # server and pasring of IRC events, through the IRCEvent class.
13
+ class IRC
14
+ @channels = nil
15
+ # Create a new IRC Object instance
16
+ def initialize( nick, server, port, realname='RBot', options = {})
17
+ @nick = nick
18
+ @server = server
19
+ @port = port
20
+ @realname = realname
21
+ @channels = Array.new(0)
22
+ # Some good default Event handlers. These can and will be overridden by users.
23
+ # Thses make changes on the IRCbot object. So they need to be here.
24
+
25
+ # Topic events can come on two tags, so we create one proc to handle them.
26
+ topic_proc = Proc.new { |event|
27
+ self.channels.each { |chan|
28
+ if chan == event.channel
29
+ chan.topic = event.message
30
+ end
31
+ }
32
+ }
33
+
34
+ IRCEvent.add_handler('332', topic_proc)
35
+ IRCEvent.add_handler('topic', topic_proc)
36
+ @@options = options;
37
+
38
+ end
39
+
40
+ attr_reader :nick, :server, :port
41
+
42
+ # Join a channel, adding it to the list of joined channels
43
+ def add_channel channel
44
+ join(channel)
45
+ self
46
+ end
47
+
48
+ # Returns a list of channels joined
49
+ def channels
50
+ @channels
51
+ end
52
+
53
+ # Alias for IRC.connect
54
+ def start
55
+ self.connect
56
+ end
57
+
58
+ # Open a connection to the server using the IRC Connect
59
+ # method. Events yielded from the IRCConnection handler are
60
+ # processed and then control is returned to IRCConnection
61
+ def connect
62
+ quithandler = lambda { send_quit(); IRCConnection.quit }
63
+ trap("INT", quithandler)
64
+ trap("TERM", quithandler)
65
+
66
+ IRCConnection.handle_connection(@server, @port, @nick, @realname, @@options) do
67
+ # Log in information moved to IRCConnection
68
+ @threads = []
69
+ IRCConnection.main do |event|
70
+ if event.kind_of?(Array)
71
+ event.each {|event|
72
+ thread_event(event)
73
+ }
74
+ else
75
+ thread_event(event)
76
+ end
77
+ # Memory leak patch thanks to Patrick Sinclair
78
+ @threads.delete_if {|thr| thr.stop? }
79
+ end
80
+ @threads.each {|thr| thr.join }
81
+ end
82
+ end
83
+
84
+ # Joins a channel on a server.
85
+ def join(channel)
86
+ if (IRCConnection.send_to_server("JOIN #{channel}"))
87
+ @channels.push(IRCChannel.new(channel));
88
+ end
89
+ end
90
+
91
+ # Leaves a channel on a server
92
+ def part(channel)
93
+ if (IRCConnection.send_to_server("PART #{channel}"))
94
+ @channels.delete_if {|chan| chan.name == channel }
95
+ end
96
+ end
97
+
98
+ # kicks a user from a channel (does not check for operator privledge)
99
+ def kick(channel, user, message)
100
+ IRCConnection.send_to_server("KICK #{channel} #{user} :#{message || user || 'kicked'}")
101
+ end
102
+
103
+ # sets the topic of the given channel
104
+ def set_topic(channel, topic)
105
+ IRCConnection.send_to_server("TOPIC #{channel} :#{topic}");
106
+ end
107
+
108
+ # Sends a private message, or channel message
109
+ def send_message(to, message)
110
+ IRCConnection.send_to_server("privmsg #{to} :#{message}");
111
+ end
112
+
113
+ # Sends a notice
114
+ def send_notice(to, message)
115
+ IRCConnection.send_to_server("NOTICE #{to} :#{message}");
116
+ end
117
+
118
+ # performs an action
119
+ def send_action(to, action)
120
+ send_ctcp(to, 'ACTION', action);
121
+ end
122
+
123
+ # send CTCP
124
+ def send_ctcp(to, type, message)
125
+ IRCConnection.send_to_server("privmsg #{to} :\001#{type} #{message}");
126
+ end
127
+
128
+ # Quits the IRC Server
129
+ def send_quit
130
+ IRCConnection.send_to_server("QUIT : Quit ordered by user")
131
+ end
132
+
133
+ # Ops selected user.
134
+ def op(channel, user)
135
+ IRCConnection.send_to_server("MODE #{channel} +o #{user}")
136
+ end
137
+
138
+ # Changes the current nickname
139
+ def ch_nick(nick)
140
+ IRCConnection.send_to_server("NICK #{nick}")
141
+ @nick = nick
142
+ end
143
+
144
+ # Removes operator status from a user
145
+ def deop(channel, user)
146
+ IRCConnection.send_to_server("MODE #{channel} -o #{user}")
147
+ end
148
+
149
+ # Changes target users mode
150
+ def mode(channel, user, mode)
151
+ IRCConnection.send_to_server("MODE #{channel} #{mode} #{user}")
152
+ end
153
+
154
+ # Retrievs user information from the server
155
+ def get_user_info(user)
156
+ IRCConnection.send_to_server("WHO #{user}")
157
+ end
158
+ private
159
+ def thread_event (event)
160
+ @threads << Thread.new(event) {|localevent|
161
+ localevent.process
162
+ }
163
+ end
164
+ end
@@ -0,0 +1,33 @@
1
+ require "IRCUser"
2
+
3
+ # Represents an IRC Channel
4
+ class IRCChannel
5
+ def initialize(name)
6
+ @name = name
7
+ @users = Array.new(0)
8
+ end
9
+ attr_reader :name
10
+
11
+ # set the topic on this channel
12
+ def topic=(topic)
13
+ @topic = topic
14
+ end
15
+
16
+ # get the topic on this channel
17
+ def topic
18
+ if @topic
19
+ return @topic
20
+ end
21
+ return "No Topic set"
22
+ end
23
+
24
+ # add a user to this channel's userlist
25
+ def add_user(username)
26
+ @users.push(IRCUser.create_user(username))
27
+ end
28
+
29
+ # returns the current user list for this channel
30
+ def users
31
+ @users
32
+ end
33
+ end
@@ -0,0 +1,134 @@
1
+
2
+ # Handles connection to IRC Server
3
+ class IRCConnection
4
+ @@quit = 0
5
+ @@readsockets = Array.new(0)
6
+ @@output_buffer = Array.new(0)
7
+ @@events = Hash.new()
8
+ @@last_send = Time.now.to_f
9
+ @@message_delay = 0.2 # Default delay to 1 fifth of a second.
10
+ # Creates a socket connection and then yields.
11
+ def IRCConnection.handle_connection(server, port, nick='ChangeMe', realname='MeToo', options = nil)
12
+ @server = server;
13
+ @port = port
14
+ @nick = nick
15
+ @realname = realname
16
+ @@options = options
17
+ if options.nil?
18
+ @@options = Array.new(0)
19
+ end
20
+ socket = create_tcp_socket(server, port)
21
+ add_IO_socket(socket) {|sock|
22
+ begin
23
+ IRCEvent.new(sock.readline.chomp)
24
+ rescue Errno::ECONNRESET
25
+ # Catches connection reset by peer, attempts to reconnect
26
+ # after sleeping for 10 second.
27
+ remove_IO_socket(sock)
28
+ sleep 10
29
+ handle_connection(@server, @port, @nick, @realname, @@options)
30
+ end
31
+ }
32
+ send_to_server "NICK #{nick}"
33
+ send_to_server "USER #{nick} 8 * :#{realname}"
34
+ if block_given?
35
+ yield
36
+ @@socket.close
37
+ end
38
+ end
39
+
40
+ def IRCConnection.create_tcp_socket(server, port)
41
+ # Now with SSL Support. Thanks to dominiek@digigen.nl for the idea on this.
42
+ tcpsocket = TCPsocket.open(server, port)
43
+ if @@options[:use_ssl]
44
+ ssl_context = OpenSSL::SSL::SSLContext.new()
45
+ ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
46
+ @@socket = OpenSSL::SSL::SSLSocket.new(tcpsocket, ssl_context)
47
+ @@socket.sync = true
48
+ @@socket.connect
49
+ else
50
+ @@socket = tcpsocket
51
+ end
52
+
53
+ if block_given?
54
+ yield
55
+ @@socket.close
56
+ return
57
+ end
58
+ return @@socket
59
+ end
60
+
61
+ # Sends a line of text to the server
62
+ def IRCConnection.send_to_server(line)
63
+ @@socket.write(line + "\n")
64
+ end
65
+
66
+ # Adds data an output buffer. This let's us keep a handle on how
67
+ # fast we send things. Yay.
68
+ def IRCConnection.output_push(line)
69
+ @@output_buffer.push(line)
70
+ end
71
+
72
+ # This loop monitors all IO_Sockets IRCConnection controls
73
+ # (including the IRC socket) and yields events to the IO_Sockets
74
+ # event handler.
75
+ def IRCConnection.main
76
+ while(@@quit == 0)
77
+ do_one_loop { |event|
78
+ yield event
79
+ }
80
+ end
81
+ end
82
+
83
+ # Makes one single loop pass, checking all sockets for data to read,
84
+ # and yields the data to the sockets event handler.
85
+ def IRCConnection.do_one_loop
86
+ read_sockets = select(@@readsockets, nil, nil, 0.1);
87
+ if !read_sockets.nil?
88
+ read_sockets[0].each {|sock|
89
+ if sock.eof? && sock == @@socket
90
+ remove_IO_socket(sock)
91
+ sleep 10
92
+ handle_connection(@server, @port, @nick, @realname)
93
+ else
94
+ yield @@events[sock.object_id.to_i].call(sock)
95
+ end
96
+ }
97
+ end
98
+ if @@output_buffer.length > 0
99
+ timer = Time.now.to_f
100
+ if (timer > @@last_send + @@message_delay)
101
+ message = @@output_buffer.shift();
102
+ if !message.nil?
103
+ IRCConnection.send_to_server(message);
104
+ @@last_send = timer
105
+ end
106
+ end
107
+ end
108
+ end
109
+
110
+ # Ends connection to the irc server
111
+ def IRCConnection.quit
112
+ @@quit = 1
113
+ end
114
+ def IRCConnection.delay=(delay)
115
+ @@message_delay = delay.to_f
116
+ end
117
+ # Retrieves user info from the server
118
+ def IRCConnection.get_user_info(user)
119
+ IRCConnection.send_to_server("WHOIS #{user}")
120
+ end
121
+
122
+ # Adds a new socket to the list of sockets to monitor for new data.
123
+ def IRCConnection.add_IO_socket(socket, &event_generator)
124
+ @@readsockets.push(socket)
125
+ @@events[socket.object_id.to_i] = event_generator
126
+ end
127
+
128
+ def IRCConnection.remove_IO_socket(sock)
129
+ sock.close
130
+ @@readsockets.delete_if {|item| item == sock }
131
+ end
132
+ end
133
+
134
+