poolparty 0.2.69 → 0.2.84
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +1 -0
- data/History.txt +6 -0
- data/Manifest.txt +140 -143
- data/PostInstall.txt +1 -1
- data/README.txt +2 -0
- data/bin/cloud-configure +5 -2
- data/bin/cloud-handle-load +3 -3
- data/bin/cloud-maintain +3 -3
- data/bin/cloud-provision +6 -5
- data/bin/cloud-rsync +28 -0
- data/bin/cloud-setup-dev +25 -0
- data/bin/cloud-spec +40 -0
- data/bin/cloud-start +5 -3
- data/bin/server-clean-cert-for +15 -0
- data/bin/server-rerun +0 -1
- data/bin/server-start-client +1 -1
- data/bin/server-start-master +1 -1
- data/bin/server-start-node +1 -1
- data/bin/server-update-hosts +4 -3
- data/bin/server-write-new-nodes +26 -0
- data/generators/poolspec/USAGE +2 -2
- data/generators/poolspec/poolspec_generator.rb +1 -1
- data/lib/erlang/messenger/Makefile +15 -0
- data/lib/erlang/messenger/ebin/client_app.beam +0 -0
- data/lib/erlang/messenger/ebin/client_server.beam +0 -0
- data/lib/erlang/messenger/ebin/erl_crash.dump +10326 -0
- data/lib/erlang/messenger/ebin/master_app.beam +0 -0
- data/lib/erlang/messenger/ebin/node_app.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_client.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_client_old.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_client_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_cluster.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_event_manager.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master_event_handler.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_master_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_node.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_node_supervisor.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_packager.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_spawner.beam +0 -0
- data/lib/erlang/messenger/ebin/pm_strings.beam +0 -0
- data/lib/erlang/messenger/ebin/utils.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/Makefile +28 -0
- data/lib/erlang/messenger/lib/eunit/ebin/autoload.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/code_monitor.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_autoexport.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_data.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_lib.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_proc.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_serial.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_server.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_striptests.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_test.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_tests.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/eunit_tty.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/ebin/file_monitor.beam +0 -0
- data/lib/erlang/messenger/lib/eunit/src/Makefile +46 -0
- data/lib/erlang/messenger/src/pm_master.erl +5 -0
- data/lib/erlang/messenger/src/pm_node.erl +2 -3
- data/lib/erlang/messenger/src/pm_spawner.erl +213 -0
- data/lib/poolparty/base_packages/heartbeat.rb +57 -43
- data/lib/poolparty/base_packages/poolparty.rb +18 -15
- data/lib/poolparty/capistrano.rb +18 -0
- data/lib/poolparty/core/class.rb +24 -0
- data/lib/poolparty/core/kernel.rb +7 -0
- data/lib/poolparty/core/module.rb +2 -2
- data/lib/poolparty/core/string.rb +1 -1
- data/lib/poolparty/dependency_resolutions/puppet.rb +10 -2
- data/lib/poolparty/exceptions/ProvisionerException.rb +5 -0
- data/lib/poolparty/extra/deployments.rb +31 -0
- data/lib/poolparty/helpers/binary.rb +14 -2
- data/lib/poolparty/helpers/optioner.rb +61 -22
- data/lib/poolparty/helpers/ruberl.rb +33 -0
- data/lib/poolparty/modules/cloud_dsl.rb +2 -1
- data/lib/poolparty/modules/cloud_resourcer.rb +30 -6
- data/lib/poolparty/modules/configurable.rb +2 -0
- data/lib/poolparty/modules/file_writer.rb +4 -4
- data/lib/poolparty/modules/resourcing_dsl.rb +5 -5
- data/lib/poolparty/monitors/base_monitor.rb +1 -1
- data/lib/poolparty/monitors/monitors/cpu_monitor.rb +2 -2
- data/lib/poolparty/net/messenger.rb +1 -1
- data/lib/poolparty/net/remote.rb +2 -2
- data/lib/poolparty/net/remote_bases/ec2.rb +51 -11
- data/lib/poolparty/net/remote_instance.rb +7 -3
- data/lib/poolparty/net/remoter.rb +72 -24
- data/lib/poolparty/net/remoter_base.rb +10 -0
- data/lib/poolparty/plugins/deploydirectory.rb +10 -5
- data/lib/poolparty/plugins/git.rb +51 -0
- data/lib/poolparty/{pool → poolparty}/base.rb +4 -2
- data/lib/poolparty/{pool → poolparty}/cloud.rb +32 -10
- data/lib/poolparty/{pool → poolparty}/plugin_model.rb +4 -4
- data/lib/poolparty/{pool → poolparty}/pool.rb +2 -2
- data/lib/poolparty/{pool → poolparty}/resource.rb +33 -15
- data/lib/poolparty/{pool → poolparty}/resources/class_package.rb +3 -3
- data/lib/poolparty/{pool → poolparty}/resources/directory.rb +6 -3
- data/lib/poolparty/{pool → poolparty}/resources/exec.rb +2 -5
- data/lib/poolparty/{pool → poolparty}/resources/file.rb +3 -3
- data/lib/poolparty/{pool → poolparty}/resources/package.rb +1 -1
- data/lib/poolparty/{pool → poolparty}/resources/remote_file.rb +1 -1
- data/lib/poolparty/poolparty/resources/remote_user.rb +17 -0
- data/lib/poolparty/{pool → poolparty}/resources/sshkey.rb +5 -1
- data/lib/poolparty/{pool → poolparty}/script.rb +1 -1
- data/lib/poolparty/provisioners/capistrano/capistrano.rb +127 -0
- data/lib/poolparty/provisioners/capistrano/capistrano_configurer.rb +58 -0
- data/lib/poolparty/provisioners/capistrano/recipies/base.rb +104 -0
- data/lib/poolparty/provisioners/capistrano/recipies/master.rb +121 -0
- data/lib/poolparty/provisioners/capistrano/recipies/slave.rb +12 -0
- data/lib/poolparty/provisioners/provisioner_base.rb +204 -0
- data/lib/poolparty/spec/core/string.rb +16 -0
- data/lib/poolparty/spec/matchers/a_spec_extensions_base.rb +26 -0
- data/lib/poolparty/spec/matchers/have_cron.rb +28 -0
- data/lib/poolparty/spec/matchers/have_deploydirectory.rb +15 -0
- data/lib/poolparty/spec/matchers/have_directory.rb +31 -0
- data/lib/poolparty/spec/matchers/have_exec.rb +28 -0
- data/lib/poolparty/spec/matchers/have_file.rb +28 -0
- data/lib/poolparty/spec/matchers/have_gempackage.rb +28 -0
- data/lib/poolparty/spec/matchers/have_git.rb +28 -0
- data/lib/poolparty/spec/matchers/have_host.rb +28 -0
- data/lib/poolparty/spec/matchers/have_mount.rb +28 -0
- data/lib/poolparty/spec/matchers/have_package.rb +28 -0
- data/lib/poolparty/spec/matchers/have_remotefile.rb +28 -0
- data/lib/poolparty/spec/matchers/have_rsyncmirror.rb +28 -0
- data/lib/poolparty/spec/matchers/have_service.rb +28 -0
- data/lib/poolparty/spec/matchers/have_sshkey.rb +28 -0
- data/lib/poolparty/spec/matchers/have_symlink.rb +28 -0
- data/lib/poolparty/spec/matchers/have_variable.rb +32 -0
- data/lib/poolparty/spec/spec/dynamic_matchers.rb +63 -0
- data/lib/poolparty/spec/spec/ensure_matchers_exist.rb +7 -0
- data/lib/poolparty/spec/templates/have_base.rb +28 -0
- data/lib/poolparty/templates/authkeys +1 -1
- data/lib/poolparty/templates/gem +12 -10
- data/lib/poolparty/templates/ha.cf +9 -11
- data/lib/poolparty/templates/haresources +1 -1
- data/lib/poolparty/templates/logd.cf +42 -0
- data/lib/poolparty/templates/puppet.conf +18 -8
- data/lib/poolparty/templates/puppetcleaner +9 -3
- data/lib/poolparty/templates/puppetrerun +16 -3
- data/lib/poolparty/templates/puppetrunner +1 -1
- data/lib/poolparty/version.rb +1 -1
- data/lib/poolparty.rb +12 -8
- data/lib/poolpartyspec.rb +34 -0
- data/poolparty.gemspec +151 -149
- data/spec/poolparty/aska/aska_spec.rb +0 -5
- data/spec/poolparty/bin/console_spec.rb +3 -0
- data/spec/poolparty/extra/deployments_spec.rb +64 -0
- data/spec/poolparty/helpers/binary_spec.rb +1 -1
- data/spec/poolparty/helpers/optioner_spec.rb +17 -4
- data/spec/poolparty/modules/cloud_resourcer_spec.rb +19 -2
- data/spec/poolparty/modules/configurable_spec.rb +2 -2
- data/spec/poolparty/net/remote_bases/ec2_spec.rb +5 -2
- data/spec/poolparty/net/remote_instance_spec.rb +5 -0
- data/spec/poolparty/net/remote_spec.rb +24 -31
- data/spec/poolparty/net/remoter_base_spec.rb +11 -6
- data/spec/poolparty/net/remoter_spec.rb +55 -27
- data/spec/poolparty/plugins/deploydirectory_spec.rb +1 -0
- data/spec/poolparty/plugins/git_spec.rb +45 -0
- data/spec/poolparty/{pool → poolparty}/cloud_spec.rb +41 -0
- data/spec/poolparty/{pool → poolparty}/plugin_spec.rb +1 -1
- data/spec/poolparty/{pool → poolparty}/pool_spec.rb +1 -1
- data/spec/poolparty/{pool → poolparty}/resource_spec.rb +15 -2
- data/spec/poolparty/poolparty/resources/user_spec.rb +38 -0
- data/spec/poolparty/poolparty/test_plugins/virtual_host_template.erb +0 -0
- data/spec/poolparty/poolparty_spec.rb +1 -1
- data/spec/poolparty/provisioners/capistrano/capistrano_spec.rb +27 -0
- data/spec/poolparty/provisioners/provisioner_base_spec.rb +120 -0
- data/spec/poolparty/spec/core/string_spec.rb +57 -0
- data/spec/poolparty/spec_helper.rb +48 -6
- data/tasks/deployment.rake +3 -5
- data/tasks/spec.rake +2 -3
- data/website/index.html +2 -2
- metadata +150 -148
- data/lib/erlang/messenger/lib/eunit/.svn/all-wcprops +0 -53
- data/lib/erlang/messenger/lib/eunit/.svn/entries +0 -140
- data/lib/erlang/messenger/lib/eunit/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/.svn/prop-base/NOTES.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/AUTHORS.svn-base +0 -2
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/CHANGELOG.svn-base +0 -14
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/COPYING.svn-base +0 -504
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/NOTES.svn-base +0 -276
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/README.svn-base +0 -3
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/sys.config.svn-base +0 -9
- data/lib/erlang/messenger/lib/eunit/.svn/text-base/vsn.mk.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/doc/.svn/all-wcprops +0 -59
- data/lib/erlang/messenger/lib/eunit/doc/.svn/entries +0 -142
- data/lib/erlang/messenger/lib/eunit/doc/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/erlang.png.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/eunit.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/index.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/modules-frame.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/overview-summary.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/packages-frame.html.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/edoc-info.svn-base +0 -3
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/erlang.png.svn-base +0 -0
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/eunit.html.svn-base +0 -172
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/index.html.svn-base +0 -17
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/modules-frame.html.svn-base +0 -12
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview-summary.html.svn-base +0 -984
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview.edoc.svn-base +0 -980
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/packages-frame.html.svn-base +0 -11
- data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/stylesheet.css.svn-base +0 -55
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/all-wcprops +0 -5
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/dir-prop-base +0 -8
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/entries +0 -28
- data/lib/erlang/messenger/lib/eunit/ebin/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/examples/.svn/all-wcprops +0 -23
- data/lib/erlang/messenger/lib/eunit/examples/.svn/entries +0 -66
- data/lib/erlang/messenger/lib/eunit/examples/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/eunit_examples.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/fib.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/eunit_examples.erl.svn-base +0 -339
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/fib.erl.svn-base +0 -19
- data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/tests.txt.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/include/.svn/all-wcprops +0 -11
- data/lib/erlang/messenger/lib/eunit/include/.svn/entries +0 -41
- data/lib/erlang/messenger/lib/eunit/include/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/include/.svn/prop-base/eunit.hrl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/include/.svn/text-base/eunit.hrl.svn-base +0 -313
- data/lib/erlang/messenger/lib/eunit/src/.svn/all-wcprops +0 -113
- data/lib/erlang/messenger/lib/eunit/src/.svn/entries +0 -259
- data/lib/erlang/messenger/lib/eunit/src/.svn/format +0 -1
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/autoload.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/code_monitor.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_autoexport.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_data.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_internal.hrl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_lib.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_proc.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_serial.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_server.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_striptests.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_test.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tests.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tty.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/file_monitor.erl.svn-base +0 -5
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/autoload.erl.svn-base +0 -388
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/code_monitor.erl.svn-base +0 -243
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.app.src.svn-base +0 -21
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.appup.src.svn-base +0 -1
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.erl.svn-base +0 -196
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_autoexport.erl.svn-base +0 -102
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_data.erl.svn-base +0 -798
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_internal.hrl.svn-base +0 -48
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_lib.erl.svn-base +0 -682
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_proc.erl.svn-base +0 -552
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_serial.erl.svn-base +0 -157
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_server.erl.svn-base +0 -340
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_striptests.erl.svn-base +0 -64
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_test.erl.svn-base +0 -334
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tests.erl.svn-base +0 -45
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tty.erl.svn-base +0 -272
- data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/file_monitor.erl.svn-base +0 -409
- data/lib/erlang/messenger/src/pm_client_old.erl +0 -52
- data/lib/poolparty/helpers/provisioner_base.rb +0 -346
- data/lib/poolparty/helpers/provisioners/master.rb +0 -205
- data/lib/poolparty/helpers/provisioners/slave.rb +0 -64
- data/spec/poolparty/helpers/provisioner_base_spec.rb +0 -134
- data/spec/poolparty/helpers/provisioners/master_spec.rb +0 -54
- data/spec/poolparty/helpers/provisioners/slave_spec.rb +0 -28
- /data/lib/poolparty/{pool → poolparty}/custom_resource.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/loggable.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/plugin.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/conditional.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/cron.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/custom_service.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/gem_package.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/host.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/mount.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/service.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/symlink.rb +0 -0
- /data/lib/poolparty/{pool → poolparty}/resources/variable.rb +0 -0
- /data/log/{pool.logs → pool.log} +0 -0
- /data/spec/poolparty/{pool/test_plugins/virtual_host_template.erb → net/log/pool.log} +0 -0
- /data/spec/poolparty/{pool → poolparty}/base_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/files/ruby_basic.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/files/ruby_plugins.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/configurers/ruby_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/custom_resource_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/example_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/plugin_model_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/class_package_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/conditional_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/cron_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/directory_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/exec_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/file_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/gem_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/host_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/package_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/remote_file_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/service_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/sshkey_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/symlink_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/resources/variable_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/script_spec.rb +0 -0
- /data/spec/poolparty/{pool → poolparty}/test_plugins/sshkey_test +0 -0
- /data/spec/poolparty/{pool → poolparty}/test_plugins/webserver.rb +0 -0
@@ -1,340 +0,0 @@
|
|
1
|
-
%% This library is free software; you can redistribute it and/or modify
|
2
|
-
%% it under the terms of the GNU Lesser General Public License as
|
3
|
-
%% published by the Free Software Foundation; either version 2 of the
|
4
|
-
%% License, or (at your option) any later version.
|
5
|
-
%%
|
6
|
-
%% This library is distributed in the hope that it will be useful, but
|
7
|
-
%% WITHOUT ANY WARRANTY; without even the implied warranty of
|
8
|
-
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
9
|
-
%% Lesser General Public License for more details.
|
10
|
-
%%
|
11
|
-
%% You should have received a copy of the GNU Lesser General Public
|
12
|
-
%% License along with this library; if not, write to the Free Software
|
13
|
-
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
14
|
-
%% USA
|
15
|
-
%%
|
16
|
-
%% $Id:$
|
17
|
-
%%
|
18
|
-
%% @author Richard Carlsson <richardc@it.uu.se>
|
19
|
-
%% @copyright 2006 Richard Carlsson
|
20
|
-
%% @private
|
21
|
-
%% @see eunit
|
22
|
-
%% @doc EUnit server process
|
23
|
-
|
24
|
-
-module(eunit_server).
|
25
|
-
|
26
|
-
-export([start/1, stop/1, start_test/4, watch/3, watch_path/3,
|
27
|
-
watch_regexp/3]).
|
28
|
-
|
29
|
-
-export([main/1]). % private
|
30
|
-
|
31
|
-
-include("eunit.hrl").
|
32
|
-
-include("eunit_internal.hrl").
|
33
|
-
|
34
|
-
|
35
|
-
-define(AUTO_TIMEOUT, 60000). %% auto test time limit
|
36
|
-
|
37
|
-
%% TODO: pass options to server, such as default timeout?
|
38
|
-
|
39
|
-
start(Server) when is_atom(Server) ->
|
40
|
-
ensure_started(Server).
|
41
|
-
|
42
|
-
stop(Server) ->
|
43
|
-
command(Server, stop).
|
44
|
-
|
45
|
-
|
46
|
-
-record(job, {super, test, options}).
|
47
|
-
|
48
|
-
%% The `Super' process will receive a stream of status messages; see
|
49
|
-
%% eunit_proc:status_message/3 for details.
|
50
|
-
|
51
|
-
start_test(Server, Super, T, Options) ->
|
52
|
-
command(Server, {start, #job{super = Super,
|
53
|
-
test = T,
|
54
|
-
options = Options}}).
|
55
|
-
|
56
|
-
watch(Server, Module, Opts) when is_atom(Module) ->
|
57
|
-
command(Server, {watch, {module, Module}, Opts}).
|
58
|
-
|
59
|
-
watch_path(Server, Path, Opts) ->
|
60
|
-
command(Server, {watch, {path, filename:flatten(Path)}, Opts}).
|
61
|
-
|
62
|
-
watch_regexp(Server, Regex, Opts) ->
|
63
|
-
case regexp:parse(Regex) of
|
64
|
-
{ok, R} ->
|
65
|
-
command(Server, {watch, {regexp, R}, Opts});
|
66
|
-
{error, _}=Error ->
|
67
|
-
Error
|
68
|
-
end.
|
69
|
-
|
70
|
-
%% This makes sure the server is started before sending the command, and
|
71
|
-
%% returns {ok, Result} if the server accepted the command or {error,
|
72
|
-
%% server_down} if the server process crashes. If the server does not
|
73
|
-
%% reply, this function will wait until the server is killed.
|
74
|
-
|
75
|
-
command(Server, Cmd) ->
|
76
|
-
if is_atom(Server), Cmd /= stop -> ensure_started(Server);
|
77
|
-
true -> ok
|
78
|
-
end,
|
79
|
-
if is_pid(Server) -> command_1(Server, Cmd);
|
80
|
-
true ->
|
81
|
-
case whereis(Server) of
|
82
|
-
undefined -> {error, server_down};
|
83
|
-
Pid -> command_1(Pid, Cmd)
|
84
|
-
end
|
85
|
-
end.
|
86
|
-
|
87
|
-
command_1(Pid, Cmd) when is_pid(Pid) ->
|
88
|
-
Pid ! {command, self(), Cmd},
|
89
|
-
command_wait(Pid, 1000, undefined).
|
90
|
-
|
91
|
-
command_wait(Pid, Timeout, Monitor) ->
|
92
|
-
receive
|
93
|
-
{Pid, Result} -> Result;
|
94
|
-
{'DOWN', Monitor, process, Pid, _R} -> {error, server_down}
|
95
|
-
after Timeout ->
|
96
|
-
%% avoid creating a monitor unless some time has passed
|
97
|
-
command_wait(Pid, infinity, erlang:monitor(process, Pid))
|
98
|
-
end.
|
99
|
-
|
100
|
-
%% Starting the server
|
101
|
-
|
102
|
-
ensure_started(Name) ->
|
103
|
-
ensure_started(Name, 5).
|
104
|
-
|
105
|
-
ensure_started(Name, N) when N > 0 ->
|
106
|
-
case whereis(Name) of
|
107
|
-
undefined ->
|
108
|
-
Parent = self(),
|
109
|
-
Pid = spawn(fun () -> server_start(Name, Parent) end),
|
110
|
-
receive
|
111
|
-
{Pid, ok} ->
|
112
|
-
Pid;
|
113
|
-
{Pid, error} ->
|
114
|
-
receive after 200 -> ensure_started(N - 1) end
|
115
|
-
end;
|
116
|
-
Pid ->
|
117
|
-
Pid
|
118
|
-
end;
|
119
|
-
ensure_started(_, _) ->
|
120
|
-
throw(no_server).
|
121
|
-
|
122
|
-
server_start(undefined = Name, Parent) ->
|
123
|
-
%% anonymous server
|
124
|
-
server_start_1(Name, Parent);
|
125
|
-
server_start(Name, Parent) ->
|
126
|
-
try register(Name, self()) of
|
127
|
-
true -> server_start_1(Name, Parent)
|
128
|
-
catch
|
129
|
-
_:_ ->
|
130
|
-
Parent ! {self(), error},
|
131
|
-
exit(error)
|
132
|
-
end.
|
133
|
-
|
134
|
-
server_start_1(Name, Parent) ->
|
135
|
-
Parent ! {self(), ok},
|
136
|
-
server_init(Name).
|
137
|
-
|
138
|
-
-record(state, {name,
|
139
|
-
stopped,
|
140
|
-
jobs,
|
141
|
-
queue,
|
142
|
-
auto_test,
|
143
|
-
modules,
|
144
|
-
paths,
|
145
|
-
regexps}).
|
146
|
-
|
147
|
-
server_init(Name) ->
|
148
|
-
server(#state{name = Name,
|
149
|
-
stopped = false,
|
150
|
-
jobs = dict:new(),
|
151
|
-
queue = queue:new(),
|
152
|
-
auto_test = queue:new(),
|
153
|
-
modules = sets:new(),
|
154
|
-
paths = sets:new(),
|
155
|
-
regexps = sets:new()}).
|
156
|
-
|
157
|
-
server(St) ->
|
158
|
-
server_check_exit(St),
|
159
|
-
?MODULE:main(St).
|
160
|
-
|
161
|
-
%% @private
|
162
|
-
main(St) ->
|
163
|
-
receive
|
164
|
-
{done, auto_test, _Pid} ->
|
165
|
-
server(auto_test_done(St));
|
166
|
-
{done, Reference, _Pid} ->
|
167
|
-
server(handle_done(Reference, St));
|
168
|
-
{command, From, _Cmd} when St#state.stopped ->
|
169
|
-
From ! {self(), stopped};
|
170
|
-
{command, From, Cmd} ->
|
171
|
-
server_command(From, Cmd, St);
|
172
|
-
{code_monitor, {loaded, M, _Time}} ->
|
173
|
-
case is_watched(M, St) of
|
174
|
-
true ->
|
175
|
-
server(new_auto_test(self(), M, St));
|
176
|
-
false ->
|
177
|
-
server(St)
|
178
|
-
end
|
179
|
-
end.
|
180
|
-
|
181
|
-
server_check_exit(St) ->
|
182
|
-
case dict:size(St#state.jobs) of
|
183
|
-
0 when St#state.stopped -> exit(normal);
|
184
|
-
_ -> ok
|
185
|
-
end.
|
186
|
-
|
187
|
-
server_command(From, {start, Job}, St) ->
|
188
|
-
Reference = make_ref(),
|
189
|
-
St1 = case proplists:get_bool(enqueue, Job#job.options) of
|
190
|
-
true ->
|
191
|
-
enqueue(Job, From, Reference, St);
|
192
|
-
false ->
|
193
|
-
start_job(Job, From, Reference, St)
|
194
|
-
end,
|
195
|
-
server_command_reply(From, {ok, Reference}),
|
196
|
-
server(St1);
|
197
|
-
server_command(From, stop, St) ->
|
198
|
-
%% unregister the server name and let remaining jobs finish
|
199
|
-
server_command_reply(From, {error, stopped}),
|
200
|
-
catch unregister(St#state.name),
|
201
|
-
server(St#state{stopped = true});
|
202
|
-
server_command(From, {watch, Target, _Opts}, St) ->
|
203
|
-
%% the code watcher is only started on demand
|
204
|
-
code_monitor:monitor(self()),
|
205
|
-
%% TODO: propagate options to testing stage
|
206
|
-
St1 = add_watch(Target, St),
|
207
|
-
server_command_reply(From, ok),
|
208
|
-
server(St1);
|
209
|
-
server_command(From, {forget, Target}, St) ->
|
210
|
-
St1 = delete_watch(Target, St),
|
211
|
-
server_command_reply(From, ok),
|
212
|
-
server(St1);
|
213
|
-
server_command(From, Cmd, St) ->
|
214
|
-
server_command_reply(From, {error, {unknown_command, Cmd}}),
|
215
|
-
server(St).
|
216
|
-
|
217
|
-
server_command_reply(From, Result) ->
|
218
|
-
From ! {self(), Result}.
|
219
|
-
|
220
|
-
enqueue(Job, From, Reference, St) ->
|
221
|
-
case dict:size(St#state.jobs) of
|
222
|
-
0 ->
|
223
|
-
start_job(Job, From, Reference, St);
|
224
|
-
_ ->
|
225
|
-
St#state{queue = queue:in({Job, From, Reference},
|
226
|
-
St#state.queue)}
|
227
|
-
end.
|
228
|
-
|
229
|
-
dequeue(St) ->
|
230
|
-
case queue:out(St#state.queue) of
|
231
|
-
{empty, _} ->
|
232
|
-
St;
|
233
|
-
{{value, {Job, From, Reference}}, Queue} ->
|
234
|
-
start_job(Job, From, Reference, St#state{queue = Queue})
|
235
|
-
end.
|
236
|
-
|
237
|
-
start_job(Job, From, Reference, St) ->
|
238
|
-
From ! {start, Reference},
|
239
|
-
%% The default is to run tests in order unless otherwise specified
|
240
|
-
Order = proplists:get_value(order, Job#job.options, inorder),
|
241
|
-
eunit_proc:start(Job#job.test, Order, Job#job.super, Reference),
|
242
|
-
St#state{jobs = dict:store(Reference, From, St#state.jobs)}.
|
243
|
-
|
244
|
-
handle_done(Reference, St) ->
|
245
|
-
case dict:find(Reference, St#state.jobs) of
|
246
|
-
{ok, From} ->
|
247
|
-
From ! {done, Reference},
|
248
|
-
dequeue(St#state{jobs = dict:erase(Reference,
|
249
|
-
St#state.jobs)});
|
250
|
-
error ->
|
251
|
-
St
|
252
|
-
end.
|
253
|
-
|
254
|
-
%% Adding and removing watched modules or paths
|
255
|
-
|
256
|
-
add_watch({module, M}, St) ->
|
257
|
-
St#state{modules = sets:add_element(M, St#state.modules)};
|
258
|
-
add_watch({path, P}, St) ->
|
259
|
-
St#state{paths = sets:add_element(P, St#state.paths)};
|
260
|
-
add_watch({regexp, R}, St) ->
|
261
|
-
St#state{regexps = sets:add_element(R, St#state.regexps)}.
|
262
|
-
|
263
|
-
delete_watch({module, M}, St) ->
|
264
|
-
St#state{modules = sets:del_element(M, St#state.modules)};
|
265
|
-
delete_watch({path, P}, St) ->
|
266
|
-
St#state{paths = sets:del_element(P, St#state.paths)};
|
267
|
-
delete_watch({regexp, R}, St) ->
|
268
|
-
St#state{regexps = sets:del_element(R, St#state.regexps)}.
|
269
|
-
|
270
|
-
%% Checking if a module is being watched
|
271
|
-
|
272
|
-
is_watched(M, St) when is_atom(M) ->
|
273
|
-
sets:is_element(M, St#state.modules) orelse
|
274
|
-
is_watched(code:which(M), St);
|
275
|
-
is_watched(Path, St) ->
|
276
|
-
sets:is_element(filename:dirname(Path), St#state.paths) orelse
|
277
|
-
match_any(sets:to_list(St#state.regexps), Path).
|
278
|
-
|
279
|
-
match_any([R | Rs], Str) ->
|
280
|
-
case regexp:first_match(Str, R) of
|
281
|
-
{match, _, _} -> true;
|
282
|
-
_ -> match_any(Rs, Str)
|
283
|
-
end;
|
284
|
-
match_any([], _Str) -> false.
|
285
|
-
|
286
|
-
%% Running automatic tests when a watched module is loaded.
|
287
|
-
%% Uses a queue in order to avoid overlapping output when several
|
288
|
-
%% watched modules are loaded simultaneously. (The currently running
|
289
|
-
%% automatic test is kept in the queue until it is done. An empty queue
|
290
|
-
%% means that no automatic test is running.)
|
291
|
-
|
292
|
-
new_auto_test(Server, M, St) ->
|
293
|
-
case queue:is_empty(St#state.auto_test) of
|
294
|
-
true ->
|
295
|
-
start_auto_test(Server, M);
|
296
|
-
false ->
|
297
|
-
ok
|
298
|
-
end,
|
299
|
-
St#state{auto_test = queue:in({Server, M}, St#state.auto_test)}.
|
300
|
-
|
301
|
-
auto_test_done(St) ->
|
302
|
-
%% remove finished test from queue before checking for more
|
303
|
-
{_, Queue} = queue:out(St#state.auto_test),
|
304
|
-
case queue:out(Queue) of
|
305
|
-
{{value, {Server, M}}, _} ->
|
306
|
-
%% this is just lookahead - the item is not removed
|
307
|
-
start_auto_test(Server, M);
|
308
|
-
{empty, _} ->
|
309
|
-
ok
|
310
|
-
end,
|
311
|
-
St#state{auto_test = Queue}.
|
312
|
-
|
313
|
-
start_auto_test(Server, M) ->
|
314
|
-
spawn(fun () -> auto_super(Server, M) end).
|
315
|
-
|
316
|
-
auto_super(Server, M) ->
|
317
|
-
process_flag(trap_exit, true),
|
318
|
-
%% Give the user a short delay before any output is produced
|
319
|
-
receive after 333 -> ok end,
|
320
|
-
%% Make sure output is sent to console on server node
|
321
|
-
group_leader(whereis(user), self()),
|
322
|
-
Pid = spawn_link(fun () -> auto_proc(Server, M) end),
|
323
|
-
receive
|
324
|
-
{'EXIT', Pid, _} ->
|
325
|
-
ok
|
326
|
-
after ?AUTO_TIMEOUT ->
|
327
|
-
exit(Pid, kill),
|
328
|
-
io:put_chars("\n== EUnit: automatic test was aborted ==\n"),
|
329
|
-
io:put_chars("\n> ")
|
330
|
-
end,
|
331
|
-
Server ! {done, auto_test, self()}.
|
332
|
-
|
333
|
-
auto_proc(Server, M) ->
|
334
|
-
%% Make the output start on a new line instead of on the same line
|
335
|
-
%% as the current shell prompt.
|
336
|
-
io:fwrite("\n== EUnit: testing module ~w ==\n", [M]),
|
337
|
-
eunit:test(Server, M, [enqueue]),
|
338
|
-
%% Make sure to print a dummy prompt at the end of the output, most
|
339
|
-
%% of all so that the Emacs mode realizes that input is active.
|
340
|
-
io:put_chars("\n-> ").
|
@@ -1,64 +0,0 @@
|
|
1
|
-
%% This library is free software; you can redistribute it and/or modify
|
2
|
-
%% it under the terms of the GNU Lesser General Public License as
|
3
|
-
%% published by the Free Software Foundation; either version 2 of the
|
4
|
-
%% License, or (at your option) any later version.
|
5
|
-
%%
|
6
|
-
%% This library is distributed in the hope that it will be useful, but
|
7
|
-
%% WITHOUT ANY WARRANTY; without even the implied warranty of
|
8
|
-
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
9
|
-
%% Lesser General Public License for more details.
|
10
|
-
%%
|
11
|
-
%% You should have received a copy of the GNU Lesser General Public
|
12
|
-
%% License along with this library; if not, write to the Free Software
|
13
|
-
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
14
|
-
%% USA
|
15
|
-
%%
|
16
|
-
%% $Id:$
|
17
|
-
%%
|
18
|
-
%% @author Richard Carlsson <richardc@it.uu.se>
|
19
|
-
%% @author Eric Merritt <cyberlync@gmail.com>
|
20
|
-
%% @copyright 2006 Richard Carlsson, Eric Merritt
|
21
|
-
%% @private
|
22
|
-
%% @see eunit
|
23
|
-
%% @doc Parse transform for stripping EUnit test functions.
|
24
|
-
|
25
|
-
-module(eunit_striptests).
|
26
|
-
|
27
|
-
-include("eunit_internal.hrl").
|
28
|
-
|
29
|
-
-export([parse_transform/2]).
|
30
|
-
|
31
|
-
parse_transform(Forms, Options) ->
|
32
|
-
TestSuffix = proplists:get_value(eunit_test_suffix, Options,
|
33
|
-
?DEFAULT_TEST_SUFFIX),
|
34
|
-
GeneratorSuffix = proplists:get_value(eunit_generator_suffix,
|
35
|
-
Options,
|
36
|
-
?DEFAULT_GENERATOR_SUFFIX),
|
37
|
-
ExportSuffix = proplists:get_value(eunit_export_suffix, Options,
|
38
|
-
?DEFAULT_EXPORT_SUFFIX),
|
39
|
-
Exports = lists:foldl(fun ({attribute,_,export,Es}, S) ->
|
40
|
-
sets:union(sets:from_list(Es), S);
|
41
|
-
(_F, S) -> S
|
42
|
-
end,
|
43
|
-
sets:new(), Forms),
|
44
|
-
F = fun (Form, Acc) ->
|
45
|
-
form(Form, Acc, Exports, TestSuffix, GeneratorSuffix,
|
46
|
-
ExportSuffix)
|
47
|
-
end,
|
48
|
-
lists:reverse(lists:foldl(F, [], Forms)).
|
49
|
-
|
50
|
-
form({function, _L, Name, 0, _Cs}=Form, Acc, Exports, TestSuffix,
|
51
|
-
GeneratorSuffix, ExportSuffix) ->
|
52
|
-
N = atom_to_list(Name),
|
53
|
-
case not sets:is_element({Name, 0}, Exports)
|
54
|
-
andalso (lists:suffix(TestSuffix, N)
|
55
|
-
orelse lists:suffix(GeneratorSuffix, N)
|
56
|
-
orelse lists:suffix(ExportSuffix, N))
|
57
|
-
of
|
58
|
-
true ->
|
59
|
-
Acc;
|
60
|
-
false ->
|
61
|
-
[Form | Acc]
|
62
|
-
end;
|
63
|
-
form(Form, Acc, _, _, _, _) ->
|
64
|
-
[Form | Acc].
|