From 06b4bd1da8b1bb2b8137326b006a0b3d5faeefb2 Mon Sep 17 00:00:00 2001 From: Matt Muller Date: Wed, 13 Nov 2024 09:21:37 -0500 Subject: [PATCH] Remove old sample app --- sample_app_old/.browserslistrc | 1 - sample_app_old/.gitattributes | 10 -- sample_app_old/.gitignore | 40 ------ sample_app_old/Dockerfile | 14 -- sample_app_old/Gemfile | 65 ---------- sample_app_old/README.md | 21 --- sample_app_old/Rakefile | 6 - sample_app_old/app/assets/config/manifest.js | 2 - sample_app_old/app/assets/images/.keep | 0 .../app/assets/stylesheets/application.css | 15 --- .../app/assets/stylesheets/email.scss | 3 - .../app/assets/stylesheets/scaffolds.scss | 65 ---------- .../app/assets/stylesheets/users.scss | 3 - .../app/channels/application_cable/channel.rb | 4 - .../channels/application_cable/connection.rb | 4 - .../app/controllers/application_controller.rb | 8 -- sample_app_old/app/controllers/concerns/.keep | 0 .../app/controllers/email_controller.rb | 9 -- .../app/controllers/users_controller.rb | 74 ----------- .../app/helpers/application_helper.rb | 2 - sample_app_old/app/helpers/email_helper.rb | 2 - sample_app_old/app/helpers/users_helper.rb | 2 - .../app/javascript/channels/consumer.js | 6 - .../app/javascript/channels/index.js | 5 - .../app/javascript/packs/application.js | 13 -- sample_app_old/app/jobs/application_job.rb | 7 - sample_app_old/app/jobs/hello_job.rb | 18 --- .../app/mailers/application_mailer.rb | 4 - sample_app_old/app/mailers/my_mailer.rb | 8 -- .../app/models/application_record.rb | 3 - sample_app_old/app/models/concerns/.keep | 0 sample_app_old/app/models/forum.rb | 7 - sample_app_old/app/models/user.rb | 3 - sample_app_old/app/views/email/index.html.erb | 54 -------- .../app/views/layouts/application.html.erb | 14 -- .../app/views/layouts/mailer.html.erb | 13 -- .../app/views/layouts/mailer.text.erb | 1 - .../app/views/my_mailer/send_email.text.erb | 8 -- sample_app_old/app/views/users/_form.html.erb | 32 ----- .../app/views/users/_user.json.jbuilder | 2 - sample_app_old/app/views/users/edit.html.erb | 6 - sample_app_old/app/views/users/index.html.erb | 29 ----- .../app/views/users/index.json.jbuilder | 1 - sample_app_old/app/views/users/new.html.erb | 5 - sample_app_old/app/views/users/show.html.erb | 19 --- .../app/views/users/show.json.jbuilder | 1 - sample_app_old/babel.config.js | 70 ---------- sample_app_old/bin/bundle | 114 ----------------- sample_app_old/bin/rails | 4 - sample_app_old/bin/rake | 4 - sample_app_old/bin/setup | 33 ----- sample_app_old/bin/spring | 10 -- sample_app_old/bin/start_server | 14 -- sample_app_old/bin/webpack | 18 --- sample_app_old/bin/webpack-dev-server | 18 --- sample_app_old/bin/yarn | 19 --- sample_app_old/config.ru | 6 - sample_app_old/config/application.rb | 28 ---- sample_app_old/config/aws_sqs_active_job.yml | 4 - sample_app_old/config/boot.rb | 4 - sample_app_old/config/cable.yml | 10 -- sample_app_old/config/credentials.yml.enc | 1 - sample_app_old/config/database.yml | 25 ---- .../config/dynamo_db_session_store.yml | 70 ---------- .../config/dynamo_db_session_store/test.yml | 70 ---------- sample_app_old/config/environment.rb | 5 - .../config/environments/development.rb | 79 ------------ .../config/environments/production.rb | 120 ------------------ sample_app_old/config/environments/test.rb | 60 --------- .../application_controller_renderer.rb | 8 -- sample_app_old/config/initializers/assets.rb | 14 -- .../initializers/backtrace_silencers.rb | 8 -- .../initializers/content_security_policy.rb | 30 ----- .../config/initializers/cookies_serializer.rb | 5 - .../initializers/filter_parameter_logging.rb | 6 - .../config/initializers/inflections.rb | 16 --- .../config/initializers/instrument_aws_sdk.rb | 8 -- .../config/initializers/mime_types.rb | 4 - .../config/initializers/permissions_policy.rb | 11 -- .../config/initializers/session_store.rb | 2 - .../config/initializers/wrap_parameters.rb | 14 -- sample_app_old/config/locales/en.yml | 33 ----- sample_app_old/config/puma.rb | 43 ------- sample_app_old/config/routes.rb | 11 -- sample_app_old/config/spring.rb | 6 - sample_app_old/config/storage.yml | 37 ------ sample_app_old/config/webpack/development.js | 5 - sample_app_old/config/webpack/environment.js | 3 - sample_app_old/config/webpack/production.js | 5 - sample_app_old/config/webpack/test.js | 5 - sample_app_old/config/webpacker.yml | 92 -------------- .../db/migrate/20201210211015_create_users.rb | 10 -- ...te_active_storage_tables.active_storage.rb | 36 ------ ...1003109_create_dynamo_db_sessions_table.rb | 9 -- sample_app_old/db/schema.rb | 51 -------- sample_app_old/db/seeds.rb | 7 - .../db/table_config/forum_config.rb | 12 -- sample_app_old/docker-compose.yml | 57 --------- sample_app_old/lib/assets/.keep | 0 sample_app_old/lib/tasks/.keep | 0 sample_app_old/log/.keep | 0 sample_app_old/package.json | 15 --- sample_app_old/postcss.config.js | 12 -- sample_app_old/public/404.html | 67 ---------- sample_app_old/public/422.html | 67 ---------- sample_app_old/public/500.html | 66 ---------- .../public/apple-touch-icon-precomposed.png | 0 sample_app_old/public/apple-touch-icon.png | 0 sample_app_old/public/favicon.ico | 0 sample_app_old/public/robots.txt | 1 - sample_app_old/storage/.keep | 0 .../test/application_system_test_case.rb | 5 - .../application_cable/connection_test.rb | 11 -- sample_app_old/test/controllers/.keep | 0 .../test/controllers/email_controller_test.rb | 8 -- .../test/controllers/users_controller_test.rb | 48 ------- sample_app_old/test/fixtures/files/.keep | 0 sample_app_old/test/fixtures/users.yml | 9 -- sample_app_old/test/helpers/.keep | 0 sample_app_old/test/integration/.keep | 0 sample_app_old/test/mailers/.keep | 0 sample_app_old/test/mailers/my_mailer_test.rb | 7 - .../mailers/previews/my_mailer_preview.rb | 4 - sample_app_old/test/models/.keep | 0 sample_app_old/test/models/user_test.rb | 7 - sample_app_old/test/system/.keep | 0 sample_app_old/test/system/users_test.rb | 45 ------- sample_app_old/test/test_helper.rb | 13 -- sample_app_old/tmp/.keep | 0 sample_app_old/tmp/pids/.keep | 0 130 files changed, 2328 deletions(-) delete mode 100644 sample_app_old/.browserslistrc delete mode 100644 sample_app_old/.gitattributes delete mode 100644 sample_app_old/.gitignore delete mode 100644 sample_app_old/Dockerfile delete mode 100644 sample_app_old/Gemfile delete mode 100644 sample_app_old/README.md delete mode 100644 sample_app_old/Rakefile delete mode 100644 sample_app_old/app/assets/config/manifest.js delete mode 100644 sample_app_old/app/assets/images/.keep delete mode 100644 sample_app_old/app/assets/stylesheets/application.css delete mode 100644 sample_app_old/app/assets/stylesheets/email.scss delete mode 100644 sample_app_old/app/assets/stylesheets/scaffolds.scss delete mode 100644 sample_app_old/app/assets/stylesheets/users.scss delete mode 100644 sample_app_old/app/channels/application_cable/channel.rb delete mode 100644 sample_app_old/app/channels/application_cable/connection.rb delete mode 100644 sample_app_old/app/controllers/application_controller.rb delete mode 100644 sample_app_old/app/controllers/concerns/.keep delete mode 100644 sample_app_old/app/controllers/email_controller.rb delete mode 100644 sample_app_old/app/controllers/users_controller.rb delete mode 100644 sample_app_old/app/helpers/application_helper.rb delete mode 100644 sample_app_old/app/helpers/email_helper.rb delete mode 100644 sample_app_old/app/helpers/users_helper.rb delete mode 100644 sample_app_old/app/javascript/channels/consumer.js delete mode 100644 sample_app_old/app/javascript/channels/index.js delete mode 100644 sample_app_old/app/javascript/packs/application.js delete mode 100644 sample_app_old/app/jobs/application_job.rb delete mode 100644 sample_app_old/app/jobs/hello_job.rb delete mode 100644 sample_app_old/app/mailers/application_mailer.rb delete mode 100644 sample_app_old/app/mailers/my_mailer.rb delete mode 100644 sample_app_old/app/models/application_record.rb delete mode 100644 sample_app_old/app/models/concerns/.keep delete mode 100644 sample_app_old/app/models/forum.rb delete mode 100644 sample_app_old/app/models/user.rb delete mode 100644 sample_app_old/app/views/email/index.html.erb delete mode 100644 sample_app_old/app/views/layouts/application.html.erb delete mode 100644 sample_app_old/app/views/layouts/mailer.html.erb delete mode 100644 sample_app_old/app/views/layouts/mailer.text.erb delete mode 100644 sample_app_old/app/views/my_mailer/send_email.text.erb delete mode 100644 sample_app_old/app/views/users/_form.html.erb delete mode 100644 sample_app_old/app/views/users/_user.json.jbuilder delete mode 100644 sample_app_old/app/views/users/edit.html.erb delete mode 100644 sample_app_old/app/views/users/index.html.erb delete mode 100644 sample_app_old/app/views/users/index.json.jbuilder delete mode 100644 sample_app_old/app/views/users/new.html.erb delete mode 100644 sample_app_old/app/views/users/show.html.erb delete mode 100644 sample_app_old/app/views/users/show.json.jbuilder delete mode 100644 sample_app_old/babel.config.js delete mode 100755 sample_app_old/bin/bundle delete mode 100755 sample_app_old/bin/rails delete mode 100755 sample_app_old/bin/rake delete mode 100755 sample_app_old/bin/setup delete mode 100755 sample_app_old/bin/spring delete mode 100755 sample_app_old/bin/start_server delete mode 100755 sample_app_old/bin/webpack delete mode 100755 sample_app_old/bin/webpack-dev-server delete mode 100755 sample_app_old/bin/yarn delete mode 100644 sample_app_old/config.ru delete mode 100644 sample_app_old/config/application.rb delete mode 100644 sample_app_old/config/aws_sqs_active_job.yml delete mode 100644 sample_app_old/config/boot.rb delete mode 100644 sample_app_old/config/cable.yml delete mode 100644 sample_app_old/config/credentials.yml.enc delete mode 100644 sample_app_old/config/database.yml delete mode 100644 sample_app_old/config/dynamo_db_session_store.yml delete mode 100644 sample_app_old/config/dynamo_db_session_store/test.yml delete mode 100644 sample_app_old/config/environment.rb delete mode 100644 sample_app_old/config/environments/development.rb delete mode 100644 sample_app_old/config/environments/production.rb delete mode 100644 sample_app_old/config/environments/test.rb delete mode 100644 sample_app_old/config/initializers/application_controller_renderer.rb delete mode 100644 sample_app_old/config/initializers/assets.rb delete mode 100644 sample_app_old/config/initializers/backtrace_silencers.rb delete mode 100644 sample_app_old/config/initializers/content_security_policy.rb delete mode 100644 sample_app_old/config/initializers/cookies_serializer.rb delete mode 100644 sample_app_old/config/initializers/filter_parameter_logging.rb delete mode 100644 sample_app_old/config/initializers/inflections.rb delete mode 100644 sample_app_old/config/initializers/instrument_aws_sdk.rb delete mode 100644 sample_app_old/config/initializers/mime_types.rb delete mode 100644 sample_app_old/config/initializers/permissions_policy.rb delete mode 100644 sample_app_old/config/initializers/session_store.rb delete mode 100644 sample_app_old/config/initializers/wrap_parameters.rb delete mode 100644 sample_app_old/config/locales/en.yml delete mode 100644 sample_app_old/config/puma.rb delete mode 100644 sample_app_old/config/routes.rb delete mode 100644 sample_app_old/config/spring.rb delete mode 100644 sample_app_old/config/storage.yml delete mode 100644 sample_app_old/config/webpack/development.js delete mode 100644 sample_app_old/config/webpack/environment.js delete mode 100644 sample_app_old/config/webpack/production.js delete mode 100644 sample_app_old/config/webpack/test.js delete mode 100644 sample_app_old/config/webpacker.yml delete mode 100644 sample_app_old/db/migrate/20201210211015_create_users.rb delete mode 100644 sample_app_old/db/migrate/20201210211818_create_active_storage_tables.active_storage.rb delete mode 100644 sample_app_old/db/migrate/20201211003109_create_dynamo_db_sessions_table.rb delete mode 100644 sample_app_old/db/schema.rb delete mode 100644 sample_app_old/db/seeds.rb delete mode 100644 sample_app_old/db/table_config/forum_config.rb delete mode 100644 sample_app_old/docker-compose.yml delete mode 100644 sample_app_old/lib/assets/.keep delete mode 100644 sample_app_old/lib/tasks/.keep delete mode 100644 sample_app_old/log/.keep delete mode 100644 sample_app_old/package.json delete mode 100644 sample_app_old/postcss.config.js delete mode 100644 sample_app_old/public/404.html delete mode 100644 sample_app_old/public/422.html delete mode 100644 sample_app_old/public/500.html delete mode 100644 sample_app_old/public/apple-touch-icon-precomposed.png delete mode 100644 sample_app_old/public/apple-touch-icon.png delete mode 100644 sample_app_old/public/favicon.ico delete mode 100644 sample_app_old/public/robots.txt delete mode 100644 sample_app_old/storage/.keep delete mode 100644 sample_app_old/test/application_system_test_case.rb delete mode 100644 sample_app_old/test/channels/application_cable/connection_test.rb delete mode 100644 sample_app_old/test/controllers/.keep delete mode 100644 sample_app_old/test/controllers/email_controller_test.rb delete mode 100644 sample_app_old/test/controllers/users_controller_test.rb delete mode 100644 sample_app_old/test/fixtures/files/.keep delete mode 100644 sample_app_old/test/fixtures/users.yml delete mode 100644 sample_app_old/test/helpers/.keep delete mode 100644 sample_app_old/test/integration/.keep delete mode 100644 sample_app_old/test/mailers/.keep delete mode 100644 sample_app_old/test/mailers/my_mailer_test.rb delete mode 100644 sample_app_old/test/mailers/previews/my_mailer_preview.rb delete mode 100644 sample_app_old/test/models/.keep delete mode 100644 sample_app_old/test/models/user_test.rb delete mode 100644 sample_app_old/test/system/.keep delete mode 100644 sample_app_old/test/system/users_test.rb delete mode 100644 sample_app_old/test/test_helper.rb delete mode 100644 sample_app_old/tmp/.keep delete mode 100644 sample_app_old/tmp/pids/.keep diff --git a/sample_app_old/.browserslistrc b/sample_app_old/.browserslistrc deleted file mode 100644 index e94f8140..00000000 --- a/sample_app_old/.browserslistrc +++ /dev/null @@ -1 +0,0 @@ -defaults diff --git a/sample_app_old/.gitattributes b/sample_app_old/.gitattributes deleted file mode 100644 index 51685710..00000000 --- a/sample_app_old/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# See https://git-scm.com/docs/gitattributes for more about git attribute files. - -# Mark the database schema as having been generated. -db/schema.rb linguist-generated - -# Mark the yarn lockfile as having been generated. -yarn.lock linguist-generated - -# Mark any vendored files as having been vendored. -vendor/* linguist-vendored diff --git a/sample_app_old/.gitignore b/sample_app_old/.gitignore deleted file mode 100644 index 072bcce6..00000000 --- a/sample_app_old/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-* - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -# Ignore pidfiles, but keep the directory. -/tmp/pids/* -!/tmp/pids/ -!/tmp/pids/.keep - -# Ignore uploaded files in development. -/storage/* -!/storage/.keep - -/public/assets -.byebug_history - -# Ignore master key for decrypting credentials and more. -/config/master.key - -/public/packs -/public/packs-test -/node_modules -/yarn-error.log -yarn-debug.log* -.yarn-integrity diff --git a/sample_app_old/Dockerfile b/sample_app_old/Dockerfile deleted file mode 100644 index 7e9ec1f1..00000000 --- a/sample_app_old/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM ruby:3.3.0 - -WORKDIR /workspace - -RUN apt-get update \ - && apt-get install -y locales default-mysql-client awscli --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* \ - && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANG en_US.utf8 - -WORKDIR /workspace/sample_app - -ENTRYPOINT ["./bin/start_server"] -CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"] diff --git a/sample_app_old/Gemfile b/sample_app_old/Gemfile deleted file mode 100644 index 3bf4d70e..00000000 --- a/sample_app_old/Gemfile +++ /dev/null @@ -1,65 +0,0 @@ -source 'https://rubygems.org' -git_source(:github) { |repo| "https://github.com/#{repo}.git" } - -# Our gems -gem 'aws-sdk-rails', path: '../' -gem 'aws-sessionstore-dynamodb', path: '../../aws-sessionstore-dynamodb-ruby' - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.2.1", ">= 7.2.1.1" -# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] -gem "sprockets-rails" -# Use sqlite3 as the database for Active Record -gem "sqlite3", ">= 1.4" -# Use the Puma web server [https://github.com/puma/puma] -gem "puma", ">= 5.0" -# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] -gem "importmap-rails" -# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" -# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] -gem "stimulus-rails" -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -gem "jbuilder" -# Use Redis adapter to run Action Cable in production -# gem "redis", ">= 4.0.1" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ windows jruby ] - -# Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false - -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" - -group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" - - # Static analysis for security vulnerabilities [https://brakemanscanner.org/] - gem "brakeman", require: false - - # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] - gem "rubocop-rails-omakase", require: false -end - -group :development do - gem 'byebug' - gem 'listen', '~> 3.3' - - # Use console on exceptions pages [https://github.com/rails/web-console] - gem "web-console" -end - -group :test do - # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara" - gem "selenium-webdriver" -end diff --git a/sample_app_old/README.md b/sample_app_old/README.md deleted file mode 100644 index c12d6529..00000000 --- a/sample_app_old/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# README - -Sample app using `aws-sdk-rails` features. Used for development and testing. - -* Ruby version - -3.3.0 - -* Database creation - -`rails db:migrate` - -## SES (Inbound) - -Fixture based testing of SES is possible via RSpec request helpers that this gem offers. How to use them is documented within the main README. How to setup inbound emails with SES is also covered there. - -## SQS ActiveJob - -* Start rails with `AWS_ACTIVE_JOB_QUEUE_URL=https://my_sqs_queue_url rails server` -* Visit/curl `http://127.0.0.1:3000/test-job?name=my_name` - This will queue a job up -* Poll for and process jobs with: `AWS_ACTIVE_JOB_QUEUE_URL=https://my_sqs_queue_url bundle exec aws_sqs_active_job --queue default` diff --git a/sample_app_old/Rakefile b/sample_app_old/Rakefile deleted file mode 100644 index 9a5ea738..00000000 --- a/sample_app_old/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require_relative "config/application" - -Rails.application.load_tasks diff --git a/sample_app_old/app/assets/config/manifest.js b/sample_app_old/app/assets/config/manifest.js deleted file mode 100644 index 59181933..00000000 --- a/sample_app_old/app/assets/config/manifest.js +++ /dev/null @@ -1,2 +0,0 @@ -//= link_tree ../images -//= link_directory ../stylesheets .css diff --git a/sample_app_old/app/assets/images/.keep b/sample_app_old/app/assets/images/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/app/assets/stylesheets/application.css b/sample_app_old/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f5..00000000 --- a/sample_app_old/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/sample_app_old/app/assets/stylesheets/email.scss b/sample_app_old/app/assets/stylesheets/email.scss deleted file mode 100644 index c94a4b87..00000000 --- a/sample_app_old/app/assets/stylesheets/email.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the email controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/sample_app_old/app/assets/stylesheets/scaffolds.scss b/sample_app_old/app/assets/stylesheets/scaffolds.scss deleted file mode 100644 index bb2597f3..00000000 --- a/sample_app_old/app/assets/stylesheets/scaffolds.scss +++ /dev/null @@ -1,65 +0,0 @@ -body { - background-color: #fff; - color: #333; - margin: 33px; } - -body, p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; } - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; } - -a { - color: #000; } - -a:visited { - color: #666; } - -a:hover { - color: #fff; - background-color: #000; } - -th { - padding-bottom: 5px; } - -td { - padding: 0 5px 7px; } - -div.field, -div.actions { - margin-bottom: 10px; } - -#notice { - color: green; } - -.field_with_errors { - padding: 2px; - background-color: red; - display: table; } - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px 7px 0; - margin-bottom: 20px; - background-color: #f0f0f0; } - -#error_explanation h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px -7px 0; - background-color: #c00; - color: #fff; } - -#error_explanation ul li { - font-size: 12px; - list-style: square; } - -label { - display: block; } diff --git a/sample_app_old/app/assets/stylesheets/users.scss b/sample_app_old/app/assets/stylesheets/users.scss deleted file mode 100644 index efc25261..00000000 --- a/sample_app_old/app/assets/stylesheets/users.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Users controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/sample_app_old/app/channels/application_cable/channel.rb b/sample_app_old/app/channels/application_cable/channel.rb deleted file mode 100644 index d6726972..00000000 --- a/sample_app_old/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/sample_app_old/app/channels/application_cable/connection.rb b/sample_app_old/app/channels/application_cable/connection.rb deleted file mode 100644 index 0ff5442f..00000000 --- a/sample_app_old/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/sample_app_old/app/controllers/application_controller.rb b/sample_app_old/app/controllers/application_controller.rb deleted file mode 100644 index fe671235..00000000 --- a/sample_app_old/app/controllers/application_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class ApplicationController < ActionController::Base - - def test_job - job = HelloJob.perform_later(params[:name]) - Rails.logger.info "Queued up a HelloJob: #{job}" - render json: {job: job} - end -end diff --git a/sample_app_old/app/controllers/concerns/.keep b/sample_app_old/app/controllers/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/app/controllers/email_controller.rb b/sample_app_old/app/controllers/email_controller.rb deleted file mode 100644 index f016346f..00000000 --- a/sample_app_old/app/controllers/email_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class EmailController < ApplicationController - def index - end - - def send_email - MyMailer.send_email(name: params[:name], phone: params[:phone], email: params[:email], message: params[:message]).deliver - redirect_to email_index_url, notice: "Email sent!" - end -end diff --git a/sample_app_old/app/controllers/users_controller.rb b/sample_app_old/app/controllers/users_controller.rb deleted file mode 100644 index 0df60194..00000000 --- a/sample_app_old/app/controllers/users_controller.rb +++ /dev/null @@ -1,74 +0,0 @@ -class UsersController < ApplicationController - before_action :set_user, only: [:show, :edit, :update, :destroy] - - # GET /users - # GET /users.json - def index - @users = User.all - end - - # GET /users/1 - # GET /users/1.json - def show - end - - # GET /users/new - def new - @user = User.new - end - - # GET /users/1/edit - def edit - end - - # POST /users - # POST /users.json - def create - @user = User.new(user_params) - - respond_to do |format| - if @user.save - format.html { redirect_to @user, notice: 'User was successfully created.' } - format.json { render :show, status: :created, location: @user } - else - format.html { render :new } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /users/1 - # PATCH/PUT /users/1.json - def update - respond_to do |format| - if @user.update(user_params) - format.html { redirect_to @user, notice: 'User was successfully updated.' } - format.json { render :show, status: :ok, location: @user } - else - format.html { render :edit } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /users/1 - # DELETE /users/1.json - def destroy - @user.destroy - respond_to do |format| - format.html { redirect_to users_url, notice: 'User was successfully destroyed.' } - format.json { head :no_content } - end - end - - private - # Use callbacks to share common setup or constraints between actions. - def set_user - @user = User.find(params[:id]) - end - - # Only allow a list of trusted parameters through. - def user_params - params.require(:user).permit(:email_address, :password, :avatar) - end -end diff --git a/sample_app_old/app/helpers/application_helper.rb b/sample_app_old/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/sample_app_old/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/sample_app_old/app/helpers/email_helper.rb b/sample_app_old/app/helpers/email_helper.rb deleted file mode 100644 index 37a644ce..00000000 --- a/sample_app_old/app/helpers/email_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module EmailHelper -end diff --git a/sample_app_old/app/helpers/users_helper.rb b/sample_app_old/app/helpers/users_helper.rb deleted file mode 100644 index 2310a240..00000000 --- a/sample_app_old/app/helpers/users_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module UsersHelper -end diff --git a/sample_app_old/app/javascript/channels/consumer.js b/sample_app_old/app/javascript/channels/consumer.js deleted file mode 100644 index 8ec3aad3..00000000 --- a/sample_app_old/app/javascript/channels/consumer.js +++ /dev/null @@ -1,6 +0,0 @@ -// Action Cable provides the framework to deal with WebSockets in Rails. -// You can generate new channels where WebSocket features live using the `bin/rails generate channel` command. - -import { createConsumer } from "@rails/actioncable" - -export default createConsumer() diff --git a/sample_app_old/app/javascript/channels/index.js b/sample_app_old/app/javascript/channels/index.js deleted file mode 100644 index 0cfcf749..00000000 --- a/sample_app_old/app/javascript/channels/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// Load all the channels within this directory and all subdirectories. -// Channel files must be named *_channel.js. - -const channels = require.context('.', true, /_channel\.js$/) -channels.keys().forEach(channels) diff --git a/sample_app_old/app/javascript/packs/application.js b/sample_app_old/app/javascript/packs/application.js deleted file mode 100644 index f710851a..00000000 --- a/sample_app_old/app/javascript/packs/application.js +++ /dev/null @@ -1,13 +0,0 @@ -// This file is automatically compiled by Webpack, along with any other files -// present in this directory. You're encouraged to place your actual application logic in -// a relevant structure within app/javascript and only use these pack files to reference -// that code so it'll be compiled. - -import Rails from "@rails/ujs" -import Turbolinks from "turbolinks" -import * as ActiveStorage from "@rails/activestorage" -import "channels" - -Rails.start() -Turbolinks.start() -ActiveStorage.start() diff --git a/sample_app_old/app/jobs/application_job.rb b/sample_app_old/app/jobs/application_job.rb deleted file mode 100644 index d394c3d1..00000000 --- a/sample_app_old/app/jobs/application_job.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ApplicationJob < ActiveJob::Base - # Automatically retry jobs that encountered a deadlock - # retry_on ActiveRecord::Deadlocked - - # Most jobs are safe to ignore if the underlying records are no longer available - # discard_on ActiveJob::DeserializationError -end diff --git a/sample_app_old/app/jobs/hello_job.rb b/sample_app_old/app/jobs/hello_job.rb deleted file mode 100644 index 074ed8ed..00000000 --- a/sample_app_old/app/jobs/hello_job.rb +++ /dev/null @@ -1,18 +0,0 @@ -class HelloJob < ApplicationJob - queue_as :default - - class NameException < StandardError; end - - class SkipException < StandardError; end - - retry_on NameException - discard_on SkipException - - def perform(name) - raise NameException if name == "error" - raise SkipException if name == "skip" - raise StandardError if name == "StandardError" - - puts "Hello from our job: #{name}" - end -end diff --git a/sample_app_old/app/mailers/application_mailer.rb b/sample_app_old/app/mailers/application_mailer.rb deleted file mode 100644 index 79aa3fa1..00000000 --- a/sample_app_old/app/mailers/application_mailer.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationMailer < ActionMailer::Base - default from: ENV['ACTION_MAILER_EMAIL'] - layout 'mailer' -end diff --git a/sample_app_old/app/mailers/my_mailer.rb b/sample_app_old/app/mailers/my_mailer.rb deleted file mode 100644 index 33a9c17e..00000000 --- a/sample_app_old/app/mailers/my_mailer.rb +++ /dev/null @@ -1,8 +0,0 @@ -class MyMailer < ApplicationMailer - def send_email(options={}) - @name = options[:name] - @email = options[:email] - @message = options[:message] - mail(:to=>ENV['ACTION_MAILER_EMAIL'], :subject=>"Amazon SES Email") - end -end diff --git a/sample_app_old/app/models/application_record.rb b/sample_app_old/app/models/application_record.rb deleted file mode 100644 index 10a4cba8..00000000 --- a/sample_app_old/app/models/application_record.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true -end diff --git a/sample_app_old/app/models/concerns/.keep b/sample_app_old/app/models/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/app/models/forum.rb b/sample_app_old/app/models/forum.rb deleted file mode 100644 index c1ac48e3..00000000 --- a/sample_app_old/app/models/forum.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'aws-record' - -class Forum - include Aws::Record - - string_attr :uuid, hash_key: true -end diff --git a/sample_app_old/app/models/user.rb b/sample_app_old/app/models/user.rb deleted file mode 100644 index 27e450e2..00000000 --- a/sample_app_old/app/models/user.rb +++ /dev/null @@ -1,3 +0,0 @@ -class User < ApplicationRecord - # has_one_attached :avatar -end diff --git a/sample_app_old/app/views/email/index.html.erb b/sample_app_old/app/views/email/index.html.erb deleted file mode 100644 index 450bd138..00000000 --- a/sample_app_old/app/views/email/index.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -<% flash.each do |name, msg| %> -
fade in"> - - - <%= name %>! <%= raw(msg) %> -
-<% end %> -

