poolparty 0.2.18 → 0.2.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. data/Manifest.txt +142 -47
  2. data/PostInstall.txt +5 -5
  3. data/README.txt +25 -4
  4. data/Rakefile +46 -2
  5. data/bin/cloud +12 -21
  6. data/bin/cloud-add-keypair +18 -13
  7. data/bin/cloud-configure +11 -18
  8. data/bin/cloud-contract +7 -17
  9. data/bin/cloud-ensure-provisioning +39 -0
  10. data/bin/cloud-expand +9 -17
  11. data/bin/cloud-handle-load +27 -0
  12. data/bin/cloud-list +3 -9
  13. data/bin/cloud-maintain +12 -18
  14. data/bin/cloud-osxcopy +3 -9
  15. data/bin/cloud-provision +20 -21
  16. data/bin/cloud-refresh +4 -13
  17. data/bin/cloud-run +3 -4
  18. data/bin/cloud-ssh +3 -2
  19. data/bin/cloud-start +18 -21
  20. data/bin/cloud-stats +17 -0
  21. data/bin/cloud-terminate +4 -7
  22. data/bin/messenger-get-current-nodes +14 -0
  23. data/bin/pool +12 -12
  24. data/bin/pool-describe +0 -1
  25. data/bin/{pool-spec → pool-generate} +1 -0
  26. data/bin/pool-init +28 -0
  27. data/bin/pool-list +14 -12
  28. data/bin/pool-start +11 -17
  29. data/bin/server-build-messenger +13 -6
  30. data/bin/server-fire-cmd +1 -1
  31. data/bin/server-get-load +5 -16
  32. data/bin/server-list-active +3 -10
  33. data/bin/server-rerun +4 -4
  34. data/bin/server-send-command +18 -0
  35. data/bin/server-show-stats +17 -0
  36. data/bin/server-start-client +29 -0
  37. data/bin/server-start-master +13 -14
  38. data/bin/server-start-node +14 -15
  39. data/bin/server-stop-client +3 -0
  40. data/bin/server-stop-master +3 -0
  41. data/bin/server-stop-node +3 -0
  42. data/bin/server-update-hosts +48 -0
  43. data/config/hoe.rb +4 -3
  44. data/examples/plugin_without_plugin_directory.rb +1 -2
  45. data/generators/poolspec/USAGE +2 -2
  46. data/generators/poolspec/poolspec_generator.rb +2 -1
  47. data/generators/poolspec/templates/pool_spec_template.erb +3 -2
  48. data/lib/erlang/messenger/Rakefile +12 -0
  49. data/lib/erlang/messenger/ebin/client.app +19 -0
  50. data/lib/erlang/messenger/ebin/master.app +1 -1
  51. data/lib/erlang/messenger/ebin/node.app +1 -1
  52. data/lib/erlang/messenger/ebin/pm_client_rel-0.1.rel +1 -0
  53. data/lib/erlang/messenger/ebin/pm_master_rel-0.1.rel +1 -1
  54. data/lib/erlang/messenger/ebin/pm_node_rel-0.1.rel +1 -1
  55. data/lib/erlang/messenger/include/defines.hrl +27 -0
  56. data/lib/erlang/messenger/lib/eunit/.svn/all-wcprops +53 -0
  57. data/lib/erlang/messenger/lib/eunit/.svn/entries +140 -0
  58. data/lib/erlang/messenger/lib/eunit/.svn/format +1 -0
  59. data/lib/erlang/messenger/lib/eunit/.svn/prop-base/NOTES.svn-base +5 -0
  60. data/lib/erlang/messenger/lib/eunit/.svn/text-base/AUTHORS.svn-base +2 -0
  61. data/lib/erlang/messenger/lib/eunit/.svn/text-base/CHANGELOG.svn-base +14 -0
  62. data/lib/erlang/messenger/lib/eunit/.svn/text-base/COPYING.svn-base +504 -0
  63. data/lib/erlang/messenger/lib/eunit/.svn/text-base/NOTES.svn-base +276 -0
  64. data/lib/erlang/messenger/lib/eunit/.svn/text-base/README.svn-base +3 -0
  65. data/lib/erlang/messenger/lib/eunit/.svn/text-base/sys.config.svn-base +9 -0
  66. data/lib/erlang/messenger/lib/eunit/.svn/text-base/vsn.mk.svn-base +1 -0
  67. data/lib/erlang/messenger/lib/eunit/doc/.svn/all-wcprops +59 -0
  68. data/lib/erlang/messenger/lib/eunit/doc/.svn/entries +142 -0
  69. data/lib/erlang/messenger/lib/eunit/doc/.svn/format +1 -0
  70. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/erlang.png.svn-base +5 -0
  71. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/eunit.html.svn-base +5 -0
  72. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/index.html.svn-base +5 -0
  73. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/modules-frame.html.svn-base +5 -0
  74. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/overview-summary.html.svn-base +5 -0
  75. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/packages-frame.html.svn-base +5 -0
  76. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/edoc-info.svn-base +3 -0
  77. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/erlang.png.svn-base +0 -0
  78. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/eunit.html.svn-base +172 -0
  79. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/index.html.svn-base +17 -0
  80. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/modules-frame.html.svn-base +12 -0
  81. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview-summary.html.svn-base +984 -0
  82. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview.edoc.svn-base +980 -0
  83. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/packages-frame.html.svn-base +11 -0
  84. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/stylesheet.css.svn-base +55 -0
  85. data/lib/erlang/messenger/lib/eunit/ebin/.svn/all-wcprops +5 -0
  86. data/lib/erlang/messenger/lib/eunit/ebin/.svn/dir-prop-base +8 -0
  87. data/lib/erlang/messenger/lib/eunit/ebin/.svn/entries +28 -0
  88. data/lib/erlang/messenger/lib/eunit/ebin/.svn/format +1 -0
  89. data/lib/erlang/messenger/lib/eunit/examples/.svn/all-wcprops +23 -0
  90. data/lib/erlang/messenger/lib/eunit/examples/.svn/entries +66 -0
  91. data/lib/erlang/messenger/lib/eunit/examples/.svn/format +1 -0
  92. data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/eunit_examples.erl.svn-base +5 -0
  93. data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/fib.erl.svn-base +5 -0
  94. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/eunit_examples.erl.svn-base +339 -0
  95. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/fib.erl.svn-base +19 -0
  96. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/tests.txt.svn-base +1 -0
  97. data/lib/erlang/messenger/lib/eunit/include/.svn/all-wcprops +11 -0
  98. data/lib/erlang/messenger/lib/eunit/include/.svn/entries +41 -0
  99. data/lib/erlang/messenger/lib/eunit/include/.svn/format +1 -0
  100. data/lib/erlang/messenger/lib/eunit/include/.svn/prop-base/eunit.hrl.svn-base +5 -0
  101. data/lib/erlang/messenger/lib/eunit/include/.svn/text-base/eunit.hrl.svn-base +313 -0
  102. data/lib/erlang/messenger/lib/eunit/src/.svn/all-wcprops +113 -0
  103. data/lib/erlang/messenger/lib/eunit/src/.svn/entries +259 -0
  104. data/lib/erlang/messenger/lib/eunit/src/.svn/format +1 -0
  105. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/autoload.erl.svn-base +5 -0
  106. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/code_monitor.erl.svn-base +5 -0
  107. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit.erl.svn-base +5 -0
  108. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_autoexport.erl.svn-base +5 -0
  109. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_data.erl.svn-base +5 -0
  110. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_internal.hrl.svn-base +5 -0
  111. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_lib.erl.svn-base +5 -0
  112. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_proc.erl.svn-base +5 -0
  113. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_serial.erl.svn-base +5 -0
  114. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_server.erl.svn-base +5 -0
  115. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_striptests.erl.svn-base +5 -0
  116. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_test.erl.svn-base +5 -0
  117. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tests.erl.svn-base +5 -0
  118. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tty.erl.svn-base +5 -0
  119. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/file_monitor.erl.svn-base +5 -0
  120. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/autoload.erl.svn-base +388 -0
  121. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/code_monitor.erl.svn-base +243 -0
  122. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.app.src.svn-base +21 -0
  123. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.appup.src.svn-base +1 -0
  124. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.erl.svn-base +196 -0
  125. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_autoexport.erl.svn-base +102 -0
  126. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_data.erl.svn-base +798 -0
  127. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_internal.hrl.svn-base +48 -0
  128. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_lib.erl.svn-base +682 -0
  129. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_proc.erl.svn-base +552 -0
  130. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_serial.erl.svn-base +157 -0
  131. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_server.erl.svn-base +340 -0
  132. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_striptests.erl.svn-base +64 -0
  133. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_test.erl.svn-base +334 -0
  134. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tests.erl.svn-base +45 -0
  135. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tty.erl.svn-base +272 -0
  136. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/file_monitor.erl.svn-base +409 -0
  137. data/lib/erlang/messenger/pm_client_rel-0.1.boot +0 -0
  138. data/lib/erlang/messenger/pm_client_rel-0.1.script +238 -0
  139. data/lib/erlang/messenger/pm_master_rel-0.1.boot +0 -0
  140. data/lib/erlang/messenger/pm_master_rel-0.1.script +82 -85
  141. data/lib/erlang/messenger/pm_node_rel-0.1.boot +0 -0
  142. data/lib/erlang/messenger/pm_node_rel-0.1.script +80 -85
  143. data/lib/erlang/messenger/src/client_app.erl +39 -0
  144. data/lib/erlang/messenger/src/client_server.erl +60 -0
  145. data/lib/erlang/messenger/src/pm_client.erl +48 -18
  146. data/lib/erlang/messenger/src/pm_client_old.erl +52 -0
  147. data/lib/erlang/messenger/src/pm_client_supervisor.erl +38 -0
  148. data/lib/erlang/messenger/src/pm_cluster.erl +20 -16
  149. data/lib/erlang/messenger/src/pm_event_manager.erl +27 -0
  150. data/lib/erlang/messenger/src/pm_master.erl +126 -34
  151. data/lib/erlang/messenger/src/pm_master_event_handler.erl +72 -0
  152. data/lib/erlang/messenger/src/pm_master_supervisor.erl +9 -10
  153. data/lib/erlang/messenger/src/pm_node.erl +107 -30
  154. data/lib/erlang/messenger/src/pm_node_supervisor.erl +13 -15
  155. data/lib/erlang/messenger/src/pm_packager.erl +5 -2
  156. data/lib/erlang/messenger/src/pm_strings.erl +11 -0
  157. data/lib/erlang/messenger/src/utils.erl +43 -8
  158. data/lib/erlang/messenger/useful_snippets +17 -0
  159. data/lib/poolparty/aska/aska.rb +150 -0
  160. data/lib/poolparty/base_packages/haproxy.rb +19 -26
  161. data/lib/poolparty/base_packages/heartbeat.rb +48 -47
  162. data/lib/poolparty/base_packages/poolparty.rb +88 -36
  163. data/lib/poolparty/base_packages/runit.rb +21 -0
  164. data/lib/poolparty/config/postlaunchmessage.txt +5 -0
  165. data/lib/poolparty/core/array.rb +4 -1
  166. data/lib/poolparty/core/class.rb +2 -0
  167. data/lib/poolparty/core/exception.rb +2 -1
  168. data/lib/poolparty/core/hash.rb +2 -2
  169. data/lib/poolparty/core/kernel.rb +3 -3
  170. data/lib/poolparty/core/metaid.rb +15 -0
  171. data/lib/poolparty/core/object.rb +42 -2
  172. data/lib/poolparty/core/string.rb +21 -6
  173. data/lib/poolparty/core/symbol.rb +9 -0
  174. data/lib/poolparty/dependency_resolutions/puppet.rb +20 -7
  175. data/lib/poolparty/exceptions/CloudNotFoundException.rb +7 -0
  176. data/lib/poolparty/exceptions/LoadRulesException.rb +7 -0
  177. data/lib/poolparty/exceptions/MasterException.rb +10 -0
  178. data/lib/poolparty/helpers/binary.rb +37 -4
  179. data/lib/poolparty/helpers/console.rb +25 -8
  180. data/lib/poolparty/helpers/nice_printer.rb +36 -0
  181. data/lib/poolparty/helpers/optioner.rb +51 -16
  182. data/lib/poolparty/helpers/provisioner_base.rb +117 -28
  183. data/lib/poolparty/helpers/provisioners/master.rb +102 -35
  184. data/lib/poolparty/helpers/provisioners/slave.rb +25 -9
  185. data/lib/poolparty/modules/cloud_dsl.rb +13 -0
  186. data/lib/poolparty/modules/cloud_resourcer.rb +51 -8
  187. data/lib/poolparty/modules/configurable.rb +1 -1
  188. data/lib/poolparty/modules/definable_resource.rb +2 -2
  189. data/lib/poolparty/modules/file_writer.rb +37 -6
  190. data/lib/poolparty/modules/method_missing_sugar.rb +8 -3
  191. data/lib/poolparty/modules/pretty_printer.rb +1 -0
  192. data/lib/poolparty/modules/resourcing_dsl.rb +4 -2
  193. data/lib/poolparty/modules/thread_pool.rb +106 -0
  194. data/lib/poolparty/monitors/base_monitor.rb +65 -6
  195. data/lib/poolparty/monitors/monitors/cpu_monitor.rb +1 -1
  196. data/lib/poolparty/monitors/monitors/memory_monitor.rb +28 -1
  197. data/lib/poolparty/monitors/monitors/web_monitor.rb +18 -0
  198. data/lib/poolparty/net/messenger.rb +72 -0
  199. data/lib/poolparty/net/remote.rb +5 -2
  200. data/lib/poolparty/net/remote_bases/ec2/ec2_response_object.rb +66 -0
  201. data/lib/poolparty/net/remote_bases/ec2.rb +133 -131
  202. data/lib/poolparty/net/remote_instance.rb +28 -6
  203. data/lib/poolparty/net/remoter.rb +117 -64
  204. data/lib/poolparty/net/remoter_base.rb +49 -11
  205. data/lib/poolparty/plugins/deploydirectory.rb +66 -0
  206. data/lib/poolparty/plugins/line.rb +5 -4
  207. data/lib/poolparty/plugins/rsyncmirror.rb +26 -0
  208. data/lib/poolparty/plugins/runit.rb +96 -0
  209. data/lib/poolparty/plugins/svn.rb +1 -1
  210. data/lib/poolparty/pool/base.rb +47 -18
  211. data/lib/poolparty/pool/cloud.rb +121 -65
  212. data/lib/poolparty/pool/custom_resource.rb +4 -20
  213. data/lib/poolparty/pool/loggable.rb +3 -8
  214. data/lib/poolparty/pool/plugin.rb +14 -19
  215. data/lib/poolparty/pool/plugin_model.rb +8 -8
  216. data/lib/poolparty/pool/pool.rb +28 -11
  217. data/lib/poolparty/pool/resource.rb +109 -40
  218. data/lib/poolparty/pool/resources/class_package.rb +74 -33
  219. data/lib/poolparty/pool/resources/conditional.rb +32 -10
  220. data/lib/poolparty/pool/resources/custom_service.rb +30 -0
  221. data/lib/poolparty/pool/resources/exec.rb +6 -5
  222. data/lib/poolparty/pool/resources/gem_package.rb +52 -0
  223. data/lib/poolparty/pool/resources/mount.rb +22 -0
  224. data/lib/poolparty/pool/resources/package.rb +13 -3
  225. data/lib/poolparty/pool/resources/sshkey.rb +1 -1
  226. data/lib/poolparty/pool/resources/variable.rb +4 -0
  227. data/lib/poolparty/pool/script.rb +8 -6
  228. data/lib/poolparty/templates/haproxy.conf +1 -1
  229. data/lib/poolparty/templates/messenger/client/log-run.erb +2 -0
  230. data/lib/poolparty/templates/messenger/client/run.erb +4 -0
  231. data/lib/poolparty/templates/messenger/master/log-run.erb +2 -0
  232. data/lib/poolparty/templates/messenger/master/run.erb +4 -0
  233. data/lib/poolparty/templates/messenger/node/log-run.erb +2 -0
  234. data/lib/poolparty/templates/messenger/node/run.erb +4 -0
  235. data/lib/poolparty/templates/poolparty.monitor +1 -1
  236. data/lib/poolparty/templates/puppet.conf +0 -0
  237. data/lib/poolparty/templates/puppetcleaner +6 -0
  238. data/lib/poolparty/templates/puppetrerun +9 -0
  239. data/lib/poolparty/templates/puppetrunner +8 -0
  240. data/lib/poolparty/templates/yaws.conf +19 -0
  241. data/lib/poolparty/version.rb +1 -1
  242. data/lib/poolparty.rb +35 -6
  243. data/lib/poolpartycl.rb +4 -0
  244. data/log/pool.logs +0 -0
  245. data/poolparty.gemspec +574 -61
  246. data/spec/poolparty/aska/aska_spec.rb +122 -0
  247. data/spec/poolparty/bin/console_spec.rb +18 -0
  248. data/spec/poolparty/core/hash_spec.rb +4 -4
  249. data/spec/poolparty/core/object_spec.rb +29 -0
  250. data/spec/poolparty/core/string_spec.rb +6 -0
  251. data/spec/poolparty/core/time_spec.rb +0 -3
  252. data/spec/poolparty/helpers/binary_spec.rb +2 -2
  253. data/spec/poolparty/helpers/optioner_spec.rb +1 -4
  254. data/spec/poolparty/helpers/provisioner_base_spec.rb +14 -1
  255. data/spec/poolparty/helpers/provisioners/master_spec.rb +3 -3
  256. data/spec/poolparty/modules/cloud_resourcer_spec.rb +3 -3
  257. data/spec/poolparty/modules/configurable_spec.rb +4 -1
  258. data/spec/poolparty/monitors/base_monitor_spec.rb +94 -2
  259. data/spec/poolparty/monitors/monitors/cpu_monitor_spec.rb +0 -1
  260. data/spec/poolparty/monitors/monitors/memory_monitor_spec.rb +47 -0
  261. data/spec/poolparty/{helpers → net}/messenger_spec.rb +3 -1
  262. data/spec/poolparty/net/remote_bases/ec2_spec.rb +46 -5
  263. data/spec/poolparty/net/remote_instance_spec.rb +2 -1
  264. data/spec/poolparty/net/remote_spec.rb +30 -8
  265. data/spec/poolparty/net/remoter_base_spec.rb +4 -1
  266. data/spec/poolparty/net/remoter_spec.rb +11 -108
  267. data/spec/poolparty/plugins/deploydirectory_spec.rb +51 -0
  268. data/spec/poolparty/pool/base_spec.rb +43 -33
  269. data/spec/poolparty/pool/cloud_spec.rb +299 -248
  270. data/spec/poolparty/pool/custom_resource_spec.rb +10 -5
  271. data/spec/poolparty/pool/example_spec.rb +0 -84
  272. data/spec/poolparty/pool/plugin_model_spec.rb +3 -2
  273. data/spec/poolparty/pool/plugin_spec.rb +89 -62
  274. data/spec/poolparty/pool/pool_spec.rb +17 -2
  275. data/spec/poolparty/pool/resource_spec.rb +341 -236
  276. data/spec/poolparty/pool/resources/class_package_spec.rb +102 -66
  277. data/spec/poolparty/pool/resources/conditional_spec.rb +65 -26
  278. data/spec/poolparty/pool/resources/cron_spec.rb +3 -2
  279. data/spec/poolparty/pool/resources/exec_spec.rb +1 -1
  280. data/spec/poolparty/pool/resources/gem_spec.rb +18 -14
  281. data/spec/poolparty/pool/resources/remote_file_spec.rb +1 -1
  282. data/spec/poolparty/pool/resources/variable_spec.rb +1 -1
  283. data/spec/poolparty/pool/script_spec.rb +58 -37
  284. data/spec/poolparty/pool/test_plugins/webserver.rb +1 -0
  285. data/spec/poolparty/spec_helper.rb +16 -5
  286. data/tasks/deployment.rake +19 -3
  287. data/tasks/development.rake +11 -2
  288. data/tasks/ec2.rake +9 -1
  289. data/website/index.html +2 -2
  290. metadata +167 -70
  291. data/bin/pool-provision +0 -34
  292. data/erl_crash.dump +0 -8409
  293. data/examples/with_apache_plugin.rb +0 -22
  294. data/lib/erlang/messenger/Makefile +0 -15
  295. data/lib/erlang/messenger/ebin/master_app.beam +0 -0
  296. data/lib/erlang/messenger/ebin/node_app.beam +0 -0
  297. data/lib/erlang/messenger/ebin/pm_client.beam +0 -0
  298. data/lib/erlang/messenger/ebin/pm_cluster.beam +0 -0
  299. data/lib/erlang/messenger/ebin/pm_event_handler.beam +0 -0
  300. data/lib/erlang/messenger/ebin/pm_master.beam +0 -0
  301. data/lib/erlang/messenger/ebin/pm_master_supervisor.beam +0 -0
  302. data/lib/erlang/messenger/ebin/pm_node.beam +0 -0
  303. data/lib/erlang/messenger/ebin/pm_node_supervisor.beam +0 -0
  304. data/lib/erlang/messenger/ebin/pm_packager.beam +0 -0
  305. data/lib/erlang/messenger/ebin/utils.beam +0 -0
  306. data/lib/erlang/messenger/lib/eunit/Makefile +0 -28
  307. data/lib/erlang/messenger/lib/eunit/ebin/autoload.beam +0 -0
  308. data/lib/erlang/messenger/lib/eunit/ebin/code_monitor.beam +0 -0
  309. data/lib/erlang/messenger/lib/eunit/ebin/eunit.beam +0 -0
  310. data/lib/erlang/messenger/lib/eunit/ebin/eunit_autoexport.beam +0 -0
  311. data/lib/erlang/messenger/lib/eunit/ebin/eunit_data.beam +0 -0
  312. data/lib/erlang/messenger/lib/eunit/ebin/eunit_lib.beam +0 -0
  313. data/lib/erlang/messenger/lib/eunit/ebin/eunit_proc.beam +0 -0
  314. data/lib/erlang/messenger/lib/eunit/ebin/eunit_serial.beam +0 -0
  315. data/lib/erlang/messenger/lib/eunit/ebin/eunit_server.beam +0 -0
  316. data/lib/erlang/messenger/lib/eunit/ebin/eunit_striptests.beam +0 -0
  317. data/lib/erlang/messenger/lib/eunit/ebin/eunit_test.beam +0 -0
  318. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tests.beam +0 -0
  319. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tty.beam +0 -0
  320. data/lib/erlang/messenger/lib/eunit/ebin/file_monitor.beam +0 -0
  321. data/lib/erlang/messenger/lib/eunit/src/Makefile +0 -46
  322. data/lib/erlang/messenger/src/pm_event_handler.erl +0 -21
  323. data/lib/poolparty/config/allowed_commands.yml +0 -1
  324. data/lib/poolparty/helpers/messenger.rb +0 -29
  325. data/lib/poolparty/plugins/git.rb +0 -39
  326. data/lib/poolparty/pool/resources/gem.rb +0 -28
  327. data/lib/poolparty/pool/tmp/.ppkeys +0 -3
  328. data/lib/poolparty/pool/tmp/happydayz +0 -1
  329. data/lib/poolparty/pool/tmp/install_master.sh +0 -33
  330. data/lib/poolparty/pool/tmp/pool.spec +0 -11
  331. data/lib/poolparty/pool/tmp/poolparty.pp +0 -600
  332. data/lib/poolparty/pool/tmp/tc-instances.list +0 -1
  333. data/lib/poolparty/templates/fileserver.conf +0 -4
  334. data/spec/poolparty/plugins/git_spec.rb +0 -33
  335. data/test_manifest.pp +0 -658
