agile_solo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +90 -0
- data/Rakefile +1 -0
- data/agile_solo.gemspec +30 -0
- data/lib/agile_solo.rb +13 -0
- data/lib/agile_solo/application/solo.rb +20 -0
- data/lib/agile_solo/command.rb +17 -0
- data/lib/agile_solo/composite_command.rb +35 -0
- data/lib/agile_solo/config.rb +13 -0
- data/lib/agile_solo/consumer.rb +41 -0
- data/lib/agile_solo/server.rb +19 -0
- data/lib/agile_solo/version.rb +3 -0
- data/spec/agile_solo/command_spec.rb +15 -0
- data/spec/agile_solo/composite_command_spec.rb +31 -0
- data/spec/agile_solo/config_spec.rb +8 -0
- data/spec/agile_solo/consumer_spec.rb +52 -0
- data/spec/agile_solo/server_spec.rb +35 -0
- data/spec/chef_repo/.chef/knife.rb +6 -0
- data/spec/chef_repo/.gitignore +3 -0
- data/spec/chef_repo/.gitmodules +3 -0
- data/spec/chef_repo/.librarian/chef/config +3 -0
- data/spec/chef_repo/Cheffile +11 -0
- data/spec/chef_repo/Cheffile.lock +33 -0
- data/spec/chef_repo/README.md +92 -0
- data/spec/chef_repo/README_APP.md +23 -0
- data/spec/chef_repo/Rakefile +5 -0
- data/spec/chef_repo/chefignore +11 -0
- data/spec/chef_repo/cookbooks/apache/CHANGES.md +9 -0
- data/spec/chef_repo/cookbooks/apache/README.md +64 -0
- data/spec/chef_repo/cookbooks/apache/metadata.json +32 -0
- data/spec/chef_repo/cookbooks/apache/metadata.rb +11 -0
- data/spec/chef_repo/cookbooks/apache/providers/fastcgi.rb +116 -0
- data/spec/chef_repo/cookbooks/apache/recipes/default.rb +8 -0
- data/spec/chef_repo/cookbooks/apache/resources/fastcgi.rb +14 -0
- data/spec/chef_repo/cookbooks/apache/templates/default/fast-cgi-vhost.erb +41 -0
- data/spec/chef_repo/cookbooks/apache2/.gitignore +3 -0
- data/spec/chef_repo/cookbooks/apache2/CHANGELOG.md +158 -0
- data/spec/chef_repo/cookbooks/apache2/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/apache2/Gemfile +10 -0
- data/spec/chef_repo/cookbooks/apache2/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/apache2/README.md +581 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/default.rb +153 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_cas.rb +2 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_ssl.rb +19 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_conf.rb +26 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_module.rb +53 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_site.rb +43 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/web_app.rb +50 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/default_test.rb +77 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +34 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +19 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +11 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +37 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +13 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +14 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +11 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_include_test.rb +15 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +18 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +13 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +10 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +28 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +65 -0
- data/spec/chef_repo/cookbooks/apache2/metadata.json +527 -0
- data/spec/chef_repo/cookbooks/apache2/metadata.rb +213 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/default.rb +223 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/iptables.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/logrotate.rb +31 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_apreq2.rb +54 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_cas.rb +59 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_openid.rb +125 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_fs.rb +21 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_svn.rb +41 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_fcgid.rb +55 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_include.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_logio.rb +24 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_perl.rb +44 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_php5.rb +78 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_python.rb +37 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_ssl.rb +46 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_wsgi.rb +38 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_xsendfile.rb +38 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.conf.erb +238 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/etc-sysconfig-httpd.erb +31 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/README +2 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.erb +4 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb +77 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/port_apache.erb +3 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/security.erb +50 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/web_app.conf.erb +47 -0
- data/spec/chef_repo/cookbooks/apt/.gitignore +14 -0
- data/spec/chef_repo/cookbooks/apt/.kitchen.yml +33 -0
- data/spec/chef_repo/cookbooks/apt/Berksfile +8 -0
- data/spec/chef_repo/cookbooks/apt/CHANGELOG.md +79 -0
- data/spec/chef_repo/cookbooks/apt/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/apt/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/apt/README.md +238 -0
- data/spec/chef_repo/cookbooks/apt/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/apt/attributes/default.rb +3 -0
- data/spec/chef_repo/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/spec/chef_repo/cookbooks/apt/metadata.json +34 -0
- data/spec/chef_repo/cookbooks/apt/metadata.rb +14 -0
- data/spec/chef_repo/cookbooks/apt/providers/preference.rb +61 -0
- data/spec/chef_repo/cookbooks/apt/providers/repository.rb +138 -0
- data/spec/chef_repo/cookbooks/apt/recipes/cacher-client.rb +59 -0
- data/spec/chef_repo/cookbooks/apt/recipes/cacher-ng.rb +38 -0
- data/spec/chef_repo/cookbooks/apt/recipes/default.rb +68 -0
- data/spec/chef_repo/cookbooks/apt/resources/preference.rb +30 -0
- data/spec/chef_repo/cookbooks/apt/resources/repository.rb +40 -0
- data/spec/chef_repo/cookbooks/apt/templates/default/01proxy.erb +2 -0
- data/spec/chef_repo/cookbooks/apt/templates/default/acng.conf.erb +276 -0
- data/spec/chef_repo/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +270 -0
- data/spec/chef_repo/cookbooks/build-essential/.gitignore +4 -0
- data/spec/chef_repo/cookbooks/build-essential/.kitchen.yml +42 -0
- data/spec/chef_repo/cookbooks/build-essential/Berksfile +3 -0
- data/spec/chef_repo/cookbooks/build-essential/CHANGELOG.md +42 -0
- data/spec/chef_repo/cookbooks/build-essential/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/build-essential/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/build-essential/README.md +139 -0
- data/spec/chef_repo/cookbooks/build-essential/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/build-essential/attributes/default.rb +33 -0
- data/spec/chef_repo/cookbooks/build-essential/metadata.json +44 -0
- data/spec/chef_repo/cookbooks/build-essential/metadata.rb +16 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/debian.rb +45 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/default.rb +24 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/fedora.rb +36 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/mac_os_x.rb +40 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/rhel.rb +43 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/smartos.rb +36 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/solaris2.rb +42 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/suse.rb +36 -0
- data/spec/chef_repo/cookbooks/install_from/README.md +51 -0
- data/spec/chef_repo/cookbooks/install_from/attributes/default.rb +2 -0
- data/spec/chef_repo/cookbooks/install_from/metadata.json +46 -0
- data/spec/chef_repo/cookbooks/install_from/metadata.rb +19 -0
- data/spec/chef_repo/cookbooks/install_from/providers/release.rb +143 -0
- data/spec/chef_repo/cookbooks/install_from/recipes/default.rb +26 -0
- data/spec/chef_repo/cookbooks/install_from/resources/release.rb +121 -0
- data/spec/chef_repo/cookbooks/metachef/.rspec +3 -0
- data/spec/chef_repo/cookbooks/metachef/.watchr +20 -0
- data/spec/chef_repo/cookbooks/metachef/Gemfile +15 -0
- data/spec/chef_repo/cookbooks/metachef/README.md +97 -0
- data/spec/chef_repo/cookbooks/metachef/attributes/default.rb +18 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/daemon_user.rb +68 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/kill_old_service.rb +35 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/standard_dirs.rb +54 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/aspect.rb +125 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/aspects.rb +170 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/attr_struct.rb +160 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/component.rb +164 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/cookbook_utils.rb +69 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/discovery.rb +124 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/discovery_lol.rb +55 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/dump_aspects.rb +83 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/metachef.rb +18 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/node_utils.rb +91 -0
- data/spec/chef_repo/cookbooks/metachef/metadata.json +102 -0
- data/spec/chef_repo/cookbooks/metachef/metadata.rb +39 -0
- data/spec/chef_repo/cookbooks/metachef/recipes/default.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/.gitignore +9 -0
- data/spec/chef_repo/cookbooks/nginx/.kitchen.yml +62 -0
- data/spec/chef_repo/cookbooks/nginx/Berksfile +7 -0
- data/spec/chef_repo/cookbooks/nginx/CHANGELOG.md +158 -0
- data/spec/chef_repo/cookbooks/nginx/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/nginx/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/nginx/README.md +398 -0
- data/spec/chef_repo/cookbooks/nginx/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/default.rb +89 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/echo.rb +10 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/geoip.rb +30 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/headers_more.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/naxsi.rb +24 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/repo.rb +30 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/source.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/upload_progress.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/chefignore +96 -0
- data/spec/chef_repo/cookbooks/nginx/definitions/nginx_site.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/mime.types +74 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/default_test.rb +12 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/source_test.rb +9 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/support/helpers.rb +7 -0
- data/spec/chef_repo/cookbooks/nginx/metadata.json +315 -0
- data/spec/chef_repo/cookbooks/nginx/metadata.rb +113 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/authorized_ips.rb +37 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_conf.rb +40 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_dir.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_script.rb +28 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/default.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/headers_more_module.rb +54 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_geoip_module.rb +116 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_gzip_static_module.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_realip_module.rb +42 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/ipv6.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/naxsi_module.rb +53 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/ohai_plugin.rb +39 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/passenger.rb +81 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/repo.rb +42 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/source.rb +204 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/upload_progress_module.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/default-site.erb +11 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/passenger.conf.erb +10 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +40 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.conf.erb +69 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nxensite.erb +38 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-run.erb +3 -0
- data/spec/chef_repo/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
- data/spec/chef_repo/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
- data/spec/chef_repo/cookbooks/ohai/CHANGELOG.md +27 -0
- data/spec/chef_repo/cookbooks/ohai/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/ohai/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/ohai/README.md +49 -0
- data/spec/chef_repo/cookbooks/ohai/attributes/default.rb +29 -0
- data/spec/chef_repo/cookbooks/ohai/files/default/plugins/README +1 -0
- data/spec/chef_repo/cookbooks/ohai/metadata.json +60 -0
- data/spec/chef_repo/cookbooks/ohai/metadata.rb +23 -0
- data/spec/chef_repo/cookbooks/ohai/recipes/default.rb +54 -0
- data/spec/chef_repo/cookbooks/redis/README.md +76 -0
- data/spec/chef_repo/cookbooks/redis/attributes/default.rb +51 -0
- data/spec/chef_repo/cookbooks/redis/metadata.json +304 -0
- data/spec/chef_repo/cookbooks/redis/metadata.rb +112 -0
- data/spec/chef_repo/cookbooks/redis/recipes/client.rb +23 -0
- data/spec/chef_repo/cookbooks/redis/recipes/default.rb +34 -0
- data/spec/chef_repo/cookbooks/redis/recipes/install_from_package.rb +26 -0
- data/spec/chef_repo/cookbooks/redis/recipes/install_from_release.rb +30 -0
- data/spec/chef_repo/cookbooks/redis/recipes/server.rb +42 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/redis.conf.erb +136 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-log-run.erb +2 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-run.erb +6 -0
- data/spec/chef_repo/cookbooks/runit/.gitignore +17 -0
- data/spec/chef_repo/cookbooks/runit/.kitchen.yml +53 -0
- data/spec/chef_repo/cookbooks/runit/Berksfile +12 -0
- data/spec/chef_repo/cookbooks/runit/CHANGELOG.md +97 -0
- data/spec/chef_repo/cookbooks/runit/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/runit/Gemfile +8 -0
- data/spec/chef_repo/cookbooks/runit/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/runit/README.md +448 -0
- data/spec/chef_repo/cookbooks/runit/Rakefile +17 -0
- data/spec/chef_repo/cookbooks/runit/attributes/default.rb +77 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runit-2.1.1.tar.gz +0 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runit.seed +1 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runsvdir +0 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/libraries/default.rb +0 -0
- data/spec/chef_repo/cookbooks/runit/libraries/provider_runit_service.rb +428 -0
- data/spec/chef_repo/cookbooks/runit/libraries/resource_runit_service.rb +185 -0
- data/spec/chef_repo/cookbooks/runit/metadata.rb +16 -0
- data/spec/chef_repo/cookbooks/runit/recipes/default.rb +124 -0
- data/spec/chef_repo/cookbooks/runit/templates/debian/init.d.erb +66 -0
- data/spec/chef_repo/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/spec/chef_repo/cookbooks/yum/.gitignore +14 -0
- data/spec/chef_repo/cookbooks/yum/.kitchen.yml +22 -0
- data/spec/chef_repo/cookbooks/yum/Berksfile +7 -0
- data/spec/chef_repo/cookbooks/yum/CHANGELOG.md +97 -0
- data/spec/chef_repo/cookbooks/yum/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/yum/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/yum/README.md +270 -0
- data/spec/chef_repo/cookbooks/yum/attributes/default.rb +30 -0
- data/spec/chef_repo/cookbooks/yum/attributes/elrepo.rb +24 -0
- data/spec/chef_repo/cookbooks/yum/attributes/epel.rb +39 -0
- data/spec/chef_repo/cookbooks/yum/attributes/remi.rb +30 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/default_test.rb +28 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/support/helpers.rb +37 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/test_test.rb +66 -0
- data/spec/chef_repo/cookbooks/yum/metadata.json +100 -0
- data/spec/chef_repo/cookbooks/yum/metadata.rb +37 -0
- data/spec/chef_repo/cookbooks/yum/providers/key.rb +79 -0
- data/spec/chef_repo/cookbooks/yum/providers/repository.rb +124 -0
- data/spec/chef_repo/cookbooks/yum/recipes/default.rb +18 -0
- data/spec/chef_repo/cookbooks/yum/recipes/elrepo.rb +31 -0
- data/spec/chef_repo/cookbooks/yum/recipes/epel.rb +35 -0
- data/spec/chef_repo/cookbooks/yum/recipes/ius.rb +42 -0
- data/spec/chef_repo/cookbooks/yum/recipes/remi.rb +35 -0
- data/spec/chef_repo/cookbooks/yum/recipes/repoforge.rb +41 -0
- data/spec/chef_repo/cookbooks/yum/recipes/test.rb +39 -0
- data/spec/chef_repo/cookbooks/yum/recipes/yum.rb +23 -0
- data/spec/chef_repo/cookbooks/yum/resources/key.rb +29 -0
- data/spec/chef_repo/cookbooks/yum/resources/repository.rb +41 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/repo.erb +38 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel5.conf.erb +33 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel6.conf.erb +36 -0
- data/spec/chef_repo/data_bags/.gitkeep +0 -0
- data/spec/chef_repo/data_bags/sample/items.json +1 -0
- data/spec/chef_repo/roles/.gitkeep +0 -0
- data/spec/chef_repo/roles/dummy.json +14 -0
- data/spec/chef_repo/site-cookbooks/.gitkeep +0 -0
- data/spec/chef_repo/site-cookbooks/sample/CHANGELOG.md +12 -0
- data/spec/chef_repo/site-cookbooks/sample/README.md +68 -0
- data/spec/chef_repo/site-cookbooks/sample/metadata.rb +7 -0
- data/spec/chef_repo/site-cookbooks/sample/recipes/default.rb +18 -0
- data/spec/chef_repo/solo.rb +3 -0
- data/spec/fixtures/items.json +1 -0
- data/spec/spec_helper.rb +32 -0
- metadata +880 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTRkYjIwNmFmNzk1MGFmMTBmMzczZmE3YzlmZmRiZTc5MjFhNmY3Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzUxOGU2NjA0ZjFhMDA2NzA4MTk3YTQ1ZDdhYTM2ZTZkMmRjNzE3NA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Y2Q1MzgzMjJiMzExYTFlMjVhOWJmN2U3NTg5ZDhjOTgyYzM5ZjU2OGRkNzBm
|
10
|
+
MmJkZjU5NjI4MmI3YjhjZWIyMDc1ZWM1MDNmMjk3ZjMyOGY1Mzc4YzYyNjFl
|
11
|
+
MDY4MmM3YTI0M2FkMDZjOTFlYTRkM2MwMmIwMzVhYzM1ZDQwZmQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTgxMGUwNDVkNWY4N2RhYTQ3YmQwMzY2NGI0MzdlN2QxZWU4MzcyMjdlNTZm
|
14
|
+
ZGFlNWMzNTU4ZDIzN2Q2ZjkzYzQyOWE3MjA3OGE1Mzk3ZmJmZTllNzYyNzAy
|
15
|
+
YzU2NzBjZWI3YWJjYWUxMmYyYWE5NTQ3YjIxY2VmYTQzZGZlMDA=
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
coverage
|
6
|
+
InstalledFiles
|
7
|
+
lib/bundler/man
|
8
|
+
pkg
|
9
|
+
rdoc
|
10
|
+
spec/reports
|
11
|
+
test/tmp
|
12
|
+
test/version_tmp
|
13
|
+
tmp
|
14
|
+
*.swp
|
15
|
+
.DS_Store
|
16
|
+
config.ru
|
17
|
+
|
18
|
+
# YARD artifacts
|
19
|
+
.yardoc
|
20
|
+
_yardoc
|
21
|
+
doc/
|
22
|
+
Gemfile.lock
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 azukiwasher
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# AgileSolo
|
2
|
+
|
3
|
+
A Ruby wrapper for Chef::Application::Solo through HTTP.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```
|
10
|
+
gem 'agile_solo'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
```
|
22
|
+
$ gem install agile_solo
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Drop `agile_solo` gem into Gemfile
|
28
|
+
|
29
|
+
```
|
30
|
+
$ mkdir hanamoguella
|
31
|
+
$ cd hanamoguella
|
32
|
+
$ bundle init
|
33
|
+
$ vim Gemfile
|
34
|
+
gem 'agile_solo'
|
35
|
+
$ bundle install
|
36
|
+
```
|
37
|
+
|
38
|
+
Edit config.ru
|
39
|
+
|
40
|
+
```
|
41
|
+
require 'agile_solo'
|
42
|
+
|
43
|
+
AgileSolo::Config.chef_repo = ENV['CHEF_REPO'] || '/root/chef_repo'
|
44
|
+
run AgileSolo::Server
|
45
|
+
```
|
46
|
+
|
47
|
+
Run the server
|
48
|
+
|
49
|
+
```
|
50
|
+
$ gem install puma
|
51
|
+
$ puma config.ru
|
52
|
+
```
|
53
|
+
|
54
|
+
Perform the request
|
55
|
+
|
56
|
+
```
|
57
|
+
$ curl --request PUT \
|
58
|
+
--header "Content-Type: application/json" \
|
59
|
+
--data @data.json \
|
60
|
+
'http:/localhost:9292/solo'
|
61
|
+
```
|
62
|
+
|
63
|
+
Request @data
|
64
|
+
|
65
|
+
```
|
66
|
+
{
|
67
|
+
"solo":{
|
68
|
+
"run_list":"recipe[sample::default]",
|
69
|
+
"name":"sample",
|
70
|
+
"items":{
|
71
|
+
"id":"items",
|
72
|
+
"data":{
|
73
|
+
"lines":["foo", "hoge"]
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
```
|
79
|
+
|
80
|
+
Response
|
81
|
+
|
82
|
+
`204 No Content`
|
83
|
+
|
84
|
+
## Contributing
|
85
|
+
|
86
|
+
1. Fork it
|
87
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
88
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
89
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
90
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/agile_solo.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'agile_solo/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'agile_solo'
|
8
|
+
spec.version = AgileSolo::VERSION
|
9
|
+
spec.authors = ['azukiwasher']
|
10
|
+
spec.email = ['azukiwasher@higanworks.com']
|
11
|
+
spec.description = %q{A Ruby wrapper for Chef::Application::Solo through HTTP}
|
12
|
+
spec.summary = %q{A Ruby wrapper for Chef::Application::Solo through HTTP}
|
13
|
+
spec.homepage = 'https://github.com/azukiwasher/agile_solo'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'sinatra'
|
22
|
+
spec.add_runtime_dependency 'rack'
|
23
|
+
spec.add_runtime_dependency 'multi_json'
|
24
|
+
spec.add_runtime_dependency 'chef'
|
25
|
+
|
26
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
|
+
spec.add_development_dependency 'rake'
|
28
|
+
spec.add_development_dependency 'rspec'
|
29
|
+
spec.add_development_dependency 'rack-test'
|
30
|
+
end
|
data/lib/agile_solo.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'agile_solo/version'
|
4
|
+
require 'agile_solo/server'
|
5
|
+
require 'agile_solo/command'
|
6
|
+
require 'agile_solo/composite_command'
|
7
|
+
require 'agile_solo/consumer'
|
8
|
+
require 'agile_solo/application/solo'
|
9
|
+
require 'agile_solo/config'
|
10
|
+
|
11
|
+
module AgileSolo
|
12
|
+
# Your code goes here...
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'chef/application/solo'
|
3
|
+
|
4
|
+
module AgileSolo
|
5
|
+
module Application
|
6
|
+
class Solo < Chef::Application::Solo
|
7
|
+
attr_reader :chef_solo_json
|
8
|
+
|
9
|
+
def run_application
|
10
|
+
begin
|
11
|
+
run_chef_client
|
12
|
+
rescue SystemExit => e
|
13
|
+
raise
|
14
|
+
rescue Exception => e
|
15
|
+
Chef::Application.fatal!("#{e.class}: #{e.message}", 1)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module AgileSolo
|
4
|
+
class CompositeCommand < Command
|
5
|
+
def initialize
|
6
|
+
@commands = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def size
|
10
|
+
@commands.size
|
11
|
+
end
|
12
|
+
|
13
|
+
def empty?
|
14
|
+
@commands.empty?
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_commands(cmd)
|
18
|
+
@commands << cmd
|
19
|
+
end
|
20
|
+
|
21
|
+
def execute
|
22
|
+
@commands.each { |cmd| cmd.execute }
|
23
|
+
end
|
24
|
+
|
25
|
+
def unexecute
|
26
|
+
@commands.each { |cmd| cmd.execute }
|
27
|
+
end
|
28
|
+
|
29
|
+
def description
|
30
|
+
description = ''
|
31
|
+
@commands.each { |cmd| description += cmd.description + "\n" }
|
32
|
+
description
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module AgileSolo
|
4
|
+
class Consumer < Command
|
5
|
+
attr_reader :name, :run_list, :data, :chef_repo
|
6
|
+
|
7
|
+
def initialize(payload)
|
8
|
+
@name = payload['name']
|
9
|
+
@run_list = payload['run_list']
|
10
|
+
@data = MultiJson.dump(payload['items'])
|
11
|
+
@chef_repo = AgileSolo::Config.chef_repo
|
12
|
+
|
13
|
+
Chef::Config[:data_bag_path] = File.join(@chef_repo, 'data_bags')
|
14
|
+
chef_solo.config[:config_file] = File.join(@chef_repo, 'solo.rb')
|
15
|
+
chef_solo.config[:override_runlist] = [@run_list]
|
16
|
+
end
|
17
|
+
|
18
|
+
def chef_solo
|
19
|
+
@chef_solo ||= AgileSolo::Application::Solo.new
|
20
|
+
end
|
21
|
+
|
22
|
+
def execute
|
23
|
+
begin
|
24
|
+
update_data_bag
|
25
|
+
chef_solo.run
|
26
|
+
rescue => e
|
27
|
+
puts e.backtrace.join("\n")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def update_data_bag
|
32
|
+
File.open(file_path, 'w') { |f| f.write(data) }
|
33
|
+
end
|
34
|
+
|
35
|
+
protected
|
36
|
+
|
37
|
+
def file_path
|
38
|
+
File.join(Chef::Config[:data_bag_path], name, 'items.json')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'sinatra/base'
|
3
|
+
require 'multi_json'
|
4
|
+
|
5
|
+
module AgileSolo
|
6
|
+
class Server < Sinatra::Base
|
7
|
+
|
8
|
+
def commands
|
9
|
+
@commands ||= CompositeCommand.new
|
10
|
+
end
|
11
|
+
|
12
|
+
put '/solo' do
|
13
|
+
content_type :json
|
14
|
+
commands.add_commands AgileSolo::Consumer.new(MultiJson.load(request.body.read)['solo'])
|
15
|
+
commands.execute
|
16
|
+
status 204
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe AgileSolo::Command do
|
5
|
+
it 'returns nil for description attribute' do
|
6
|
+
command = AgileSolo::Command.new
|
7
|
+
expect(command.description.empty?).to be_true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'returns the description for the request' do
|
11
|
+
description = 'Hello, world!'
|
12
|
+
command = AgileSolo::Command.new(description)
|
13
|
+
expect(command.description).to eql description
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe AgileSolo::CompositeCommand do
|
5
|
+
before do
|
6
|
+
@cmds = AgileSolo::CompositeCommand.new
|
7
|
+
end
|
8
|
+
it 'returns an empty commands array' do
|
9
|
+
expect(@cmds.empty?).to be_true
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'calls the execute method in the given class' do
|
13
|
+
message = 'Hello,world!'
|
14
|
+
obj = OpenStruct.new(execute: message)
|
15
|
+
expect(obj).to receive(:execute).and_return(message)
|
16
|
+
|
17
|
+
@cmds.add_commands obj
|
18
|
+
@cmds.execute
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'raise error missing the execute method in the given class' do
|
22
|
+
@cmds.add_commands Object.new
|
23
|
+
expect{@cmds.execute}.to raise_error NoMethodError
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'returns the desciption' do
|
27
|
+
message = 'Hello,world!'
|
28
|
+
@cmds.add_commands OpenStruct.new(description: message)
|
29
|
+
expect(@cmds.description.chomp).to eql message
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe AgileSolo::Consumer do
|
4
|
+
before do
|
5
|
+
AgileSolo::Config.chef_repo = File.expand_path('./spec/chef_repo')
|
6
|
+
@payload = MultiJson.load(fixture('items.json'))['solo']
|
7
|
+
@consumer = AgileSolo::Consumer.new(@payload)
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#initialize" do
|
11
|
+
it 'returns the given chef repository' do
|
12
|
+
expect(@consumer.chef_repo).to eql AgileSolo::Config.chef_repo
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'returns name attribute' do
|
16
|
+
expect(@consumer.name).to eql @payload['name']
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'returns run_list attribute' do
|
20
|
+
expect(@consumer.run_list).to eql @payload['run_list']
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'returns data attribute' do
|
24
|
+
expect(@consumer.data).to eql MultiJson.dump(@payload['items'])
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'returns the data_bag_path' do
|
28
|
+
expect(Chef::Config[:data_bag_path]).to eql File.join(@consumer.chef_repo, 'data_bags')
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'returns the config_file path' do
|
32
|
+
expect(@consumer.chef_solo.config[:config_file]).to eql File.join(@consumer.chef_repo, 'solo.rb')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns the override_runlist path' do
|
36
|
+
expect(@consumer.chef_solo.config[:override_runlist].include?(@consumer.run_list)).to be_true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#chef_solo' do
|
41
|
+
it 'returns a solo object' do
|
42
|
+
expect(@consumer.chef_solo).to be_instance_of AgileSolo::Application::Solo
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe '#execute' do
|
47
|
+
it 'calls the overrided run_application method' do
|
48
|
+
expect(@consumer.chef_solo).to receive(:run_application)
|
49
|
+
@consumer.execute
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|