AWS SES Email Example

-
-
-
-
- <%= form_tag(send_email_path, method: "post", :class=>"form-horizontal") do %> -
- Contact us - - -
- -
- -
-
- - -
- -
- -
-
- - -
- -
- -
-
- - -
-
- -
-
-
- <% end %> -
-
-
-
diff --git a/sample_app_old/app/views/layouts/application.html.erb b/sample_app_old/app/views/layouts/application.html.erb deleted file mode 100644 index b35269cf..00000000 --- a/sample_app_old/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - SampleApp - - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - - - - <%= yield %> - - diff --git a/sample_app_old/app/views/layouts/mailer.html.erb b/sample_app_old/app/views/layouts/mailer.html.erb deleted file mode 100644 index cbd34d2e..00000000 --- a/sample_app_old/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/sample_app_old/app/views/layouts/mailer.text.erb b/sample_app_old/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bddb..00000000 --- a/sample_app_old/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/sample_app_old/app/views/my_mailer/send_email.text.erb b/sample_app_old/app/views/my_mailer/send_email.text.erb deleted file mode 100644 index dbacf3cb..00000000 --- a/sample_app_old/app/views/my_mailer/send_email.text.erb +++ /dev/null @@ -1,8 +0,0 @@ -Somebody contacted you through your site. -Details: - -Name: <%= @name %>, - -Email: <%= @email %>, - -Message: <%= @message %> diff --git a/sample_app_old/app/views/users/_form.html.erb b/sample_app_old/app/views/users/_form.html.erb deleted file mode 100644 index 36c829c8..00000000 --- a/sample_app_old/app/views/users/_form.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -<%= form_with(model: user) do |form| %> - <% if user.errors.any? %> -
-

