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
@@ -0,0 +1,204 @@
|
|
1
|
+
=begin rdoc
|
2
|
+
The Provisioner is responsible for provisioning REMOTE servers
|
3
|
+
This class only comes in to play when calling the setup commands on
|
4
|
+
the development machine
|
5
|
+
=end
|
6
|
+
require 'capistrano/cli'
|
7
|
+
|
8
|
+
module PoolParty
|
9
|
+
module Provisioner
|
10
|
+
|
11
|
+
def provisioner_for(inst)
|
12
|
+
PoolParty::Provisioner::Capistrano.new(inst, self, :ubuntu)
|
13
|
+
end
|
14
|
+
|
15
|
+
class ProvisionerBase
|
16
|
+
attr_accessor :config, :loaded_tasks, :instance, :cloud, :os
|
17
|
+
|
18
|
+
include Configurable
|
19
|
+
include CloudResourcer
|
20
|
+
include FileWriter
|
21
|
+
|
22
|
+
def initialize(instance=nil, cld=self, os=:ubuntu, &block)
|
23
|
+
@instance = instance
|
24
|
+
@cloud = cld
|
25
|
+
|
26
|
+
options(cloud.options) if cloud && cloud.respond_to?(:options)
|
27
|
+
# set_vars_from_options(instance.options) unless instance.nil? || !instance.options || !instance.options.empty?
|
28
|
+
# options(instance.options) if instance.respond_to?(:options)
|
29
|
+
|
30
|
+
@os = os.to_s.downcase.to_sym
|
31
|
+
self.instance_eval &block if block
|
32
|
+
|
33
|
+
loaded
|
34
|
+
end
|
35
|
+
|
36
|
+
def provision_master?
|
37
|
+
!@instance.nil? && @instance.master?
|
38
|
+
end
|
39
|
+
|
40
|
+
# Callback after initialized
|
41
|
+
def loaded
|
42
|
+
end
|
43
|
+
|
44
|
+
def loaded_tasks
|
45
|
+
@loaded_tasks ||= []
|
46
|
+
end
|
47
|
+
|
48
|
+
### Installation tasks
|
49
|
+
|
50
|
+
# This is the actual runner for the installation
|
51
|
+
def install(testing=false)
|
52
|
+
error unless valid?
|
53
|
+
setup_runner
|
54
|
+
unless testing
|
55
|
+
before_install(@instance)
|
56
|
+
|
57
|
+
vputs "Provisioning #{@instance.name}"
|
58
|
+
process_install!(testing)
|
59
|
+
|
60
|
+
after_install(@instance)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
# The provisioner bases overwrite this method
|
64
|
+
def process_install!(testing=false)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Configuration
|
68
|
+
def configure(testing=false)
|
69
|
+
error unless valid?
|
70
|
+
setup_runner
|
71
|
+
unless testing
|
72
|
+
before_configure(@instance)
|
73
|
+
|
74
|
+
vputs "Provisioning #{@instance.name}"
|
75
|
+
process_configure!(testing)
|
76
|
+
|
77
|
+
after_configure(@instance)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Tasks that need to be performed everytime we do any
|
82
|
+
# remote ssh'ing into any instance
|
83
|
+
def setup_runner(force=false)
|
84
|
+
@cloud.prepare_for_configuration
|
85
|
+
@cloud.build_and_store_new_config_file(force)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Callbacks
|
89
|
+
# Before installation callback
|
90
|
+
def before_install(instance)
|
91
|
+
end
|
92
|
+
def after_install(instance)
|
93
|
+
end
|
94
|
+
def before_configure(instance)
|
95
|
+
end
|
96
|
+
def after_configure(instance)
|
97
|
+
end
|
98
|
+
|
99
|
+
def valid?
|
100
|
+
true
|
101
|
+
end
|
102
|
+
def error
|
103
|
+
raise ProvisionerException.new("Error in installation")
|
104
|
+
end
|
105
|
+
# Custom installation tasks
|
106
|
+
# Allow the remoter bases to attach their own tasks on the
|
107
|
+
# installation process
|
108
|
+
def custom_install_tasks
|
109
|
+
@cloud.custom_install_tasks_for(@instance) || []
|
110
|
+
end
|
111
|
+
# Custom configure tasks
|
112
|
+
# Allows the remoter bases to attach their own
|
113
|
+
# custom configuration tasks to the configuration process
|
114
|
+
def custom_configure_tasks
|
115
|
+
@cloud.custom_configure_tasks_for(@instance) || []
|
116
|
+
end
|
117
|
+
|
118
|
+
# Get the packages associated with each os
|
119
|
+
def puppet_packages
|
120
|
+
case @os
|
121
|
+
when :fedora
|
122
|
+
"puppet-server puppet factor"
|
123
|
+
else
|
124
|
+
"puppet puppetmaster"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
# Package installers for general *nix operating systems
|
128
|
+
def self.installers
|
129
|
+
@installers ||= {
|
130
|
+
:ubuntu => "aptitude install -y",
|
131
|
+
:fedora => "yum install",
|
132
|
+
:gentoo => "emerge"
|
133
|
+
}
|
134
|
+
end
|
135
|
+
def os_installer
|
136
|
+
"#{self.class.installers[@os]}"
|
137
|
+
end
|
138
|
+
# Convenience method to grab the installer
|
139
|
+
def installer_for(names=[])
|
140
|
+
packages = names.is_a?(Array) ? names.join(" ") : names
|
141
|
+
"#{self.class.installers[@os]} #{packages}"
|
142
|
+
end
|
143
|
+
|
144
|
+
#TODO#
|
145
|
+
# Abstract the gems out
|
146
|
+
def base_gems
|
147
|
+
{
|
148
|
+
:logging => "http://rubyforge.org/frs/download.php/44731/logging-0.9.4.gem",
|
149
|
+
:ZenTest => "http://rubyforge.org/frs/download.php/45581/ZenTest-3.11.0.gem",
|
150
|
+
:ParseTree => "http://rubyforge.org/frs/download.php/45600/ParseTree-3.0.1.gem",
|
151
|
+
:ruby2ruby => "http://rubyforge.org/frs/download.php/45587/ruby2ruby-1.2.0.gem",
|
152
|
+
:activesupport => "http://rubyforge.org/frs/download.php/45627/activesupport-2.1.2.gem",
|
153
|
+
:"xml-simple" => "http://rubyforge.org/frs/download.php/18366/xml-simple-1.0.11.gem",
|
154
|
+
:RubyInline => "http://rubyforge.org/frs/download.php/45683/RubyInline-3.8.1.gem",
|
155
|
+
:flexmock => "http://rubyforge.org/frs/download.php/42580/flexmock-0.8.3.gem",
|
156
|
+
:hoe => "http://rubyforge.org/frs/download.php/45685/hoe-1.8.2.gem",
|
157
|
+
:lockfile => "http://rubyforge.org/frs/download.php/18698/lockfile-1.4.3.gem",
|
158
|
+
:rubyforge => "http://rubyforge.org/frs/download.php/45546/rubyforge-1.0.1.gem",
|
159
|
+
:rake => "http://rubyforge.org/frs/download.php/43954/rake-0.8.3.gem",
|
160
|
+
:sexp_processor => "http://rubyforge.org/frs/download.php/45589/sexp_processor-3.0.0.gem",
|
161
|
+
:capistrano => "http://rubyforge.org/frs/download.php/48031/capistrano-2.5.3.gem",
|
162
|
+
:poolparty => "http://github.com/auser/poolparty/tree/master%2Fpkg%2Fpoolparty.gem?raw=true",
|
163
|
+
"ec2" => "http://rubyforge.org/frs/download.php/43666/amazon-ec2-0.3.1.gem"
|
164
|
+
}
|
165
|
+
end
|
166
|
+
|
167
|
+
def download_base_gems_string
|
168
|
+
returning(Array.new) do |arr|
|
169
|
+
base_gems.each do |name, url|
|
170
|
+
arr << "wget #{url} -O #{Base.remote_storage_path}/#{name}.gem 2>&1"
|
171
|
+
end
|
172
|
+
end.join(" && ")
|
173
|
+
end
|
174
|
+
|
175
|
+
def install_base_gems_string
|
176
|
+
returning(Array.new) do |arr|
|
177
|
+
base_gems.each do |name, url|
|
178
|
+
arr << "/usr/bin/gem install --ignore-dependencies --no-ri --no-rdoc #{Base.remote_storage_path}/#{name}.gem"
|
179
|
+
end
|
180
|
+
end.join(" && ")
|
181
|
+
end
|
182
|
+
|
183
|
+
# Template directory from the provisioner base
|
184
|
+
def template_directory
|
185
|
+
File.join(File.dirname(__FILE__), "..", "templates")
|
186
|
+
end
|
187
|
+
|
188
|
+
# Install from the class-level
|
189
|
+
def self.install(instance, cl=self, testing=false)
|
190
|
+
new(instance, cl).install(testing)
|
191
|
+
end
|
192
|
+
|
193
|
+
def self.configure(instance, cl=self, testing=false)
|
194
|
+
new(instance, cl).configure(testing)
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
## Load the provisioners
|
202
|
+
Dir[File.dirname(__FILE__) + "/*/*.rb"].each do |file|
|
203
|
+
require file
|
204
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class String
|
2
|
+
def grab_entry_for(type, name)
|
3
|
+
begin
|
4
|
+
allowed = /[ \$\._\-\[\]\n\t\\\/&,\(\)"',|:=\>\<0-9a-zA-Z]/
|
5
|
+
matches = self.match(/#{type}(.*)\{(.*)"#{name}":(.*)(#{allowed})*\}/)[0]
|
6
|
+
rescue
|
7
|
+
""
|
8
|
+
end
|
9
|
+
end
|
10
|
+
def _grab_key_value_for(type, name, key)
|
11
|
+
grab_entry_for(type, name).scan(/#{key}[ =>]*(.*)[,?]?$/).flatten.first rescue ""
|
12
|
+
end
|
13
|
+
def grab_key_value_for(ty, name, key)
|
14
|
+
_grab_key_value_for(ty,name,key).gsub(/,/, '')
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
# Mainly extensions, these methods are inherent in all of the matchers
|
5
|
+
# and are intended for helping parse the final manifest for spec'ing purposes.
|
6
|
+
class SpecExtensionsBase
|
7
|
+
def ensured_as(ensured="present")
|
8
|
+
str = "ensure => '#{ensured}'"
|
9
|
+
!grab_entry.scan(/#{str}/).empty?
|
10
|
+
end
|
11
|
+
def is_present?
|
12
|
+
!grab_entry.empty? && is_valid_resource?
|
13
|
+
end
|
14
|
+
def grab_entry
|
15
|
+
@target.grab_entry_for(type, @expected)
|
16
|
+
end
|
17
|
+
def type
|
18
|
+
"file"
|
19
|
+
end
|
20
|
+
def is_valid_resource?
|
21
|
+
grab_entry.split(/\n/).select {|l| l.match(/(.*)=>(\W+),$/) }.empty?
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveCron < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have cron #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have cron #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"cron"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_cron(name, extra="")
|
25
|
+
SpecExtensions::HaveCron.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module PoolParty
|
2
|
+
class SpecCore
|
3
|
+
# dynamic_matcher_for(:deploydirectory) do
|
4
|
+
# it "should have the directory" do
|
5
|
+
# @manifest.should have_directory(@to)
|
6
|
+
# end
|
7
|
+
# it "should have the rsyncmirror" do
|
8
|
+
# @manifest.should have_rsyncmirror("deploydirectory-#{@to}")
|
9
|
+
# end
|
10
|
+
# it "should have the exec to unpack the archive" do
|
11
|
+
# @manifest.should have_exec("deploy-directory-#{@to}")
|
12
|
+
# end
|
13
|
+
# end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveDirectory < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present? && is_a_directory?
|
12
|
+
end
|
13
|
+
def is_a_directory?
|
14
|
+
ensured_as("directory")
|
15
|
+
end
|
16
|
+
def failure_message
|
17
|
+
"expected #{@target.inspect} to have directory #{@expected}"
|
18
|
+
end
|
19
|
+
def negative_failure_message
|
20
|
+
"expected #{@target.inspect} not to have directory #{@expected}"
|
21
|
+
end
|
22
|
+
def type
|
23
|
+
"file"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
def have_directory(name, extra="")
|
28
|
+
SpecExtensions::HaveDirectory.new(name, extra)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveExec < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have exec #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have exec #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"exec"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_exec(name, extra="")
|
25
|
+
SpecExtensions::HaveExec.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveFile < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have file #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have file #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"file"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_file(name, extra="")
|
25
|
+
SpecExtensions::HaveFile.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveGempackage < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have gempackage #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have gempackage #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"exec"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_gempackage(name, extra="")
|
25
|
+
SpecExtensions::HaveGempackage.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveGit < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have git #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have git #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"git"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_git(name, extra="")
|
25
|
+
SpecExtensions::HaveGit.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveHost < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have host #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have host #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"host"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_host(name, extra="")
|
25
|
+
SpecExtensions::HaveHost.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveMount < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have mount #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have mount #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"mount"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_mount(name, extra="")
|
25
|
+
SpecExtensions::HaveMount.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HavePackage < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have package #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have package #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"package"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_package(name, extra="")
|
25
|
+
SpecExtensions::HavePackage.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveRemotefile < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have remotefile #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have remotefile #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"remotefile"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_remotefile(name, extra="")
|
25
|
+
SpecExtensions::HaveRemotefile.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveRsyncmirror < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have rsyncmirror #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have rsyncmirror #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"rsyncmirror"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_rsyncmirror(name, extra="")
|
25
|
+
SpecExtensions::HaveRsyncmirror.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveService < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have service #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have service #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"service"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_service(name, extra="")
|
25
|
+
SpecExtensions::HaveService.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveSshkey < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have sshkey #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have sshkey #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"sshkey"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_sshkey(name, extra="")
|
25
|
+
SpecExtensions::HaveSshkey.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spec
|
2
|
+
module Matchers
|
3
|
+
module SpecExtensions
|
4
|
+
class HaveSymlink < SpecExtensionsBase
|
5
|
+
def initialize(expected,extra="")
|
6
|
+
@expected = expected
|
7
|
+
@extra = extra
|
8
|
+
end
|
9
|
+
def matches?(target)
|
10
|
+
@target = target
|
11
|
+
is_present?
|
12
|
+
end
|
13
|
+
def failure_message
|
14
|
+
"expected #{@target.inspect} to have symlink #{@expected}"
|
15
|
+
end
|
16
|
+
def negative_failure_message
|
17
|
+
"expected #{@target.inspect} not to have symlink #{@expected}"
|
18
|
+
end
|
19
|
+
def type
|
20
|
+
"symlink"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
def have_symlink(name, extra="")
|
25
|
+
SpecExtensions::HaveSymlink.new(name, extra)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|