fairchild-poolparty 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. data/README.txt +0 -12
  2. data/Rakefile +17 -1
  3. data/VERSION.yml +1 -1
  4. data/bin/cloud +20 -1
  5. data/bin/cloud-bootstrap +14 -4
  6. data/bin/cloud-configure +26 -9
  7. data/bin/cloud-contract +7 -7
  8. data/bin/cloud-describe +28 -0
  9. data/bin/cloud-expand +13 -6
  10. data/bin/cloud-list +3 -5
  11. data/bin/cloud-osxcopy +1 -1
  12. data/bin/cloud-provision +1 -1
  13. data/bin/cloud-show +6 -5
  14. data/bin/cloud-ssh +1 -3
  15. data/bin/cloud-start +8 -6
  16. data/bin/cloud-terminate +9 -7
  17. data/bin/server-cloud-elections +29 -18
  18. data/bin/server-ensure-provisioning +24 -29
  19. data/bin/server-list-active +10 -5
  20. data/bin/server-monitor.ru +18 -1
  21. data/bin/server-update-hosts +3 -3
  22. data/bin/server-write-new-nodes +1 -1
  23. data/config/jeweler.rb +12 -3
  24. data/lib/poolparty/aska/aska.rb +1 -12
  25. data/lib/poolparty/base_packages/haproxy.rb +26 -18
  26. data/lib/poolparty/base_packages/poolparty.rb +1 -1
  27. data/lib/poolparty/capistrano.rb +1 -1
  28. data/lib/poolparty/core/array.rb +12 -0
  29. data/lib/poolparty/core/hash.rb +12 -5
  30. data/lib/poolparty/core/nil.rb +8 -0
  31. data/lib/poolparty/core/object.rb +15 -5
  32. data/lib/poolparty/core/string.rb +28 -2
  33. data/lib/poolparty/dependency_resolver/chef_resolver.rb +106 -79
  34. data/lib/poolparty/dependency_resolver/dependency_resolver.rb +1 -1
  35. data/lib/poolparty/dependency_resolver/dependency_resolver_cloud_extensions.rb +5 -4
  36. data/lib/poolparty/dependency_resolver/puppet_resolver.rb +44 -17
  37. data/lib/poolparty/helpers/console.rb +1 -1
  38. data/lib/poolparty/helpers/optioner.rb +9 -2
  39. data/lib/poolparty/lite.rb +12 -2
  40. data/lib/poolparty/modules/callbacks.rb +44 -0
  41. data/lib/poolparty/modules/cloud_dsl.rb +17 -11
  42. data/lib/poolparty/modules/cloud_resourcer.rb +29 -21
  43. data/lib/poolparty/modules/definable_resource.rb +1 -1
  44. data/lib/poolparty/modules/pinger.rb +28 -0
  45. data/lib/poolparty/modules/resourcing_dsl.rb +7 -3
  46. data/lib/poolparty/modules/thread_pool.rb +107 -106
  47. data/lib/poolparty/modules/user_helpers.rb +20 -0
  48. data/lib/poolparty/monitors/base_monitor.rb +32 -81
  49. data/lib/poolparty/monitors/monitor_rack.rb +60 -69
  50. data/lib/poolparty/monitors/monitors/favicon_monitor.rb +12 -0
  51. data/lib/poolparty/monitors/monitors/load_monitor.rb +9 -15
  52. data/lib/poolparty/monitors/monitors/memory_monitor.rb +48 -48
  53. data/lib/poolparty/monitors/monitors/neighborhood_monitor.rb +77 -0
  54. data/lib/poolparty/monitors/{stats_monitor.rb → monitors/stats_monitor.rb} +29 -24
  55. data/lib/poolparty/monitors/monitors/time_monitor.rb +15 -0
  56. data/lib/poolparty/net/messenger.rb +2 -0
  57. data/lib/poolparty/net/remoter/cloud_control.rb +177 -227
  58. data/lib/poolparty/net/remoter/connections.rb +10 -18
  59. data/lib/poolparty/net/remoter/interactive.rb +24 -90
  60. data/lib/poolparty/net/remoter_base.rb +98 -25
  61. data/lib/poolparty/net/remoter_bases/ec2/ec2.rb +83 -66
  62. data/lib/poolparty/net/remoter_bases/vmrun/utilities/vm_disk.rb +12 -0
  63. data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb +33 -0
  64. data/lib/poolparty/net/remoter_bases/vmrun/utilities/vmx_file.rb +117 -0
  65. data/lib/poolparty/net/remoter_bases/vmrun/vmrun.rb +165 -0
  66. data/lib/poolparty/net/remoter_bases/vmrun/vmrun_instance.rb +71 -0
  67. data/lib/poolparty/{base_packages → plugins}/bind.rb +1 -1
  68. data/lib/poolparty/plugins/chef.rb +71 -71
  69. data/lib/poolparty/plugins/chef_deploy.rb +58 -0
  70. data/lib/poolparty/plugins/{deploydirectory.rb → deploy_directory.rb} +12 -3
  71. data/lib/poolparty/plugins/dynomite.rb +14 -0
  72. data/lib/poolparty/plugins/gem_package.rb +37 -0
  73. data/lib/poolparty/plugins/line_in_file.rb +1 -0
  74. data/lib/poolparty/plugins/nanite.rb +41 -0
  75. data/lib/poolparty/{base_packages → plugins}/tokyo_tyrant.rb +1 -1
  76. data/lib/poolparty/poolparty/cloud.rb +36 -35
  77. data/lib/poolparty/poolparty/default.rb +2 -11
  78. data/lib/poolparty/poolparty/key.rb +15 -12
  79. data/lib/poolparty/poolparty/neighborhoods.rb +54 -21
  80. data/lib/poolparty/poolparty/plugin.rb +6 -9
  81. data/lib/poolparty/poolparty/plugin_model.rb +5 -5
  82. data/lib/poolparty/poolparty/pool.rb +8 -4
  83. data/lib/poolparty/poolparty/poolparty_base_class.rb +20 -11
  84. data/lib/poolparty/poolparty/resource.rb +9 -5
  85. data/lib/poolparty/poolparty/service.rb +3 -1
  86. data/lib/poolparty/provision/boot_strapper.rb +47 -24
  87. data/lib/poolparty/provision/configurations/chef.rb +7 -4
  88. data/lib/poolparty/provision/dr_configure.rb +80 -25
  89. data/lib/poolparty/resources/cron.rb +8 -0
  90. data/lib/poolparty/resources/directory.rb +1 -1
  91. data/lib/poolparty/resources/file.rb +16 -0
  92. data/lib/poolparty/resources/package.rb +7 -2
  93. data/lib/poolparty/resources/service.rb +4 -3
  94. data/lib/poolparty/resources/symlink.rb +0 -8
  95. data/lib/poolparty/schema.rb +35 -20
  96. data/lib/poolparty/templates/haproxy.conf +27 -25
  97. data/lib/poolparty/templates/monitor.ru +3 -3
  98. data/lib/poolparty/verification/verifier_base.rb +17 -0
  99. data/lib/poolparty/verification/verifiers/ping.rb +17 -0
  100. data/lib/poolparty/verification/verify.rb +74 -0
  101. data/lib/poolparty.rb +8 -9
  102. data/lib/poolpartycl.rb +14 -0
  103. data/spec/bin/server-list-active_spec.rb +2 -0
  104. data/spec/poolparty/base_packages/haproxy_spec.rb +1 -1
  105. data/spec/poolparty/core/array_spec.rb +3 -1
  106. data/spec/poolparty/core/ordered_hash_spec.rb +2 -2
  107. data/spec/poolparty/dependency_resolver/chef_resolver_spec.rb +9 -15
  108. data/spec/poolparty/dependency_resolver/dependency_resolver_cloud_extensions_spec.rb +6 -6
  109. data/spec/poolparty/dependency_resolver/puppet_resolver_spec.rb +121 -124
  110. data/spec/poolparty/net/remote_spec.rb +287 -286
  111. data/spec/poolparty/net/remoter_bases/ec2_mocks_and_stubs.rb +1 -1
  112. data/spec/poolparty/net/remoter_bases/ec2_remote_instance_spec.rb +7 -8
  113. data/spec/poolparty/net/remoter_bases/ec2_spec.rb +22 -7
  114. data/spec/poolparty/net/remoter_spec.rb +48 -45
  115. data/spec/poolparty/poolparty/cloud_spec.rb +15 -22
  116. data/spec/poolparty/poolparty/key_spec.rb +4 -4
  117. data/spec/poolparty/poolparty/neighborhoods_spec.rb +1 -2
  118. data/spec/poolparty/poolparty/plugin_spec.rb +2 -2
  119. data/spec/poolparty/poolparty/resource_spec.rb +4 -5
  120. data/spec/poolparty/poolparty_base_class_spec.rb +82 -78
  121. data/spec/poolparty/resources/package_spec.rb +0 -3
  122. data/spec/poolparty/spec_helper.rb +4 -4
  123. data/tasks/development.rake +9 -0
  124. data/test/poolparty/core/array_test.rb +21 -0
  125. data/test/poolparty/core/hash_test.rb +14 -1
  126. data/test/poolparty/core/string_test.rb +29 -0
  127. data/test/poolparty/dependency_resolver/puppet_resolver_test.rb +106 -0
  128. data/test/poolparty/modules/callbacks_test.rb +40 -0
  129. data/test/poolparty/modules/cloud_dsl_test.rb +25 -0
  130. data/test/poolparty/net/remoter_bases/vmrun/vmrun_test.rb +50 -0
  131. data/test/poolparty/net/remoter_test.rb +14 -0
  132. data/test/poolparty/poolparty/neighborhood_test.rb +23 -0
  133. data/test/poolparty/poolparty/poolparty_base_class_test.rb +84 -0
  134. data/test/poolparty/verification/verify_test.rb +49 -0
  135. data/test/test_helper.rb +4 -1
  136. data/test/test_poolparty.rb +6 -5
  137. data/vendor/chef/apache2/attributes/apache.rb +1 -1
  138. data/vendor/chef/apache2/templates/default/default-site.erb +1 -1
  139. data/vendor/chef/chef-deploy/LICENSE +201 -0
  140. data/vendor/chef/chef-deploy/README.rdoc +24 -0
  141. data/vendor/chef/chef-deploy/Rakefile +57 -0
  142. data/vendor/chef/chef-deploy/TODO +4 -0
  143. data/vendor/chef/chef-deploy/lib/chef-deploy/cached_deploy.rb +230 -0
  144. data/vendor/chef/chef-deploy/lib/chef-deploy/git.rb +132 -0
  145. data/vendor/chef/chef-deploy/lib/chef-deploy/subversion.rb +98 -0
  146. data/vendor/chef/chef-deploy/lib/chef-deploy.rb +183 -0
  147. metadata +57 -252
  148. data/bin/cloud-run +0 -18
  149. data/bin/cloud-stats +0 -17
  150. data/bin/ec2-list-active +0 -24
  151. data/bin/pool +0 -31
  152. data/bin/pool-describe +0 -8
  153. data/bin/pool-generate +0 -18
  154. data/bin/pool-init +0 -28
  155. data/bin/pool-list +0 -30
  156. data/bin/pool-start +0 -26
  157. data/bin/server-list-instances +0 -15
  158. data/lib/erlang/messenger/Emakefile +0 -1
  159. data/lib/erlang/messenger/Makefile +0 -15
  160. data/lib/erlang/messenger/README +0 -5
  161. data/lib/erlang/messenger/Rakefile +0 -72
  162. data/lib/erlang/messenger/control +0 -11
  163. data/lib/erlang/messenger/ebin/client.app +0 -19
  164. data/lib/erlang/messenger/ebin/master.app +0 -19
  165. data/lib/erlang/messenger/ebin/node.app +0 -19
  166. data/lib/erlang/messenger/ebin/packager.app +0 -19
  167. data/lib/erlang/messenger/ebin/pm_client_rel-0.1.rel +0 -1
  168. data/lib/erlang/messenger/ebin/pm_master_rel-0.1.rel +0 -1
  169. data/lib/erlang/messenger/ebin/pm_node_rel-0.1.rel +0 -1
  170. data/lib/erlang/messenger/include/defines.hrl +0 -27
  171. data/lib/erlang/messenger/lib/eunit/AUTHORS +0 -2
  172. data/lib/erlang/messenger/lib/eunit/CHANGELOG +0 -14
  173. data/lib/erlang/messenger/lib/eunit/COPYING +0 -504
  174. data/lib/erlang/messenger/lib/eunit/Makefile +0 -28
  175. data/lib/erlang/messenger/lib/eunit/NOTES +0 -276
  176. data/lib/erlang/messenger/lib/eunit/README +0 -3
  177. data/lib/erlang/messenger/lib/eunit/doc/edoc-info +0 -3
  178. data/lib/erlang/messenger/lib/eunit/doc/erlang.png +0 -0
  179. data/lib/erlang/messenger/lib/eunit/doc/eunit.html +0 -172
  180. data/lib/erlang/messenger/lib/eunit/doc/index.html +0 -17
  181. data/lib/erlang/messenger/lib/eunit/doc/modules-frame.html +0 -12
  182. data/lib/erlang/messenger/lib/eunit/doc/overview-summary.html +0 -984
  183. data/lib/erlang/messenger/lib/eunit/doc/overview.edoc +0 -980
  184. data/lib/erlang/messenger/lib/eunit/doc/packages-frame.html +0 -11
  185. data/lib/erlang/messenger/lib/eunit/doc/stylesheet.css +0 -55
  186. data/lib/erlang/messenger/lib/eunit/ebin/autoload.beam +0 -0
  187. data/lib/erlang/messenger/lib/eunit/ebin/code_monitor.beam +0 -0
  188. data/lib/erlang/messenger/lib/eunit/ebin/eunit.app +0 -21
  189. data/lib/erlang/messenger/lib/eunit/ebin/eunit.appup +0 -1
  190. data/lib/erlang/messenger/lib/eunit/ebin/eunit.beam +0 -0
  191. data/lib/erlang/messenger/lib/eunit/ebin/eunit_autoexport.beam +0 -0
  192. data/lib/erlang/messenger/lib/eunit/ebin/eunit_data.beam +0 -0
  193. data/lib/erlang/messenger/lib/eunit/ebin/eunit_lib.beam +0 -0
  194. data/lib/erlang/messenger/lib/eunit/ebin/eunit_proc.beam +0 -0
  195. data/lib/erlang/messenger/lib/eunit/ebin/eunit_serial.beam +0 -0
  196. data/lib/erlang/messenger/lib/eunit/ebin/eunit_server.beam +0 -0
  197. data/lib/erlang/messenger/lib/eunit/ebin/eunit_striptests.beam +0 -0
  198. data/lib/erlang/messenger/lib/eunit/ebin/eunit_test.beam +0 -0
  199. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tests.beam +0 -0
  200. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tty.beam +0 -0
  201. data/lib/erlang/messenger/lib/eunit/ebin/file_monitor.beam +0 -0
  202. data/lib/erlang/messenger/lib/eunit/examples/eunit_examples.erl +0 -339
  203. data/lib/erlang/messenger/lib/eunit/examples/fib.erl +0 -19
  204. data/lib/erlang/messenger/lib/eunit/examples/tests.txt +0 -1
  205. data/lib/erlang/messenger/lib/eunit/include/eunit.hrl +0 -313
  206. data/lib/erlang/messenger/lib/eunit/src/Makefile +0 -46
  207. data/lib/erlang/messenger/lib/eunit/src/autoload.erl +0 -388
  208. data/lib/erlang/messenger/lib/eunit/src/code_monitor.erl +0 -243
  209. data/lib/erlang/messenger/lib/eunit/src/eunit.app.src +0 -21
  210. data/lib/erlang/messenger/lib/eunit/src/eunit.appup.src +0 -1
  211. data/lib/erlang/messenger/lib/eunit/src/eunit.erl +0 -196
  212. data/lib/erlang/messenger/lib/eunit/src/eunit_autoexport.erl +0 -102
  213. data/lib/erlang/messenger/lib/eunit/src/eunit_data.erl +0 -798
  214. data/lib/erlang/messenger/lib/eunit/src/eunit_internal.hrl +0 -48
  215. data/lib/erlang/messenger/lib/eunit/src/eunit_lib.erl +0 -682
  216. data/lib/erlang/messenger/lib/eunit/src/eunit_proc.erl +0 -552
  217. data/lib/erlang/messenger/lib/eunit/src/eunit_serial.erl +0 -157
  218. data/lib/erlang/messenger/lib/eunit/src/eunit_server.erl +0 -340
  219. data/lib/erlang/messenger/lib/eunit/src/eunit_striptests.erl +0 -64
  220. data/lib/erlang/messenger/lib/eunit/src/eunit_test.erl +0 -334
  221. data/lib/erlang/messenger/lib/eunit/src/eunit_tests.erl +0 -45
  222. data/lib/erlang/messenger/lib/eunit/src/eunit_tty.erl +0 -272
  223. data/lib/erlang/messenger/lib/eunit/src/file_monitor.erl +0 -409
  224. data/lib/erlang/messenger/lib/eunit/sys.config +0 -9
  225. data/lib/erlang/messenger/lib/eunit/vsn.mk +0 -1
  226. data/lib/erlang/messenger/pm_client_rel-0.1.boot +0 -0
  227. data/lib/erlang/messenger/pm_client_rel-0.1.script +0 -238
  228. data/lib/erlang/messenger/pm_master_rel-0.1.boot +0 -0
  229. data/lib/erlang/messenger/pm_master_rel-0.1.script +0 -239
  230. data/lib/erlang/messenger/pm_node_rel-0.1.boot +0 -0
  231. data/lib/erlang/messenger/pm_node_rel-0.1.script +0 -237
  232. data/lib/erlang/messenger/src/client_app.erl +0 -39
  233. data/lib/erlang/messenger/src/client_server.erl +0 -60
  234. data/lib/erlang/messenger/src/master_app.erl +0 -39
  235. data/lib/erlang/messenger/src/node_app.erl +0 -39
  236. data/lib/erlang/messenger/src/pm_client.erl +0 -49
  237. data/lib/erlang/messenger/src/pm_client_supervisor.erl +0 -38
  238. data/lib/erlang/messenger/src/pm_cluster.erl +0 -61
  239. data/lib/erlang/messenger/src/pm_event_manager.erl +0 -27
  240. data/lib/erlang/messenger/src/pm_master.erl +0 -215
  241. data/lib/erlang/messenger/src/pm_master_event_handler.erl +0 -72
  242. data/lib/erlang/messenger/src/pm_master_supervisor.erl +0 -39
  243. data/lib/erlang/messenger/src/pm_node.erl +0 -200
  244. data/lib/erlang/messenger/src/pm_node_supervisor.erl +0 -38
  245. data/lib/erlang/messenger/src/pm_packager.erl +0 -76
  246. data/lib/erlang/messenger/src/pm_spawner.erl +0 -213
  247. data/lib/erlang/messenger/src/pm_strings.erl +0 -11
  248. data/lib/erlang/messenger/src/utils.erl +0 -72
  249. data/lib/erlang/messenger/useful_snippets +0 -17
  250. data/lib/poolparty/monitors/monitors/server_monitor.rb +0 -7
  251. data/lib/poolparty/monitors/monitors/web_monitor.rb +0 -18
  252. data/lib/poolparty/monitors/neighborhood_monitor.rb +0 -24
  253. data/lib/poolparty/monitors.rb +0 -6
  254. data/lib/poolparty/net/remoter/lists.rb +0 -12
  255. data/lib/poolparty/poolparty/custom_resource.rb +0 -45
  256. data/lib/poolparty/resources/custom_service.rb +0 -30
  257. data/lib/poolparty/services/gem_package.rb +0 -52
  258. data/lib/poolparty/version.rb +0 -15
  259. data/spec/poolparty/plugins/svn_spec.rb +0 -16
  260. data/spec/poolparty/poolparty/custom_resource_spec.rb +0 -79
  261. data/vendor/gems/butterfly/History.txt +0 -4
  262. data/vendor/gems/butterfly/PostInstall.txt +0 -2
  263. data/vendor/gems/butterfly/README.rdoc +0 -48
  264. data/vendor/gems/butterfly/Rakefile +0 -62
  265. data/vendor/gems/butterfly/VERSION.yml +0 -4
  266. data/vendor/gems/butterfly/bin/flutter +0 -4
  267. data/vendor/gems/butterfly/butterfly.gemspec +0 -37
  268. data/vendor/gems/butterfly/examples/config.ru +0 -15
  269. data/vendor/gems/butterfly/examples/my_app.rb +0 -12
  270. data/vendor/gems/butterfly/lib/butterfly.rb +0 -14
  271. data/vendor/gems/butterfly/lib/handler.rb +0 -48
  272. data/vendor/gems/butterfly/lib/request.rb +0 -29
  273. data/vendor/gems/butterfly/lib/response.rb +0 -49
  274. data/vendor/gems/butterfly/script/console +0 -10
  275. data/vendor/gems/butterfly/script/destroy +0 -14
  276. data/vendor/gems/butterfly/script/generate +0 -14
  277. data/vendor/gems/butterfly/test/test_adapter_base.rb +0 -23
  278. data/vendor/gems/butterfly/test/test_butterfly_request.rb +0 -46
  279. data/vendor/gems/butterfly/test/test_butterfly_response.rb +0 -43
  280. data/vendor/gems/butterfly/test/test_butterfly_server.rb +0 -16
  281. data/vendor/gems/butterfly/test/test_default.rb +0 -12
  282. data/vendor/gems/butterfly/test/test_helper.rb +0 -6
  283. data/vendor/gems/dslify/History.txt +0 -4
  284. data/vendor/gems/dslify/Manifest.txt +0 -25
  285. data/vendor/gems/dslify/PostInstall.txt +0 -5
  286. data/vendor/gems/dslify/README.txt +0 -60
  287. data/vendor/gems/dslify/Rakefile +0 -56
  288. data/vendor/gems/dslify/config/hoe.rb +0 -73
  289. data/vendor/gems/dslify/config/requirements.rb +0 -15
  290. data/vendor/gems/dslify/dslify.gemspec +0 -40
  291. data/vendor/gems/dslify/lib/dslify/dslify.rb +0 -69
  292. data/vendor/gems/dslify/lib/dslify/version.rb +0 -10
  293. data/vendor/gems/dslify/lib/dslify.rb +0 -7
  294. data/vendor/gems/dslify/script/console +0 -10
  295. data/vendor/gems/dslify/script/destroy +0 -14
  296. data/vendor/gems/dslify/script/generate +0 -14
  297. data/vendor/gems/dslify/script/txt2html +0 -82
  298. data/vendor/gems/dslify/setup.rb +0 -1585
  299. data/vendor/gems/dslify/tasks/deployment.rake +0 -34
  300. data/vendor/gems/dslify/tasks/environment.rake +0 -7
  301. data/vendor/gems/dslify/tasks/website.rake +0 -17
  302. data/vendor/gems/dslify/test/test_dslify.rb +0 -114
  303. data/vendor/gems/dslify/website/index.html +0 -86
  304. data/vendor/gems/dslify/website/index.txt +0 -83
  305. data/vendor/gems/dslify/website/javascripts/rounded_corners_lite.inc.js +0 -285
  306. data/vendor/gems/dslify/website/stylesheets/screen.css +0 -138
  307. data/vendor/gems/dslify/website/template.html.erb +0 -48
  308. data/vendor/gems/parenting/History.txt +0 -4
  309. data/vendor/gems/parenting/Manifest.txt +0 -13
  310. data/vendor/gems/parenting/PostInstall.txt +0 -2
  311. data/vendor/gems/parenting/README.rdoc +0 -47
  312. data/vendor/gems/parenting/Rakefile +0 -28
  313. data/vendor/gems/parenting/lib/parenting/base.rb +0 -65
  314. data/vendor/gems/parenting/lib/parenting.rb +0 -10
  315. data/vendor/gems/parenting/parenting.gemspec +0 -39
  316. data/vendor/gems/parenting/script/console +0 -10
  317. data/vendor/gems/parenting/script/destroy +0 -14
  318. data/vendor/gems/parenting/script/generate +0 -14
  319. data/vendor/gems/parenting/test/file_to_eval.rb +0 -9
  320. data/vendor/gems/parenting/test/test_helper.rb +0 -5
  321. data/vendor/gems/parenting/test/test_parenting.rb +0 -89
  322. data/vendor/gems/suitcase/LICENSE +0 -20
  323. data/vendor/gems/suitcase/README.rdoc +0 -31
  324. data/vendor/gems/suitcase/Rakefile +0 -57
  325. data/vendor/gems/suitcase/VERSION.yml +0 -4
  326. data/vendor/gems/suitcase/lib/suitcase/unzipper.rb +0 -15
  327. data/vendor/gems/suitcase/lib/suitcase/zipper.rb +0 -119
  328. data/vendor/gems/suitcase/lib/suitcase.rb +0 -5
  329. data/vendor/gems/suitcase/suitcase.gemspec +0 -32
  330. data/vendor/gems/suitcase/test/suitcase_test.rb +0 -102
  331. data/vendor/gems/suitcase/test/test_dir/box.rb +0 -1
  332. data/vendor/gems/suitcase/test/test_dir/test.txt +0 -1
  333. data/vendor/gems/suitcase/test/test_helper.rb +0 -12