<%= pluralize(user.errors.count, "error") %> prohibited this user from being saved:

- - -
- <% end %> - -
- <%= form.label :email_address %> - <%= form.text_field :email_address %> -
- -
- <%= form.label :password %> - <%= form.text_field :password %> -
- -
- <%= form.label :avatar %> - <%= form.file_field :avatar %> -
- -
- <%= form.submit %> -
-<% end %> diff --git a/sample_app_old/app/views/users/_user.json.jbuilder b/sample_app_old/app/views/users/_user.json.jbuilder deleted file mode 100644 index 7ee04b3d..00000000 --- a/sample_app_old/app/views/users/_user.json.jbuilder +++ /dev/null @@ -1,2 +0,0 @@ -json.extract! user, :id, :email_address, :password, :created_at, :updated_at -json.url user_url(user, format: :json) diff --git a/sample_app_old/app/views/users/edit.html.erb b/sample_app_old/app/views/users/edit.html.erb deleted file mode 100644 index 1a5c2a64..00000000 --- a/sample_app_old/app/views/users/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing User

- -<%= render 'form', user: @user %> - -<%= link_to 'Show', @user %> | -<%= link_to 'Back', users_path %> diff --git a/sample_app_old/app/views/users/index.html.erb b/sample_app_old/app/views/users/index.html.erb deleted file mode 100644 index adf705dd..00000000 --- a/sample_app_old/app/views/users/index.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -

