├── .editorconfig ├── .fasterer.yml ├── .github ├── ISSUE_TEMPLATE.md ├── no-response.yml ├── stale.yml └── workflows │ ├── main.yml │ └── matrix_includes.json ├── .gitignore ├── .kitchen.docker.yml ├── .kitchen.yml ├── .lvimrc ├── .overcommit.yml ├── .rspec ├── .rubocop.yml ├── .ruby-gemset ├── .ruby-version ├── .yamllint ├── Berksfile ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── RELEASING.md ├── Rakefile ├── TESTING.md ├── attributes └── default.rb ├── bin ├── bundle-audit └── foodcritic ├── chefignore ├── docker-compose.yml ├── docs ├── attributes.md ├── changelog.md ├── contributing.md ├── getting-started.md ├── index.md ├── license.md ├── recipes.md ├── requirements.md ├── stylesheets │ └── extra.css ├── support.md ├── team.md └── troubleshooting.md ├── files └── debian_downgrade_protection.rb ├── libraries ├── all.rb ├── archive.rb ├── chef_patches.rb ├── core_ext.rb ├── drivers_appserver_base.rb ├── drivers_appserver_factory.rb ├── drivers_appserver_null.rb ├── drivers_appserver_passenger.rb ├── drivers_appserver_puma.rb ├── drivers_appserver_thin.rb ├── drivers_appserver_unicorn.rb ├── drivers_base.rb ├── drivers_db_base.rb ├── drivers_db_factory.rb ├── drivers_db_mysql.rb ├── drivers_db_null.rb ├── drivers_db_postgis.rb ├── drivers_db_postgresql.rb ├── drivers_db_sqlite.rb ├── drivers_dsl_defaults.rb ├── drivers_dsl_logrotate.rb ├── drivers_dsl_notifies.rb ├── drivers_dsl_output.rb ├── drivers_dsl_packages.rb ├── drivers_framework_base.rb ├── drivers_framework_factory.rb ├── drivers_framework_hanami.rb ├── drivers_framework_null.rb ├── drivers_framework_padrino.rb ├── drivers_framework_rails.rb ├── drivers_source_base.rb ├── drivers_source_factory.rb ├── drivers_source_remote_base.rb ├── drivers_source_remote_http.rb ├── drivers_source_remote_s3.rb ├── drivers_source_scm_base.rb ├── drivers_source_scm_git.rb ├── drivers_webserver_apache2.rb ├── drivers_webserver_base.rb ├── drivers_webserver_factory.rb ├── drivers_webserver_nginx.rb ├── drivers_webserver_null.rb ├── drivers_worker_base.rb ├── drivers_worker_delayed_job.rb ├── drivers_worker_factory.rb ├── drivers_worker_good_job.rb ├── drivers_worker_null.rb ├── drivers_worker_resque.rb ├── drivers_worker_shoryuken.rb ├── drivers_worker_sidekiq.rb ├── helpers.rb ├── provider_deploy.rb ├── provider_revision.rb ├── provider_timestamped.rb ├── resource_deploy.rb └── resource_deploy_revision.rb ├── metadata.rb ├── mkdocs.yml ├── package-lock.json ├── package.json ├── recipes ├── configure.rb ├── default.rb ├── deploy.rb ├── setup.rb ├── shutdown.rb └── undeploy.rb ├── spec ├── fixtures │ ├── archives │ │ ├── test.7z │ │ ├── test.Z │ │ ├── test.bz2 │ │ ├── test.gz │ │ ├── test.tar │ │ ├── test.tar.Z │ │ ├── test.tar.bz2 │ │ ├── test.tar.gz │ │ ├── test.tar.xz │ │ ├── test.xz │ │ └── test.zip │ ├── aws_opsworks_app.rb │ ├── aws_opsworks_rds_db_instance.rb │ └── node.rb ├── spec_helper.rb └── unit │ ├── examples │ ├── db_parameters_and_connection.rb │ └── db_validate_adapter_and_engine.rb │ ├── libraries │ ├── archive_spec.rb │ ├── core_ext_spec.rb │ ├── drivers_appserver_factory_spec.rb │ ├── drivers_appserver_null_spec.rb │ ├── drivers_appserver_puma_spec.rb │ ├── drivers_appserver_thin_spec.rb │ ├── drivers_appserver_unicorn_spec.rb │ ├── drivers_db_factory_spec.rb │ ├── drivers_db_mysql_spec.rb │ ├── drivers_db_postgresql_spec.rb │ ├── drivers_dsl_logrotate_spec.rb │ ├── drivers_framework_factory_spec.rb │ ├── drivers_framework_hanami_spec.rb │ ├── drivers_framework_null_spec.rb │ ├── drivers_framework_padrino_spec.rb │ ├── drivers_framework_rails_spec.rb │ ├── drivers_source_factory_spec.rb │ ├── drivers_source_remote_http_spec.rb │ ├── drivers_source_remote_s3_spec.rb │ ├── drivers_source_scm_git_spec.rb │ ├── drivers_webserver_apache2_spec.rb │ ├── drivers_webserver_factory_spec.rb │ ├── drivers_webserver_nginx_spec.rb │ ├── drivers_webserver_null_spec.rb │ ├── drivers_worker_delayed_job_spec.rb │ ├── drivers_worker_factory_spec.rb │ ├── drivers_worker_good_job_spec.rb │ ├── drivers_worker_null_spec.rb │ ├── drivers_worker_resque_spec.rb │ ├── drivers_worker_shoryuken_spec.rb │ └── drivers_worker_sidekiq_spec.rb │ └── recipes │ ├── configure_spec.rb │ ├── deploy_spec.rb │ ├── setup_spec.rb │ ├── shutdown_spec.rb │ └── undeploy_spec.rb ├── templates └── default │ ├── application.yml.erb │ ├── appserver.apache2.passenger.conf.erb │ ├── appserver.apache2.upstream.conf.erb │ ├── appserver.nginx.conf.erb │ ├── database.yml.erb │ ├── delayed_job.monitrc.erb │ ├── dot_env.erb │ ├── environment.erb │ ├── good_job.monitrc.erb │ ├── puma.monitrc.erb │ ├── puma.rb.erb │ ├── rails_console_overload.rb.erb │ ├── resque.monitrc.erb │ ├── shoryuken.conf.yml.erb │ ├── shoryuken.monitrc.erb │ ├── sidekiq.conf.yml.erb │ ├── sidekiq.monitrc.erb │ ├── ssh-deploy-key.erb │ ├── ssh-git-wrapper.sh.erb │ ├── ssl_key.erb │ ├── thin.monitrc.erb │ ├── thin.yml.erb │ ├── unicorn.conf.erb │ └── unicorn.monitrc.erb └── test ├── dummy-app ├── archive │ ├── http_thin_nginx_padrino_delayed_job.tar.gz │ └── http_unicorn_apache_hanami_resque.zip ├── bundler20 │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── deploy │ │ └── after_restart.rb │ ├── docker-compose.yml │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── delayed_job │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── jobs │ │ │ └── dummy_job.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── bundler │ │ ├── delayed_job │ │ ├── erubis │ │ ├── nokogiri │ │ ├── puma │ │ ├── pumactl │ │ ├── rackup │ │ ├── rails │ │ ├── rake │ │ ├── setup │ │ ├── sprockets │ │ ├── thor │ │ ├── unicorn │ │ └── unicorn_rails │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ ├── 20160423150232_create_dummies.rb │ │ │ └── 20160915093026_create_delayed_jobs.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── hanami │ ├── .env.development │ ├── .env.test │ ├── .gitignore │ ├── .hanamirc │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── Rakefile │ ├── apps │ │ └── web │ │ │ ├── application.rb │ │ │ ├── assets │ │ │ ├── favicon.ico │ │ │ ├── images │ │ │ │ └── .gitkeep │ │ │ ├── javascripts │ │ │ │ └── .gitkeep │ │ │ └── stylesheets │ │ │ │ └── .gitkeep │ │ │ ├── config │ │ │ └── routes.rb │ │ │ ├── controllers │ │ │ ├── .gitkeep │ │ │ └── home │ │ │ │ └── index.rb │ │ │ ├── templates │ │ │ ├── application.html.erb │ │ │ └── home │ │ │ │ └── index.html.erb │ │ │ └── views │ │ │ ├── application_layout.rb │ │ │ └── home │ │ │ └── index.rb │ ├── config.ru │ ├── config │ │ ├── environment.rb │ │ └── initializers │ │ │ └── .gitkeep │ ├── db │ │ ├── dummy_app_development.sqlite │ │ ├── migrations │ │ │ ├── .gitkeep │ │ │ └── 20160915114437_create_dummies.rb │ │ └── schema.sql │ ├── lib │ │ ├── dummy_app.rb │ │ └── dummy_app │ │ │ ├── entities │ │ │ ├── .gitkeep │ │ │ └── dummy.rb │ │ │ ├── mailers │ │ │ ├── .gitkeep │ │ │ └── templates │ │ │ │ └── .gitkeep │ │ │ └── repositories │ │ │ ├── .gitkeep │ │ │ └── dummy_repository.rb │ ├── public │ │ └── .gitkeep │ └── spec │ │ ├── dummy_app │ │ ├── entities │ │ │ ├── .gitkeep │ │ │ └── dummy_spec.rb │ │ ├── mailers │ │ │ └── .gitkeep │ │ └── repositories │ │ │ ├── .gitkeep │ │ │ └── dummy_repository_spec.rb │ │ ├── features_helper.rb │ │ ├── spec_helper.rb │ │ ├── support │ │ └── .gitkeep │ │ └── web │ │ ├── controllers │ │ ├── .gitkeep │ │ └── home │ │ │ └── index_spec.rb │ │ ├── features │ │ └── .gitkeep │ │ └── views │ │ ├── .gitkeep │ │ └── home │ │ └── index_spec.rb ├── master │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── deploy │ │ └── after_restart.rb │ ├── docker-compose.yml │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── maximum-override │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ ├── images │ │ │ │ └── .keep │ │ │ ├── javascripts │ │ │ │ └── application.js │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ └── concerns │ │ │ │ └── .keep │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ └── concerns │ │ │ │ └── .keep │ │ └── views │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── application_controller_renderer.rb │ │ │ ├── assets.rb │ │ │ ├── backtrace_silencers.rb │ │ │ ├── content_security_policy.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── new_framework_defaults_6_0.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ └── seeds.rb │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ ├── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt │ └── test │ │ ├── controllers │ │ └── .keep │ │ ├── fixtures │ │ └── .keep │ │ ├── helpers │ │ └── .keep │ │ ├── integration │ │ └── .keep │ │ ├── mailers │ │ └── .keep │ │ ├── models │ │ └── .keep │ │ └── test_helper.rb ├── padrino │ ├── .bundle │ │ └── config │ ├── .components │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── Rakefile │ ├── app │ │ ├── app.rb │ │ ├── controllers │ │ │ └── home.rb │ │ ├── helpers │ │ │ └── home_helper.rb │ │ └── views │ │ │ └── home │ │ │ └── index.html.erb │ ├── bin │ │ ├── bundler │ │ ├── dummy-app │ │ ├── padrino │ │ ├── padrino-gen │ │ ├── puma │ │ ├── pumactl │ │ ├── rackup │ │ ├── rake │ │ ├── thor │ │ └── tilt │ ├── config.ru │ ├── config │ │ ├── apps.rb │ │ ├── boot.rb │ │ └── database.rb │ ├── db │ │ ├── migrate │ │ │ └── 001_create_dummies.rb │ │ └── schema.rb │ ├── lib │ │ └── connection_pool_management_middleware.rb │ ├── models │ │ └── dummy.rb │ └── public │ │ └── favicon.ico ├── rails-pgsql │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── deploy │ │ └── after_restart.rb │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── resque │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── jobs │ │ │ └── dummy_job.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── shoryuken │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── deploy │ │ └── after_restart.rb │ ├── docker-compose.yml │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt ├── thin │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── home_controller.rb │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ └── dummy.rb │ │ └── views │ │ │ ├── home │ │ │ └── index.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml.sample │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ ├── migrate │ │ │ └── 20160423150232_create_dummies.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── deploy │ │ └── after_restart.rb │ ├── docker-compose.yml │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ └── public │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── favicon.ico │ │ └── robots.txt └── unicorn │ ├── .gitignore │ ├── .ruby-gemset │ ├── .ruby-version │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.rdoc │ ├── Rakefile │ ├── app │ ├── assets │ │ ├── images │ │ │ └── .keep │ │ └── stylesheets │ │ │ └── application.css │ ├── controllers │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ └── home_controller.rb │ ├── helpers │ │ └── application_helper.rb │ ├── mailers │ │ └── .keep │ ├── models │ │ ├── .keep │ │ ├── concerns │ │ │ └── .keep │ │ └── dummy.rb │ └── views │ │ ├── home │ │ └── index.html.erb │ │ └── layouts │ │ └── application.html.erb │ ├── bin │ ├── bundle │ ├── rails │ ├── rake │ └── setup │ ├── config.ru │ ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml.sample │ ├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── initializers │ │ ├── backtrace_silencers.rb │ │ ├── cookies_serializer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── mime_types.rb │ │ ├── session_store.rb │ │ └── wrap_parameters.rb │ ├── locales │ │ └── en.yml │ ├── routes.rb │ └── secrets.yml │ ├── db │ ├── migrate │ │ └── 20160423150232_create_dummies.rb │ ├── schema.rb │ └── seeds.rb │ ├── deploy │ └── after_restart.rb │ ├── docker-compose.yml │ ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep │ ├── log │ └── .keep │ └── public │ ├── 404.html │ ├── 422.html │ ├── 500.html │ ├── favicon.ico │ └── robots.txt └── integration ├── all_options └── serverspec │ └── all_options_spec.rb ├── data_bags ├── default │ ├── aws_opsworks_app │ │ └── dummy_project.json │ └── aws_opsworks_rds_db_instance │ │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json ├── default_with_shoryuken_and_fullstaq │ ├── aws_opsworks_app │ │ └── dummy_project.json │ └── aws_opsworks_rds_db_instance │ │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json ├── http_thin_nginx_padrino_delayed_job │ ├── aws_opsworks_app │ │ └── dummy_project.json │ └── aws_opsworks_rds_db_instance │ │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json ├── http_unicorn_apache_hanami_resque │ ├── aws_opsworks_app │ │ └── dummy_project.json │ └── aws_opsworks_rds_db_instance │ │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json ├── maximum_override │ ├── aws_opsworks_app │ │ ├── other_project.json │ │ └── yet_another_project.json │ └── aws_opsworks_rds_db_instance │ │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json └── nullified │ ├── aws_opsworks_app │ └── dummy_project.json │ └── aws_opsworks_rds_db_instance │ └── arn_aws_rds_us-west-2_850906259207_db_dummy-project.json ├── default └── serverspec │ └── default_spec.rb ├── default_with_shoryuken_and_fullstaq └── serverspec │ └── default_with_shoryuken_and_fullstaq_spec.rb ├── helpers └── serverspec │ └── spec_helper.rb ├── http_thin_nginx_padrino_delayed_job └── serverspec │ └── http_thin_nginx_padrino_delayed_job_spec.rb ├── http_unicorn_apache_hanami_resque └── serverspec │ └── http_unicorn_apache_hanami_resque_spec.rb ├── maximum_override └── serverspec │ └── maximum_override_spec.rb └── nullified └── serverspec └── nullified_spec.rb /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | insert_final_newline = true 11 | indent_style = space 12 | indent_size = 2 13 | 14 | -------------------------------------------------------------------------------- /.fasterer.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Fasterer mistakenly flags the warning that 3 | # "Hash#keys.each is slower than Hash#each_key" on the Chef 4 | # node object (which is not a Hash). Because Fasterer only 5 | # has two ways to disable its analyzer (ignore a file entirely 6 | # or ignore a speedup entirely), we pick the lesser of two 7 | # evils and disable the keys_each_vs_each_key test :-/ 8 | speedups: 9 | keys_each_vs_each_key: false 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Expected Behavior 2 | 3 | 4 | ### Actual Behavior 5 | 6 | 7 | ### Custom JSON 8 | ```json 9 | 10 | ``` 11 | 12 | ### Chef log including error 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Configuration for probot-no-response - https://github.com/probot/no-response 3 | # Number of days of inactivity before an Issue is closed for lack of response 4 | daysUntilClose: 14 5 | # Label requiring a response 6 | responseRequiredLabel: more-information-needed 7 | # Comment to post when closing an Issue for lack of response. Set to `false` to disable 8 | closeComment: > 9 | This issue has been automatically closed because there has been no response 10 | to our request for more information from the original author. With only the 11 | information that is currently in the issue, we don't have enough information 12 | to take action. Please reach out if you have or find the answers we need so 13 | that we can investigate further. 14 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Number of days of inactivity before an issue becomes stale 3 | daysUntilStale: 60 4 | # Number of days of inactivity before a stale issue is closed 5 | daysUntilClose: 7 6 | # Issues with these labels will never be considered stale 7 | exemptLabels: 8 | - important 9 | - security 10 | # Label to use when marking an issue as stale 11 | staleLabel: stale 12 | # Comment to post when marking an issue as stale. Set to `false` to disable 13 | markComment: > 14 | This issue has been automatically marked as stale because it has not had 15 | recent activity. It will be closed if no further activity occurs. Thank you 16 | for your contributions. 17 | # Comment to post when closing a stale issue. Set to `false` to disable 18 | closeComment: false 19 | -------------------------------------------------------------------------------- /.github/workflows/matrix_includes.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "instance": "default-ubuntu-1804", 4 | "runOn": "always" 5 | }, { 6 | "instance": "all-options-ubuntu-1804", 7 | "runOn": "always" 8 | }, { 9 | "instance": "default-with-shoryuken-and-fullstaq-ubuntu-1804", 10 | "runOn": "always" 11 | }, { 12 | "instance": "http-unicorn-apache-hanami-resque-ubuntu-1804", 13 | "runOn": "always" 14 | }, { 15 | "instance": "http-thin-nginx-padrino-delayed-job-ubuntu-1804", 16 | "runOn": "always" 17 | }, { 18 | "instance": "nullified-ubuntu-1804", 19 | "runOn": "always" 20 | }, { 21 | "instance": "maximum-override-ubuntu-1804", 22 | "runOn": "always" 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | Berksfile.lock 3 | *~ 4 | *# 5 | .#* 6 | \#*# 7 | .*.sw[a-z] 8 | *.un~ 9 | coverage 10 | site 11 | 12 | # Bundler 13 | .bundle/* 14 | 15 | node_modules/ 16 | 17 | .kitchen/ 18 | .kitchen.local.yml 19 | .asset-cache 20 | .sass-cache 21 | _site 22 | docs/build/* 23 | !docs/build/.keep 24 | vendor 25 | client.pem 26 | .chef.login 27 | -------------------------------------------------------------------------------- /.kitchen.docker.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | name: docker 4 | privileged: true 5 | -------------------------------------------------------------------------------- /.lvimrc: -------------------------------------------------------------------------------- 1 | let test#ruby#rspec#options = { 2 | \ 'nearest': '--format documentation --color', 3 | \ 'file': '--format documentation --color', 4 | \ 'suite': '--format documentation --color', 5 | \} 6 | let test#ruby#rspec#executable = 'chef exec rspec' 7 | let test#ruby#bundle_exec = 0 8 | 9 | let g:projectionist_heuristics = { 10 | \ "*.rb": { 11 | \ "libraries/*.rb": { "alternate": "spec/unit/libraries/{}_spec.rb", "type": "source" }, 12 | \ "recipes/*.rb": { "alternate": "spec/unit/recipes/{}_spec.rb", "type": "source" }, 13 | \ "spec/unit/libraries/*_spec.rb": { "alternate": "libraries/{}.rb", "type": "spec" }, 14 | \ "spec/unit/recipes/*_spec.rb": { "alternate": "recipes/{}.rb", "type": "spec" } 15 | \ } 16 | \ } 17 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | -r 'spec_helper' 2 | --color 3 | --format=documentation 4 | -------------------------------------------------------------------------------- /.ruby-gemset: -------------------------------------------------------------------------------- 1 | opsworks_ruby 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-2.7.1 2 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | extends: default 2 | 3 | rules: 4 | line-length: 5 | max: 120 6 | -------------------------------------------------------------------------------- /Berksfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://supermarket.chef.io' 4 | solver :ruby, :required 5 | 6 | metadata 7 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org/' 4 | 5 | group :lint do 6 | gem 'brakeman' 7 | gem 'bundler-audit' 8 | gem 'coveralls' 9 | gem 'fasterer' 10 | gem 'foodcritic' 11 | gem 'overcommit' 12 | gem 'rubocop' 13 | gem 'rubocop-performance' 14 | end 15 | 16 | group :chef do 17 | gem 'berkshelf' 18 | gem 'chef', '~> 12.0' 19 | gem 'chefspec', '~> 6.0' 20 | gem 'chef-zero', '~> 5.3' 21 | gem 'kitchen-docker' 22 | gem 'kitchen-vagrant' 23 | gem 'rspec' 24 | gem 'test-kitchen' 25 | end 26 | -------------------------------------------------------------------------------- /TESTING.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | 3 | ## Unit Testing and Linting 4 | 5 | ``` 6 | docker-compose run --rm -e SKIP="AuthorName AuthorEmail" cookbook \ 7 | bash -c "chef exec bundle exec overcommit --sign && chef exec bundle exec overcommit -r && chef exec bundle exec rspec" 8 | ``` 9 | 10 | ## Integration Testing 11 | 12 | To run integration tests you need [Chef Development Kit](https://downloads.chef.io/chefdk) 13 | and [Vagrant](https://www.vagrantup.com/). 14 | After installing it, invoke: 15 | 16 | ``` 17 | kitchen converge 18 | kitchen verify 19 | ``` 20 | -------------------------------------------------------------------------------- /bin/bundle-audit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bundle exec bundle-audit "$@" 4 | -------------------------------------------------------------------------------- /bin/foodcritic: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bundle exec foodcritic "$@" 4 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | 4 | services: 5 | cookbook: 6 | build: . 7 | ports: 8 | - "8000:8000" 9 | volumes: 10 | - ".:/cookbooks/opsworks_ruby" 11 | -------------------------------------------------------------------------------- /docs/recipes.md: -------------------------------------------------------------------------------- 1 | # Recipes 2 | 3 | This cookbook provides five main recipes, which should be attached to corresponding OpsWorks actions. 4 | 5 | - `opsworks_ruby::setup` - attach to **Setup** 6 | - `opsworks_ruby::configure` - attach to **Configure** 7 | - `opsworks_ruby::deploy` - attach to **Deploy** 8 | - `opsworks_ruby::undeploy` - attach to **Undeploy** 9 | - `opsworks_ruby::shutdown` - attach to **Shutdown** 10 | -------------------------------------------------------------------------------- /docs/requirements.md: -------------------------------------------------------------------------------- 1 | # Requirements 2 | 3 | ## Cookbooks 4 | 5 | - [ruby-ng](https://supermarket.chef.io/cookbooks/ruby-ng) 6 | - [nginx](https://github.com/chef-cookbooks/nginx) 7 | 8 | ## Platform 9 | 10 | This cookbook was tested on the following OpsWorks platforms: 11 | 12 | - Amazon Linux 2017.03 13 | - Ubuntu 16.04 LTS 14 | 15 | In addition, all recent Debian family distrubutions are assumed to work. 16 | -------------------------------------------------------------------------------- /docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --md-primary-fg-color: #e14a30; 3 | } 4 | -------------------------------------------------------------------------------- /libraries/drivers_appserver_null.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Appserver 5 | class Null < Drivers::Appserver::Base 6 | adapter :null 7 | allowed_engines :null 8 | output filter: [] 9 | 10 | def configure; end 11 | alias after_deploy configure 12 | alias after_undeploy configure 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /libraries/drivers_db_mysql.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Db 5 | class Mysql < Base 6 | adapter :mysql2 7 | allowed_engines :mysql, :mysql2, :mariadb, :aurora 8 | packages debian: 'libmysqlclient-dev', rhel: 'mysql-devel' 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /libraries/drivers_db_null.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Db 5 | class Null < Base 6 | adapter :null 7 | allowed_engines :null 8 | output filter: [] 9 | defaults username: nil, password: nil, host: nil, database: nil 10 | 11 | def can_migrate? 12 | false 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /libraries/drivers_db_postgis.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Db 5 | class Postgis < Base 6 | adapter :postgis 7 | allowed_engines :postgis 8 | packages debian: %w[libpq-dev libgeos-dev], rhel: %w[postgresql96-devel libgeos-devel] 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /libraries/drivers_db_postgresql.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Db 5 | class Postgresql < Base 6 | adapter :postgresql 7 | allowed_engines :postgres, :postgresql, :'aurora-postgresql' 8 | packages debian: 'libpq-dev', rhel: 'postgresql96-devel' 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /libraries/drivers_dsl_defaults.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Dsl 5 | module Defaults 6 | def self.included(klass) 7 | klass.instance_eval do 8 | def defaults(options = {}) 9 | @defaults = options if options.present? 10 | @defaults || {} 11 | end 12 | end 13 | end 14 | 15 | def defaults 16 | self.class.defaults.presence || (self.class.superclass.respond_to?(:defaults) && self.class.superclass.defaults) 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /libraries/drivers_framework_null.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Framework 5 | class Null < Drivers::Framework::Base 6 | adapter :null 7 | allowed_engines :null 8 | output filter: [:deploy_environment] 9 | 10 | def settings 11 | super.merge(deploy_environment: { 'RACK_ENV' => deploy_env }) 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /libraries/drivers_framework_padrino.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Framework 5 | class Padrino < Drivers::Framework::Base 6 | adapter :padrino 7 | allowed_engines :padrino 8 | output filter: %i[ 9 | migrate migration_command deploy_environment assets_precompile assets_precompilation_command 10 | ] 11 | 12 | def settings 13 | super.merge( 14 | deploy_environment: { 'RACK_ENV' => deploy_env, 'DATABASE_URL' => database_url }, 15 | assets_precompile: node['deploy'][app['shortname']][driver_type]['assets_precompile'] 16 | ) 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /libraries/drivers_source_scm_base.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Source 5 | module Scm 6 | class Base < Drivers::Source::Base 7 | def fetch(deploy_context) 8 | deploy_context.scm_provider(adapter.constantize) 9 | 10 | out.each do |scm_key, scm_value| 11 | scm_key = :repository if scm_key == :url 12 | deploy_context.send(scm_key, scm_value) if deploy_context.respond_to?(scm_key) 13 | end 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /libraries/drivers_webserver_null.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Webserver 5 | class Null < Drivers::Webserver::Base 6 | adapter :null 7 | allowed_engines :null 8 | output filter: [] 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /libraries/drivers_worker_delayed_job.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Worker 5 | class DelayedJob < Drivers::Worker::Base 6 | adapter :delayed_job 7 | allowed_engines :delayed_job 8 | output filter: %i[process_count syslog queues] 9 | packages :monit 10 | 11 | def after_deploy 12 | restart_monit 13 | end 14 | alias after_undeploy after_deploy 15 | 16 | def settings 17 | super.merge(queues: node['deploy'][app['shortname']][driver_type]['queues'] || '') 18 | end 19 | 20 | def configure 21 | add_worker_monit 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /libraries/drivers_worker_good_job.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Worker 5 | class GoodJob < Drivers::Worker::Base 6 | adapter :good_job 7 | allowed_engines :good_job 8 | output filter: %i[process_count syslog queues] 9 | packages :monit 10 | 11 | def after_deploy 12 | restart_monit 13 | end 14 | alias after_undeploy after_deploy 15 | 16 | def settings 17 | super.merge(queues: node['deploy'][app['shortname']][driver_type]['queues'] || '') 18 | end 19 | 20 | def configure 21 | add_worker_monit 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /libraries/drivers_worker_null.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Worker 5 | class Null < Drivers::Worker::Base 6 | adapter :null 7 | allowed_engines :null 8 | output filter: [] 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /libraries/drivers_worker_resque.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Drivers 4 | module Worker 5 | class Resque < Drivers::Worker::Base 6 | adapter :resque 7 | allowed_engines :resque 8 | output filter: %i[process_count syslog workers queues] 9 | packages :monit, debian: 'redis-server', rhel: 'redis' 10 | 11 | def configure 12 | add_worker_monit 13 | end 14 | 15 | def after_deploy 16 | restart_monit 17 | end 18 | alias after_undeploy after_deploy 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "opsworks_ruby", 3 | "version": "1.23.0", 4 | "description": "Set of chef recipes for OpsWorks based Ruby projects.", 5 | "dependencies": {}, 6 | "devDependencies": { 7 | "cz-conventional-changelog": "^1.1.6" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/ajgon/opsworks_ruby.git" 12 | }, 13 | "author": "Igor Rzegocki ", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/ajgon/opsworks_ruby/issues" 17 | }, 18 | "homepage": "https://github.com/ajgon/opsworks_ruby#readme", 19 | "config": { 20 | "commitizen": { 21 | "path": "./node_modules/cz-conventional-changelog" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /recipes/default.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | include_recipe 'opsworks_ruby::deploy' 4 | -------------------------------------------------------------------------------- /spec/fixtures/archives/test.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.7z -------------------------------------------------------------------------------- /spec/fixtures/archives/test.Z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.Z -------------------------------------------------------------------------------- /spec/fixtures/archives/test.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.bz2 -------------------------------------------------------------------------------- /spec/fixtures/archives/test.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.gz -------------------------------------------------------------------------------- /spec/fixtures/archives/test.tar.Z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.tar.Z -------------------------------------------------------------------------------- /spec/fixtures/archives/test.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.tar.bz2 -------------------------------------------------------------------------------- /spec/fixtures/archives/test.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.tar.gz -------------------------------------------------------------------------------- /spec/fixtures/archives/test.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.tar.xz -------------------------------------------------------------------------------- /spec/fixtures/archives/test.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.xz -------------------------------------------------------------------------------- /spec/fixtures/archives/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/spec/fixtures/archives/test.zip -------------------------------------------------------------------------------- /spec/fixtures/aws_opsworks_rds_db_instance.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | def aws_opsworks_rds_db_instance(override = {}) 4 | item = { 5 | rds_db_instance_arn: 'arn:aws:rds:us-west-2:850906259207:db:dummy-project', 6 | db_instance_identifier: 'dummy-project', 7 | db_user: 'dbuser', 8 | db_password: '03c1bc98cdd5eb2f9c75', 9 | region: 'us-west-2', 10 | address: 'dummy-project.c298jfowejf.us-west-2.rds.amazon.com', 11 | port: 3265, 12 | engine: 'postgres', 13 | missing_on_rds: false, 14 | id: 'arn_aws_rds_us-west-2_850906259207_db_dummy-project' 15 | }.merge(override) 16 | 17 | JSON.parse(item.to_json) 18 | end 19 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_appserver_null_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Appserver::Null do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('appserver') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq({}) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_appserver_puma_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Appserver::Puma do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('appserver') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(worker_processes: 8, thread_min: 0, thread_max: 16) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_appserver_thin_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Appserver::Thin do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('appserver') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(max_connections: 4096, worker_processes: 8) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_appserver_unicorn_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Appserver::Unicorn do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('appserver') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(worker_processes: 8, delay: 3) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_db_factory_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Db::Factory do 6 | it 'raises error when unknown engine is present' do 7 | expect do 8 | described_class.build(dummy_context(node), aws_opsworks_app, rds: { 'engine' => 'unknown' }) 9 | end.to raise_error StandardError, 'There is no supported Db driver for given configuration.' 10 | end 11 | 12 | it 'returns a Postgresql class' do 13 | db = described_class.build(dummy_context(node), aws_opsworks_app, rds: aws_opsworks_rds_db_instance) 14 | expect(db).to be_instance_of(Drivers::Db::Postgresql) 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_db_mysql_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | require 'unit/examples/db_validate_adapter_and_engine' 5 | require 'unit/examples/db_parameters_and_connection' 6 | 7 | describe Drivers::Db::Mysql do 8 | include_examples 'db validate adapter and engine', 'mysql' 9 | include_examples 'db parameters and connection', 'mysql', adapter: 'mysql2' 10 | end 11 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_db_postgresql_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | require 'unit/examples/db_validate_adapter_and_engine' 5 | require 'unit/examples/db_parameters_and_connection' 6 | 7 | describe Drivers::Db::Postgresql do 8 | include_examples 'db validate adapter and engine', 'postgresql' 9 | include_examples 'db parameters and connection', 'postgresql' 10 | end 11 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_framework_factory_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Framework::Factory do 6 | it 'raises error when unknown adapter is present' do 7 | expect do 8 | described_class.build( 9 | dummy_context('deploy' => { aws_opsworks_app['shortname'] => { 'framework' => { 'adapter' => 'django' } } }), 10 | aws_opsworks_app 11 | ) 12 | end.to raise_error StandardError, 'There is no supported Framework driver for given configuration.' 13 | end 14 | 15 | it 'returns a Rails class' do 16 | framework = described_class.build(dummy_context(node), aws_opsworks_app) 17 | expect(framework).to be_instance_of(Drivers::Framework::Rails) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_framework_null_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Framework::Null do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('framework') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(deploy_environment: { 'RACK_ENV' => 'staging' }) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_webserver_null_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Webserver::Null do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('webserver') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq({}) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_worker_delayed_job_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Worker::DelayedJob do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('worker') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(process_count: 2, syslog: true, queues: 'test_queue') 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_worker_factory_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Worker::Factory do 6 | it 'raises error when unknown adapter is present' do 7 | expect do 8 | described_class.build( 9 | dummy_context('deploy' => { aws_opsworks_app['shortname'] => { 'worker' => { 'adapter' => 'rq' } } }), 10 | aws_opsworks_app 11 | ) 12 | end.to raise_error StandardError, 'There is no supported Worker driver for given configuration.' 13 | end 14 | 15 | it 'returns a Sidekiq class' do 16 | worker = described_class.build(dummy_context(node), aws_opsworks_app) 17 | expect(worker).to be_instance_of(Drivers::Worker::Sidekiq) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_worker_good_job_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Worker::GoodJob do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('worker') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(process_count: 2, syslog: true, queues: 'test_queue') 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_worker_null_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Worker::Null do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('worker') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq({}) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/unit/libraries/drivers_worker_resque_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Drivers::Worker::Resque do 6 | let(:driver) { described_class.new(dummy_context(node), aws_opsworks_app) } 7 | 8 | it 'receives and exposes app and node' do 9 | expect(driver.app).to eq aws_opsworks_app 10 | expect(driver.send(:node)).to eq node 11 | expect(driver.options).to eq({}) 12 | end 13 | 14 | it 'has the correct driver_type' do 15 | expect(driver.driver_type).to eq('worker') 16 | end 17 | 18 | it 'returns proper out data' do 19 | expect(driver.out).to eq(process_count: 2, syslog: true, queues: 'test_queue') 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /templates/default/application.yml.erb: -------------------------------------------------------------------------------- 1 | --- 2 | <% @environment.each do |key, value| %> 3 | <%= key.to_s %>: <%= value && value.to_s.inspect %> 4 | <% end %> 5 | -------------------------------------------------------------------------------- /templates/default/database.yml.erb: -------------------------------------------------------------------------------- 1 | <%= 2 | config = {} 3 | (['development', 'production'] + Array.wrap(@environment)).select(&:present?).uniq.each do |env| 4 | config[env] = @database 5 | end 6 | JSON.parse(config.to_json).to_yaml 7 | -%> 8 | -------------------------------------------------------------------------------- /templates/default/dot_env.erb: -------------------------------------------------------------------------------- 1 | <% @environment.each do |key, value| %> 2 | <%= key.to_s %>=<%= value && value.to_s.inspect %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /templates/default/environment.erb: -------------------------------------------------------------------------------- 1 | <% @environment.each do |k, v| %> 2 | <%= "#{k}=#{v.to_json}" %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /templates/default/rails_console_overload.rb.erb: -------------------------------------------------------------------------------- 1 | Rails.application.class.send(:define_method, :load_console) do |app = Rails.application| 2 | 3 | <% @environment.each do |key, value| %> 4 | ENV['<%= key.to_s %>'] = "<%= value.to_s %>" 5 | <% end %> 6 | 7 | super(app) 8 | end 9 | -------------------------------------------------------------------------------- /templates/default/shoryuken.conf.yml.erb: -------------------------------------------------------------------------------- 1 | <%= @config.to_h.to_yaml %> 2 | -------------------------------------------------------------------------------- /templates/default/sidekiq.conf.yml.erb: -------------------------------------------------------------------------------- 1 | <%= @config.to_yaml %> 2 | -------------------------------------------------------------------------------- /templates/default/ssh-deploy-key.erb: -------------------------------------------------------------------------------- 1 | <%= @ssh_key %> 2 | -------------------------------------------------------------------------------- /templates/default/ssh-git-wrapper.sh.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "/tmp/.ssh-deploy-key" "$@" 3 | 4 | -------------------------------------------------------------------------------- /templates/default/ssl_key.erb: -------------------------------------------------------------------------------- 1 | <%= @key_data.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/archive/http_thin_nginx_padrino_delayed_job.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/archive/http_thin_nginx_padrino_delayed_job.tar.gz -------------------------------------------------------------------------------- /test/dummy-app/archive/http_unicorn_apache_hanami_resque.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/archive/http_unicorn_apache_hanami_resque.zip -------------------------------------------------------------------------------- /test/dummy-app/bundler20/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails' 4 | gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | #gem 'pg' 7 | #gem 'mysql2' 8 | gem 'puma' 9 | gem 'sidekiq' 10 | gem 'tzinfo-data' 11 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test || true" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | redis: 5 | image: redis 6 | expose: 7 | - 6379 8 | app: 9 | build: . 10 | volumes: 11 | - ".:/app" 12 | links: 13 | - redis 14 | environment: 15 | REDIS_URL: redis://redis:6379 16 | -------------------------------------------------------------------------------- /test/dummy-app/bundler20/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/bundler20/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/bundler20/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/bundler20/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | /public/delayed_job.txt 15 | 16 | # Ignore all logfiles and tempfiles. 17 | /log/* 18 | !/log/.keep 19 | /tmp 20 | /vendor 21 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails' 4 | gem 'sqlite3' 5 | #gem 'pg' 6 | #gem 'mysql2' 7 | gem 'puma' 8 | gem 'delayed_job_active_record' 9 | gem 'daemons' 10 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | DummyJob.perform_later 6 | @item = Dummy.last.field 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/jobs/dummy_job.rb: -------------------------------------------------------------------------------- 1 | class DummyJob < ActiveJob::Base 2 | queue_as :default 3 | 4 | def perform(*args) 5 | File.open(Rails.root.join('public', 'delayed_job.txt'), 'w') { |f| f.write(SecureRandom.hex(128)) } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/bundler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'bundler' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("bundler", "bundler") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/delayed_job: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) 4 | require 'delayed/command' 5 | Delayed::Command.new(ARGV).daemonize 6 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/erubis: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'erubis' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("erubis", "erubis") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/nokogiri: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'nokogiri' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("nokogiri", "nokogiri") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/puma: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'puma' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("puma", "puma") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/pumactl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'pumactl' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("puma", "pumactl") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/rackup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rackup' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rack", "rackup") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rails' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("railties", "rails") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rake' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rake", "rake") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/sprockets: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'sprockets' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("sprockets", "sprockets") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/thor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'thor' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("thor", "thor") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/unicorn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'unicorn' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("unicorn", "unicorn") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/bin/unicorn_rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'unicorn_rails' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("unicorn", "unicorn_rails") 18 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/delayed_job/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/delayed_job/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.env.development: -------------------------------------------------------------------------------- 1 | # Define ENV variables for development environment 2 | DATABASE_URL="sqlite://db/dummy_app_development.sqlite" 3 | SERVE_STATIC_ASSETS="true" 4 | WEB_SESSIONS_SECRET="8a7444ca6abce7afe1efabace7fc0fd6ec864f44e36ad777a890ebb829bb4d21" 5 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.env.test: -------------------------------------------------------------------------------- 1 | # Define ENV variables for test environment 2 | DATABASE_URL="sqlite://db/dummy_app_test.sqlite" 3 | SERVE_STATIC_ASSETS="true" 4 | WEB_SESSIONS_SECRET="6027293e9d909d676f92ee20ff3516b087cd6bc391e61bba79f13df271eb60eb" 5 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.gitignore: -------------------------------------------------------------------------------- 1 | /public/assets* 2 | /tmp 3 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.hanamirc: -------------------------------------------------------------------------------- 1 | project=dummy_app 2 | architecture=container 3 | test=minitest 4 | template=erb 5 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'bundler' 4 | gem 'rake' 5 | gem 'hanami', '~> 0.8' 6 | gem 'hanami-model', '~> 0.6' 7 | 8 | gem 'sqlite3' 9 | 10 | group :development do 11 | # Code reloading 12 | # See: http://hanamirb.org/guides/applications/code-reloading 13 | gem 'shotgun' 14 | end 15 | 16 | group :test, :development do 17 | gem 'dotenv', '~> 2.0' 18 | end 19 | 20 | group :test do 21 | gem 'minitest' 22 | gem 'capybara' 23 | end 24 | 25 | group :production do 26 | gem 'puma' 27 | end 28 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'hanami/rake_tasks' 3 | require 'rake/testtask' 4 | 5 | Rake::TestTask.new do |t| 6 | t.pattern = 'spec/**/*_spec.rb' 7 | t.libs << 'spec' 8 | t.warning = false 9 | end 10 | 11 | task default: :test 12 | task spec: :test 13 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/hanami/apps/web/assets/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/assets/images/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/assets/javascripts/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/assets/stylesheets/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/config/routes.rb: -------------------------------------------------------------------------------- 1 | # Configure your routes here 2 | # See: http://hanamirb.org/guides/routing/overview/ 3 | # 4 | # Example: 5 | # get '/hello', to: ->(env) { [200, {}, ['Hello from Hanami!']] } 6 | get '/', to: 'home#index' 7 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/controllers/home/index.rb: -------------------------------------------------------------------------------- 1 | module Web::Controllers::Home 2 | class Index 3 | include Web::Action 4 | 5 | expose :item 6 | 7 | def call(params) 8 | data = SecureRandom.hex(32) 9 | dummy = Dummy.new(field: data) 10 | DummyRepository.create(dummy) 11 | @item = DummyRepository.last.field 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/templates/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Web 5 | <%= favicon %> 6 | 7 | 8 | <%= yield %> 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/templates/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/views/application_layout.rb: -------------------------------------------------------------------------------- 1 | module Web 2 | module Views 3 | class ApplicationLayout 4 | include Web::Layout 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/apps/web/views/home/index.rb: -------------------------------------------------------------------------------- 1 | module Web::Views::Home 2 | class Index 3 | include Web::View 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/config.ru: -------------------------------------------------------------------------------- 1 | require './config/environment' 2 | 3 | run Hanami::Container.new 4 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/config/environment.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/setup' 2 | require 'hanami/setup' 3 | require_relative '../lib/dummy_app' 4 | require_relative '../apps/web/application' 5 | 6 | Hanami::Container.configure do 7 | mount Web::Application, at: '/' 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/config/initializers/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/db/dummy_app_development.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/hanami/db/dummy_app_development.sqlite -------------------------------------------------------------------------------- /test/dummy-app/hanami/db/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/db/migrations/20160915114437_create_dummies.rb: -------------------------------------------------------------------------------- 1 | Hanami::Model.migration do 2 | change do 3 | create_table :dummies do 4 | primary_key :id 5 | column :field, String 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/db/schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/hanami/db/schema.sql -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/entities/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/entities/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy 2 | include Hanami::Entity 3 | attributes :field 4 | end 5 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/mailers/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/mailers/templates/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/repositories/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/lib/dummy_app/repositories/dummy_repository.rb: -------------------------------------------------------------------------------- 1 | class DummyRepository 2 | include Hanami::Repository 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/public/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/dummy_app/entities/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/dummy_app/entities/dummy_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Dummy do 4 | # place your tests here 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/dummy_app/mailers/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/dummy_app/repositories/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/dummy_app/repositories/dummy_repository_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe DummyRepository do 4 | # place your tests here 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/features_helper.rb: -------------------------------------------------------------------------------- 1 | # Require this file for feature tests 2 | require_relative './spec_helper' 3 | 4 | require 'capybara' 5 | require 'capybara/dsl' 6 | 7 | Capybara.app = Hanami::Container.new 8 | 9 | class MiniTest::Spec 10 | include Capybara::DSL 11 | end 12 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # Require this file for unit tests 2 | ENV['HANAMI_ENV'] ||= 'test' 3 | 4 | require_relative '../config/environment' 5 | require 'minitest/autorun' 6 | 7 | Hanami::Application.preload! 8 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/support/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/web/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/web/controllers/home/index_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require_relative '../../../../apps/web/controllers/home/index' 3 | 4 | describe Web::Controllers::Home::Index do 5 | let(:action) { Web::Controllers::Home::Index.new } 6 | let(:params) { Hash[] } 7 | 8 | it 'is successful' do 9 | response = action.call(params) 10 | response[0].must_equal 200 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/web/features/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/web/views/.gitkeep: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /test/dummy-app/hanami/spec/web/views/home/index_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require_relative '../../../../apps/web/views/home/index' 3 | 4 | describe Web::Views::Home::Index do 5 | let(:exposures) { Hash[foo: 'bar'] } 6 | let(:template) { Hanami::View::Template.new('apps/web/templates/home/index.html.erb') } 7 | let(:view) { Web::Views::Home::Index.new(template, exposures) } 8 | let(:rendered) { view.render } 9 | 10 | it 'exposes #foo' do 11 | view.foo.must_equal exposures.fetch(:foo) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/dummy-app/master/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/master/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/master/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.1 2 | -------------------------------------------------------------------------------- /test/dummy-app/master/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '~> 5.2.0' 4 | gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | #gem 'pg' 7 | #gem 'mysql2' 8 | gem 'puma', '~> 4' 9 | gem 'sidekiq', '~> 6' 10 | gem 'tzinfo-data' 11 | -------------------------------------------------------------------------------- /test/dummy-app/master/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/master/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_directory ../stylesheets .css 2 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/master/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/master/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/master/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/master/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/master/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/master/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/master/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/master/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/master/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test || true" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/master/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | redis: 5 | image: redis 6 | expose: 7 | - 6379 8 | app: 9 | build: . 10 | volumes: 11 | - ".:/app" 12 | links: 13 | - redis 14 | environment: 15 | REDIS_URL: redis://redis:6379 16 | -------------------------------------------------------------------------------- /test/dummy-app/master/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/master/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/master/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/master/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore all logfiles and tempfiles. 11 | /log/* 12 | !/log/.keep 13 | /tmp 14 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dumber-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.3 2 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '6.0.1' 4 | gem 'sqlite3' 5 | gem 'sass-rails' 6 | gem 'bootsnap', '>= 1.4.2', require: false 7 | gem 'good_job' 8 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/README.rdoc: -------------------------------------------------------------------------------- 1 | # dumber-app 2 | 3 | An extremely simple Rails app that requires no database. 4 | 5 | It probably doesn't do anything useful. 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DumberApp 5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | 5 | run Rails.application 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in the app/assets 11 | # folder are already added. 12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 13 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dumber-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/controllers/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/fixtures/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/fixtures/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/helpers/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/integration/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/maximum-override/test/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/maximum-override/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Add more helper methods to be used by all tests here... 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_BIN: "bin" 3 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/.components: -------------------------------------------------------------------------------- 1 | --- 2 | :orm: activerecord 3 | :test: none 4 | :mock: none 5 | :script: none 6 | :renderer: none 7 | :stylesheet: none 8 | :namespace: DummyApp 9 | :migration_format: number 10 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | log/**/* 3 | tmp/**/* 4 | vendor/gems/* 5 | !vendor/gems/cache/ 6 | .sass-cache/* 7 | db/*.db 8 | .*.sw* 9 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler/setup' 2 | require 'padrino-core/cli/rake' 3 | 4 | PadrinoTasks.use(:database) 5 | PadrinoTasks.use(:activerecord) 6 | PadrinoTasks.init 7 | 8 | task :default => :test 9 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/app/controllers/home.rb: -------------------------------------------------------------------------------- 1 | DummyApp::App.controllers :home do 2 | 3 | get :index, :map => '/' do 4 | data = SecureRandom.hex(32) 5 | Dummy.create(field: data) 6 | @item = Dummy.last.field 7 | render 'home/index' 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/app/helpers/home_helper.rb: -------------------------------------------------------------------------------- 1 | # Helper methods defined here can be accessed in any controller or view in the application 2 | 3 | module DummyApp 4 | class App 5 | module HomeHelper 6 | # def simple_helper_method 7 | # ... 8 | # end 9 | end 10 | 11 | helpers HomeHelper 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/bundler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'bundler' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("bundler", "bundler") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/dummy-app: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | Dir.chdir(File.dirname(__FILE__)+'/..') 4 | 5 | # Start the app with Padrino::Server 6 | require 'bundler/setup' 7 | require 'padrino-core/cli/launcher' 8 | 9 | ARGV.unshift('start') if ARGV.first.nil? || ARGV.first.start_with?('-') 10 | Padrino::Cli::Launcher.start ARGV 11 | 12 | # Start the app with Rack::Server 13 | #require "rack" 14 | #Rack::Server.start 15 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/padrino: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'padrino' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("padrino-core", "padrino") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/padrino-gen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'padrino-gen' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("padrino-gen", "padrino-gen") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/puma: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'puma' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("puma", "puma") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/pumactl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'pumactl' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("puma", "pumactl") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/rackup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rackup' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rack", "rackup") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'rake' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("rake", "rake") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/thor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'thor' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("thor", "thor") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/bin/tilt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | # 4 | # This file was generated by Bundler. 5 | # 6 | # The application 'tilt' is installed as part of a gem, and 7 | # this file is here to facilitate running it. 8 | # 9 | 10 | require "pathname" 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 12 | Pathname.new(__FILE__).realpath) 13 | 14 | require "rubygems" 15 | require "bundler/setup" 16 | 17 | load Gem.bin_path("tilt", "tilt") 18 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/config.ru: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env rackup 2 | # encoding: utf-8 3 | 4 | # This file can be used to start Padrino, 5 | # just execute it from the command line. 6 | 7 | require File.expand_path("../config/boot.rb", __FILE__) 8 | 9 | run Padrino.application 10 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/db/migrate/001_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration 2 | def self.up 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :dummies 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/lib/connection_pool_management_middleware.rb: -------------------------------------------------------------------------------- 1 | class ConnectionPoolManagement 2 | def initialize(app) 3 | @app = app 4 | end 5 | 6 | def call(env) 7 | ActiveRecord::Base.connection_pool.with_connection { @app.call(env) } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/padrino/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/padrino/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.3.1 2 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails' 4 | #gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | gem 'pg' 7 | #gem 'mysql2' 8 | gem 'puma' 9 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/rails-pgsql/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/rails-pgsql/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/resque/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | /public/resque.txt 15 | 16 | # Ignore all logfiles and tempfiles. 17 | /log/* 18 | !/log/.keep 19 | /tmp 20 | /vendor 21 | -------------------------------------------------------------------------------- /test/dummy-app/resque/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/resque/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/resque/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails' 4 | gem 'sqlite3' 5 | #gem 'pg' 6 | #gem 'mysql2' 7 | gem 'unicorn' 8 | gem 'resque' 9 | gem 'redis' 10 | -------------------------------------------------------------------------------- /test/dummy-app/resque/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/resque/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | require 'resque/tasks' 6 | 7 | Rails.application.load_tasks 8 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | DummyJob.perform_later 6 | @item = Dummy.last.field 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/jobs/dummy_job.rb: -------------------------------------------------------------------------------- 1 | class DummyJob < ActiveJob::Base 2 | queue_as :default 3 | 4 | def perform(*args) 5 | File.open(Rails.root.join('public', 'resque.txt'), 'w') { |f| f.write(SecureRandom.hex(128)) } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/resque/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/resque/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/resque/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/resque/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/resque/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/resque/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/resque/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/resque/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/resque/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/resque/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/resque/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails' 4 | gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | #gem 'pg' 7 | #gem 'mysql2' 8 | gem 'puma' 9 | gem 'shoryuken' 10 | gem 'aws-sdk-sqs' 11 | gem 'tzinfo-data' 12 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test || true" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | redis: 5 | image: redis 6 | expose: 7 | - 6379 8 | app: 9 | build: . 10 | volumes: 11 | - ".:/app" 12 | links: 13 | - redis 14 | environment: 15 | REDIS_URL: redis://redis:6379 16 | -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/shoryuken/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/shoryuken/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/thin/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/thin/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/thin/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/thin/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '~> 5.2.0' 4 | gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | #gem 'pg' 7 | #gem 'mysql2' 8 | gem 'sidekiq' 9 | gem 'thin' 10 | gem 'tzinfo-data' 11 | -------------------------------------------------------------------------------- /test/dummy-app/thin/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/thin/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/thin/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/thin/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/thin/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/thin/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /test/dummy-app/thin/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/thin/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/thin/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/thin/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test || true" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/thin/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | redis: 5 | image: redis 6 | expose: 7 | - 6379 8 | app: 9 | build: . 10 | volumes: 11 | - ".:/app" 12 | links: 13 | - redis 14 | environment: 15 | REDIS_URL: redis://redis:6379 16 | -------------------------------------------------------------------------------- /test/dummy-app/thin/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/thin/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/thin/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/thin/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | /config/database.yml 14 | 15 | # Ignore all logfiles and tempfiles. 16 | /log/* 17 | !/log/.keep 18 | /tmp 19 | /vendor 20 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/.ruby-gemset: -------------------------------------------------------------------------------- 1 | dummy-app 2 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.0 2 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '~> 5.2.0' 4 | gem 'sqlite3' 5 | gem 'sprockets-rails' 6 | #gem 'pg' 7 | #gem 'mysql2' 8 | gem 'puma', '~> 3.0' 9 | gem 'sidekiq' 10 | gem 'tzinfo-data' 11 | gem 'unicorn' 12 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/app/assets/images/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/controllers/home_controller.rb: -------------------------------------------------------------------------------- 1 | class HomeController < ApplicationController 2 | def index 3 | data = SecureRandom.hex(32) 4 | Dummy.create(field: data) 5 | @item = Dummy.last.field 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/app/mailers/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/app/models/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/app/models/concerns/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/models/dummy.rb: -------------------------------------------------------------------------------- 1 | class Dummy < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 | Data: <%= @item.to_s %> 2 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DummyApp 5 | <%= stylesheet_link_tag 'application', media: 'all' %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/database.yml.sample: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy-app_session' 4 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | root 'home#index' 3 | end 4 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/db/migrate/20160423150232_create_dummies.rb: -------------------------------------------------------------------------------- 1 | class CreateDummies < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dummies do |t| 4 | t.string :field 5 | t.timestamps null: false 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/deploy/after_restart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | Chef::Log.info('Running deploy/after_restart.rb...') 3 | 4 | execute 'copy assets' do 5 | cwd release_path 6 | command "mkdir -p #{release_path}/public/test && cp -r #{release_path}/public/assets/* #{release_path}/public/test || true" 7 | end 8 | 9 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | redis: 5 | image: redis 6 | expose: 7 | - 6379 8 | app: 9 | build: . 10 | volumes: 11 | - ".:/app" 12 | links: 13 | - redis 14 | environment: 15 | REDIS_URL: redis://redis:6379 16 | -------------------------------------------------------------------------------- /test/dummy-app/unicorn/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/lib/assets/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/lib/tasks/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/log/.keep -------------------------------------------------------------------------------- /test/dummy-app/unicorn/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajgon/opsworks_ruby/6a3ce0d2ae052e2eaa5680b9b31a5fc3c4288e2b/test/dummy-app/unicorn/public/favicon.ico -------------------------------------------------------------------------------- /test/dummy-app/unicorn/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/integration/data_bags/default/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/data_bags/default_with_shoryuken_and_fullstaq/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/data_bags/http_thin_nginx_padrino_delayed_job/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/data_bags/http_unicorn_apache_hanami_resque/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/data_bags/maximum_override/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/data_bags/nullified/aws_opsworks_rds_db_instance/arn_aws_rds_us-west-2_850906259207_db_dummy-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "arn_aws_rds_us-west-2_850906259207_db_dummy-project" 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/helpers/serverspec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'serverspec' 4 | 5 | if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? 6 | set :backend, :exec 7 | else 8 | set :backend, :cmd 9 | set :os, family: 'windows' 10 | end 11 | --------------------------------------------------------------------------------