@@ -0,0 +1,106 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ class PuppetResolverSpec
4
+ plugin :apache do
5
+ end
6
+ end
7
+
8
+ class TestPuppetResolver < Test::Unit::TestCase
9
+ context "from a hash" do
10
+ setup do
11
+ reset!
12
+ @cloud_reference_hash = {
13
+ :options => {:name => "dog", :keypair => "bob", :users => ["ari", "michael"]},
14
+ :resources => [
15
+ {:name => "/etc/motd", :content => "Welcome to the cloud", :pp_type => "file"},
16
+ {:name => "/etc/profile", :content => "profile info", :pp_type => "file"},
17
+ {:name => "/var/www", :pp_type => "directory"}
18
+ ],
19
+ :services => {
20
+ :apache => [{
21
+ :options => {:listen => "8080"},
22
+ :resources => [
23
+ {:name => "/etc/apache2/apache2.conf", :pp_type => "file", :template => "/absolute/path/to/template", :content => "rendered template string"}
24
+ ],
25
+ :services => {}
26
+ }]
27
+ }
28
+ }
29
+ end
30
+
31
+ should "throw an exception if not given a hash" do
32
+ lambda { PoolParty::PuppetResolver.compile }.should raise_error
33
+ end
34
+ should "accept a hash" do
35
+ lambda { PoolParty::PuppetResolver.compile(@cloud_reference_hash)}.should_not raise_error
36
+ end
37
+ context "compiled" do
38
+ setup do
39
+ reset!
40
+ @dr = PuppetResolver.new(@cloud_reference_hash)
41
+ @compiled = @dr.compile
42
+ end
43
+
44
+ should "should print resources in the proper layout" do
45
+ @compiled.should =~ /file \{ "\/etc\/motd"/
46
+ end
47
+
48
+ should "should print apache into a class definition" do
49
+ # puts "<pre>#{@compiled.to_yaml}</pre>"
50
+ @compiled.should =~ /class apache \{/
51
+ end
52
+ end
53
+ end
54
+
55
+ context "with a cloud" do
56
+ setup do
57
+ reset!
58
+ @cloud = cloud :hope do
59
+ keypair "bob"
60
+ has_file :name => "/etc/motd", :content => "Welcome to the cloud"
61
+ has_file :name => "/etc/profile", :content => "profile info"
62
+
63
+ has_directory :name => "/var/www"
64
+ has_file :name => "/var/www/index.html", :content => "profile info", :requires => get_directory("/var/www")
65
+
66
+ dependency_resolver "puppet"
67
+ # has_package :name => "bash"
68
+ # parent == cloud
69
+ apache do
70
+ # parent == apache
71
+ listen "8080"
72
+ has_file :name => "/etc/apache2/apache2.conf", :template => "#{::File.dirname(__FILE__)}/../../fixtures/test_template.erb", :friends => "bob"
73
+ has_exec :command => "ls /etc/apache2"
74
+ end
75
+
76
+ case_of "hostname" do
77
+ when_is 'master' do
78
+ has_package :name=>'haproxy'
79
+ end
80
+ end
81
+ end
82
+ @properties = @cloud.to_properties_hash
83
+
84
+ # puts "<pre>#{@cloud_reference_hash.to_yaml}\n\n#{@properties}</pre>"
85
+ @dr = PuppetResolver.new(@properties)
86
+ @compiled = @dr.compile
87
+ end
88
+ should "should compile to a string" do
89
+ # puts "<pre>#{@compiled.to_yaml}</pre>"
90
+ @compiled.class.should == String
91
+ end
92
+ should "should include apache class" do
93
+ @compiled.should =~ /class apache \{/
94
+ end
95
+ should "should include the case statement" do
96
+ @compiled.should =~ /case \$hostname \{/
97
+ @compiled.should =~ /master : \{/
98
+ end
99
+ should "should require the file to have the directory (written as file)" do
100
+ @compiled.should =~ /require => File\[\"\/var\/www\"\]/
101
+ end
102
+ should "should ensure file" do
103
+ @compiled.should =~ /ensure => "present"/
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,40 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ class CallbacksTestClass
4
+ attr_reader :configured
5
+ include PoolParty::Callbacks
6
+
7
+ additional_callbacks ["after_boxes"]
8
+
9
+ def before_configure
10
+ @configured = true
11
+ end
12
+ end
13
+
14
+ class TestCallbacks < Test::Unit::TestCase
15
+ context "methods" do
16
+ setup do
17
+ @tc = CallbacksTestClass.new
18
+ @tc.after_create
19
+ end
20
+
21
+ should "have the 4 basic callbacks" do
22
+ assert @tc.respond_to?(:call_before_bootstrap_callbacks)
23
+ assert @tc.respond_to?(:call_after_bootstrap_callbacks)
24
+ assert @tc.respond_to?(:call_before_configure_callbacks)
25
+ assert @tc.respond_to?(:call_after_configure_callbacks)
26
+ end
27
+ should "have an addiitonal callback caller method" do
28
+ assert @tc.respond_to?(:call_after_boxes_callbacks)
29
+ end
30
+ should "call the callback on the class when calling call_(\w+)_callbacks method" do
31
+ assert_nil @tc.configured
32
+ @tc.call_before_configure_callbacks
33
+ assert @tc.configured
34
+ end
35
+ should "not explode when the method does not exist on the call_(\w+)_callbacks method" do
36
+ lambda {@tc.call_after_boxes_callbacks}.should_not raise_error
37
+ end
38
+ end
39
+
40
+ end
@@ -29,5 +29,30 @@ class TestCloudDsl < Test::Unit::TestCase
29
29
  @cloud.enabled?(:hyper_drive).should == false
30
30
  end
31
31
  end
32
+ context "calling add_optional_enabled_services" do
33
+ setup do
34
+ reset!
35
+ @cloud = cloud :test_cloud_dsl_2
36
+ @cloud.instance_eval "self.class.send :attr_reader, :brains"
37
+ @cloud.instance_eval "def box;@brains = 'pepper';end"
38
+ end
39
+
40
+ should "send @cloud the method box after it's been enabled" do
41
+ @cloud.enable :box
42
+ @cloud.add_optional_enabled_services
43
+ @cloud.brains.should == "pepper"
44
+ end
45
+ should "not call box if the method has not been enabled" do
46
+ @cloud.add_optional_enabled_services
47
+ @cloud.brains.should == nil
48
+ end
49
+ should "call haproxy when adding enabled serivces" do
50
+ @cloud.enable :haproxy
51
+ @cloud.add_optional_enabled_services
52
+ klasses = @cloud.plugin_store.map {|a| a.class.to_s.split("::")[-1] }
53
+ klasses.include?("HaproxyClass").should == true
54
+ end
55
+ end
56
+
32
57
 
33
58
  end
@@ -0,0 +1,50 @@
1
+ require "#{::File.dirname(__FILE__)}/../../../../test_helper"
2
+
3
+ class TestVmRun < Test::Unit::TestCase
4
+ context "registered as remote base" do
5
+ setup do
6
+ reset!
7
+ $vmx_keys = {
8
+ ::File.expand_path("~/Documents/vm/Ubuntu32bitVM.vmwarevm/Ubuntu32bitVM.vmx") => "192.168.248.133"
9
+ }
10
+ $vmx_files = $vmx_keys.keys
11
+ $ipaddresses = $vmx_keys.values
12
+
13
+ @cloud = cloud :test_vm_runner do
14
+
15
+ using :vmrun do
16
+ vmx_hash $vmx_keys
17
+ end
18
+
19
+ end
20
+ end
21
+ should "be setting the type of remote_base as Vmrun" do
22
+ @cloud.remote_base.class.should == PoolParty::Remote::Vmrun
23
+ end
24
+ should "have the method vmrun as the remoter base" do
25
+ @cloud.vmrun.should == @cloud.remote_base
26
+ end
27
+ should "start vmware instance" do
28
+ @cloud.launch_instance!
29
+ assert @cloud.vmrun.describe_instances.first[:instance_id], $vmx_files.first
30
+ end
31
+ should "have the ip and mac address" do
32
+ @cloud.launch_instance!
33
+
34
+ vmx_file = @cloud.vmrun.describe_instances.first[:instance_id]
35
+ instance = @cloud.vmrun.describe_instance(:vmx_file => vmx_file)
36
+
37
+ assert !instance.mac_address.nil?
38
+ assert !instance.ip.nil?
39
+ end
40
+ should "be able to turn off the instance" do
41
+ @cloud.launch_instance!
42
+ @cloud.terminate_instance!
43
+ assert @cloud.describe_instances.empty?
44
+ end
45
+ after :all do
46
+ PoolParty::Remote::Vmrun.terminate!(@cloud)
47
+ end
48
+ end
49
+
50
+ end
@@ -0,0 +1,14 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ class RemoterTest < Test::Unit::TestCase
4
+ context "list_of_nodes" do
5
+ setup do
6
+
7
+ end
8
+
9
+ should "fixme" do
10
+
11
+ end
12
+ end
13
+
14
+ end
@@ -0,0 +1,23 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ class TestNeighborhoods < Test::Unit::TestCase
4
+ context "Constant" do
5
+ should "have the constant Neighborhoods" do
6
+ PoolParty.const_get("Neighborhoods").should == PoolParty::Neighborhoods
7
+ end
8
+ end
9
+ context "setting up a neighborhood" do
10
+ should "set the schema when starting with a json string or a hash" do
11
+ n = Neighborhoods.new({:instances => "b"})
12
+ n.schema.nil?.should == false
13
+ n.schema.class.should == PoolParty::Schema
14
+ end
15
+ should "raise an error if there started with nil" do
16
+ lambda {Neighborhoods.new}.should raise_error
17
+ end
18
+ it "should not raise a fit if there ARE instances defined" do
19
+ lambda{Neighborhoods.new({:instances => ["10.0.0.1"]})}.should_not raise_error
20
+ end
21
+ end
22
+
23
+ end
@@ -0,0 +1,84 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ class TestBaseClass < PoolParty::PoolPartyBaseClass
4
+ end
5
+
6
+ class TestBaseClassTest < Test::Unit::TestCase
7
+ context "services" do
8
+ before(:each) do
9
+ reset!
10
+ @tbc = TestBaseClass.new do
11
+ has_git_repos :name => "test git", :at => "/var/www/google", :source => "git://pop.git"
12
+ end
13
+ end
14
+ it "should add a service when a service is called" do
15
+ @tbc.services.size.should == 1
16
+ end
17
+ end
18
+ context "context_stack" do
19
+ before(:each) do
20
+ ::PoolParty.reset!
21
+ @a = TestBaseClass.new
22
+ end
23
+ it "should have a context stack that is empty" do
24
+ @a.context_stack.empty?.should == true
25
+ end
26
+ it "should have a context_stack that is not empty when being evaluated" do
27
+ TestBaseClass.new do
28
+ context_stack.empty?.should == false
29
+ end
30
+ end
31
+ it "should have self in context_stack" do
32
+ TestBaseClass.new do
33
+ context_stack.last.should == self
34
+ end
35
+ end
36
+ it "should have the parent of self set in the context stack in the current_context" do
37
+ TestBaseClass.new do
38
+ current_context.last.should == parent
39
+ end
40
+ end
41
+ context "depth" do
42
+ before(:each) do
43
+ reset!
44
+ Proc.new do
45
+ @a = $a =TestBaseClass.new do
46
+ @@b = $b = TestBaseClass.new do
47
+ @@c = $c =TestBaseClass.new do
48
+ end
49
+ end
50
+ end
51
+ end.call
52
+ end
53
+ it "should set the correct depth" do
54
+ @a.depth.should == 0
55
+ @@b.depth.should == 1
56
+ @@c.depth.should == 2
57
+ end
58
+ it "should have the parent set properly" do
59
+ # @a.parent.should == nil
60
+ @@c.parent.should == @@b
61
+ @@b.parent.should == @a
62
+ end
63
+ it "should have proper self" do
64
+ @a.this.should == $a.this
65
+ end
66
+ end
67
+ end
68
+ it "should have the parent set properly" do
69
+ @a = TestBaseClass.new do
70
+ @@b = TestBaseClass.new do
71
+ @@c = TestBaseClass.new do
72
+ end
73
+ end
74
+ end
75
+
76
+ @a.parent.should == nil
77
+ @@c.parent.should == @@b
78
+ @@b.parent.should == @a
79
+
80
+ @a.parent.should == nil
81
+ @@c.parent.should == @@b
82
+ @@b.parent.should == @a
83
+ end
84
+ end
@@ -0,0 +1,49 @@
1
+ require "#{::File.dirname(__FILE__)}/../../test_helper"
2
+
3
+ module PoolParty
4
+ module Verifiers
5
+ class Ping < VerifierBase
6
+ attr_accessor :port, :checked
7
+ def initialize(port=80)
8
+ @port = port
9
+ end
10
+ def passing?
11
+ @checked
12
+ end
13
+ end
14
+
15
+ end
16
+ end
17
+ class TestVerificationClass
18
+ include PoolParty::Verification
19
+
20
+ attr_reader :port
21
+ def initialize(port=70, &block)
22
+ @port = port
23
+ instance_eval &block
24
+ end
25
+ end
26
+
27
+ class TestVerification < Test::Unit::TestCase
28
+ context "verification included" do
29
+ setup do
30
+ @vc = TestVerificationClass.new do
31
+ verify do
32
+ ping 80
33
+ end
34
+ end
35
+ end
36
+ should "have a the ping verifier as a verifiers in the class" do
37
+ @vc.verifiers.first.class.should == PoolParty::Verifiers::Ping
38
+ end
39
+ should "not explode when calling verify on the verifier" do
40
+ @vc.verifiers.first.checked = true
41
+ @vc.passing?.should == true
42
+ end
43
+ should "explode if the verification fails" do
44
+ @vc.verifiers.first.checked = false
45
+ lambda {@vc.passing?}.should raise_error
46
+ end
47
+ end
48
+
49
+ end
data/test/test_helper.rb CHANGED
@@ -2,4 +2,7 @@ require "rubygems"
2
2
  require "test/unit"
3
3
  require "context"
4
4
  require "matchy"
5
- require File.dirname(__FILE__) + '/../lib/PoolParty'
5
+ # require "shoulda"
6
+ # require "mocha"
7
+
8
+ require File.dirname(__FILE__) + '/../lib/poolparty'
@@ -1,11 +1,12 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
2
 
3
3
  class TestPoolParty < Test::Unit::TestCase
4
-
5
- def setup
4
+ context "helpers" do
5
+
6
+ should "include_user_directory" do
7
+ # FIXUP
8
+ assert false
9
+ end
6
10
  end
7
11
 
8
- def test_truth
9
- assert true
10
- end
11
12
  end
@@ -47,7 +47,7 @@ end
47
47
  ###
48
48
 
49
49
  # General settings
50
- apache[:listen_ports] = [ "80" ] unless apache.has_key?(:listen_ports)
50
+ apache[:listen_ports] = [ "8080" ] unless apache.has_key?(:listen_ports)
51
51
  apache[:contact] = "ops@example.com" unless apache.has_key?(:contact)
52
52
  apache[:timeout] = 300 unless apache.has_key?(:timeout)
53
53
  apache[:keepalive] = "On" unless apache.has_key?(:keepalive)
@@ -1,4 +1,4 @@
1
- <VirtualHost *:80>
1
+ <VirtualHost *:<%= @node[:apache][:listen_ports].first rescue 80 %>>
2
2
  ServerAdmin <%= @node[:apache][:contact] %>
3
3
 
4
4
  DocumentRoot /var/www/
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,24 @@
1
+ == chef-deploy
2
+
3
+ A gem that provides resources and providers for deploying ruby web apps from chef recipes
4
+
5
+
6
+ Uses the same directory layout as capistrano and steals the git remote cached deploy strategy
7
+ from cap and adapts it to work without cap and under chef
8
+
9
+ deploy "/data/#{app}" do
10
+ repo "git://github.com/engineyard/rack-app.git"
11
+ branch "HEAD"
12
+ user "ez"
13
+ enable_submodules true
14
+ migrate true
15
+ migration_command "rake db:migrate"
16
+ environment "production"
17
+ shallow_clone true
18
+ revision '0xbeadbeef'
19
+ action :deploy # or :rollback
20
+ end
21
+
22
+
23
+ Currently only supports doing the cached git checkout, rsyncing it into place and doing the symlink dance.
24
+ Does not restart servers or have hooks(yet)