<%= notice %>

- -

Users

- - - - - - - - - - - - <% @users.each do |user| %> - - - - - - - - <% end %> - -
Email addressPassword
<%= user.email_address %><%= user.password %><%= link_to 'Show', user %><%= link_to 'Edit', edit_user_path(user) %><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %>
- -
- -<%= link_to 'New User', new_user_path %> diff --git a/sample_app_old/app/views/users/index.json.jbuilder b/sample_app_old/app/views/users/index.json.jbuilder deleted file mode 100644 index 98788dad..00000000 --- a/sample_app_old/app/views/users/index.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.array! @users, partial: "users/user", as: :user diff --git a/sample_app_old/app/views/users/new.html.erb b/sample_app_old/app/views/users/new.html.erb deleted file mode 100644 index 844c39b1..00000000 --- a/sample_app_old/app/views/users/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New User

- -<%= render 'form', user: @user %> - -<%= link_to 'Back', users_path %> diff --git a/sample_app_old/app/views/users/show.html.erb b/sample_app_old/app/views/users/show.html.erb deleted file mode 100644 index 28121950..00000000 --- a/sample_app_old/app/views/users/show.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -

<%= notice %>

- -

- Email address: - <%= @user.email_address %> -

- -

- Password: - <%= @user.password %> -

- -

- Avatar: - <%= @user.avatar %> -