@@ -4,81 +4,117 @@ include PoolParty::Resources
4
4
 
5
5
  describe "File" do
6
6
  before(:each) do
7
- reset!
8
- @class = PoolParty::Resources::Classpackage.new({:name => "rockstar"})
7
+ reset_resources!
9
8
  end
10
- it "should have a method resources" do
11
- @class.respond_to?(:resources).should == true
12
- end
13
- it "should store the resources in an array" do
14
- @class.resources.class.should == Hash
15
- end
16
- describe "with resources" do
17
- before(:each) do
18
- cloud :application_cloud do
19
- classpackage do
20
- file({:name => "red"})
9
+ describe "wrapped" do
10
+ before(:each) do
11
+ reset!
12
+ @class = PoolParty::Resources::Classpackage.new({:name => "rockstar"})
13
+ end
14
+ it "should have a method resources" do
15
+ @class.respond_to?(:resources).should == true
16
+ end
17
+ it "should store the resources in an array" do
18
+ @class.resources.class.should == Hash
19
+ end
20
+ describe "with resources" do
21
+ before(:each) do
22
+ cloud :application_cloud do
23
+ classpackage do
24
+ file({:name => "red"})
25
+ end
26
+ end
27
+ @class = cloud(:application_cloud).resource(:classpackage).first
28
+ end
29
+ it "should store a resource in the resources array" do
30
+ @class.resources.size.should == 1
31
+ end
32
+ it "should have a file resource in the cloud" do
33
+ @class.resource(:file).should_not == nil
34
+ end
35
+ describe "to_s" do
36
+ before(:each) do
37
+ @class.instance_eval do
38
+ name "rockstar"
39
+ file({:name => "red"}) do; end
40
+ end
41
+ end
42
+ it "should output the class with the name as class [name]" do
43
+ @class.to_string.should =~ /class rockstar/
44
+ end
45
+ after do
46
+ @class.to_string
47
+ end
21
48
  end
