cloud-toaster 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/LICENSE +202 -0
- data/README.md +54 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/bin/strace-4.8_patched/strace-i686 +0 -0
- data/bin/strace-4.8_patched/strace-x86_64 +0 -0
- data/bin/toaster +74 -0
- data/chef/cookbooks/chef-solo-search/CHANGELOG +16 -0
- data/chef/cookbooks/chef-solo-search/Gemfile +8 -0
- data/chef/cookbooks/chef-solo-search/LICENSE +202 -0
- data/chef/cookbooks/chef-solo-search/NOTICE +18 -0
- data/chef/cookbooks/chef-solo-search/README.md +143 -0
- data/chef/cookbooks/chef-solo-search/Rakefile +10 -0
- data/chef/cookbooks/chef-solo-search/libraries/search/overrides.rb +100 -0
- data/chef/cookbooks/chef-solo-search/libraries/search/parser.rb +222 -0
- data/chef/cookbooks/chef-solo-search/libraries/search.rb +75 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene.treetop +150 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb +285 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/query_transform.rb +65 -0
- data/chef/cookbooks/chef-solo-search/metadata.rb +11 -0
- data/chef/cookbooks/chef-solo-search/recipes/default.rb +3 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/alpha.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/beta.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/without_json_class.json +7 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/jerry.json +8 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/lea.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/mike.json +13 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/tom.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/gemfiles/Gemfile.10 +4 -0
- data/chef/cookbooks/chef-solo-search/tests/gemfiles/Gemfile.11 +5 -0
- data/chef/cookbooks/chef-solo-search/tests/test_data_bags.rb +45 -0
- data/chef/cookbooks/chef-solo-search/tests/test_search.rb +244 -0
- data/chef/cookbooks/lxc/attributes/create_lxc.rb +8 -0
- data/chef/cookbooks/lxc/attributes/general.rb +15 -0
- data/chef/cookbooks/lxc/attributes/init_bare_os.rb +15 -0
- data/chef/cookbooks/lxc/attributes/init_proto.rb +18 -0
- data/chef/cookbooks/lxc/attributes/install_ruby.rb +51 -0
- data/chef/cookbooks/lxc/attributes/mount_volume.rb +11 -0
- data/chef/cookbooks/lxc/attributes/setup_host.rb +9 -0
- data/chef/cookbooks/lxc/attributes/setup_proxy.rb +3 -0
- data/chef/cookbooks/lxc/attributes/start_lxc.rb +11 -0
- data/chef/cookbooks/lxc/attributes/stop_lxc.rb +3 -0
- data/chef/cookbooks/lxc/files/install.chef.sh +78 -0
- data/chef/cookbooks/lxc/metadata.json +6 -0
- data/chef/cookbooks/lxc/recipes/create_lxc.rb +106 -0
- data/chef/cookbooks/lxc/recipes/init_bare_os.rb +82 -0
- data/chef/cookbooks/lxc/recipes/init_proto.rb +417 -0
- data/chef/cookbooks/lxc/recipes/install_docker.rb +61 -0
- data/chef/cookbooks/lxc/recipes/install_ruby.rb +28 -0
- data/chef/cookbooks/lxc/recipes/mount_volume.rb +63 -0
- data/chef/cookbooks/lxc/recipes/setup_database.rb +22 -0
- data/chef/cookbooks/lxc/recipes/setup_host.rb +179 -0
- data/chef/cookbooks/lxc/recipes/setup_proxy.rb +157 -0
- data/chef/cookbooks/lxc/recipes/start_lxc.rb +180 -0
- data/chef/cookbooks/lxc/recipes/stop_lxc.rb +86 -0
- data/chef/cookbooks/mysql/CHANGELOG.md +391 -0
- data/chef/cookbooks/mysql/README.md +211 -0
- data/chef/cookbooks/mysql/attributes/default.rb +22 -0
- data/chef/cookbooks/mysql/libraries/helpers.rb +277 -0
- data/chef/cookbooks/mysql/libraries/matchers.rb +17 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client.rb +10 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_debian.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_fedora.rb +38 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_freebsd.rb +33 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_omnios.rb +41 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_rhel.rb +42 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_smartos.rb +33 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_suse.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_ubuntu.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service.rb +10 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_debian.rb +193 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_fedora.rb +157 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_freebsd.rb +151 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_omnios.rb +232 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_rhel.rb +318 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_smartos.rb +216 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_suse.rb +170 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb +218 -0
- data/chef/cookbooks/mysql/libraries/resource_mysql_client.rb +11 -0
- data/chef/cookbooks/mysql/libraries/resource_mysql_service.rb +194 -0
- data/chef/cookbooks/mysql/metadata.json +40 -0
- data/chef/cookbooks/mysql/metadata.rb +20 -0
- data/chef/cookbooks/mysql/recipes/client.rb +22 -0
- data/chef/cookbooks/mysql/recipes/server.rb +33 -0
- data/chef/cookbooks/mysql/recipes/server_deprecated.rb +23 -0
- data/chef/cookbooks/mysql/templates/default/5.0/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.1/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.5/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.6/my.cnf.erb +39 -0
- data/chef/cookbooks/mysql/templates/default/apparmor/usr.sbin.mysqld.erb +40 -0
- data/chef/cookbooks/mysql/templates/default/debian/debian.cnf.erb +12 -0
- data/chef/cookbooks/mysql/templates/default/debian/mysql-server.seed.erb +10 -0
- data/chef/cookbooks/mysql/templates/default/deprecated/my.cnf.erb +374 -0
- data/chef/cookbooks/mysql/templates/default/grants/grants.sql.erb +27 -0
- data/chef/cookbooks/mysql/templates/default/omnios/mysql.xml.erb +26 -0
- data/chef/cookbooks/mysql/templates/default/omnios/svc.method.mysqld.erb +29 -0
- data/chef/cookbooks/mysql/templates/default/smartos/mysql.xml.erb +32 -0
- data/chef/cookbooks/mysql/templates/default/smartos/svc.method.mysqld.erb +29 -0
- data/chef/cookbooks/openssl/README.md +37 -0
- data/chef/cookbooks/openssl/libraries/secure_password.rb +37 -0
- data/chef/cookbooks/openssl/metadata.json +30 -0
- data/chef/cookbooks/openssl/metadata.rb +8 -0
- data/chef/cookbooks/openssl/recipes/default.rb +19 -0
- data/chef/cookbooks/ssh/attributes/default.rb +8 -0
- data/chef/cookbooks/ssh/recipes/authorize_key.rb +20 -0
- data/chef/cookbooks/toaster/attributes/testing.rb +37 -0
- data/chef/cookbooks/toaster/libraries/default.rb +61 -0
- data/chef/cookbooks/toaster/recipes/post__cakephp__default.rb +27 -0
- data/chef/cookbooks/toaster/recipes/post__cube__default.rb +26 -0
- data/chef/cookbooks/toaster/recipes/post__drupal__default.rb +16 -0
- data/chef/cookbooks/toaster/recipes/post__icinga__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/post__node__default.rb +16 -0
- data/chef/cookbooks/toaster/recipes/post__virtualbox__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/post__wordpress__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/pre__aegir__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/pre__app__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__cakephp__default.rb +24 -0
- data/chef/cookbooks/toaster/recipes/pre__cube__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__disco__default.rb +21 -0
- data/chef/cookbooks/toaster/recipes/pre__drbd__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/pre__eaccelerator__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__elasticsearch-head__default.rb +11 -0
- data/chef/cookbooks/toaster/recipes/pre__elasticsearch__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__gitosis__default.rb +17 -0
- data/chef/cookbooks/toaster/recipes/pre__kafka__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__munin__server.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__mysql__server.rb +4 -0
- data/chef/cookbooks/toaster/recipes/pre__nagios__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__netkernel__default.rb +24 -0
- data/chef/cookbooks/toaster/recipes/pre__php__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__postgresql__server.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__pxe_dust__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__pxe_install_server__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__riak__default.rb +40 -0
- data/chef/cookbooks/toaster/recipes/pre__sensu__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__sol__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__solr__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__sonar__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__storm__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__vmware__tools.rb +4 -0
- data/chef/cookbooks/toaster/recipes/pre__wordpress__default.rb +17 -0
- data/chef/cookbooks/toaster/recipes/pre__xen__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/pre__znc__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/testing.rb +241 -0
- data/chef/cookbooks/toaster/recipes/testing_post.rb +36 -0
- data/chef/cookbooks/yum/CHANGELOG.md +212 -0
- data/chef/cookbooks/yum/README.md +268 -0
- data/chef/cookbooks/yum/attributes/main.rb +97 -0
- data/chef/cookbooks/yum/libraries/matchers.rb +27 -0
- data/chef/cookbooks/yum/metadata.json +34 -0
- data/chef/cookbooks/yum/metadata.rb +13 -0
- data/chef/cookbooks/yum/providers/globalconfig.rb +37 -0
- data/chef/cookbooks/yum/providers/repository.rb +85 -0
- data/chef/cookbooks/yum/recipes/default.rb +34 -0
- data/chef/cookbooks/yum/resources/globalconfig.rb +105 -0
- data/chef/cookbooks/yum/resources/repository.rb +63 -0
- data/chef/cookbooks/yum/templates/default/main.erb +251 -0
- data/chef/cookbooks/yum/templates/default/repo.erb +109 -0
- data/chef/cookbooks/yum-mysql-community/CHANGELOG.md +67 -0
- data/chef/cookbooks/yum-mysql-community/README.md +137 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql-connectors-community.rb +31 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql55-community.rb +29 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql56-community.rb +31 -0
- data/chef/cookbooks/yum-mysql-community/files/default/mysql_pubkey.asc +33 -0
- data/chef/cookbooks/yum-mysql-community/metadata.json +30 -0
- data/chef/cookbooks/yum-mysql-community/metadata.rb +8 -0
- data/chef/cookbooks/yum-mysql-community/recipes/connectors.rb +48 -0
- data/chef/cookbooks/yum-mysql-community/recipes/mysql55.rb +48 -0
- data/chef/cookbooks/yum-mysql-community/recipes/mysql56.rb +48 -0
- data/config.json +34 -0
- data/lib/toaster/api.rb +447 -0
- data/lib/toaster/chef/chef_listener.rb +514 -0
- data/lib/toaster/chef/chef_node_inspector.rb +165 -0
- data/lib/toaster/chef/chef_util.rb +865 -0
- data/lib/toaster/chef/failsafe_resource_parser.rb +140 -0
- data/lib/toaster/chef/resource_inspector.rb +536 -0
- data/lib/toaster/db/cache.rb +98 -0
- data/lib/toaster/db/cached_db.rb +53 -0
- data/lib/toaster/db/cgi_session_cache.rb +209 -0
- data/lib/toaster/db/db.rb +98 -0
- data/lib/toaster/db/mysql.rb +18 -0
- data/lib/toaster/db/ram_cache.rb +203 -0
- data/lib/toaster/markup/jdom-1.1.jar +0 -0
- data/lib/toaster/markup/jdom-b7.jar +0 -0
- data/lib/toaster/markup/markup_util.rb +437 -0
- data/lib/toaster/markup/vmtools-utils-0.5.jar +0 -0
- data/lib/toaster/markup/xmldiff.sh +5 -0
- data/lib/toaster/model/additional_property.rb +11 -0
- data/lib/toaster/model/automation.rb +218 -0
- data/lib/toaster/model/automation_attribute.rb +13 -0
- data/lib/toaster/model/automation_run.rb +104 -0
- data/lib/toaster/model/ignore_property.rb +11 -0
- data/lib/toaster/model/key_value_pair.rb +59 -0
- data/lib/toaster/model/run_attribute.rb +17 -0
- data/lib/toaster/model/state.rb +17 -0
- data/lib/toaster/model/state_change.rb +79 -0
- data/lib/toaster/model/task.rb +292 -0
- data/lib/toaster/model/task_execution.rb +76 -0
- data/lib/toaster/model/task_parameter.rb +66 -0
- data/lib/toaster/model/user.rb +32 -0
- data/lib/toaster/ohai/_disabled_/network_ports.rb +81 -0
- data/lib/toaster/ohai/apache/apache.rb +48 -0
- data/lib/toaster/ohai/cron/cron.rb +32 -0
- data/lib/toaster/ohai/files/_meta.rb +30 -0
- data/lib/toaster/ohai/files/files.rb +20 -0
- data/lib/toaster/ohai/gems/gems.rb +19 -0
- data/lib/toaster/ohai/groups/groups.rb +20 -0
- data/lib/toaster/ohai/iptables/iptables.rb +48 -0
- data/lib/toaster/ohai/mounts/mounts.rb +26 -0
- data/lib/toaster/ohai/mysql/mysql.rb +31 -0
- data/lib/toaster/ohai/packages/_meta.rb +86 -0
- data/lib/toaster/ohai/packages/packages.rb +33 -0
- data/lib/toaster/ohai/ports/ports.rb +21 -0
- data/lib/toaster/ohai/routes/routes.rb +25 -0
- data/lib/toaster/ohai/services/services.rb +42 -0
- data/lib/toaster/ohai/users/users.rb +17 -0
- data/lib/toaster/state/convergence.rb +197 -0
- data/lib/toaster/state/idempotence.rb +192 -0
- data/lib/toaster/state/ptrace_util.rb +48 -0
- data/lib/toaster/state/state_node.rb +105 -0
- data/lib/toaster/state/state_transition.rb +38 -0
- data/lib/toaster/state/state_transition_graph.rb +701 -0
- data/lib/toaster/state/syscall_tracer.rb +317 -0
- data/lib/toaster/state/system_state.rb +349 -0
- data/lib/toaster/state/transition_edge.rb +65 -0
- data/lib/toaster/test/test_attribute.rb +19 -0
- data/lib/toaster/test/test_case.rb +175 -0
- data/lib/toaster/test/test_coverage.rb +147 -0
- data/lib/toaster/test/test_coverage_goal.rb +108 -0
- data/lib/toaster/test/test_generator.rb +246 -0
- data/lib/toaster/test/test_orchestrator.rb +165 -0
- data/lib/toaster/test/test_result.rb +73 -0
- data/lib/toaster/test/test_runner.rb +394 -0
- data/lib/toaster/test/test_suite.rb +151 -0
- data/lib/toaster/test_manager.rb +281 -0
- data/lib/toaster/toaster_app_service.rb +141 -0
- data/lib/toaster/util/blocking_map.rb +80 -0
- data/lib/toaster/util/combinatorial.rb +58 -0
- data/lib/toaster/util/config.rb +103 -0
- data/lib/toaster/util/docker.rb +71 -0
- data/lib/toaster/util/logging.rb +19 -0
- data/lib/toaster/util/lxc.rb +383 -0
- data/lib/toaster/util/mem_dump.rb +38 -0
- data/lib/toaster/util/proxy.rb +23 -0
- data/lib/toaster/util/timestamp.rb +131 -0
- data/lib/toaster/util/util.rb +437 -0
- data/lib/toaster/web_ui.rb +7 -0
- data/webapp/Gemfile +46 -0
- data/webapp/Gemfile.lock +237 -0
- data/webapp/Rakefile +6 -0
- data/webapp/app/assets/fonts/font.woff +0 -0
- data/webapp/app/assets/images/final_state.gif +0 -0
- data/webapp/app/assets/images/initial_state.gif +0 -0
- data/webapp/app/assets/images/loading.gif +0 -0
- data/webapp/app/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/webapp/app/assets/images/ui-icons_222222_256x240.png +0 -0
- data/webapp/app/assets/javascripts/analysis.js.coffee +3 -0
- data/webapp/app/assets/javascripts/application.js +16 -0
- data/webapp/app/assets/javascripts/execs.js.coffee +3 -0
- data/webapp/app/assets/javascripts/graph.js +441 -0
- data/webapp/app/assets/javascripts/jquery-1.7.2.js +9404 -0
- data/webapp/app/assets/javascripts/jquery-ui-1.8.22.js +11529 -0
- data/webapp/app/assets/javascripts/jquery.cookie.js +96 -0
- data/webapp/app/assets/javascripts/jquery.hotkeys.js +99 -0
- data/webapp/app/assets/javascripts/jquery.jstree.js +4551 -0
- data/webapp/app/assets/javascripts/jsPlumb/jquery.jsPlumb-1.3.14-all-min.js +1 -0
- data/webapp/app/assets/javascripts/jstree.util.js +53 -0
- data/webapp/app/assets/javascripts/scripts.js.coffee +3 -0
- data/webapp/app/assets/javascripts/settings.js.coffee +3 -0
- data/webapp/app/assets/javascripts/test.js.coffee +3 -0
- data/webapp/app/assets/javascripts/util.js.coffee +3 -0
- data/webapp/app/assets/stylesheets/analysis.css.scss +3 -0
- data/webapp/app/assets/stylesheets/application.css +49 -0
- data/webapp/app/assets/stylesheets/execs.css.scss +3 -0
- data/webapp/app/assets/stylesheets/graph.css +159 -0
- data/webapp/app/assets/stylesheets/jquery-ui-1.8.6.custom.css +572 -0
- data/webapp/app/assets/stylesheets/layout.css +151 -0
- data/webapp/app/assets/stylesheets/menu.css +186 -0
- data/webapp/app/assets/stylesheets/reset.css +41 -0
- data/webapp/app/assets/stylesheets/scripts.css.scss +3 -0
- data/webapp/app/assets/stylesheets/settings.css.scss +3 -0
- data/webapp/app/assets/stylesheets/test.css.scss +3 -0
- data/webapp/app/assets/stylesheets/util.css.scss +3 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.eot +0 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.svg +1 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.ttf +0 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.woff +0 -0
- data/webapp/app/controllers/analysis_controller.rb +7 -0
- data/webapp/app/controllers/application_controller.rb +14 -0
- data/webapp/app/controllers/base_controller.rb +91 -0
- data/webapp/app/controllers/execs_controller.rb +59 -0
- data/webapp/app/controllers/graph_controller.rb +17 -0
- data/webapp/app/controllers/scripts_controller.rb +166 -0
- data/webapp/app/controllers/settings_controller.rb +10 -0
- data/webapp/app/controllers/test_controller.rb +127 -0
- data/webapp/app/controllers/util_controller.rb +6 -0
- data/webapp/app/helpers/analysis_helper.rb +2 -0
- data/webapp/app/helpers/application_helper.rb +2 -0
- data/webapp/app/helpers/automations_helper.rb +2 -0
- data/webapp/app/helpers/execs_helper.rb +2 -0
- data/webapp/app/helpers/scripts_helper.rb +2 -0
- data/webapp/app/helpers/settings_helper.rb +2 -0
- data/webapp/app/helpers/test_helper.rb +2 -0
- data/webapp/app/helpers/util_helper.rb +2 -0
- data/webapp/app/views/analysis/convergence.html.erb +156 -0
- data/webapp/app/views/analysis/idempotence.html.erb +2 -0
- data/webapp/app/views/execs/automation_runs.html.erb +98 -0
- data/webapp/app/views/execs/task_executions.html.erb +154 -0
- data/webapp/app/views/graph/graph_frame.html +101 -0
- data/webapp/app/views/layouts/application.html.erb +114 -0
- data/webapp/app/views/scripts/edit.html.erb +58 -0
- data/webapp/app/views/scripts/graph.html.erb +75 -0
- data/webapp/app/views/scripts/import_chef.html.erb +104 -0
- data/webapp/app/views/scripts/scripts.html.erb +116 -0
- data/webapp/app/views/scripts/tasks.html.erb +139 -0
- data/webapp/app/views/settings/containers.html.erb +161 -0
- data/webapp/app/views/settings/index.html.erb +51 -0
- data/webapp/app/views/test/cases.html.erb +2 -0
- data/webapp/app/views/test/gen.html.erb +229 -0
- data/webapp/app/views/test/suites.html.erb +205 -0
- data/webapp/app/views/util/chef.html.erb +53 -0
- data/webapp/bin/bundle +3 -0
- data/webapp/bin/rails +4 -0
- data/webapp/bin/rake +4 -0
- data/webapp/config/application.rb +28 -0
- data/webapp/config/boot.rb +18 -0
- data/webapp/config/database.yml +42 -0
- data/webapp/config/environment.rb +5 -0
- data/webapp/config/environments/development.rb +35 -0
- data/webapp/config/environments/production.rb +80 -0
- data/webapp/config/environments/test.rb +36 -0
- data/webapp/config/initializers/backtrace_silencers.rb +7 -0
- data/webapp/config/initializers/devise.rb +256 -0
- data/webapp/config/initializers/filter_parameter_logging.rb +4 -0
- data/webapp/config/initializers/inflections.rb +16 -0
- data/webapp/config/initializers/mime_types.rb +5 -0
- data/webapp/config/initializers/patches.rb +13 -0
- data/webapp/config/initializers/secret_token.rb +12 -0
- data/webapp/config/initializers/session_store.rb +6 -0
- data/webapp/config/initializers/wrap_parameters.rb +16 -0
- data/webapp/config/locales/devise.en.yml +59 -0
- data/webapp/config/locales/en.yml +23 -0
- data/webapp/config/routes.rb +113 -0
- data/webapp/config.ru +4 -0
- data/webapp/db/development.sqlite3 +0 -0
- data/webapp/db/migrate/20140624002037_devise_create_users.rb +42 -0
- data/webapp/db/migrate/20140628002058_create_all_tables.rb +159 -0
- data/webapp/db/schema.rb +162 -0
- data/webapp/db/seeds.rb +7 -0
- data/webapp/log/development.log +167823 -0
- data/webapp/public/404.html +58 -0
- data/webapp/public/422.html +58 -0
- data/webapp/public/500.html +57 -0
- data/webapp/public/favicon.ico +0 -0
- data/webapp/public/robots.txt +5 -0
- data/webapp/test/controllers/analysis_controller_test.rb +14 -0
- data/webapp/test/controllers/automations_controller_test.rb +49 -0
- data/webapp/test/controllers/execs_controller_test.rb +9 -0
- data/webapp/test/controllers/executions_controller_test.rb +9 -0
- data/webapp/test/controllers/runs_controller_test.rb +7 -0
- data/webapp/test/controllers/scripts_controller_test.rb +9 -0
- data/webapp/test/controllers/settings_controller_test.rb +9 -0
- data/webapp/test/controllers/test_controller_test.rb +14 -0
- data/webapp/test/controllers/util_controller_test.rb +9 -0
- data/webapp/test/fixtures/users.yml +11 -0
- data/webapp/test/helpers/analysis_helper_test.rb +4 -0
- data/webapp/test/helpers/automations_helper_test.rb +4 -0
- data/webapp/test/helpers/execs_helper_test.rb +4 -0
- data/webapp/test/helpers/executions_helper_test.rb +4 -0
- data/webapp/test/helpers/runs_helper_test.rb +4 -0
- data/webapp/test/helpers/scripts_helper_test.rb +4 -0
- data/webapp/test/helpers/settings_helper_test.rb +4 -0
- data/webapp/test/helpers/test_helper_test.rb +4 -0
- data/webapp/test/helpers/util_helper_test.rb +4 -0
- data/webapp/test/models/user_test.rb +7 -0
- data/webapp/test/test_helper.rb +15 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/analysis.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/automations.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/execs.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/executions.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/scripts.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/settings.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/test.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/util.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/06a1cdb3d5472dd126cffc18f548c342 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/0dc0562647e703ca0535da3b9fcad796 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/113f1c71cb0f2a786729477989122982 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/151a1c6b128721d8923ba0c380a2af17 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1722fb8a6daad566c8a6d5ef31969459 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1a05555c46560c6b246aa0a996679bc6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1cb7fb6aa8bd1c2b7df8f7c52442e345 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1d76f803b0a83adc5ea7e7c848657967 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/200152f95fc464d69c425ed8fdc2fbcc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/2049c8927ebd046c8a3291f81041d5f1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/207907100aabd08a6767e39a95b364e3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/249e2d4db815922fc72419c4a1407caf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3034e4c334b1ebed9433e33050555f18 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/316c88d859cc3666044e51b1dd89e872 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/347f43d816178c8ba11a28a771696924 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/36ab92a3b8d527ed1eff0944b5f1263d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3893b852ff196f05ff6ca8e38bb2237f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3c358bd5fa32d151c7aa44971dd9b96f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3ce88fad85146e0bed233f5419c24d29 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3dabcb7c89677292e1e019a9bac446e5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/4116fac01e6d379ede37af725a592477 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/42628e032b8f0b16a5ba01a1fcc7b6d7 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/437b258a98e8fe2c87fa8e24b7ce9abf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/43e98ed206f05738ae305e7e1b09a840 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/468da8933ba442b88b2f4b0e40c2ac30 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/48ef3fa68e9084c7cfa84e525decc318 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/4b68dcc030691297629a7156361018dc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/50368b1bd77c9130d821cbad89ab83ac +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/511a980807b8d16fc3fb839991041865 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/516a0973874a73d0d15feec9448f7466 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/569e21b0ca1a230c7880f8d7a8b1febf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5b5543d2ed5bed100f1739fc12ebf2c5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5c10dbffb918651dc0498579ba9a6853 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5c366b5370316b3e9c03d1a58cb5eb44 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5fcb9466e0d5cb0e31b35957fe2d3901 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/61da396fb86c5ecd844a2d83ac759b4b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/624ba87170059068845a4651b3cd2c7c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6391f61b6121feda70da6d0a22520fdd +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/653a981829c12a52bd57b7918168a148 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/66479793d9e5683d9f7fa67522d1962d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/69c589bd224ee0df5ab02e4568e0ab39 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6dd7c564897b7e66eecbb180baeef2c6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6e2b92a4e6966cb78e63207bc7888391 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/70adb410f59a0edc5aea8c2b2ef8a441 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/72cbfd5bf33945bcce154f7a4feaf04d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/740ee9d355ada8cf5e9beb620f2cd5cc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/74770a22b5d1b0b3bc3527da83706f96 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/759bf97655af50852816720db7b59fcb +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/76e9c19246c684413a02af695fa2b0bc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7728beeace48ca12e336d2bce0158871 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/77f49730c7b689f75a2e174fbd3ace2a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/78021a57030fd36cf82699aad9910b26 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/796b349b06da691fe5f069f9e3947fcb +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/79e7505c70697cc7d34d4a8351c3b840 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7b2b7d9034fc7b77daf5da1436667e6f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7c2ea2ca2cdd89b062bf23f44e8f599c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7ea112af55e6df12cdff377052b71420 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7f27632588dd316836b009a621c0176c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7fcef9f644290dea8d0e4bf13f6bb8e9 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/81c6bf67419a29257ed79f442c24907d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/83656ce9260eb473c1654420e0180167 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/83e8bdddefc2dce069b56e6650135397 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/880c796f41e5d67ae68ed239acfc91e3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/8c1c39dd537d2c9990fe9c70a5646b06 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/8d763042da5254015767385ce324b348 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/91e1ccbf65ff4d9b0f42b1159796bcf2 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/92cdfac7698b6bb68983cf317c1cedef +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/94cab8cbc120e152ce4c444492a3fc1d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/96b918c3c041b6a089c8adc870fa3aaa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/97cbe306627b432ab3bfb52416690d1d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/98da83d396c0c00eb03937ecbc2e6bfa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9db04db20ec9c4a0f84ed01caa5e6e2b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9dc1c251f50c828fae95d6107619c53e +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9e91711ab34bbf89ad1cfb4351027d36 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9f587881f98b328b656e6456178418b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9fc981560caba00621bb95d0974ad076 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9fd4385f8fda99f3ddd3f133a89231d1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/a32ab71649e3db15eca95bcc3a7588da +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/a497c976969bdbb1f69875358d39d3b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b06058d455770c1d9db6b6670bc4bf4d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b3da405f1e68470ad6146a1322f2438c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b4ba5853663f6721d15942ce08dd76bf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b6f1534bcdbff92a16c85487f363235a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b9c57b9750f8af3551b1a5d9e27f0a92 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bb5be6a0ee889a15214e2442aee8c6e1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bc80a81b2d67b5ad40f3c7a2bb6e6f22 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bfaba27d5ce71d292f453659b0755511 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bfac6cd2984fbd5e0d762389e3c37164 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c17bec9e3b5db6d8385c3d6eb362e628 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c1a9eceddc0a1e41eb2992e9204f71e6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c50cd87be040044504b5c3fde1047e24 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c5907cfd07b24ad19b8c80e8af618a57 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c8da5594caf845a183dd1c6cd45c5433 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cbc6968ed49fa14db439a64dd0a46abc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cedf710ee090647b81c08675583eca62 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cf1e3cebfad43293c3c470a5e437ebc9 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d5a14f86bb4b422fdd8eb4722d966c9a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d66b9cdd3230f9e5354e495e17097c49 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/dfa0ed87d851222fe58ada385e3f037d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e1aa402390382db4d97b27cb094485fa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e4f1db35ef9d9fbbf53252a44e381eb8 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e57eb6c1ad51fd8c13afc0e719a259b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e7c37b542e914e392ec326190cea1aa2 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e923d7e19c216d4a924831f3896e007a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e96a414a621483bbc89e73f11be5e7b4 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/eafcfc3d2561c18743c1b32f0f710c68 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/ecdd630f5466d45a2afa7515aaa5fc3b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/ee60a0a35d60cff425373970547694bd +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/eee2c36b75709b0c3797c2a151fdd5d3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f104b66c0f89b453d0c8c73980fbab18 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f26d1bc86590415685e9836ad75d1774 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f4081e868eb565527099dba2c9d8c4de +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f813030b97e30415ad276bbd1f7e1fb4 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f8e3e28bc9640c25da58aea46c3ac4b3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f9169d0a8b70eaf95de52b3c6ad51105 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f939450f7a481e3fbeb158b81b39c624 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/fce73296b8298ac4c74b3e95cde4dfdb +0 -0
- metadata +941 -0
@@ -0,0 +1,229 @@
|
|
1
|
+
<div>
|
2
|
+
<h1>Generate Test Automations</h1>
|
3
|
+
<%
|
4
|
+
|
5
|
+
require "toaster/test/test_suite"
|
6
|
+
require "toaster/chef/chef_util"
|
7
|
+
require "toaster/util/lxc"
|
8
|
+
require "toaster/markup/markup_util"
|
9
|
+
require "toaster/state/state_transition_graph"
|
10
|
+
require "toaster/test/test_coverage"
|
11
|
+
require "toaster/api"
|
12
|
+
|
13
|
+
$session = session
|
14
|
+
test_suites = []
|
15
|
+
output = ""
|
16
|
+
automation = cur_auto
|
17
|
+
message = ""
|
18
|
+
prototypes = []
|
19
|
+
errors = ""
|
20
|
+
test_coverage = nil
|
21
|
+
test_suite = nil
|
22
|
+
|
23
|
+
begin
|
24
|
+
|
25
|
+
# restore previously loaded data from session
|
26
|
+
if $session['gen.prototypes'] && $session['gen.prototypes'].to_s.strip != ""
|
27
|
+
prototypes = Toaster::MarkupUtil.parse_json($session['gen.prototypes'])
|
28
|
+
end
|
29
|
+
|
30
|
+
rescue => ex
|
31
|
+
errors += "\nError: #{ex} - #{ex.backtrace.join("\n")}"
|
32
|
+
end
|
33
|
+
|
34
|
+
begin
|
35
|
+
|
36
|
+
begin
|
37
|
+
|
38
|
+
if param('submitGen') != ""
|
39
|
+
|
40
|
+
test_suite_id = param('test_id') ? param('test_id') : $session['gen.test_suite_id']
|
41
|
+
test_suite = Toaster::TestSuite.load(test_suite_id)
|
42
|
+
errors += "Could not find test suite with ID '#{test_suite_id}'. Please reload." if !test_suite
|
43
|
+
|
44
|
+
# set/update parameter values
|
45
|
+
(0..1000).each do |i|
|
46
|
+
param_name = "paramvalues_taskparam#{i}"
|
47
|
+
if param(param_name) != ""
|
48
|
+
param_id = param(param_name)
|
49
|
+
param_values = param("paramvalues_value#{i}")
|
50
|
+
test_suite.parameter_test_values[param_id] = param_values
|
51
|
+
else
|
52
|
+
break
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
test_suite.save()
|
57
|
+
|
58
|
+
cookbook = param("cookbook")
|
59
|
+
recipes = param("recipes")
|
60
|
+
prototype = param("prototype")
|
61
|
+
|
62
|
+
client = ToasterAppClient.new(param('server'))
|
63
|
+
output += client.runtests(test_suite.uuid.to_s)
|
64
|
+
end
|
65
|
+
|
66
|
+
rescue => ex
|
67
|
+
errors += "\nError: #{ex} - #{ex.backtrace.join("\n")}"
|
68
|
+
end
|
69
|
+
|
70
|
+
if param('initSuite') != ""
|
71
|
+
output = ""
|
72
|
+
prototype_name = param('prototype')
|
73
|
+
if prototype_name == ""
|
74
|
+
errors += "Please load the list of prototypes and select (or create) a prototype container."
|
75
|
+
else
|
76
|
+
recipes = param('recipe','default')
|
77
|
+
cookbook = param('cookbook')
|
78
|
+
destroy_lxc = param('destroyLXC') != "" ? true : false
|
79
|
+
|
80
|
+
client = ToasterAppClient.new(param('server'))
|
81
|
+
|
82
|
+
if param('download') != ""
|
83
|
+
output += client.download(cookbook, prototype_name, "latest", recipes)
|
84
|
+
end
|
85
|
+
output += client.testinit(cookbook, recipes, prototype_name, destroy_lxc)
|
86
|
+
end
|
87
|
+
# if we don't clear the cache here, the new test suite will not be loaded..
|
88
|
+
clear_cache(true)
|
89
|
+
end
|
90
|
+
|
91
|
+
if param('loadTest') != "" && param('test_id') != ""
|
92
|
+
test_suite = Toaster::TestSuite.load(param('test_id'))
|
93
|
+
elsif $session['gen.test_suite_id'] != ""
|
94
|
+
begin
|
95
|
+
test_suite = Toaster::TestSuite.load($session['gen.test_suite_id'])
|
96
|
+
rescue => ex
|
97
|
+
#errors += "#{ex}\n"
|
98
|
+
$session['gen.test_suite_id'] = ""
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if test_suite
|
103
|
+
automation = test_suite.automation
|
104
|
+
if test_suite && test_suite.automation
|
105
|
+
set_param('cookbook', automation.get_short_name())
|
106
|
+
end
|
107
|
+
$session['gen.test_suite_id'] = test_suite.id.to_s
|
108
|
+
end
|
109
|
+
|
110
|
+
if param("loadProtos") != "" || $session['gen.prototypes'] == ""
|
111
|
+
prototypes = Toaster::LXC.get_prototypes_for_host($session['service.host'])
|
112
|
+
#puts "protos: #{prototypes}"
|
113
|
+
prototypes = prototypes.keys.collect { |name| Toaster::LXC.get_prototype_name(name) }
|
114
|
+
$session['gen.prototypes'] = Toaster::MarkupUtil.to_json(prototypes)
|
115
|
+
end
|
116
|
+
|
117
|
+
if test_suite && param('compCoverage') != ""
|
118
|
+
state_graph = StateTransitionGraph.build_graph_for_test_suite(test_suite)
|
119
|
+
test_coverage = TestCoverage.new(test_suite, state_graph)
|
120
|
+
end
|
121
|
+
|
122
|
+
test_suites = Toaster::TestSuite.find()
|
123
|
+
test_suites.sort! { |x,y| (!x.last_test || !y.last_test) ? 0 :
|
124
|
+
x.last_test.start_time.to_i <=> y.last_test.start_time.to_i }
|
125
|
+
rescue => ex
|
126
|
+
errors += "\nError: #{ex} - #{ex.backtrace.join("\n")}"
|
127
|
+
end
|
128
|
+
|
129
|
+
%>
|
130
|
+
<% if output && output.to_s.strip != "" %>
|
131
|
+
Script Output:
|
132
|
+
<pre style="height: 400px; overflow: auto;"><%= output %></pre>
|
133
|
+
<% end %>
|
134
|
+
<% if errors && errors.to_s != "" %>
|
135
|
+
<div class="error"><%= errors.gsub("\n", "<br/>") %></div>
|
136
|
+
<% end %>
|
137
|
+
<% if message && message.to_s != "" %>
|
138
|
+
<div class="info"><%= message %></div>
|
139
|
+
<% end %>
|
140
|
+
<form action="#" method="post">
|
141
|
+
<input type="hidden" name="sessionID" value="<%= $session['session_id'] %>" />
|
142
|
+
|
143
|
+
<h2>Automation</h2>
|
144
|
+
<% if !automation %>
|
145
|
+
|
146
|
+
<table>
|
147
|
+
<tr><td>Select Automation:</td>
|
148
|
+
<td><%= select_tag(:automation,
|
149
|
+
options_for_select(Automation.find().to_a.collect{|a|
|
150
|
+
["\"#{a.name}\" (ID: #{a.id})",a.id]
|
151
|
+
})) %></td></tr>
|
152
|
+
<tr><td></td><td><input type="submit" value="Continue" name="selectAuto"/></td></tr>
|
153
|
+
</table>
|
154
|
+
|
155
|
+
<% else
|
156
|
+
executed_tasks = automation.get_globally_executed_tasks() %>
|
157
|
+
<table>
|
158
|
+
<tr><td><b>Automation</b></td><td><%= automation.name %></td></tr>
|
159
|
+
<tr>
|
160
|
+
<td style="vertical-align: top;"><b>Automation Tasks</b></td>
|
161
|
+
<td><table>
|
162
|
+
<tr><th>Parameter</th><th>Default Value</th><th>Test Values</th></tr>
|
163
|
+
<% executed_tasks.each do |t| %>
|
164
|
+
<tr><td colspan="3"></td></tr>
|
165
|
+
<tr><td colspan="3" style="text-align: center">
|
166
|
+
Task '<a href="<%= l('task'=>t.id, 't'=>'tasks') %>"><%= t.name %></a>'
|
167
|
+
<span style="float: right">(<%= t.global_states_reduced().size %> distinct state(s))</span>
|
168
|
+
</td></tr>
|
169
|
+
<% t.task_parameters.each_with_index do |p,index| %>
|
170
|
+
<tr><td><%= p ? p.key : "n/a" %></td><td><%= p ? automation.get_default_value(p.key) : "n/a" %></td>
|
171
|
+
<td>
|
172
|
+
<input type="hidden" name="paramvalues_taskparam<%= index %>" value="<%= t.id %>"/>
|
173
|
+
<textarea name="paramvalues_value<%= index %>" style="width: 300px; height: 30px;"><%= p ? automation.get_default_value(p.key) : "" %></textarea></td>
|
174
|
+
</tr>
|
175
|
+
<% end %>
|
176
|
+
<% end %>
|
177
|
+
</table></td>
|
178
|
+
</tr>
|
179
|
+
</table>
|
180
|
+
|
181
|
+
<h3>Container Environment</h3>
|
182
|
+
<table>
|
183
|
+
<tr><td>Use Prototype:</td>
|
184
|
+
<td><select name="prototype">
|
185
|
+
<% prototypes.each do |p| %>
|
186
|
+
<option value="<%= p %>"><%= p %></option>
|
187
|
+
<% end %>
|
188
|
+
</select>
|
189
|
+
<input type="submit" value="Load Prototypes" name="loadProtos"/><br/>
|
190
|
+
</td></tr>
|
191
|
+
<tr><td>Options</td><td>
|
192
|
+
<input type="checkbox" name="download" checked="checked"/> Download latest version from opscode.com (copy files into prototype)<br/>
|
193
|
+
</td></tr>
|
194
|
+
<tr><td></td><td></td></tr>
|
195
|
+
</table>
|
196
|
+
|
197
|
+
<h3>Test Configuration</h3>
|
198
|
+
|
199
|
+
<table>
|
200
|
+
|
201
|
+
<tr><td style="vertical-align: top"><b>Test Settings:</b></td><td>
|
202
|
+
<table>
|
203
|
+
<tr><td><b>Idempotence</b></td><td colspan="2">N ∈ { <input type="text" name="idempotenceN" style="width: 150px" value="<%= param('idempotenceN','0..100') %>"/> }
|
204
|
+
<br/>(test idempotence of N consecutive tasks)</td></tr>
|
205
|
+
<tr><td><b>Combinations</b></td>
|
206
|
+
<td>skip-N:</td><td>N ∈ {<input type="text" name="skipN" value="<%= param('skipN') %>"/>}</td></tr>
|
207
|
+
<tr><td></td><td>skip-N-successive:</td><td>N ∈ {<input type="text" name="skipNsucc" value="<%= param('skipNsucc') %>"/>}</td></tr>
|
208
|
+
<tr><td></td><td>combine-N:</td><td>N ∈ {<input type="text" name="combineN" value="<%= param('combineN') %>"/>}</td></tr>
|
209
|
+
<tr><td></td><td>combine-N-successive:</td><td>N ∈ {<input type="text" name="combineNsucc" value="<%= param('combineNsucc') %>"/>}</td></tr>
|
210
|
+
<tr><td><b>Graph Coverage</b></td>
|
211
|
+
<td colspan="2"><select name="graphCoverage">
|
212
|
+
<option value="nodes">Cover all nodes</option>
|
213
|
+
<!--<option value="trans">Cover all transitions</option>
|
214
|
+
<option value="transPairs">Cover all transition pairs</option>-->
|
215
|
+
</select></td></tr>
|
216
|
+
</table>
|
217
|
+
</td></tr>
|
218
|
+
</table>
|
219
|
+
<h3>Generate!</h3>
|
220
|
+
<tr><td></td><td>
|
221
|
+
<!--<input type="checkbox" name="destroyLXC" checked="checked"/> Destroy container after test execution.<br/>-->
|
222
|
+
<input type="submit" name="submitGen" value="Create Test Suite"/></td></tr>
|
223
|
+
</table>
|
224
|
+
|
225
|
+
<% end %>
|
226
|
+
|
227
|
+
</form>
|
228
|
+
|
229
|
+
</div>
|
@@ -0,0 +1,205 @@
|
|
1
|
+
<div>
|
2
|
+
<h1>Test Suites</h1>
|
3
|
+
<%
|
4
|
+
$session = session
|
5
|
+
tests = []
|
6
|
+
test_suite = cur_suite
|
7
|
+
test_coverage = nil
|
8
|
+
state_graph = nil
|
9
|
+
message = nil
|
10
|
+
|
11
|
+
begin
|
12
|
+
|
13
|
+
require 'toaster/test/test_suite'
|
14
|
+
require 'toaster/test/test_coverage'
|
15
|
+
require 'toaster/state/state_transition_graph'
|
16
|
+
|
17
|
+
tests = TestSuite.find()
|
18
|
+
if param('test') != ""
|
19
|
+
test_suite = TestSuite.load(param('test'))
|
20
|
+
if test_suite
|
21
|
+
test_suite.test_cases.each do |tc|
|
22
|
+
if param("reset_#{tc.uuid}") != ""
|
23
|
+
auto_run_uuid = tc.automation_run.uuid
|
24
|
+
tc.delete_test_result()
|
25
|
+
message = "Successfully dropped results of automation run '#{auto_run_uuid}' " +
|
26
|
+
"for test case '#{tc.uuid}' from the database."
|
27
|
+
test_suite = TestSuite.load(param('test'))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
if test_suite && param('compCoverage') != ""
|
33
|
+
coverage_goal = TestCoverageGoal.new
|
34
|
+
coverage_goal.idempotence = param('testIdempotence') != ""
|
35
|
+
automation = test_suite.automation
|
36
|
+
state_graph = StateTransitionGraph.build_graph_for_automation(automation, coverage_goal)
|
37
|
+
test_coverage = TestCoverage.new(test_suite, state_graph)
|
38
|
+
end
|
39
|
+
|
40
|
+
set_param("action", nil)
|
41
|
+
set_param("confirmed", nil)
|
42
|
+
if test_suite && param('action') == "delete"
|
43
|
+
if param('confirmed') == "1"
|
44
|
+
test_suite.delete()
|
45
|
+
load_cache()
|
46
|
+
Toaster::Cache.clear()
|
47
|
+
tests = TestSuite.find()
|
48
|
+
set_param("action", "")
|
49
|
+
set_param("confirmed", "")
|
50
|
+
else
|
51
|
+
message = "<a href='#{l("test" => test_suite.id.to_s, "confirmed" => "1", "action" => "delete")}'>Click here</a>
|
52
|
+
to confirm deletion of test suite and all associated automation runs,
|
53
|
+
or <a href='#{l("action" => "")}'>click here</a> to cancel."
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
rescue => ex
|
58
|
+
%>
|
59
|
+
<div class="error">ERROR: <%= ex %> : <%= ex.backtrace %></div>
|
60
|
+
<%
|
61
|
+
end
|
62
|
+
|
63
|
+
%>
|
64
|
+
<% if message %>
|
65
|
+
<h2>Information</h2>
|
66
|
+
<div class="info"><%= message %></div>
|
67
|
+
<% end %>
|
68
|
+
<% if $session[:exec_output] %>
|
69
|
+
<h2>Information</h2>
|
70
|
+
<div class="info">Test execution has been started. Service Output: <pre><%= $session[:exec_output] %></pre></div>
|
71
|
+
<% $session[:exec_output] = nil
|
72
|
+
end %>
|
73
|
+
<form action="#" method="post">
|
74
|
+
<input type="hidden" name="sessionID" value="<%= $session['session_id'] %>" />
|
75
|
+
<input type="hidden" name="test" value="<%= param('test') %>" />
|
76
|
+
<table class="tablesorter">
|
77
|
+
<thead>
|
78
|
+
<tr><th>ID</th><th>Automation</th><th>Prototype</th>
|
79
|
+
<th>Test Cases</th><th>Executed</th>
|
80
|
+
<th>First Test Started</th><th>Last Test Ended</th>
|
81
|
+
<th>Passed</th><th>Failed</th>
|
82
|
+
<th>Net Duration</th>
|
83
|
+
<th>Avg. Net Duration</th>
|
84
|
+
<th colspan="3">Actions</th></tr>
|
85
|
+
</thead>
|
86
|
+
<tbody>
|
87
|
+
<% tests.each { |suite|
|
88
|
+
|
89
|
+
num_cases = suite.test_cases.size
|
90
|
+
gross = suite.get_gross_duration()
|
91
|
+
avg_gross = gross.to_f / num_cases.to_f
|
92
|
+
net = suite.get_net_duration()
|
93
|
+
num_tests = suite.test_cases.size
|
94
|
+
num_tests_finished = suite.test_cases_finished.size
|
95
|
+
perc_tests_finished = num_tests_finished.to_f / num_tests.to_f * 100.0
|
96
|
+
avg_net = net.to_f / num_tests_finished.to_f
|
97
|
+
failed = suite.test_cases_failed
|
98
|
+
passed = suite.test_cases_succeeded
|
99
|
+
is_active = suite.id.to_s == param('test')
|
100
|
+
clazz = is_active ? "active" : ""
|
101
|
+
|
102
|
+
has_executed_cases = !suite.executed_test_cases.empty?
|
103
|
+
%>
|
104
|
+
<tr class="<%= clazz %>">
|
105
|
+
<td><a href="/test/suites/<%= suite.id %>"><%= suite.uuid %></a></td>
|
106
|
+
<td>
|
107
|
+
<% if suite.automation %>
|
108
|
+
<a href="/scripts/<%= suite.automation.id %>/details"><%= suite.automation.name %></a>
|
109
|
+
<% else %>
|
110
|
+
"n/a"
|
111
|
+
<% end %>
|
112
|
+
</td>
|
113
|
+
<td><%= suite.lxc_prototype %></td>
|
114
|
+
<td><%= num_tests %></td>
|
115
|
+
<td><%= num_tests_finished %> (<%= format_float(perc_tests_finished) %>%)</td>
|
116
|
+
<td><%= !has_executed_cases ? "n/a" : format_time(suite.first_test.start_time) %></td>
|
117
|
+
<td><%= !has_executed_cases ? "n/a" : format_time(suite.last_test.end_time) %></td>
|
118
|
+
<td><%= passed.size %></td>
|
119
|
+
<td><%= failed.size %></td>
|
120
|
+
<td><%= !has_executed_cases ? "n/a" : to_minutes(net) %></td>
|
121
|
+
<td><%= !has_executed_cases ? "n/a" : to_minutes(avg_net) %></td>
|
122
|
+
<td><a href="<%= is_active ? l('test' => '') : l('test' => suite.id.to_s) %>">details</a></td>
|
123
|
+
<td><%= link_to 'delete', "/test/suites/#{suite.id}",
|
124
|
+
:data => { :confirm => 'Confirm: Delete the entire test suite, including all executed test cases?'}, :method => :delete %></td>
|
125
|
+
<td><%= link_to 'execute', "/test/exec/#{suite.id}",
|
126
|
+
:data => { :confirm => 'Confirm: Execute all test cases in this test suite?', :method => :post } %>
|
127
|
+
</td>
|
128
|
+
</tr>
|
129
|
+
<% } %>
|
130
|
+
</tbody>
|
131
|
+
</table>
|
132
|
+
|
133
|
+
<% if test_suite %>
|
134
|
+
|
135
|
+
<h2>Test Suite Details</h2>
|
136
|
+
Test Suite ID: <%= test_suite.uuid %>
|
137
|
+
<h3>Test Cases</h3>
|
138
|
+
<table class="tablesorter">
|
139
|
+
<thead>
|
140
|
+
<tr><th>ID</th><th>Executing Host</th><th>Repeated Tasks</th>
|
141
|
+
<th>Skipped Tasks</th><th>Success</th><th colspan="3">Actions</th></tr>
|
142
|
+
</thead>
|
143
|
+
<tbody>
|
144
|
+
<% test_suite.test_cases.each do |test| %>
|
145
|
+
<tr><td><%= test.uuid %></td>
|
146
|
+
<td><%= test.executing_host %></td>
|
147
|
+
<td><%= test.repeat_task_uuids %></td>
|
148
|
+
<td><%= test.skip_task_uuids%></td>
|
149
|
+
<td><%= test.running_or_scheduled? ? "scheduled/running" : test.success %></td>
|
150
|
+
<td>
|
151
|
+
<% if test.automation_run && test.automation_run.id %>
|
152
|
+
<%= link_to 'details', "/execs/#{test_suite.automation.id}/#{test.automation_run.id}" %>
|
153
|
+
<% end %>
|
154
|
+
</td><td>
|
155
|
+
<% if !test.running_or_scheduled? %>
|
156
|
+
<%= link_to 'execute', "/test/exec/#{test.test_suite.id}/#{test.id}",
|
157
|
+
:data => { :confirm => 'Are you sure you want to execute this test case?', :method => :post } %>
|
158
|
+
<% end %>
|
159
|
+
</td>
|
160
|
+
<td>
|
161
|
+
<%= link_to 'reset', "/test/suites/#{test.test_suite.id}/#{test.id}",
|
162
|
+
:data => { :confirm => 'Are you sure you want to delete/reset this test run?' }, :method => :delete %>
|
163
|
+
</td>
|
164
|
+
</tr>
|
165
|
+
<% end %>
|
166
|
+
</tbody>
|
167
|
+
</table>
|
168
|
+
|
169
|
+
<h3>Coverage Settings</h3>
|
170
|
+
<table>
|
171
|
+
<tr><td><b>Idempotence</b></td><td colspan="2">N ∈ { <input type="text" name="idempotenceN" value="<%= param('idempotenceN',test_suite.coverage_goal.idempotence.to_a.join(',')) %>"/> }
|
172
|
+
(test idempotence of N consecutive tasks)</td></tr>
|
173
|
+
<tr><td><b>Combinations</b></td>
|
174
|
+
<td>skip-N:</td><td>N ∈ {<input type="text" name="skipN" value="<%= param('skipN') %>"/>}</td></tr>
|
175
|
+
<tr><td></td><td>skip-N-successive:</td><td>N ∈ {<input type="text" name="skipNsucc" value="<%= param('skipNsucc') %>"/>}</td></tr>
|
176
|
+
<tr><td></td><td>combine-N:</td><td>N ∈ {<input type="text" name="combineN" value="<%= param('combineN') %>"/>}</td></tr>
|
177
|
+
<tr><td></td><td>skip-N-successive:</td><td>N ∈ {<input type="text" name="combineNsucc" value="<%= param('combineNsucc') %>"/>}</td></tr>
|
178
|
+
<tr><td></td><td colspan="2"><input type="submit" name="compCoverage" value="Compute Coverage"/></td></tr>
|
179
|
+
</table>
|
180
|
+
<% if test_coverage && state_graph
|
181
|
+
states = state_graph.nodes().size
|
182
|
+
states_cov = test_coverage.covered_states().size
|
183
|
+
states_perc = states_cov.to_f / states.to_f * 100
|
184
|
+
trans = state_graph.edges().size
|
185
|
+
trans_cov = test_coverage.covered_transitions().size
|
186
|
+
trans_perc = trans_cov.to_f / trans.to_f * 100
|
187
|
+
%>
|
188
|
+
<h3>Coverage Results</h3>
|
189
|
+
<table>
|
190
|
+
<thead>
|
191
|
+
<tr><th>Type</th><th>Total</th><th>Covered</th><th>Coverage</th></tr>
|
192
|
+
</thead><tbody>
|
193
|
+
<tr><td>States</td><td><%= states %></td><td><%= states_cov %></td><td><%= format_float(states_perc) %>%</td></tr>
|
194
|
+
<tr><td>Transitions</td><td><%= trans %></td><td><%= trans_cov %></td><td><%= format_float(trans_perc) %>%</td></tr>
|
195
|
+
</tbody>
|
196
|
+
</table>
|
197
|
+
<% end %>
|
198
|
+
|
199
|
+
<% end %>
|
200
|
+
|
201
|
+
<h2>Actions</h2>
|
202
|
+
<p><a href="/test/gen">Create new test suite</a></p>
|
203
|
+
|
204
|
+
</form>
|
205
|
+
</div>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<div style="width: 100%">
|
2
|
+
<form action="<%= l({'p' => 'chef'}) %>" method="post">
|
3
|
+
<input type="hidden" name="sessionID" value="<%= $session['session_id'] %>"/>
|
4
|
+
<h2>Chef Cookbooks</h2>
|
5
|
+
<style type="text/css">
|
6
|
+
<%=
|
7
|
+
require "rubygems"
|
8
|
+
require "diffy"
|
9
|
+
require "toaster/chef/chef_util"
|
10
|
+
Diffy::CSS
|
11
|
+
%>
|
12
|
+
</style>
|
13
|
+
<%
|
14
|
+
|
15
|
+
cookb = nil
|
16
|
+
if param("submitCompare") != ""
|
17
|
+
cookb = param("cookb")
|
18
|
+
v1 = param("v1")
|
19
|
+
v2 = param("v2")
|
20
|
+
end
|
21
|
+
%>
|
22
|
+
<h3>Diff Tool</h3>
|
23
|
+
<table>
|
24
|
+
<tr><td>Cookbook:</td><td><input type="text" name="cookb" value="<%= param('cookb', 'apache2') %>"/></td></tr>
|
25
|
+
<tr><td>Version 1:</td><td><input type="text" name="v1" value="<%= param('v1', '1.1.8') %>"/> (e.g., '1.3.2')</td></tr>
|
26
|
+
<tr><td>Version 2:</td><td><input type="text" name="v2" value="<%= param('v2', '1.1.12') %>"/> (e.g., '1.3.4')</td></tr>
|
27
|
+
<tr><td></td><td><input type="submit" value="Compare" name="submitCompare"/></td></tr>
|
28
|
+
</table>
|
29
|
+
<br/>
|
30
|
+
<div>
|
31
|
+
<% if cookb %>
|
32
|
+
Click on file name to show differences. (Unchanged files are printed in grey.)
|
33
|
+
<%=
|
34
|
+
begin
|
35
|
+
out = ChefUtil.diff_cookbook_versions(cookb, v1, v2)
|
36
|
+
out.html_safe
|
37
|
+
rescue => ex
|
38
|
+
ex
|
39
|
+
end
|
40
|
+
%>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
<script type="text/javascript">
|
44
|
+
function hideAllDetails(duration) {
|
45
|
+
if(!duration) duration = 500
|
46
|
+
$(".file .content").each(function() {
|
47
|
+
$(this).hide("blind", {}, duration);
|
48
|
+
});
|
49
|
+
}
|
50
|
+
hideAllDetails(10);
|
51
|
+
</script>
|
52
|
+
</form>
|
53
|
+
</div>
|
data/webapp/bin/bundle
ADDED
data/webapp/bin/rails
ADDED
data/webapp/bin/rake
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
|
8
|
+
# bug fix for ruby 1.9+
|
9
|
+
require 'dl/import'
|
10
|
+
DL::Importable = DL::Importer
|
11
|
+
|
12
|
+
Bundler.require(:default, Rails.env)
|
13
|
+
|
14
|
+
module Toaster
|
15
|
+
class Application < Rails::Application
|
16
|
+
# Settings in config/environments/* take precedence over those specified here.
|
17
|
+
# Application configuration should go into files in config/initializers
|
18
|
+
# -- all .rb files in that directory are automatically loaded.
|
19
|
+
|
20
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
21
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
22
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
23
|
+
|
24
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
25
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
26
|
+
# config.i18n.default_locale = :de
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Set up gems listed in the Gemfile.
|
2
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
3
|
+
|
4
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
5
|
+
|
6
|
+
require 'rails/commands/server'
|
7
|
+
|
8
|
+
gem 'bundler'
|
9
|
+
|
10
|
+
module Rails
|
11
|
+
class Server
|
12
|
+
def default_options
|
13
|
+
super.merge({
|
14
|
+
:Port => 8080
|
15
|
+
})
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#development:
|
7
|
+
# adapter: sqlite3
|
8
|
+
# database: db/development.sqlite3
|
9
|
+
# pool: 5
|
10
|
+
# timeout: 5000
|
11
|
+
|
12
|
+
<%
|
13
|
+
$LOAD_PATH << File.join(Dir.pwd, "../lib")
|
14
|
+
require "toaster/util/config"
|
15
|
+
%>
|
16
|
+
|
17
|
+
# MySQL adapter
|
18
|
+
development:
|
19
|
+
adapter: mysql2
|
20
|
+
host: <%= Toaster::Config.get("db.host") %>
|
21
|
+
database: <%= Toaster::Config.get("db.database") %>
|
22
|
+
username: <%= Toaster::Config.get("db.username") %>
|
23
|
+
password: <%= Toaster::Config.get("db.password") %>
|
24
|
+
socket: /var/run/mysqld/mysqld.sock
|
25
|
+
|
26
|
+
# Warning: The database defined as "test" will be erased and
|
27
|
+
# re-generated from your development database when you run "rake".
|
28
|
+
# Do not set this db to the same as development or production.
|
29
|
+
test:
|
30
|
+
adapter: sqlite3
|
31
|
+
database: db/test.sqlite3
|
32
|
+
pool: 5
|
33
|
+
timeout: 5000
|
34
|
+
|
35
|
+
production:
|
36
|
+
adapter: mysql2
|
37
|
+
host: <%= Toaster::Config.get("db.host") %>
|
38
|
+
database: <%= Toaster::Config.get("db.database") %>
|
39
|
+
username: <%= Toaster::Config.get("db.username") %>
|
40
|
+
password: <%= Toaster::Config.get("db.password") %>
|
41
|
+
socket: /var/run/mysqld/mysqld.sock
|
42
|
+
timeout: 5000
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Toaster::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
|
10
|
+
# Do not eager load code on boot.
|
11
|
+
config.eager_load = false
|
12
|
+
|
13
|
+
# Show full error reports and disable caching.
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send.
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger.
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Raise an error on page load if there are pending migrations
|
24
|
+
config.active_record.migration_error = :page_load
|
25
|
+
|
26
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
27
|
+
# This option may cause significant delays in view rendering with a large
|
28
|
+
# number of complex assets.
|
29
|
+
config.assets.debug = true
|
30
|
+
|
31
|
+
#whu
|
32
|
+
config.autoload_paths += Dir["#{config.root}/../../../lib/**/"]
|
33
|
+
config.cache_store = :memory_store
|
34
|
+
|
35
|
+
end
|