- -<%= link_to 'Edit', edit_user_path(@user) %> | -<%= link_to 'Back', users_path %> diff --git a/sample_app_old/app/views/users/show.json.jbuilder b/sample_app_old/app/views/users/show.json.jbuilder deleted file mode 100644 index ff40bb96..00000000 --- a/sample_app_old/app/views/users/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.partial! "users/user", user: @user diff --git a/sample_app_old/babel.config.js b/sample_app_old/babel.config.js deleted file mode 100644 index 4df19493..00000000 --- a/sample_app_old/babel.config.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports = function(api) { - var validEnv = ['development', 'test', 'production'] - var currentEnv = api.env() - var isDevelopmentEnv = api.env('development') - var isProductionEnv = api.env('production') - var isTestEnv = api.env('test') - - if (!validEnv.includes(currentEnv)) { - throw new Error( - 'Please specify a valid `NODE_ENV` or ' + - '`BABEL_ENV` environment variables. Valid values are "development", ' + - '"test", and "production". Instead, received: ' + - JSON.stringify(currentEnv) + - '.' - ) - } - - return { - presets: [ - isTestEnv && [ - '@babel/preset-env', - { - targets: { - node: 'current' - } - } - ], - (isProductionEnv || isDevelopmentEnv) && [ - '@babel/preset-env', - { - forceAllTransforms: true, - useBuiltIns: 'entry', - corejs: 3, - modules: false, - exclude: ['transform-typeof-symbol'] - } - ] - ].filter(Boolean), - plugins: [ - 'babel-plugin-macros', - '@babel/plugin-syntax-dynamic-import', - isTestEnv && 'babel-plugin-dynamic-import-node', - '@babel/plugin-transform-destructuring', - [ - '@babel/plugin-proposal-class-properties', - { - loose: true - } - ], - [ - '@babel/plugin-proposal-object-rest-spread', - { - useBuiltIns: true - } - ], - [ - '@babel/plugin-transform-runtime', - { - helpers: false - } - ], - [ - '@babel/plugin-transform-regenerator', - { - async: false - } - ] - ].filter(Boolean) - } -} diff --git a/sample_app_old/bin/bundle b/sample_app_old/bin/bundle deleted file mode 100755 index a71368e3..00000000 --- a/sample_app_old/bin/bundle +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'bundle' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "rubygems" - -m = Module.new do - module_function - - def invoked_as_script? - File.expand_path($0) == File.expand_path(__FILE__) - end - - def env_var_version - ENV["BUNDLER_VERSION"] - end - - def cli_arg_version - return unless invoked_as_script? # don't want to hijack other binstubs - return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` - bundler_version = nil - update_index = nil - ARGV.each_with_index do |a, i| - if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN - bundler_version = a - end - next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ - bundler_version = $1 - update_index = i - end - bundler_version - end - - def gemfile - gemfile = ENV["BUNDLE_GEMFILE"] - return gemfile if gemfile && !gemfile.empty? - - File.expand_path("../../Gemfile", __FILE__) - end - - def lockfile - lockfile = - case File.basename(gemfile) - when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) - else "#{gemfile}.lock" - end - File.expand_path(lockfile) - end - - def lockfile_version - return unless File.file?(lockfile) - lockfile_contents = File.read(lockfile) - return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ - Regexp.last_match(1) - end - - def bundler_version - @bundler_version ||= - env_var_version || cli_arg_version || - lockfile_version - end - - def bundler_requirement - return "#{Gem::Requirement.default}.a" unless bundler_version - - bundler_gem_version = Gem::Version.new(bundler_version) - - requirement = bundler_gem_version.approximate_recommendation - - return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") - - requirement += ".a" if bundler_gem_version.prerelease? - - requirement - end - - def load_bundler! - ENV["BUNDLE_GEMFILE"] ||= gemfile - - activate_bundler - end - - def activate_bundler - gem_error = activation_error_handling do - gem "bundler", bundler_requirement - end - return if gem_error.nil? - require_error = activation_error_handling do - require "bundler/version" - end - return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) - warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" - exit 42 - end - - def activation_error_handling - yield - nil - rescue StandardError, LoadError => e - e - end -end - -m.load_bundler! - -if m.invoked_as_script? - load Gem.bin_path("bundler", "bundle") -end diff --git a/sample_app_old/bin/rails b/sample_app_old/bin/rails deleted file mode 100755 index efc03774..00000000 --- a/sample_app_old/bin/rails +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -APP_PATH = File.expand_path("../config/application", __dir__) -require_relative "../config/boot" -require "rails/commands" diff --git a/sample_app_old/bin/rake b/sample_app_old/bin/rake deleted file mode 100755 index 4fbf10b9..00000000 --- a/sample_app_old/bin/rake +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require_relative "../config/boot" -require "rake" -Rake.application.run diff --git a/sample_app_old/bin/setup b/sample_app_old/bin/setup deleted file mode 100755 index ec47b79b..00000000 --- a/sample_app_old/bin/setup +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env ruby -require "fileutils" - -# path to your application root. -APP_ROOT = File.expand_path("..", __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -FileUtils.chdir APP_ROOT do - # This script is a way to set up or update your development environment automatically. - # This script is idempotent, so that you can run it at any time and get an expectable outcome. - # Add necessary setup steps to this file. - - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # FileUtils.cp "config/database.yml.sample", "config/database.yml" - # end - - puts "\n== Preparing database ==" - system! "bin/rails db:prepare" - - puts "\n== Removing old logs and tempfiles ==" - system! "bin/rails log:clear tmp:clear" - - puts "\n== Restarting application server ==" - system! "bin/rails restart" -end diff --git a/sample_app_old/bin/spring b/sample_app_old/bin/spring deleted file mode 100755 index 89f6161e..00000000 --- a/sample_app_old/bin/spring +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ruby -if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"]) - # Load Spring without loading other gems in the Gemfile, for speed. - require "bundler" - Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring| - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem "spring", spring.version - require "spring/binstub" - end -end diff --git a/sample_app_old/bin/start_server b/sample_app_old/bin/start_server deleted file mode 100755 index dda5879f..00000000 --- a/sample_app_old/bin/start_server +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -e - -bundle install --jobs=4 - -if [ -e /workspace/sample_app/tmp/pids/*.pid ]; then rm /workspace/sample_app/tmp/pids/*.pid; fi - -bundle exec rails db:prepare - -aws sqs --endpoint $AWS_ENDPOINT_URL create-queue --queue-name async-job-queue --no-cli-pager -aws ses --endpoint $AWS_ENDPOINT_URL verify-email-identity --email $ACTION_MAILER_EMAIL - -bin/rails runner Aws::SessionStore::DynamoDB::Table.create_table - -exec "$@" diff --git a/sample_app_old/bin/webpack b/sample_app_old/bin/webpack deleted file mode 100755 index 1031168d..00000000 --- a/sample_app_old/bin/webpack +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" -ENV["NODE_ENV"] ||= "development" - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require "bundler/setup" - -require "webpacker" -require "webpacker/webpack_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Webpacker::WebpackRunner.run(ARGV) -end diff --git a/sample_app_old/bin/webpack-dev-server b/sample_app_old/bin/webpack-dev-server deleted file mode 100755 index dd966273..00000000 --- a/sample_app_old/bin/webpack-dev-server +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" -ENV["NODE_ENV"] ||= "development" - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require "bundler/setup" - -require "webpacker" -require "webpacker/dev_server_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Webpacker::DevServerRunner.run(ARGV) -end diff --git a/sample_app_old/bin/yarn b/sample_app_old/bin/yarn deleted file mode 100755 index 241546e5..00000000 --- a/sample_app_old/bin/yarn +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' - -APP_ROOT = File.expand_path('..', __dir__) -Dir.chdir(APP_ROOT) do - executable_path = ENV["PATH"].split(File::PATH_SEPARATOR).find do |path| - normalized_path = File.expand_path(path) - - normalized_path != __dir__ && File.executable?(Pathname.new(normalized_path).join('yarn')) - end - - if executable_path - exec File.expand_path(Pathname.new(executable_path).join('yarn')), *ARGV - else - $stderr.puts "Yarn executable was not detected in the system." - $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 - end -end diff --git a/sample_app_old/config.ru b/sample_app_old/config.ru deleted file mode 100644 index 4a3c09a6..00000000 --- a/sample_app_old/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require_relative "config/environment" - -run Rails.application -Rails.application.load_server diff --git a/sample_app_old/config/application.rb b/sample_app_old/config/application.rb deleted file mode 100644 index 65f1d388..00000000 --- a/sample_app_old/config/application.rb +++ /dev/null @@ -1,28 +0,0 @@ -require_relative 'boot' - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module SampleApp - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 - - # Configuration for the application, engines, and railties goes here. - # - # These settings can be overridden in specific environments using the files - # in config/environments, which are processed later. - # - # config.time_zone = "Central Time (US & Canada)" - # config.eager_load_paths << Rails.root.join("extras") - - # Use the :sqs_async (non blocking) - # adapter from the aws-sdk-rails package - # To poll for and run jobs you'll need to start a worker process: - # bundle exec aws_sqs_active_job --queue default - config.active_job.queue_adapter = :sqs_async - end -end diff --git a/sample_app_old/config/aws_sqs_active_job.yml b/sample_app_old/config/aws_sqs_active_job.yml deleted file mode 100644 index 090b2980..00000000 --- a/sample_app_old/config/aws_sqs_active_job.yml +++ /dev/null @@ -1,4 +0,0 @@ -queues: - default: <%= ENV['AWS_ACTIVE_JOB_QUEUE_URL'] %> -shutdown_timeout: 10 -retry_standard_errors: true \ No newline at end of file diff --git a/sample_app_old/config/boot.rb b/sample_app_old/config/boot.rb deleted file mode 100644 index 988a5ddc..00000000 --- a/sample_app_old/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -require "bundler/setup" # Set up gems listed in the Gemfile. -require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/sample_app_old/config/cable.yml b/sample_app_old/config/cable.yml deleted file mode 100644 index 2d811267..00000000 --- a/sample_app_old/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: test - -production: - adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: sample_app_production diff --git a/sample_app_old/config/credentials.yml.enc b/sample_app_old/config/credentials.yml.enc deleted file mode 100644 index 308f6e39..00000000 --- a/sample_app_old/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -bpvE30zngTM5UpVk5uqNzLjFQzM4HTqEHygfya+w9eX3xGFa7oxb0sPTFXHrabMyBEPoAzz+36jtvVvndK1KJvSNVX6u5c1oGPohWz7Xi73yfi6NK67MqV5QqSB4ufzkqPTUT8JZH/JJPJXWDJgA7Jli23jw5jritNwlkROVZaTzcEI7bWqCeXZY+FWz8+0KzX5ZtXSn+hbElHM1oNzXQLCuLWSE5X7rxYeWQBXW2zFq0VnMYGomd4x68S9tJRTdFg1rOz8HEd4yfJRqcdlEoK7yOr8xIzWWv00KOEsEaEe2AR9pIalihl5xqXt8R2i7F0t9dJhl2RTkiXc0s2rcYof+HgQUSPTPkEXhJly+OruGfhgz2g1zSeuisA+e145LV+C3rdHf3sZRC0bbcyO5ufu/1egCZLVOmHHj--o5v/XQGGBlLkv5xy--UDQQUs57M7Jt18dRJ0nzUA== \ No newline at end of file diff --git a/sample_app_old/config/database.yml b/sample_app_old/config/database.yml deleted file mode 100644 index 4a8a1b26..00000000 --- a/sample_app_old/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite. Versions 3.8.0 and up are supported. -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - timeout: 5000 - -development: - <<: *default - database: db/development.sqlite3 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: db/test.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/sample_app_old/config/dynamo_db_session_store.yml b/sample_app_old/config/dynamo_db_session_store.yml deleted file mode 100644 index a5ffd6ae..00000000 --- a/sample_app_old/config/dynamo_db_session_store.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Uncomment and manipulate the key value pairs below -# in order to configure the DynamoDB Session Store Application. - -# [String] The secret key for HMAC encryption. This defaults to -# `Rails.application.secret_key_base`. You can use a different key if desired. -# -# secret_key: SECRET_KEY - -# [String] Session table name. -# -# table_name: Sessions - -# [String] Session table hash key name. -# -# table_key: session_id - -# [Boolean] Define as true or false depending on if you want a strongly -# consistent read. -# See AWS DynamoDB documentation for table consistent_read for more -# information on this setting. -# -# consistent_read: true - -# [Integer] Maximum number of reads consumed per second before -# DynamoDB returns a ThrottlingException. See AWS DynamoDB documentation -# or table read_capacity for more information on this setting. -# -# read_capacity: 10 - -# [Integer] Maximum number of writes consumed per second before -# DynamoDB returns a ThrottlingException. See AWS DynamoDB documentation -# or table write_capacity for more information on this setting. -# -# write_capacity: 5 - -# [Boolean] Define as true or false depending on whether you want all errors to be -# raised up the stack. -# -# raise_errors: false - -# [Integer] Maximum number of seconds earlier -# from the current time that a session was created. -# By default this is 7 days. -# -# max_age: 604800 - -# [Integer] Maximum number of seconds -# before the current time that the session was last accessed. -# By default this is 5 hours. -# -# max_stale: 18000 - -# [Boolean] Define as true or false for whether you want to enable locking -# for all accesses to session data. -# -# enable_locking: false - -# [Integer] Time in milleseconds after which lock will expire. -# -# lock_expiry_time: 500 - -# [Integer] Time in milleseconds to wait before retrying to obtain -# lock once an attempt to obtain lock has been made and has failed. -# -# lock_retry_delay: 500 - -# [Integer] Maximum time in seconds to wait to acquire lock -# before giving up. -# -# lock_max_wait_time: 1 diff --git a/sample_app_old/config/dynamo_db_session_store/test.yml b/sample_app_old/config/dynamo_db_session_store/test.yml deleted file mode 100644 index a5ffd6ae..00000000 --- a/sample_app_old/config/dynamo_db_session_store/test.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Uncomment and manipulate the key value pairs below -# in order to configure the DynamoDB Session Store Application. - -# [String] The secret key for HMAC encryption. This defaults to -# `Rails.application.secret_key_base`. You can use a different key if desired. -# -# secret_key: SECRET_KEY - -# [String] Session table name. -# -# table_name: Sessions - -# [String] Session table hash key name. -# -# table_key: session_id - -# [Boolean] Define as true or false depending on if you want a strongly -# consistent read. -# See AWS DynamoDB documentation for table consistent_read for more -# information on this setting. -# -# consistent_read: true - -# [Integer] Maximum number of reads consumed per second before -# DynamoDB returns a ThrottlingException. See AWS DynamoDB documentation -# or table read_capacity for more information on this setting. -# -# read_capacity: 10 - -# [Integer] Maximum number of writes consumed per second before -# DynamoDB returns a ThrottlingException. See AWS DynamoDB documentation -# or table write_capacity for more information on this setting. -# -# write_capacity: 5 - -# [Boolean] Define as true or false depending on whether you want all errors to be -# raised up the stack. -# -# raise_errors: false - -# [Integer] Maximum number of seconds earlier -# from the current time that a session was created. -# By default this is 7 days. -# -# max_age: 604800 - -# [Integer] Maximum number of seconds -# before the current time that the session was last accessed. -# By default this is 5 hours. -# -# max_stale: 18000 - -# [Boolean] Define as true or false for whether you want to enable locking -# for all accesses to session data. -# -# enable_locking: false - -# [Integer] Time in milleseconds after which lock will expire. -# -# lock_expiry_time: 500 - -# [Integer] Time in milleseconds to wait before retrying to obtain -# lock once an attempt to obtain lock has been made and has failed. -# -# lock_retry_delay: 500 - -# [Integer] Maximum time in seconds to wait to acquire lock -# before giving up. -# -# lock_max_wait_time: 1 diff --git a/sample_app_old/config/environment.rb b/sample_app_old/config/environment.rb deleted file mode 100644 index cac53157..00000000 --- a/sample_app_old/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the Rails application. -require_relative "application" - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/sample_app_old/config/environments/development.rb b/sample_app_old/config/environments/development.rb deleted file mode 100644 index e9f673b8..00000000 --- a/sample_app_old/config/environments/development.rb +++ /dev/null @@ -1,79 +0,0 @@ -require "active_support/core_ext/integer/time" - -Rails.application.configure do - # Our config - config.active_storage.service = :amazon - config.action_mailer.delivery_method = :ses - - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded any time - # it changes. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable/disable caching. By default caching is disabled. - # Run rails dev:cache to toggle caching. - if File.exist?(Rails.root.join('tmp', 'caching-dev.txt')) - config.action_controller.perform_caching = true - config.action_controller.enable_fragment_cache_logging = true - - config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}" - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Store uploaded files on the local file system (see config/storage.yml for options). - # config.active_storage.service = :local - - config.action_mailer.raise_delivery_errors = true - - config.action_mailer.perform_caching = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise exceptions for disallowed deprecations. - config.active_support.disallowed_deprecation = :raise - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Highlight code that triggered database queries in logs. - config.active_record.verbose_query_logs = true - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true - - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - config.file_watcher = ActiveSupport::EventedFileUpdateChecker - - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true -end diff --git a/sample_app_old/config/environments/production.rb b/sample_app_old/config/environments/production.rb deleted file mode 100644 index 28e69365..00000000 --- a/sample_app_old/config/environments/production.rb +++ /dev/null @@ -1,120 +0,0 @@ -require "active_support/core_ext/integer/time" - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.cache_classes = true - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). - # config.require_master_key = true - - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? - - # Compress CSS using a preprocessor. - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = 'http://assets.example.com' - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Mount Action Cable outside main process or domain. - # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info - - # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "sample_app_production" - - config.action_mailer.perform_caching = false - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Log disallowed deprecations. - config.active_support.disallowed_deprecation = :log - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new - - # Use a different logger for distributed setups. - # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') - - if ENV["RAILS_LOG_TO_STDOUT"].present? - logger = ActiveSupport::Logger.new(STDOUT) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false - - # Inserts middleware to perform automatic connection switching. - # The `database_selector` hash is used to pass options to the DatabaseSelector - # middleware. The `delay` is used to determine how long to wait after a write - # to send a subsequent read to the primary. - # - # The `database_resolver` class is used by the middleware to determine which - # database is appropriate to use based on the time delay. - # - # The `database_resolver_context` class is used by the middleware to set - # timestamps for the last write to the primary. The resolver uses the context - # class timestamps to determine how long to wait before reading from the - # replica. - # - # By default Rails will store a last write timestamp in the session. The - # DatabaseSelector middleware is designed as such you can define your own - # strategy for connection switching and pass that into the middleware through - # these configuration options. - # config.active_record.database_selector = { delay: 2.seconds } - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session -end diff --git a/sample_app_old/config/environments/test.rb b/sample_app_old/config/environments/test.rb deleted file mode 100644 index 93ed4f1b..00000000 --- a/sample_app_old/config/environments/test.rb +++ /dev/null @@ -1,60 +0,0 @@ -require "active_support/core_ext/integer/time" - -# The test environment is used exclusively to run your application's -# test suite. You never need to work with it otherwise. Remember that -# your test database is "scratch space" for the test suite and is wiped -# and recreated between test runs. Don't rely on the data there! - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - config.cache_classes = false - config.action_view.cache_template_loading = true - - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false - - # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.to_i}" - } - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - config.cache_store = :null_store - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raise exceptions for disallowed deprecations. - config.active_support.disallowed_deprecation = :raise - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true -end diff --git a/sample_app_old/config/initializers/application_controller_renderer.rb b/sample_app_old/config/initializers/application_controller_renderer.rb deleted file mode 100644 index 89d2efab..00000000 --- a/sample_app_old/config/initializers/application_controller_renderer.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# ActiveSupport::Reloader.to_prepare do -# ApplicationController.renderer.defaults.merge!( -# http_host: 'example.org', -# https: false -# ) -# end diff --git a/sample_app_old/config/initializers/assets.rb b/sample_app_old/config/initializers/assets.rb deleted file mode 100644 index 4b828e80..00000000 --- a/sample_app_old/config/initializers/assets.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/sample_app_old/config/initializers/backtrace_silencers.rb b/sample_app_old/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 33699c30..00000000 --- a/sample_app_old/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code -# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". -Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/sample_app_old/config/initializers/content_security_policy.rb b/sample_app_old/config/initializers/content_security_policy.rb deleted file mode 100644 index 35d0f26f..00000000 --- a/sample_app_old/config/initializers/content_security_policy.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy - -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# # If you are using webpack-dev-server then specify webpack-dev-server host -# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? - -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" -# end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Set the nonce only to specific directives -# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/sample_app_old/config/initializers/cookies_serializer.rb b/sample_app_old/config/initializers/cookies_serializer.rb deleted file mode 100644 index 5a6a32d3..00000000 --- a/sample_app_old/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Specify a serializer for the signed and encrypted cookie jars. -# Valid options are :json, :marshal, and :hybrid. -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/sample_app_old/config/initializers/filter_parameter_logging.rb b/sample_app_old/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4b34a036..00000000 --- a/sample_app_old/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,6 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn -] diff --git a/sample_app_old/config/initializers/inflections.rb b/sample_app_old/config/initializers/inflections.rb deleted file mode 100644 index 3860f659..00000000 --- a/sample_app_old/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, "\\1en" -# inflect.singular /^(ox)en/i, "\\1" -# inflect.irregular "person", "people" -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym "RESTful" -# end diff --git a/sample_app_old/config/initializers/instrument_aws_sdk.rb b/sample_app_old/config/initializers/instrument_aws_sdk.rb deleted file mode 100644 index d7881378..00000000 --- a/sample_app_old/config/initializers/instrument_aws_sdk.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Add ActiveNotification instrumentation to all AWS SDK clients -Aws::Rails.instrument_sdk_operations - -# use a regex to subscribe to all Aws notifications -ActiveSupport::Notifications.subscribe(/aws/) do |name, start, finish, id, payload| - # process event - report metrics, whatever is needed. - Rails.logger.info "Recieved an ActiveSupport::Notification for: #{name} event" -end diff --git a/sample_app_old/config/initializers/mime_types.rb b/sample_app_old/config/initializers/mime_types.rb deleted file mode 100644 index dc189968..00000000 --- a/sample_app_old/config/initializers/mime_types.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf diff --git a/sample_app_old/config/initializers/permissions_policy.rb b/sample_app_old/config/initializers/permissions_policy.rb deleted file mode 100644 index 00f64d71..00000000 --- a/sample_app_old/config/initializers/permissions_policy.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Define an application-wide HTTP permissions policy. For further -# information see https://developers.google.com/web/updates/2018/06/feature-policy -# -# Rails.application.config.permissions_policy do |f| -# f.camera :none -# f.gyroscope :none -# f.microphone :none -# f.usb :none -# f.fullscreen :self -# f.payment :self, "https://secure.example.com" -# end diff --git a/sample_app_old/config/initializers/session_store.rb b/sample_app_old/config/initializers/session_store.rb deleted file mode 100644 index 61e7c923..00000000 --- a/sample_app_old/config/initializers/session_store.rb +++ /dev/null @@ -1,2 +0,0 @@ -options = { key: '_sample_app_session' } -Rails.application.config.session_store :dynamo_db_store, **options diff --git a/sample_app_old/config/initializers/wrap_parameters.rb b/sample_app_old/config/initializers/wrap_parameters.rb deleted file mode 100644 index bbfc3961..00000000 --- a/sample_app_old/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# To enable root element in JSON for ActiveRecord objects. -# ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true -# end diff --git a/sample_app_old/config/locales/en.yml b/sample_app_old/config/locales/en.yml deleted file mode 100644 index cf9b342d..00000000 --- a/sample_app_old/config/locales/en.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# The following keys must be escaped otherwise they will not be retrieved by -# the default I18n backend: -# -# true, false, on, off, yes, no -# -# Instead, surround them with single quotes. -# -# en: -# 'true': 'foo' -# -# To learn more, please read the Rails Internationalization guide -# available at https://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/sample_app_old/config/puma.rb b/sample_app_old/config/puma.rb deleted file mode 100644 index d9b3e836..00000000 --- a/sample_app_old/config/puma.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. -# -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } -threads min_threads_count, max_threads_count - -# Specifies the `worker_timeout` threshold that Puma will use to wait before -# terminating a worker in development environments. -# -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -# -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } - -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked web server processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. -# -# preload_app! - -# Allow puma to be restarted by `rails restart` command. -plugin :tmp_restart diff --git a/sample_app_old/config/routes.rb b/sample_app_old/config/routes.rb deleted file mode 100644 index 4623eab7..00000000 --- a/sample_app_old/config/routes.rb +++ /dev/null @@ -1,11 +0,0 @@ -Rails.application.routes.draw do - # for SES ActionMailer - get 'email/index' - post '/send_email', to: 'email#send_email', as: 'send_email' - - # for ActiveStorage - resources :users - - # for SQS ActiveJob - get '/test-job', to: 'application#test_job' -end diff --git a/sample_app_old/config/spring.rb b/sample_app_old/config/spring.rb deleted file mode 100644 index db5bf130..00000000 --- a/sample_app_old/config/spring.rb +++ /dev/null @@ -1,6 +0,0 @@ -Spring.watch( - ".ruby-version", - ".rbenv-vars", - "tmp/restart.txt", - "tmp/caching-dev.txt" -) diff --git a/sample_app_old/config/storage.yml b/sample_app_old/config/storage.yml deleted file mode 100644 index d7d1ff51..00000000 --- a/sample_app_old/config/storage.yml +++ /dev/null @@ -1,37 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -amazon: - service: S3 - # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> - # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> - region: us-west-2 - bucket: <%= ENV['ACTIVE_STORAGE_BUCKET'] %> - http_wire_trace: true - upload: - multipart_threshold: <%= 10.megabytes %> - -# Remember not to checkin your GCS keyfile to a repository -# google: -# service: GCS -# project: your_project -# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> -# bucket: your_own_bucket - -# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) -# microsoft: -# service: AzureStorage -# storage_account_name: your_account_name -# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> -# container: your_container_name - -# mirror: -# service: Mirror -# primary: local -# mirrors: [ amazon, google, microsoft ] diff --git a/sample_app_old/config/webpack/development.js b/sample_app_old/config/webpack/development.js deleted file mode 100644 index c5edff94..00000000 --- a/sample_app_old/config/webpack/development.js +++ /dev/null @@ -1,5 +0,0 @@ -process.env.NODE_ENV = process.env.NODE_ENV || 'development' - -const environment = require('./environment') - -module.exports = environment.toWebpackConfig() diff --git a/sample_app_old/config/webpack/environment.js b/sample_app_old/config/webpack/environment.js deleted file mode 100644 index d16d9af7..00000000 --- a/sample_app_old/config/webpack/environment.js +++ /dev/null @@ -1,3 +0,0 @@ -const { environment } = require('@rails/webpacker') - -module.exports = environment diff --git a/sample_app_old/config/webpack/production.js b/sample_app_old/config/webpack/production.js deleted file mode 100644 index be0f53aa..00000000 --- a/sample_app_old/config/webpack/production.js +++ /dev/null @@ -1,5 +0,0 @@ -process.env.NODE_ENV = process.env.NODE_ENV || 'production' - -const environment = require('./environment') - -module.exports = environment.toWebpackConfig() diff --git a/sample_app_old/config/webpack/test.js b/sample_app_old/config/webpack/test.js deleted file mode 100644 index c5edff94..00000000 --- a/sample_app_old/config/webpack/test.js +++ /dev/null @@ -1,5 +0,0 @@ -process.env.NODE_ENV = process.env.NODE_ENV || 'development' - -const environment = require('./environment') - -module.exports = environment.toWebpackConfig() diff --git a/sample_app_old/config/webpacker.yml b/sample_app_old/config/webpacker.yml deleted file mode 100644 index a6b14656..00000000 --- a/sample_app_old/config/webpacker.yml +++ /dev/null @@ -1,92 +0,0 @@ -# Note: You must restart bin/webpack-dev-server for changes to take effect - -default: &default - source_path: app/javascript - source_entry_path: packs - public_root_path: public - public_output_path: packs - cache_path: tmp/cache/webpacker - webpack_compile_output: true - - # Additional paths webpack should lookup modules - # ['app/assets', 'engine/foo/app/assets'] - additional_paths: [] - - # Reload manifest.json on all requests so we reload latest compiled packs - cache_manifest: false - - # Extract and emit a css file - extract_css: false - - static_assets_extensions: - - .jpg - - .jpeg - - .png - - .gif - - .tiff - - .ico - - .svg - - .eot - - .otf - - .ttf - - .woff - - .woff2 - - extensions: - - .mjs - - .js - - .sass - - .scss - - .css - - .module.sass - - .module.scss - - .module.css - - .png - - .svg - - .gif - - .jpeg - - .jpg - -development: - <<: *default - compile: true - - # Reference: https://webpack.js.org/configuration/dev-server/ - dev_server: - https: false - host: localhost - port: 3035 - public: localhost:3035 - hmr: false - # Inline should be set to true if using HMR - inline: true - overlay: true - compress: true - disable_host_check: true - use_local_ip: false - quiet: false - pretty: false - headers: - 'Access-Control-Allow-Origin': '*' - watch_options: - ignored: '**/node_modules/**' - - -test: - <<: *default - compile: true - - # Compile test packs to a separate directory - public_output_path: packs-test - -production: - <<: *default - - # Production depends on precompilation of packs prior to booting for performance. - compile: false - - # Extract and emit a css file - extract_css: true - - # Cache manifest.json for performance - cache_manifest: true diff --git a/sample_app_old/db/migrate/20201210211015_create_users.rb b/sample_app_old/db/migrate/20201210211015_create_users.rb deleted file mode 100644 index 04a5cbce..00000000 --- a/sample_app_old/db/migrate/20201210211015_create_users.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateUsers < ActiveRecord::Migration[6.1] - def change - create_table :users do |t| - t.string :email_address - t.string :password - - t.timestamps - end - end -end diff --git a/sample_app_old/db/migrate/20201210211818_create_active_storage_tables.active_storage.rb b/sample_app_old/db/migrate/20201210211818_create_active_storage_tables.active_storage.rb deleted file mode 100644 index 87798267..00000000 --- a/sample_app_old/db/migrate/20201210211818_create_active_storage_tables.active_storage.rb +++ /dev/null @@ -1,36 +0,0 @@ -# This migration comes from active_storage (originally 20170806125915) -class CreateActiveStorageTables < ActiveRecord::Migration[5.2] - def change - create_table :active_storage_blobs do |t| - t.string :key, null: false - t.string :filename, null: false - t.string :content_type - t.text :metadata - t.string :service_name, null: false - t.bigint :byte_size, null: false - t.string :checksum, null: false - t.datetime :created_at, null: false - - t.index [ :key ], unique: true - end - - create_table :active_storage_attachments do |t| - t.string :name, null: false - t.references :record, null: false, polymorphic: true, index: false - t.references :blob, null: false - - t.datetime :created_at, null: false - - t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true - t.foreign_key :active_storage_blobs, column: :blob_id - end - - create_table :active_storage_variant_records do |t| - t.belongs_to :blob, null: false, index: false - t.string :variation_digest, null: false - - t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true - t.foreign_key :active_storage_blobs, column: :blob_id - end - end -end diff --git a/sample_app_old/db/migrate/20201211003109_create_dynamo_db_sessions_table.rb b/sample_app_old/db/migrate/20201211003109_create_dynamo_db_sessions_table.rb deleted file mode 100644 index 1e4a5486..00000000 --- a/sample_app_old/db/migrate/20201211003109_create_dynamo_db_sessions_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateDynamoDbSessionsTable < ActiveRecord::Migration[6.1] - def up - Aws::SessionStore::DynamoDB::Table.create_table - end - - def down - Aws::SessionStore::DynamoDB::Table.delete_table - end -end diff --git a/sample_app_old/db/schema.rb b/sample_app_old/db/schema.rb deleted file mode 100644 index b4c493e5..00000000 --- a/sample_app_old/db/schema.rb +++ /dev/null @@ -1,51 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# This file is the source Rails uses to define your schema when running `bin/rails -# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to -# be faster and is potentially less error prone than running all of your -# migrations from scratch. Old migrations may fail to apply correctly if those -# migrations use external dependencies or application code. -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema[7.2].define(version: 2024_10_20_210519) do - create_table "active_storage_attachments", force: :cascade do |t| - t.string "name", null: false - t.string "record_type", null: false - t.integer "record_id", null: false - t.integer "blob_id", null: false - t.datetime "created_at", precision: nil, null: false - t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" - t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true - end - - create_table "active_storage_blobs", force: :cascade do |t| - t.string "key", null: false - t.string "filename", null: false - t.string "content_type" - t.text "metadata" - t.string "service_name", null: false - t.bigint "byte_size", null: false - t.string "checksum", null: false - t.datetime "created_at", precision: nil, null: false - t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true - end - - create_table "active_storage_variant_records", force: :cascade do |t| - t.integer "blob_id", null: false - t.string "variation_digest", null: false - t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true - end - - create_table "users", force: :cascade do |t| - t.string "email_address" - t.string "password" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" - add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" -end diff --git a/sample_app_old/db/seeds.rb b/sample_app_old/db/seeds.rb deleted file mode 100644 index f3a0480d..00000000 --- a/sample_app_old/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). -# -# Examples: -# -# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) -# Character.create(name: 'Luke', movie: movies.first) diff --git a/sample_app_old/db/table_config/forum_config.rb b/sample_app_old/db/table_config/forum_config.rb deleted file mode 100644 index f720771e..00000000 --- a/sample_app_old/db/table_config/forum_config.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'aws-record' - -module ModelTableConfig - def self.config - Aws::Record::TableConfig.define do |t| - t.model_class Forum - - t.read_capacity_units 10 - t.write_capacity_units 5 - end - end -end diff --git a/sample_app_old/docker-compose.yml b/sample_app_old/docker-compose.yml deleted file mode 100644 index bd3db0c0..00000000 --- a/sample_app_old/docker-compose.yml +++ /dev/null @@ -1,57 +0,0 @@ -version: '3' - -services: - application-server: - build: - context: . - dockerfile: ./Dockerfile - command: ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"] - environment: - AWS_ENDPOINT_URL: http://localstack:4566 - AWS_REGION: us-east-1 - AWS_ACCESS_KEY_ID: dummy - AWS_SECRET_ACCESS_KEY: dummy - AWS_ACTIVE_JOB_QUEUE_URL: http://localstack:4566/000000000000/async-job-queue - ACTION_MAILER_EMAIL: 'sender@example.com' - volumes: - - bundle:/usr/local/bundle - - ./..:/workspace - ports: - - "3000:3000" - depends_on: - - localstack - tty: true - stdin_open: true - application-worker: - build: - context: . - dockerfile: ./Dockerfile - command: ["bundle", "exec", "aws_sqs_active_job", "--queue", "default"] - environment: - AWS_ENDPOINT_URL: http://localstack:4566 - AWS_REGION: us-east-1 - AWS_ACCESS_KEY_ID: dummy - AWS_SECRET_ACCESS_KEY: dummy - AWS_ACTIVE_JOB_QUEUE_URL: http://localstack:4566/000000000000/async-job-queue - ACTION_MAILER_EMAIL: 'sender@example.com' - volumes: - - bundle:/usr/local/bundle - - ./..:/workspace - tty: true - localstack: - image: localstack/localstack - ports: - - "4566:4566" - - "4510-4559:4510-4559" - dynamodb-console: - image: aaronshaf/dynamodb-admin - environment: - DYNAMO_ENDPOINT: http://localstack:4566 - ports: - - "8001:8001" - depends_on: - - localstack - -volumes: - bundle: - driver: local diff --git a/sample_app_old/lib/assets/.keep b/sample_app_old/lib/assets/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/lib/tasks/.keep b/sample_app_old/lib/tasks/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/log/.keep b/sample_app_old/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/package.json b/sample_app_old/package.json deleted file mode 100644 index 86f5b5b9..00000000 --- a/sample_app_old/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "sample-app", - "private": true, - "dependencies": { - "@rails/actioncable": "^6.0.0", - "@rails/activestorage": "^6.0.0", - "@rails/ujs": "^6.0.0", - "@rails/webpacker": "5.2.1", - "turbolinks": "^5.2.0" - }, - "version": "0.1.0", - "devDependencies": { - "webpack-dev-server": "^3.11.0" - } -} diff --git a/sample_app_old/postcss.config.js b/sample_app_old/postcss.config.js deleted file mode 100644 index aa5998a8..00000000 --- a/sample_app_old/postcss.config.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - plugins: [ - require('postcss-import'), - require('postcss-flexbugs-fixes'), - require('postcss-preset-env')({ - autoprefixer: { - flexbox: 'no-2009' - }, - stage: 3 - }) - ] -} diff --git a/sample_app_old/public/404.html b/sample_app_old/public/404.html deleted file mode 100644 index 2be3af26..00000000 --- a/sample_app_old/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/sample_app_old/public/422.html b/sample_app_old/public/422.html deleted file mode 100644 index c08eac0d..00000000 --- a/sample_app_old/public/422.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - - -
-
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/sample_app_old/public/500.html b/sample_app_old/public/500.html deleted file mode 100644 index 78a030af..00000000 --- a/sample_app_old/public/500.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - - -
-
-