22
49
  end
23
- @class = cloud(:application_cloud).resource(:classpackage).first
24
- end
25
- it "should store a resource in the resources array" do
26
- @class.resources.size.should == 1
27
50
  end
28
- it "should have a file resource in the cloud" do
29
- @class.resource(:file).should_not == nil
30
- end
31
- describe "to_s" do
51
+ describe "setting with a block" do
32
52
  before(:each) do
33
- @class.instance_eval do
34
- name "rockstar"
35
- file({:name => "red"}) do; end
53
+ @class1 = classpackage do
54
+ name "my_class"
55
+ file({:name => "frank"})
36
56
  end
37
57
  end
38
- it "should output the class with the name as class [name]" do
39
- @class.to_string.should =~ /class rockstar/
58
+ it "should set the name when set" do
59
+ @class1.name.should == "my_class"
40
60
  end
41
- after do
42
- @class.to_string
61
+ it "should have the file resource in the resources class" do
62
+ @class1.resources.size.should_not be_zero
63
+ end
64
+ it "should have the file resource in the resources array" do
65
+ @class1.resource(:file).class.should == Array
66
+ end
67
+ it "should store the file in the resources array" do
68
+ @class1.resource(:file).get_named("frank").first.name.should == "frank"
43
69
  end
44
70
  end
45
- end
46
- end
47
- describe "setting with a block" do
48
- before(:each) do
49
- @class1 = classpackage do
50
- name "my_class"
51
- file({:name => "frank"})
52
- end
53
- end
54
- it "should set the name when set" do
55
- @class1.name.should == "my_class"
56
- end
57
- it "should have the file resource in the resources class" do
58
- @class1.resources.size.should_not be_zero
59
- end
60
- it "should have the file resource in the resources array" do
61
- @class1.resource(:file).class.should == Array
62
- end
63
- it "should store the file in the resources array" do
64
- @class1.resource(:file).get_named("frank").first.name.should == "frank"
65
- end
66
- end
67
- describe "from a collection of resources to another" do
68
- before(:each) do
69
- self.stub!(:options).and_return({:name => "cook"})
70
- file(:name => "franksfile")
71
- exec(:name => "get file", :command => "kill frank for file")
72
- end
73
- it "should have the method classpackage_with_self" do
74
- self.respond_to?(:classpackage_with_self).should == true
75
- end
76
- it "should transfer the resources to the class" do
77
- @class2 = classpackage_with_self(self)
78
- @class2.resources.should_not be_empty
79
- end
80
- it "should leave zero resources on the parent" do
81
- @class2 = classpackage_with_self(self)
82
- resources.should be_empty
71
+ describe "from a collection of resources to another" do
72
+ before(:each) do
73
+ reset_resources!
74
+ cloud :bunkers do
75
+ file(:name => "franksfile")
76
+ exec(:name => "get file", :command => "kill frank for file")
77
+ end
78
+ @cloud = cloud(:bunkers)
79
+ @class2 = classpackage_with_self(@cloud)
80
+ end
81
+ it "should have the method classpackage_with_self" do
82
+ self.respond_to?(:classpackage_with_self).should == true
83
+ end
84
+ it "should transfer the resources to the class" do
85
+ @class2.resources.size.should == 2
86
+ end
87
+ it "should have the file resource in the classpackage" do
88
+ @class2.resource(:file).first.name.should == "franksfile"
89
+ end
90
+ it "should have the exec resource in the classpackage" do
91
+ @class2.resource(:exec).first.name.should == "get file"
92
+ end
93
+ it "should have the resources on the new classpackage" do
94
+ @cloud.resources.size.should == 1
95
+ end
96
+ it "should have the conditional classpackage on the resources" do
97
+ @cloud.resource(:classpackage).first.should == @class2
98
+ end
99
+ describe "to_string" do
100
+ before(:each) do
101
+ @output = @class2.to_string
102
+ end
103
+ it "should have the file in the string" do
104
+ @output.should =~ /franksfile/
105
+ end
106
+ it "should contain just the two resources in the string" do
107
+ @output.match(/(\w+) \{/).size.should == 2
108
+ end
109
+ describe "from within the cloud" do
110
+ before(:each) do
111
+ reset_resources!
112
+ @output = @cloud.build_short_manifest
113
+ end
114
+ it "should have one class" do
115
+ @output.match(/class (\w+) \{/).size.should == 2
116
+ end
117
+ end
118
+ end
83
119
  end
84
120
  end
@@ -4,35 +4,74 @@ include PoolParty::Resources
4
4
 
5
5
  describe "Conditional" do
6
6
  before(:each) do
7
- @cloud = cloud :app do; end
8
- @cloud.instance_eval do
9
- execute_if("$hostname", "'master'", self) do
10
- file({:name => "/etc/apache2/puppetmaster.conf"})
11
- end
12
- end
13
- @cond = @cloud.resource(:conditional).first
14
- end
15
- it "should add the block of resources on the parent" do
16
- @cloud.resources.size.should == 1
17
- end
18
- it "should have a conditional in the resources" do
19
- @cloud.resource(:conditional).first.name.should == "$hostname == 'master'"
20
- end
21
- it "should push the resources onto the conditional resource" do
22
- @cond.resources.size.should == 1
7
+ reset_resources!
23
8
  end
24
- it "should have a file resource on the conditional" do
25
- @cond.resource(:file).first.name.should == "/etc/apache2/puppetmaster.conf"
26
- end
27
- it "should have the parent as the cloud" do
28
- @cond.parent.should == @cloud
29
- end
30
- describe "to_string" do
9
+ describe "wrapped" do
31
10
  before(:each) do
32
- @string = @cond.to_string
11
+ @cloud = cloud :conditional_cloud_spec do
12
+ execute_if("$hostname","'master'", {}, self) do
13
+ has_file({:name => "/etc/apache2/puppetmaster2.conf"})
14
+ end
15
+ end
16
+ @cond = @cloud.get_resource(:conditional, "$hostname 'master'")
17
+ end
18
+ it "should add the block of resources on the parent" do
19
+ @cloud.resources.size.should == 1
20
+ end
21
+ it "should have a conditional in the resources" do
22
+ @cond.name.should == "$hostname 'master'"
33
23
  end
34
- it "should have a case statement for the hostname" do
35
- @string.should =~ /case \$hostname/
24
+ it "should push the resources onto the conditional resource" do
25
+ @cond.resources.size.should == 1
26
+ end
27
+ it "should have a file resource on the conditional" do
28
+ @cond.get_file("/etc/apache2/puppetmaster2.conf").name.should == "/etc/apache2/puppetmaster2.conf"
29
+ end
30
+ it "should have the parent as the cloud" do
31
+ @cond.parent.should == @cloud
32
+ end
33
+ describe "helpers" do
34
+ it "should have execute_on_master with the string $hostname == 'master'" do
35
+ str = execute_on_master do
36
+ has_file(:name => "/etc/vars")
37
+ end.to_string.should =~ /\$hostnamemaster/
38
+ end
39
+ it "should have execute_on_node with the string $hostname != 'master'" do
40
+ str = execute_on_node do
41
+ has_file(:name => "/etc/vars")
42
+ end.to_string.should =~ /\$hostnamemaster/
43
+ end
44
+ end
45
+ describe "to_string" do
46
+ before(:each) do
47
+ @string = @cond.to_string
48
+ end
49
+ it "should have a case statement for the hostname" do
50
+ @string.should =~ /case \$hostname/
51
+ end
52
+ describe "multiple" do
53
+ before(:each) do
54
+ reset!
55
+ @cloud = cloud :multiple_conditionals do
56
+ execute_on_master do
57
+ has_file(:name => "/etc/frank.txt")
58
+ end
59
+ execute_on_master do
60
+ has_exec(:name => "feed frank")
61
+ end
62
+ end
63
+ end
64
+ it "should have two conditional resources" do
65
+ @cloud.resource(:conditional).size.should == 2
66
+ end
67
+ end
68
+ describe "execute on node" do
69
+ it "should place the node in the default section" do
70
+ str = execute_on_node do
71
+ has_file(:name => "/etc/vars")
72
+ end.to_string.should =~ /default : \{/
73
+ end
74
+ end
36
75
  end
37
76
  end
38
77
  end
@@ -19,17 +19,18 @@ describe "Cron" do
19
19
  end
20
20
  describe "as included" do
21
21
  before(:each) do
22
+ reset_resources!
22
23
  @cron = cron({:rent => "low"}) do
23
24
  name "/www/conf/httpd.conf"
24
25
  hour 23
25
26
  minute 5
26
- weekday 1
27
+ weekday 1
27
28
  end
28
29
  end
29
30
  it "should use default values" do
30
31
  @cron.name.should == "/www/conf/httpd.conf"
31
32
  end
32
- it "should keep the default values for the file" do
33
+ it "should keep the default values for the cron" do
33
34
  @cron.user.should == "root"
34
35
  end
35
36
  it "should also set options through a hash" do
@@ -8,7 +8,7 @@ describe "Exec" do
8
8
  end
9
9
  describe "instances" do
10
10
  it "should turn the one hash instance into a string" do
11
- @exec.to_string.should =~ /exec \{\n"\/usr\/bin\/ifconfig"/
11
+ @exec.to_string.should =~ /exec \{ "\/usr\/bin\/ifconfig"/
12
12
  end
13
13
  it "should turn the two hash instance into a string" do
14
14
  @exec = exec({:name => "/usr/bin/ping 127.0.0.1"})
@@ -10,7 +10,7 @@ describe "Gem" do
10
10
  has_gempackage(:name => "rails")
11
11
  end
12
12
  end
13
- @gem = @cloud.resource(:gempackage).first
13
+ @gem = @cloud.get_resource(:gempackage, "activesupport")
14
14
  end
15
15
  it "should have a package" do
16
16
  @cloud.resource(:gempackage).should_not be_empty
@@ -19,24 +19,28 @@ describe "Gem" do
19
19
  @gem.name.should == "activesupport"
20
20
  end
21
21
  it "should have the 'rails' gem in the packages" do
22
- @cloud.resource(:gempackage).first.to_string.should =~ /rails/
22
+ @gem.to_string.should =~ /activesupport/
23
23
  end
24
24
  describe "with parent options" do
25
25
  before(:each) do
26
- reset_all!
27
- @cloud1 = cloud :gem_version_cloud do
28
- has_gempackage(:name => "ParseTree", :version => "2.2.0") do
29
- has_gempackage(:name => "edge-rails")
26
+ reset_resources!
27
+ end
28
+ describe "reset" do
29
+ before(:each) do
30
+ @cloud1 = cloud :gem_version_cloud do
31
+ has_gempackage(:name => "ParseTree", :version => "2.2.0") do
32
+ has_gempackage(:name => "edge-rails")
33
+ end
30
34
  end
35
+ @gem = @cloud1.resource(:gempackage).first
36
+ @gem2 = @gem.resource(:gempackage).first
37
+ end
38
+ it "should have the version set on the parent" do
39
+ @gem.version.should == "2.2.0"
40
+ end
41
+ it "should not take the version of the parent on the child" do
42
+ @gem.resource(:gempackage).first.version.should == nil
31
43
  end
32
- @gem = @cloud1.resource(:gempackage).first
33
- @gem2 = @gem.resource(:gempackage).first
34
- end
35
- it "should have the version set on the parent" do
36
- @gem.version.should == "2.2.0"
37
- end
38
- it "should not take the version of the parent on the child" do
39
- @gem2.version.should == nil
40
44
  end
41
45
  end
42
46
  end
@@ -24,7 +24,7 @@ describe "Remote file" do
24
24
  end
25
25
  end
26
26
  it "should have the source set to puppet" do
27
- @file.source.should == "puppet:///files/httpd.conf"
27
+ @file.source.should == "puppet://master/files/httpd.conf"
28
28
  end
29
29
  it "should use default values" do
30
30
  @file.name.should == "/www/conf/httpd.conf"
@@ -4,7 +4,7 @@ include PoolParty::Resources
4
4
 
5
5
  describe "Variable" do
6
6
  before(:each) do
7
- reset!
7
+ reset_resources!
8
8
  @variable = variable(:name => "name", :value => "ari Lerner")
9
9
  end
10
10
  it "should have a package" do
@@ -1,50 +1,71 @@
1
1
  require File.dirname(__FILE__) + '/../spec_helper'
2
2
 
3
+ include PoolParty::Resources
4
+
3
5
  describe "Script" do
4
- it "should have inflate as a class method" do
5
- Script.respond_to?(:inflate).should == true
6
- end
7
- it "should have inflate_file as an instance method" do
8
- Script.respond_to?(:inflate_file).should == true
6
+ before(:each) do
7
+ reset_resources!
8
+ setup
9
9
  end
10
- it "should have inflate as an instance method" do
11
- Script.new.respond_to?(:inflate).should == true
12
- end
13
-
14
- describe "with a script" do
15
- before(:each) do
16
- @script = 'script'
17
- @filename = 'filename'
18
-
19
- @pool = Script.new
20
- Script.stub!(:new).and_return(@pool)
21
- @pool.stub!(:inflate).and_return true
10
+ describe "wrapped" do
11
+ it "should have inflate as a class method" do
12
+ Script.respond_to?(:inflate).should == true
22
13
  end
23
-
24
- it "should create a new Script when calling on the class method" do
25
- Script.should_receive(:new).and_return @pool
26
- end
27
- it "should instance eval the script" do
28
- @pool.should_receive(:instance_eval).with(@script, @filename).and_return true
14
+ it "should have inflate_file as an instance method" do
15
+ Script.respond_to?(:inflate_file).should == true
29
16
  end
30
- it "should call inflate on itself" do
31
- @pool.should_receive(:inflate).and_return true
17
+ it "should have inflate as an instance method" do
18
+ Script.new.respond_to?(:inflate).should == true
32
19
  end
33
- after do
34
- Script.inflate(@script, @filename)
35
- end
36
- describe "save!" do
20
+
21
+ describe "with a script" do
37
22
  before(:each) do
38
- pool :appdotcom do
39
- keypair "snoodle"
40
- cloud :app do
41
- has_file :name => "/etc/httpd/httpd.conf"
23
+ @script = 'script'
24
+ @filename = 'filename'
25
+
26
+ @pool = Script.new
27
+ Script.stub!(:new).and_return(@pool)
28
+ @pool.stub!(:inflate).and_return true
29
+ end
30
+
31
+ it "should create a new Script when calling on the class method" do
32
+ Script.should_receive(:new).and_return @pool
33
+ end
34
+ it "should instance eval the script" do
35
+ @pool.should_receive(:instance_eval).with(@script, @filename).and_return true
36
+ end
37
+ it "should call inflate on itself" do
38
+ @pool.should_receive(:inflate).and_return true
39
+ end
40
+ after do
41
+ Script.inflate(@script, @filename)
42
+ end
43
+ describe "save!" do
44
+ before(:each) do
45
+ reset!
46
+ reset_resources!
47
+ pool :appdotcomcoo do
48
+ keypair "snoodle"
49
+ ami "ami-123456"
50
+
51
+ cloud :app do
52
+ expand_when "cpu > 90", "memory > 80"
53
+ contract_when "cpu < 10", "memory < 10"
54
+
55
+ has_file :name => "/etc/httpd/httpd.conf"
56
+ end
42
57
  end
58
+ @saved = Script.save!(false)
59
+ end
60
+ it "should save the keypair" do
61
+ @saved.should =~ /keypair 'snoodle'/
62
+ end
63
+ it "should save the ami" do
64
+ @saved.should =~ /ami 'ami-123456'/
65
+ end
66
+ it "should save the expansions" do
67
+ @saved.should =~ /expand_when 'cpu>90', 'memory>80'/
43
68
  end
44
- @saved = Script.save!(false)
45
- end
46
- it "should save the keypair" do
47
- @saved.should =~ /keypair "snoodle"/
48
69
  end
49
70
  end
50
71
  end
@@ -1,5 +1,6 @@
1
1
  class WebServers
2
2
  plugin :apache do
3
+ include PoolParty::Resources
3
4
 
4
5
  attr_accessor :php
5
6
 
@@ -1,7 +1,7 @@
1
1
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
2
2
  require 'poolparty'
3
3
 
4
- %w(test/spec).each do |library|
4
+ %w(spec).each do |library|
5
5
  begin
6
6
  require library
7
7
  rescue
@@ -11,11 +11,14 @@ end
11
11
 
12
12
  # Dir["#{File.dirname(__FILE__)}/helpers/**"].each {|a| require a}
13
13
 
14
+ ENV["POOL_SPEC"] = nil
15
+
14
16
  include PoolParty
15
17
  extend PoolParty
16
18
 
17
- Base.environment = "test"
18
- Base.verbose = false
19
+ def setup
20
+ PoolParty::Messenger.stub!(:messenger_send!).and_return false
21
+ end
19
22
 
20
23
  def setup_cl
21
24
  require 'poolpartycl'
@@ -62,7 +65,7 @@ def stub_list_from_local_for(o)
62
65
  @ris = @list.split(/\n/).map {|line| PoolParty::Remote::RemoteInstance.new(line) }
63
66
  end
64
67
  def stub_remoter_for(o)
65
- o.stub!(:ec2).and_return EC2::Base.new( :access_key_id => "not a key", :secret_access_key => "even more not a key")
68
+ o.stub!(:ec2).and_return EC2::Base.new( :access_key_id => "not a key", :secret_access_key => "even more not a key")
66
69
  end
67
70
  def stub_list_from_remote_for(o, launch_stub=true)
68
71
  stub_remoter_for(o)
@@ -99,6 +102,7 @@ def running_remote_instances
99
102
  end
100
103
 
101
104
  def reset_response!
105
+ setup
102
106
  @ris = nil
103
107
  end
104
108
 
@@ -116,10 +120,17 @@ def remove_stub_instance_from(o, num)
116
120
  # o.stub!(:remote_instances_list).once.and_return ris
117
121
  end
118
122
  def stub_instance(num=1, status="running", keypair="fake_keypair")
119
- {:name => "node#{num}", :ip => "192.168.0.#{num}", :status => "#{status}", :launching_time => num.minutes.ago, :keypair => "#{keypair}"}
123
+ {:name => "node#{num}", :ip => "192.168.0.#{num}", :status => "#{status}", :launching_time => num.minutes.ago.to_s, :keypair => "#{keypair}"}
120
124
  end
121
125
  def drop_pending_instances_for(o)
122
126
  puts "hi"
123
127
  o.list_of_pending_instances.stub!(:size).and_return 0
124
128
  1
129
+ end
130
+
131
+ # Stub for messenger_send!
132
+ class Object
133
+ def messenger_send!(*args)
134
+ true
135
+ end
125
136
  end
@@ -7,8 +7,12 @@ task :deploy => [:check_version, :website, :release] do
7
7
  puts "Tagging release #{CHANGES}"
8
8
  end
9
9
 
10
- desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
- task :local_deploy => [:website_generate, :install_gem]
10
+ # desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ # task :local_deploy => []
12
+ desc "Deploy the gem locally"
13
+ task :local_deploy => [:website_generate, :install_gem, :build_local_gem] do
14
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
15
+ end
12
16
 
13
17
  task :check_version do
14
18
  unless ENV['VERSION']
@@ -26,9 +30,21 @@ task :install_gem_no_doc => [:clean, :package] do
26
30
  sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
31
  end
28
32
 
33
+ desc "Ensure .hoerc exists in the homedirectory. Create it if it doesn't"
34
+ task :hoerc do
35
+ str =<<-EOE
36
+ ---
37
+ publish_on_announce: true
38
+ exclude: !ruby/regexp
39
+ /tmp$|\.git|log$|local/.*\.rb$|Makefile|\.beam$/
40
+ EOE
41
+ hoerc_path = ::File.join( ENV["HOME"], ".hoerc" )
42
+ ::File.open(hoerc_path, "w+") {|f| f << str } unless ::File.file?(hoerc_path)
43
+ end
44
+
29
45
  namespace :manifest do
30
46
  desc 'Recreate Manifest.txt to include ALL files'
31
- task :refresh do
47
+ task :refresh => [:hoerc] do
32
48
  `rake check_manifest | patch -p0 > Manifest.txt`
33
49
  end
34
50
  end
@@ -1,7 +1,6 @@
1
1
  namespace(:dev) do
2
2
  task :initialize do
3
- setup_application
4
- run "mkdir ~/.ec2 >/dev/null 2>/dev/null" unless File.directory?("~/.ec2")
3
+ Kernel.system"mkdir ~/.ec2 >/dev/null 2>/dev/null" unless File.directory?("~/.ec2")
5
4
  end
6
5
  # Setup a basic development environment for the user
7
6
  desc "Setup development environment specify the config_file"
@@ -63,4 +62,14 @@ To work on this cloud, source the file like:
63
62
  ec2-authorize -p 80 default
64
63
  EOR
65
64
  end
65
+ desc "Turn the gemspec into a yaml file"
66
+ task :gemspec_to_yaml => [:initialize, :gemspec] do
67
+ filepath = ::File.join(::File.dirname(__FILE__), "..", "poolparty.gemspec")
68
+ data = open(filepath).read
69
+ spec = eval("$SAFE = 3\n#{data}")
70
+ yml = YAML.dump spec
71
+ File.open(filepath, "w+") do |f|
72
+ f << yml
73
+ end
74
+ end
66
75
  end
data/tasks/ec2.rake CHANGED
@@ -1,5 +1,13 @@
1
1
  namespace(:ec2) do
2
+ desc "Prepare your cloud for poolparty"
2
3
  task :init do
3
- %x[ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0]
4
+ cmd =<<-EOE
5
+ ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0
6
+ ec2-authorize -p 7000-7050 default
7
+ ec2-authorize -p 8140 default
8
+ ec2-authorize -p 4369 default
9
+ EOE
10
+
11
+ Kernel.system cmd.split(/\n/).join(" && ")
4
12
  end
5
13
  end
data/website/index.html CHANGED
@@ -34,7 +34,7 @@
34
34
  <h1>PoolParty</h1>
35
35
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/poolparty"; return false'>
36
36
  <p>Get Version</p>
37
- <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.18</a>
37
+ <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.68</a>
38
38
  </div>
39
39
  <h1>&#8216;Easy cloud computing&#8217;</h1>
40
40
  <h2>What</h2>
@@ -96,7 +96,7 @@ rake install_gem</pre></p>
96
96
  <h2>Contact</h2>
97
97
  <p>Comments are welcome. Send an email to <a href="mailto:ari.lerner@citrusbyte.com">Ari Lerner</a> email via the <a href="http://groups.google.com/group/PoolParty">forum</a></p>
98
98
  <p class="coda">
99
- <a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>, 15th October 2008<br>
99
+ <a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>, 21st November 2008<br>
100
100
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
101
101
  </p>
102
102
  </div>