We're sorry, but something went wrong.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/sample_app_old/public/apple-touch-icon-precomposed.png b/sample_app_old/public/apple-touch-icon-precomposed.png deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/public/apple-touch-icon.png b/sample_app_old/public/apple-touch-icon.png deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/public/favicon.ico b/sample_app_old/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/public/robots.txt b/sample_app_old/public/robots.txt deleted file mode 100644 index c19f78ab..00000000 --- a/sample_app_old/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/sample_app_old/storage/.keep b/sample_app_old/storage/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/application_system_test_case.rb b/sample_app_old/test/application_system_test_case.rb deleted file mode 100644 index d19212ab..00000000 --- a/sample_app_old/test/application_system_test_case.rb +++ /dev/null @@ -1,5 +0,0 @@ -require "test_helper" - -class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -end diff --git a/sample_app_old/test/channels/application_cable/connection_test.rb b/sample_app_old/test/channels/application_cable/connection_test.rb deleted file mode 100644 index 800405f1..00000000 --- a/sample_app_old/test/channels/application_cable/connection_test.rb +++ /dev/null @@ -1,11 +0,0 @@ -require "test_helper" - -class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase - # test "connects with cookies" do - # cookies.signed[:user_id] = 42 - # - # connect - # - # assert_equal connection.user_id, "42" - # end -end diff --git a/sample_app_old/test/controllers/.keep b/sample_app_old/test/controllers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/controllers/email_controller_test.rb b/sample_app_old/test/controllers/email_controller_test.rb deleted file mode 100644 index 023f6486..00000000 --- a/sample_app_old/test/controllers/email_controller_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -require "test_helper" - -class EmailControllerTest < ActionDispatch::IntegrationTest - test "should get index" do - get email_index_url - assert_response :success - end -end diff --git a/sample_app_old/test/controllers/users_controller_test.rb b/sample_app_old/test/controllers/users_controller_test.rb deleted file mode 100644 index 479ef926..00000000 --- a/sample_app_old/test/controllers/users_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "test_helper" - -class UsersControllerTest < ActionDispatch::IntegrationTest - setup do - @user = users(:one) - end - - test "should get index" do - get users_url - assert_response :success - end - - test "should get new" do - get new_user_url - assert_response :success - end - - test "should create user" do - assert_difference('User.count') do - post users_url, params: { user: { email_address: @user.email_address, password: @user.password } } - end - - assert_redirected_to user_url(User.last) - end - - test "should show user" do - get user_url(@user) - assert_response :success - end - - test "should get edit" do - get edit_user_url(@user) - assert_response :success - end - - test "should update user" do - patch user_url(@user), params: { user: { email_address: @user.email_address, password: @user.password } } - assert_redirected_to user_url(@user) - end - - test "should destroy user" do - assert_difference('User.count', -1) do - delete user_url(@user) - end - - assert_redirected_to users_url - end -end diff --git a/sample_app_old/test/fixtures/files/.keep b/sample_app_old/test/fixtures/files/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/fixtures/users.yml b/sample_app_old/test/fixtures/users.yml deleted file mode 100644 index cf1b3456..00000000 --- a/sample_app_old/test/fixtures/users.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - email_address: MyString - password: MyString - -two: - email_address: MyString - password: MyString diff --git a/sample_app_old/test/helpers/.keep b/sample_app_old/test/helpers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/integration/.keep b/sample_app_old/test/integration/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/mailers/.keep b/sample_app_old/test/mailers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/mailers/my_mailer_test.rb b/sample_app_old/test/mailers/my_mailer_test.rb deleted file mode 100644 index e0cae420..00000000 --- a/sample_app_old/test/mailers/my_mailer_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class MyMailerTest < ActionMailer::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/sample_app_old/test/mailers/previews/my_mailer_preview.rb b/sample_app_old/test/mailers/previews/my_mailer_preview.rb deleted file mode 100644 index 2adcbbce..00000000 --- a/sample_app_old/test/mailers/previews/my_mailer_preview.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Preview all emails at http://localhost:3000/rails/mailers/my_mailer -class MyMailerPreview < ActionMailer::Preview - -end diff --git a/sample_app_old/test/models/.keep b/sample_app_old/test/models/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/models/user_test.rb b/sample_app_old/test/models/user_test.rb deleted file mode 100644 index 5c07f490..00000000 --- a/sample_app_old/test/models/user_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class UserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/sample_app_old/test/system/.keep b/sample_app_old/test/system/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/test/system/users_test.rb b/sample_app_old/test/system/users_test.rb deleted file mode 100644 index c7e55617..00000000 --- a/sample_app_old/test/system/users_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "application_system_test_case" - -class UsersTest < ApplicationSystemTestCase - setup do - @user = users(:one) - end - - test "visiting the index" do - visit users_url - assert_selector "h1", text: "Users" - end - - test "creating a User" do - visit users_url - click_on "New User" - - fill_in "Email address", with: @user.email_address - fill_in "Password", with: @user.password - click_on "Create User" - - assert_text "User was successfully created" - click_on "Back" - end - - test "updating a User" do - visit users_url - click_on "Edit", match: :first - - fill_in "Email address", with: @user.email_address - fill_in "Password", with: @user.password - click_on "Update User" - - assert_text "User was successfully updated" - click_on "Back" - end - - test "destroying a User" do - visit users_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "User was successfully destroyed" - end -end diff --git a/sample_app_old/test/test_helper.rb b/sample_app_old/test/test_helper.rb deleted file mode 100644 index 47b598de..00000000 --- a/sample_app_old/test/test_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -ENV['RAILS_ENV'] ||= 'test' -require_relative "../config/environment" -require "rails/test_help" - -class ActiveSupport::TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/sample_app_old/tmp/.keep b/sample_app_old/tmp/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/sample_app_old/tmp/pids/.keep b/sample_app_old/tmp/pids/.keep deleted file mode 100644 index e69de29b..00000000