From bce1cd6e62652afd8f280bae2843447c96d4cb15 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 23 Feb 2025 19:42:18 +0100 Subject: [PATCH 1/2] Add Rails 8 --- .github/workflows/ruby.yml | 19 +++ specs_e2e/rails_5_2/Gemfile | 15 -- .../rails_5_2/app/assets/javascripts/posts.js | 2 - .../app/assets/stylesheets/posts.css | 4 - .../app/assets/stylesheets/scaffold.css | 80 ----------- .../app/controllers/application_controller.rb | 2 - .../rails_5_2/app/jobs/application_job.rb | 2 - .../app/views/layouts/application.html.erb | 12 -- .../app/views/welcome/index.html.erb | 5 - specs_e2e/rails_5_2/bin/bundle | 3 - specs_e2e/rails_5_2/bin/rails | 4 - specs_e2e/rails_5_2/bin/rake | 4 - specs_e2e/rails_5_2/bin/setup | 25 ---- specs_e2e/rails_5_2/bin/update | 25 ---- specs_e2e/rails_5_2/config/application.rb | 33 ----- specs_e2e/rails_5_2/config/boot.rb | 4 - .../rails_5_2/config/credentials.yml.enc | 1 - specs_e2e/rails_5_2/config/database.yml | 15 -- .../config/environments/development.rb | 40 ------ .../config/environments/production.rb | 68 --------- .../rails_5_2/config/environments/test.rb | 36 ----- .../application_controller_renderer.rb | 8 -- .../initializers/backtrace_silencers.rb | 7 - .../initializers/content_security_policy.rb | 25 ---- .../config/initializers/cookies_serializer.rb | 5 - .../initializers/filter_parameter_logging.rb | 4 - .../config/initializers/mime_types.rb | 4 - .../config/initializers/wrap_parameters.rb | 9 -- specs_e2e/rails_5_2/config/locales/en.yml | 33 ----- specs_e2e/rails_5_2/config/master.key | 1 - specs_e2e/rails_5_2/public/404.html | 67 --------- specs_e2e/rails_5_2/public/422.html | 67 --------- specs_e2e/rails_5_2/public/500.html | 66 --------- specs_e2e/rails_5_2/public/favicon.ico | 0 specs_e2e/rails_5_2/public/robots.txt | 1 - specs_e2e/rails_8/.gitattributes | 9 ++ specs_e2e/{rails_5_2 => rails_8}/.gitignore | 0 specs_e2e/rails_8/.rubocop.yml | 8 ++ specs_e2e/rails_8/Gemfile | 20 +++ specs_e2e/{rails_5_2 => rails_8}/README.md | 0 specs_e2e/{rails_5_2 => rails_8}/Rakefile | 2 +- .../app/assets/stylesheets/application.css | 10 ++ .../app/controllers/application_controller.rb | 4 + .../app/controllers/posts_controller.rb | 0 .../app/helpers/posts_helper.rb | 0 specs_e2e/rails_8/app/jobs/application_job.rb | 7 + .../app/models/application_record.rb | 2 +- .../{rails_5_2 => rails_8}/app/models/post.rb | 0 .../app/views/layouts/application.html.erb | 27 ++++ .../app/views/posts/_form.html.erb | 0 .../app/views/posts/edit.html.erb | 0 .../app/views/posts/index.html.erb | 0 .../app/views/posts/new.html.erb | 0 .../app/views/posts/show.html.erb | 0 specs_e2e/rails_8/bin/brakeman | 7 + specs_e2e/rails_8/bin/bundle | 109 +++++++++++++++ specs_e2e/rails_8/bin/dev | 2 + specs_e2e/rails_8/bin/importmap | 4 + specs_e2e/rails_8/bin/rails | 4 + specs_e2e/rails_8/bin/rake | 4 + specs_e2e/rails_8/bin/setup | 34 +++++ specs_e2e/rails_8/bin/thrust | 5 + specs_e2e/{rails_5_2 => rails_8}/config.ru | 3 +- specs_e2e/rails_8/config/application.rb | 27 ++++ specs_e2e/rails_8/config/boot.rb | 4 + specs_e2e/rails_8/config/cable.yml | 17 +++ specs_e2e/rails_8/config/cache.yml | 16 +++ specs_e2e/rails_8/config/credentials.yml.enc | 1 + specs_e2e/rails_8/config/database.yml | 41 ++++++ specs_e2e/rails_8/config/deploy.yml | 116 ++++++++++++++++ .../config/environment.rb | 2 +- .../config/environments/development.rb | 57 ++++++++ .../rails_8/config/environments/production.rb | 90 ++++++++++++ specs_e2e/rails_8/config/environments/test.rb | 45 ++++++ specs_e2e/rails_8/config/importmap.rb | 7 + .../initializers/content_security_policy.rb | 25 ++++ .../initializers/filter_parameter_logging.rb | 8 ++ .../config/initializers/inflections.rb | 8 +- specs_e2e/rails_8/config/locales/en.yml | 31 +++++ specs_e2e/rails_8/config/master.key | 1 + specs_e2e/rails_8/config/puma.rb | 41 ++++++ specs_e2e/rails_8/config/queue.yml | 18 +++ specs_e2e/rails_8/config/recurring.yml | 10 ++ .../{rails_5_2 => rails_8}/config/routes.rb | 0 specs_e2e/rails_8/config/storage.yml | 34 +++++ specs_e2e/rails_8/db/cable_schema.rb | 11 ++ specs_e2e/rails_8/db/cache_schema.rb | 14 ++ .../db/migrate/20180621085832_create_posts.rb | 2 +- specs_e2e/rails_8/db/queue_schema.rb | 129 ++++++++++++++++++ specs_e2e/rails_8/db/seeds.rb | 9 ++ specs_e2e/rails_8/package.json | 8 ++ .../rails_8/playwright-report/index.html | 71 ++++++++++ specs_e2e/rails_8/public/400.html | 114 ++++++++++++++++ specs_e2e/rails_8/public/404.html | 114 ++++++++++++++++ .../public/406-unsupported-browser.html | 114 ++++++++++++++++ specs_e2e/rails_8/public/422.html | 114 ++++++++++++++++ specs_e2e/rails_8/public/500.html | 114 ++++++++++++++++ specs_e2e/rails_8/public/icon.png | Bin 0 -> 4166 bytes specs_e2e/rails_8/public/icon.svg | 3 + specs_e2e/rails_8/public/robots.txt | 1 + .../vendor => rails_8/storage}/.keep | 0 specs_e2e/rails_8/storage/test.sqlite3 | Bin 0 -> 28672 bytes specs_e2e/rails_8/storage/test.sqlite3-shm | Bin 0 -> 32768 bytes specs_e2e/rails_8/storage/test.sqlite3-wal | Bin 0 -> 341992 bytes specs_e2e/rails_8/test-results/.last-run.json | 4 + specs_e2e/{rails_5_2 => rails_8}/test.sh | 2 +- .../test/application_system_test_case.rb | 5 + .../test/controllers/posts_controller_test.rb | 0 .../test/cypress_fixtures/posts.yml | 0 .../test/fixtures/posts.yml | 0 .../test/models/post_test.rb | 0 specs_e2e/rails_8/test/test_helper.rb | 15 ++ .../vendor/.keep} | 0 .../vendor/javascript/.keep} | 0 114 files changed, 1713 insertions(+), 687 deletions(-) delete mode 100644 specs_e2e/rails_5_2/Gemfile delete mode 100644 specs_e2e/rails_5_2/app/assets/javascripts/posts.js delete mode 100644 specs_e2e/rails_5_2/app/assets/stylesheets/posts.css delete mode 100644 specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css delete mode 100644 specs_e2e/rails_5_2/app/controllers/application_controller.rb delete mode 100644 specs_e2e/rails_5_2/app/jobs/application_job.rb delete mode 100644 specs_e2e/rails_5_2/app/views/layouts/application.html.erb delete mode 100644 specs_e2e/rails_5_2/app/views/welcome/index.html.erb delete mode 100755 specs_e2e/rails_5_2/bin/bundle delete mode 100755 specs_e2e/rails_5_2/bin/rails delete mode 100755 specs_e2e/rails_5_2/bin/rake delete mode 100755 specs_e2e/rails_5_2/bin/setup delete mode 100755 specs_e2e/rails_5_2/bin/update delete mode 100644 specs_e2e/rails_5_2/config/application.rb delete mode 100644 specs_e2e/rails_5_2/config/boot.rb delete mode 100644 specs_e2e/rails_5_2/config/credentials.yml.enc delete mode 100644 specs_e2e/rails_5_2/config/database.yml delete mode 100644 specs_e2e/rails_5_2/config/environments/development.rb delete mode 100644 specs_e2e/rails_5_2/config/environments/production.rb delete mode 100644 specs_e2e/rails_5_2/config/environments/test.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/application_controller_renderer.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/content_security_policy.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/cookies_serializer.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/mime_types.rb delete mode 100644 specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb delete mode 100644 specs_e2e/rails_5_2/config/locales/en.yml delete mode 100644 specs_e2e/rails_5_2/config/master.key delete mode 100644 specs_e2e/rails_5_2/public/404.html delete mode 100644 specs_e2e/rails_5_2/public/422.html delete mode 100644 specs_e2e/rails_5_2/public/500.html delete mode 100644 specs_e2e/rails_5_2/public/favicon.ico delete mode 100644 specs_e2e/rails_5_2/public/robots.txt create mode 100644 specs_e2e/rails_8/.gitattributes rename specs_e2e/{rails_5_2 => rails_8}/.gitignore (100%) create mode 100644 specs_e2e/rails_8/.rubocop.yml create mode 100644 specs_e2e/rails_8/Gemfile rename specs_e2e/{rails_5_2 => rails_8}/README.md (100%) rename specs_e2e/{rails_5_2 => rails_8}/Rakefile (83%) create mode 100644 specs_e2e/rails_8/app/assets/stylesheets/application.css create mode 100644 specs_e2e/rails_8/app/controllers/application_controller.rb rename specs_e2e/{rails_5_2 => rails_8}/app/controllers/posts_controller.rb (100%) rename specs_e2e/{rails_5_2 => rails_8}/app/helpers/posts_helper.rb (100%) create mode 100644 specs_e2e/rails_8/app/jobs/application_job.rb rename specs_e2e/{rails_5_2 => rails_8}/app/models/application_record.rb (62%) rename specs_e2e/{rails_5_2 => rails_8}/app/models/post.rb (100%) create mode 100644 specs_e2e/rails_8/app/views/layouts/application.html.erb rename specs_e2e/{rails_5_2 => rails_8}/app/views/posts/_form.html.erb (100%) rename specs_e2e/{rails_5_2 => rails_8}/app/views/posts/edit.html.erb (100%) rename specs_e2e/{rails_5_2 => rails_8}/app/views/posts/index.html.erb (100%) rename specs_e2e/{rails_5_2 => rails_8}/app/views/posts/new.html.erb (100%) rename specs_e2e/{rails_5_2 => rails_8}/app/views/posts/show.html.erb (100%) create mode 100755 specs_e2e/rails_8/bin/brakeman create mode 100755 specs_e2e/rails_8/bin/bundle create mode 100755 specs_e2e/rails_8/bin/dev create mode 100755 specs_e2e/rails_8/bin/importmap create mode 100755 specs_e2e/rails_8/bin/rails create mode 100755 specs_e2e/rails_8/bin/rake create mode 100755 specs_e2e/rails_8/bin/setup create mode 100755 specs_e2e/rails_8/bin/thrust rename specs_e2e/{rails_5_2 => rails_8}/config.ru (57%) create mode 100644 specs_e2e/rails_8/config/application.rb create mode 100644 specs_e2e/rails_8/config/boot.rb create mode 100644 specs_e2e/rails_8/config/cable.yml create mode 100644 specs_e2e/rails_8/config/cache.yml create mode 100644 specs_e2e/rails_8/config/credentials.yml.enc create mode 100644 specs_e2e/rails_8/config/database.yml create mode 100644 specs_e2e/rails_8/config/deploy.yml rename specs_e2e/{rails_5_2 => rails_8}/config/environment.rb (75%) create mode 100644 specs_e2e/rails_8/config/environments/development.rb create mode 100644 specs_e2e/rails_8/config/environments/production.rb create mode 100644 specs_e2e/rails_8/config/environments/test.rb create mode 100644 specs_e2e/rails_8/config/importmap.rb create mode 100644 specs_e2e/rails_8/config/initializers/content_security_policy.rb create mode 100644 specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb rename specs_e2e/{rails_5_2 => rails_8}/config/initializers/inflections.rb (77%) create mode 100644 specs_e2e/rails_8/config/locales/en.yml create mode 100644 specs_e2e/rails_8/config/master.key create mode 100644 specs_e2e/rails_8/config/puma.rb create mode 100644 specs_e2e/rails_8/config/queue.yml create mode 100644 specs_e2e/rails_8/config/recurring.yml rename specs_e2e/{rails_5_2 => rails_8}/config/routes.rb (100%) create mode 100644 specs_e2e/rails_8/config/storage.yml create mode 100644 specs_e2e/rails_8/db/cable_schema.rb create mode 100644 specs_e2e/rails_8/db/cache_schema.rb rename specs_e2e/{rails_5_2 => rails_8}/db/migrate/20180621085832_create_posts.rb (75%) create mode 100644 specs_e2e/rails_8/db/queue_schema.rb create mode 100644 specs_e2e/rails_8/db/seeds.rb create mode 100644 specs_e2e/rails_8/package.json create mode 100644 specs_e2e/rails_8/playwright-report/index.html create mode 100644 specs_e2e/rails_8/public/400.html create mode 100644 specs_e2e/rails_8/public/404.html create mode 100644 specs_e2e/rails_8/public/406-unsupported-browser.html create mode 100644 specs_e2e/rails_8/public/422.html create mode 100644 specs_e2e/rails_8/public/500.html create mode 100644 specs_e2e/rails_8/public/icon.png create mode 100644 specs_e2e/rails_8/public/icon.svg create mode 100644 specs_e2e/rails_8/public/robots.txt rename specs_e2e/{rails_5_2/vendor => rails_8/storage}/.keep (100%) create mode 100644 specs_e2e/rails_8/storage/test.sqlite3 create mode 100644 specs_e2e/rails_8/storage/test.sqlite3-shm create mode 100644 specs_e2e/rails_8/storage/test.sqlite3-wal create mode 100644 specs_e2e/rails_8/test-results/.last-run.json rename specs_e2e/{rails_5_2 => rails_8}/test.sh (98%) create mode 100644 specs_e2e/rails_8/test/application_system_test_case.rb rename specs_e2e/{rails_5_2 => rails_8}/test/controllers/posts_controller_test.rb (100%) rename specs_e2e/{rails_5_2 => rails_8}/test/cypress_fixtures/posts.yml (100%) rename specs_e2e/{rails_5_2 => rails_8}/test/fixtures/posts.yml (100%) rename specs_e2e/{rails_5_2 => rails_8}/test/models/post_test.rb (100%) create mode 100644 specs_e2e/rails_8/test/test_helper.rb rename specs_e2e/{rails_5_2/public/apple-touch-icon-precomposed.png => rails_8/vendor/.keep} (100%) rename specs_e2e/{rails_5_2/public/apple-touch-icon.png => rails_8/vendor/javascript/.keep} (100%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7dead21..b48f1ce 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -42,3 +42,22 @@ jobs: run: ./specs_e2e/rails_7_2/test.sh env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + + rails_8: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.2 + bundler-cache: true + - name: Run tests + run: bundle exec rake + - run: gem uninstall -v '>= 2' -ax bundler || true + - run: gem install bundler -v '< 2' + - name: Run interaction tests + run: ./specs_e2e/rails_8/test.sh + env: + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/specs_e2e/rails_5_2/Gemfile b/specs_e2e/rails_5_2/Gemfile deleted file mode 100644 index 8b9b5c3..0000000 --- a/specs_e2e/rails_5_2/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source 'https://rubygems.org' -git_source(:github) { |repo| "https://github.com/#{repo}.git" } - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.2.0' -gem 'sprockets', '~> 3.7.2' -gem 'sqlite3', '~> 1.3.6' - -# Reduces boot times through caching; required in config/boot.rb -gem 'bootsnap', '>= 1.1.0', require: false - -group :development, :test do - gem 'database_cleaner' - gem 'cypress-on-rails', path: '../../' -end diff --git a/specs_e2e/rails_5_2/app/assets/javascripts/posts.js b/specs_e2e/rails_5_2/app/assets/javascripts/posts.js deleted file mode 100644 index dee720f..0000000 --- a/specs_e2e/rails_5_2/app/assets/javascripts/posts.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css b/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css deleted file mode 100644 index afad32d..0000000 --- a/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css b/specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css deleted file mode 100644 index cd4f3de..0000000 --- a/specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css +++ /dev/null @@ -1,80 +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/specs_e2e/rails_5_2/app/controllers/application_controller.rb b/specs_e2e/rails_5_2/app/controllers/application_controller.rb deleted file mode 100644 index 09705d1..0000000 --- a/specs_e2e/rails_5_2/app/controllers/application_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ApplicationController < ActionController::Base -end diff --git a/specs_e2e/rails_5_2/app/jobs/application_job.rb b/specs_e2e/rails_5_2/app/jobs/application_job.rb deleted file mode 100644 index a009ace..0000000 --- a/specs_e2e/rails_5_2/app/jobs/application_job.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ApplicationJob < ActiveJob::Base -end diff --git a/specs_e2e/rails_5_2/app/views/layouts/application.html.erb b/specs_e2e/rails_5_2/app/views/layouts/application.html.erb deleted file mode 100644 index 7533280..0000000 --- a/specs_e2e/rails_5_2/app/views/layouts/application.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - Rails52 - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - - - <%= yield %> - - diff --git a/specs_e2e/rails_5_2/app/views/welcome/index.html.erb b/specs_e2e/rails_5_2/app/views/welcome/index.html.erb deleted file mode 100644 index 6db1a08..0000000 --- a/specs_e2e/rails_5_2/app/views/welcome/index.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

Welcome

-

Posts:

-<% Post.all.each do |post| %> -

<%= post.inspect %>

-<% end %> diff --git a/specs_e2e/rails_5_2/bin/bundle b/specs_e2e/rails_5_2/bin/bundle deleted file mode 100755 index f19acf5..0000000 --- a/specs_e2e/rails_5_2/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -load Gem.bin_path('bundler', 'bundle') diff --git a/specs_e2e/rails_5_2/bin/rails b/specs_e2e/rails_5_2/bin/rails deleted file mode 100755 index 0739660..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/bin/rake b/specs_e2e/rails_5_2/bin/rake deleted file mode 100755 index 1724048..0000000 --- a/specs_e2e/rails_5_2/bin/rake +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/specs_e2e/rails_5_2/bin/setup b/specs_e2e/rails_5_2/bin/setup deleted file mode 100755 index 0533fee..0000000 --- a/specs_e2e/rails_5_2/bin/setup +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env ruby -require 'fileutils' -include FileUtils - -# path to your application root. -APP_ROOT = File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - 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/specs_e2e/rails_5_2/bin/update b/specs_e2e/rails_5_2/bin/update deleted file mode 100755 index 2fba4ed..0000000 --- a/specs_e2e/rails_5_2/bin/update +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env ruby -require 'fileutils' -include FileUtils - -# path to your application root. -APP_ROOT = File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a way to update your development environment automatically. - # Add necessary update steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - 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/specs_e2e/rails_5_2/config/application.rb b/specs_e2e/rails_5_2/config/application.rb deleted file mode 100644 index d7a9bb3..0000000 --- a/specs_e2e/rails_5_2/config/application.rb +++ /dev/null @@ -1,33 +0,0 @@ -require_relative 'boot' - -require "rails" -# Pick the frameworks you want: -require "active_model/railtie" -require "active_job/railtie" -require "active_record/railtie" -# require "active_storage/engine" -require "action_controller/railtie" -# require "action_mailer/railtie" -require "action_view/railtie" -# require "action_cable/engine" -# require "sprockets/railtie" -require "rails/test_unit/railtie" - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module Rails52 - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.2 - - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers - # -- all .rb files in that directory are automatically loaded after loading - # the framework and any gems in your application. - - # Don't generate system test files. - config.generators.system_tests = nil - end -end diff --git a/specs_e2e/rails_5_2/config/boot.rb b/specs_e2e/rails_5_2/config/boot.rb deleted file mode 100644 index b9e460c..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/config/credentials.yml.enc b/specs_e2e/rails_5_2/config/credentials.yml.enc deleted file mode 100644 index e176cb2..0000000 --- a/specs_e2e/rails_5_2/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -PU4fysLVBMDfEaSi455771OWoJSW6cjWLRUnm6QdvQbF5MY212853Tu6bbtj+GbCs9xIv8qWO2Krx2FNXKVYHvdwVECp59AM/DIV47VSxtkeG9492CsuXZoiUM4SGQETwJ4zTpTParXX6HhAuOdE9rrVGXUBE1LBODGGA/qobk3wfSJCvOQHidEkKk6NvTPs/Hym4OxTJJiyM1zbE/uYuM0g3xBm96fKPVBJ99yJdGlysWqRs7c36IatC+8SQSJi1dq3KiHdEBSlFwj8HheoF3mpo/HNmJQpfjTDmujgiHVO6zWpyHJsp4TzRqyvb6ebQo67gXe3HN6NlB9GGki/cPHIimVWcunn/3h3B666V1NHgfq+cCys0Lcs+fN7RBc0uLh7Lbk08n/ijVBQkgu1kiU0eobtUykb3az7--V52ELknEN7jluVO5--YW2QRZx+/1IH9Sf9iLHGsA== \ No newline at end of file diff --git a/specs_e2e/rails_5_2/config/database.yml b/specs_e2e/rails_5_2/config/database.yml deleted file mode 100644 index a33fe83..0000000 --- a/specs_e2e/rails_5_2/config/database.yml +++ /dev/null @@ -1,15 +0,0 @@ -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 diff --git a/specs_e2e/rails_5_2/config/environments/development.rb b/specs_e2e/rails_5_2/config/environments/development.rb deleted file mode 100644 index 5426b12..0000000 --- a/specs_e2e/rails_5_2/config/environments/development.rb +++ /dev/null @@ -1,40 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. 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 Rails.root.join('tmp', 'caching-dev.txt').exist? - config.action_controller.perform_caching = 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 - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = 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 -end diff --git a/specs_e2e/rails_5_2/config/environments/production.rb b/specs_e2e/rails_5_2/config/environments/production.rb deleted file mode 100644 index 1c974f4..0000000 --- a/specs_e2e/rails_5_2/config/environments/production.rb +++ /dev/null @@ -1,68 +0,0 @@ -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? - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.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 - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # 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 = "rails_5_2_#{Rails.env}" - - # 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 - - # 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 -end diff --git a/specs_e2e/rails_5_2/config/environments/test.rb b/specs_e2e/rails_5_2/config/environments/test.rb deleted file mode 100644 index 4f3bb6d..0000000 --- a/specs_e2e/rails_5_2/config/environments/test.rb +++ /dev/null @@ -1,36 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # 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! - config.cache_classes = ENV['CI'].present? - - # 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 - - # 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 - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/specs_e2e/rails_5_2/config/initializers/application_controller_renderer.rb b/specs_e2e/rails_5_2/config/initializers/application_controller_renderer.rb deleted file mode 100644 index 89d2efa..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb b/specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +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| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/specs_e2e/rails_5_2/config/initializers/content_security_policy.rb b/specs_e2e/rails_5_2/config/initializers/content_security_policy.rb deleted file mode 100644 index d3bcaa5..0000000 --- a/specs_e2e/rails_5_2/config/initializers/content_security_policy.rb +++ /dev/null @@ -1,25 +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 - -# # 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) } - -# 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/specs_e2e/rails_5_2/config/initializers/cookies_serializer.rb b/specs_e2e/rails_5_2/config/initializers/cookies_serializer.rb deleted file mode 100644 index 5a6a32d..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4a994e1..0000000 --- a/specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,4 +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 += [:password] diff --git a/specs_e2e/rails_5_2/config/initializers/mime_types.rb b/specs_e2e/rails_5_2/config/initializers/mime_types.rb deleted file mode 100644 index dc18996..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb b/specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb deleted file mode 100644 index 633c1c8..0000000 --- a/specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,9 +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 diff --git a/specs_e2e/rails_5_2/config/locales/en.yml b/specs_e2e/rails_5_2/config/locales/en.yml deleted file mode 100644 index decc5a8..0000000 --- a/specs_e2e/rails_5_2/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 http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/specs_e2e/rails_5_2/config/master.key b/specs_e2e/rails_5_2/config/master.key deleted file mode 100644 index fdefe9f..0000000 --- a/specs_e2e/rails_5_2/config/master.key +++ /dev/null @@ -1 +0,0 @@ -42b8a9ee98524d2ae0edc4afaaee9d07 \ No newline at end of file diff --git a/specs_e2e/rails_5_2/public/404.html b/specs_e2e/rails_5_2/public/404.html deleted file mode 100644 index 2be3af2..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/public/422.html b/specs_e2e/rails_5_2/public/422.html deleted file mode 100644 index c08eac0..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/public/500.html b/specs_e2e/rails_5_2/public/500.html deleted file mode 100644 index 78a030a..0000000 --- a/specs_e2e/rails_5_2/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/specs_e2e/rails_5_2/public/favicon.ico b/specs_e2e/rails_5_2/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/specs_e2e/rails_5_2/public/robots.txt b/specs_e2e/rails_5_2/public/robots.txt deleted file mode 100644 index 37b576a..0000000 --- a/specs_e2e/rails_5_2/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/specs_e2e/rails_8/.gitattributes b/specs_e2e/rails_8/.gitattributes new file mode 100644 index 0000000..8dc4323 --- /dev/null +++ b/specs_e2e/rails_8/.gitattributes @@ -0,0 +1,9 @@ +# 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 any vendored files as having been vendored. +vendor/* linguist-vendored +config/credentials/*.yml.enc diff=rails_credentials +config/credentials.yml.enc diff=rails_credentials diff --git a/specs_e2e/rails_5_2/.gitignore b/specs_e2e/rails_8/.gitignore similarity index 100% rename from specs_e2e/rails_5_2/.gitignore rename to specs_e2e/rails_8/.gitignore diff --git a/specs_e2e/rails_8/.rubocop.yml b/specs_e2e/rails_8/.rubocop.yml new file mode 100644 index 0000000..f9d86d4 --- /dev/null +++ b/specs_e2e/rails_8/.rubocop.yml @@ -0,0 +1,8 @@ +# Omakase Ruby styling for Rails +inherit_gem: { rubocop-rails-omakase: rubocop.yml } + +# Overwrite or add rules to create your own house style +# +# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` +# Layout/SpaceInsideArrayLiteralBrackets: +# Enabled: false diff --git a/specs_e2e/rails_8/Gemfile b/specs_e2e/rails_8/Gemfile new file mode 100644 index 0000000..bf849ad --- /dev/null +++ b/specs_e2e/rails_8/Gemfile @@ -0,0 +1,20 @@ +source "https://rubygems.org" + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 8.0.1" +# The modern asset pipeline for Rails [https://github.com/rails/propshaft] +gem "propshaft" +# Use sqlite3 as the database for Active Record +gem "sqlite3", ">= 2.1" +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", ">= 5.0" +# 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 + gem 'cypress-on-rails', path: '../../' + gem 'database_cleaner' +end diff --git a/specs_e2e/rails_5_2/README.md b/specs_e2e/rails_8/README.md similarity index 100% rename from specs_e2e/rails_5_2/README.md rename to specs_e2e/rails_8/README.md diff --git a/specs_e2e/rails_5_2/Rakefile b/specs_e2e/rails_8/Rakefile similarity index 83% rename from specs_e2e/rails_5_2/Rakefile rename to specs_e2e/rails_8/Rakefile index e85f913..9a5ea73 100644 --- a/specs_e2e/rails_5_2/Rakefile +++ b/specs_e2e/rails_8/Rakefile @@ -1,6 +1,6 @@ # 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' +require_relative "config/application" Rails.application.load_tasks diff --git a/specs_e2e/rails_8/app/assets/stylesheets/application.css b/specs_e2e/rails_8/app/assets/stylesheets/application.css new file mode 100644 index 0000000..fe93333 --- /dev/null +++ b/specs_e2e/rails_8/app/assets/stylesheets/application.css @@ -0,0 +1,10 @@ +/* + * This is a manifest file that'll be compiled into application.css. + * + * With Propshaft, assets are served efficiently without preprocessing steps. You can still include + * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard + * cascading order, meaning styles declared later in the document or manifest will override earlier ones, + * depending on specificity. + * + * Consider organizing styles into separate files for maintainability. + */ diff --git a/specs_e2e/rails_8/app/controllers/application_controller.rb b/specs_e2e/rails_8/app/controllers/application_controller.rb new file mode 100644 index 0000000..0d95db2 --- /dev/null +++ b/specs_e2e/rails_8/app/controllers/application_controller.rb @@ -0,0 +1,4 @@ +class ApplicationController < ActionController::Base + # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. + allow_browser versions: :modern +end diff --git a/specs_e2e/rails_5_2/app/controllers/posts_controller.rb b/specs_e2e/rails_8/app/controllers/posts_controller.rb similarity index 100% rename from specs_e2e/rails_5_2/app/controllers/posts_controller.rb rename to specs_e2e/rails_8/app/controllers/posts_controller.rb diff --git a/specs_e2e/rails_5_2/app/helpers/posts_helper.rb b/specs_e2e/rails_8/app/helpers/posts_helper.rb similarity index 100% rename from specs_e2e/rails_5_2/app/helpers/posts_helper.rb rename to specs_e2e/rails_8/app/helpers/posts_helper.rb diff --git a/specs_e2e/rails_8/app/jobs/application_job.rb b/specs_e2e/rails_8/app/jobs/application_job.rb new file mode 100644 index 0000000..d394c3d --- /dev/null +++ b/specs_e2e/rails_8/app/jobs/application_job.rb @@ -0,0 +1,7 @@ +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/specs_e2e/rails_5_2/app/models/application_record.rb b/specs_e2e/rails_8/app/models/application_record.rb similarity index 62% rename from specs_e2e/rails_5_2/app/models/application_record.rb rename to specs_e2e/rails_8/app/models/application_record.rb index 10a4cba..b63caeb 100644 --- a/specs_e2e/rails_5_2/app/models/application_record.rb +++ b/specs_e2e/rails_8/app/models/application_record.rb @@ -1,3 +1,3 @@ class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true + primary_abstract_class end diff --git a/specs_e2e/rails_5_2/app/models/post.rb b/specs_e2e/rails_8/app/models/post.rb similarity index 100% rename from specs_e2e/rails_5_2/app/models/post.rb rename to specs_e2e/rails_8/app/models/post.rb diff --git a/specs_e2e/rails_8/app/views/layouts/application.html.erb b/specs_e2e/rails_8/app/views/layouts/application.html.erb new file mode 100644 index 0000000..2ddf1ad --- /dev/null +++ b/specs_e2e/rails_8/app/views/layouts/application.html.erb @@ -0,0 +1,27 @@ + + + + <%= content_for(:title) || "App" %> + + + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= yield :head %> + + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> + + + + + + <%# Includes all stylesheet files in app/assets/stylesheets %> + <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %> + + + + <%= yield %> + + diff --git a/specs_e2e/rails_5_2/app/views/posts/_form.html.erb b/specs_e2e/rails_8/app/views/posts/_form.html.erb similarity index 100% rename from specs_e2e/rails_5_2/app/views/posts/_form.html.erb rename to specs_e2e/rails_8/app/views/posts/_form.html.erb diff --git a/specs_e2e/rails_5_2/app/views/posts/edit.html.erb b/specs_e2e/rails_8/app/views/posts/edit.html.erb similarity index 100% rename from specs_e2e/rails_5_2/app/views/posts/edit.html.erb rename to specs_e2e/rails_8/app/views/posts/edit.html.erb diff --git a/specs_e2e/rails_5_2/app/views/posts/index.html.erb b/specs_e2e/rails_8/app/views/posts/index.html.erb similarity index 100% rename from specs_e2e/rails_5_2/app/views/posts/index.html.erb rename to specs_e2e/rails_8/app/views/posts/index.html.erb diff --git a/specs_e2e/rails_5_2/app/views/posts/new.html.erb b/specs_e2e/rails_8/app/views/posts/new.html.erb similarity index 100% rename from specs_e2e/rails_5_2/app/views/posts/new.html.erb rename to specs_e2e/rails_8/app/views/posts/new.html.erb diff --git a/specs_e2e/rails_5_2/app/views/posts/show.html.erb b/specs_e2e/rails_8/app/views/posts/show.html.erb similarity index 100% rename from specs_e2e/rails_5_2/app/views/posts/show.html.erb rename to specs_e2e/rails_8/app/views/posts/show.html.erb diff --git a/specs_e2e/rails_8/bin/brakeman b/specs_e2e/rails_8/bin/brakeman new file mode 100755 index 0000000..ace1c9b --- /dev/null +++ b/specs_e2e/rails_8/bin/brakeman @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +ARGV.unshift("--ensure-latest") + +load Gem.bin_path("brakeman", "brakeman") diff --git a/specs_e2e/rails_8/bin/bundle b/specs_e2e/rails_8/bin/bundle new file mode 100755 index 0000000..50da5fd --- /dev/null +++ b/specs_e2e/rails_8/bin/bundle @@ -0,0 +1,109 @@ +#!/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.match?(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", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") + 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_requirement + @bundler_requirement ||= + env_var_version || + cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + bundler_gem_version.approximate_recommendation + 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/specs_e2e/rails_8/bin/dev b/specs_e2e/rails_8/bin/dev new file mode 100755 index 0000000..5f91c20 --- /dev/null +++ b/specs_e2e/rails_8/bin/dev @@ -0,0 +1,2 @@ +#!/usr/bin/env ruby +exec "./bin/rails", "server", *ARGV diff --git a/specs_e2e/rails_8/bin/importmap b/specs_e2e/rails_8/bin/importmap new file mode 100755 index 0000000..36502ab --- /dev/null +++ b/specs_e2e/rails_8/bin/importmap @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby + +require_relative "../config/application" +require "importmap/commands" diff --git a/specs_e2e/rails_8/bin/rails b/specs_e2e/rails_8/bin/rails new file mode 100755 index 0000000..efc0377 --- /dev/null +++ b/specs_e2e/rails_8/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/specs_e2e/rails_8/bin/rake b/specs_e2e/rails_8/bin/rake new file mode 100755 index 0000000..4fbf10b --- /dev/null +++ b/specs_e2e/rails_8/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/specs_e2e/rails_8/bin/setup b/specs_e2e/rails_8/bin/setup new file mode 100755 index 0000000..be3db3c --- /dev/null +++ b/specs_e2e/rails_8/bin/setup @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require "fileutils" + +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args, exception: true) +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("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" + + unless ARGV.include?("--skip-server") + puts "\n== Starting development server ==" + STDOUT.flush # flush the output before exec(2) so that it displays + exec "bin/dev" + end +end diff --git a/specs_e2e/rails_8/bin/thrust b/specs_e2e/rails_8/bin/thrust new file mode 100755 index 0000000..36bde2d --- /dev/null +++ b/specs_e2e/rails_8/bin/thrust @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("thruster", "thrust") diff --git a/specs_e2e/rails_5_2/config.ru b/specs_e2e/rails_8/config.ru similarity index 57% rename from specs_e2e/rails_5_2/config.ru rename to specs_e2e/rails_8/config.ru index f7ba0b5..4a3c09a 100644 --- a/specs_e2e/rails_5_2/config.ru +++ b/specs_e2e/rails_8/config.ru @@ -1,5 +1,6 @@ # This file is used by Rack-based servers to start the application. -require_relative 'config/environment' +require_relative "config/environment" run Rails.application +Rails.application.load_server diff --git a/specs_e2e/rails_8/config/application.rb b/specs_e2e/rails_8/config/application.rb new file mode 100644 index 0000000..462164c --- /dev/null +++ b/specs_e2e/rails_8/config/application.rb @@ -0,0 +1,27 @@ +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 App + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 8.0 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w[assets tasks]) + + # 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") + end +end diff --git a/specs_e2e/rails_8/config/boot.rb b/specs_e2e/rails_8/config/boot.rb new file mode 100644 index 0000000..988a5dd --- /dev/null +++ b/specs_e2e/rails_8/config/boot.rb @@ -0,0 +1,4 @@ +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/specs_e2e/rails_8/config/cable.yml b/specs_e2e/rails_8/config/cable.yml new file mode 100644 index 0000000..b9adc5a --- /dev/null +++ b/specs_e2e/rails_8/config/cable.yml @@ -0,0 +1,17 @@ +# Async adapter only works within the same process, so for manually triggering cable updates from a console, +# and seeing results in the browser, you must do so from the web console (running inside the dev process), +# not a terminal started via bin/rails console! Add "console" to any action or any ERB template view +# to make the web console appear. +development: + adapter: async + +test: + adapter: test + +production: + adapter: solid_cable + connects_to: + database: + writing: cable + polling_interval: 0.1.seconds + message_retention: 1.day diff --git a/specs_e2e/rails_8/config/cache.yml b/specs_e2e/rails_8/config/cache.yml new file mode 100644 index 0000000..19d4908 --- /dev/null +++ b/specs_e2e/rails_8/config/cache.yml @@ -0,0 +1,16 @@ +default: &default + store_options: + # Cap age of oldest cache entry to fulfill retention policies + # max_age: <%= 60.days.to_i %> + max_size: <%= 256.megabytes %> + namespace: <%= Rails.env %> + +development: + <<: *default + +test: + <<: *default + +production: + database: cache + <<: *default diff --git a/specs_e2e/rails_8/config/credentials.yml.enc b/specs_e2e/rails_8/config/credentials.yml.enc new file mode 100644 index 0000000..2cdd6f1 --- /dev/null +++ b/specs_e2e/rails_8/config/credentials.yml.enc @@ -0,0 +1 @@ +KBXR054/drP12hr3yMGD6qBrGNOk57kGD467ieoFiMsBRCB1xp5g9JYRDGruQmSYFgchTPmkCnemgpvYtnoL9x3I8JNlsmLP6fONg4jn6srirYy93BBDTu8i3GMWGbbXmYHcmix6GIy4of9p7S9W7QorENrUU65fqS/k8TsHyC9nNIqh4R+8JK/LMS3WLLDYzgweBZB0w8DOinY09b40TASeBTDpTChHTPMplEtjwYf+3pXENe0+l1IL5Fg6MFwyzwB3Fu0TleF7L6DOcfqUXosUaZLNU9qJxY8JagyNUXR+Ir5HLxi7jnf7iSTIqrl50i8v3DDf3AJFcWJ6lU6QaZSIplr4hH2oXPV9enqpmnOklQQL85gX/AeKkMzLYMLgVohjgFIVf7CVY9nACrJdwf9GmVp4T4fZWeI3Ri4bkrdng3xo9nprPstplAibXs6jnJafyenxOuy0w0b/4ZcEURJqlffr73PyXTvp6G3AWYuh8eVPuoH7ZsDn--4gECL9gWcOwxSmB8--XL8H1uFYRwrciKV+dHvH8w== \ No newline at end of file diff --git a/specs_e2e/rails_8/config/database.yml b/specs_e2e/rails_8/config/database.yml new file mode 100644 index 0000000..2640cb5 --- /dev/null +++ b/specs_e2e/rails_8/config/database.yml @@ -0,0 +1,41 @@ +# 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: storage/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: storage/test.sqlite3 + + +# Store production database in the storage/ directory, which by default +# is mounted as a persistent Docker volume in config/deploy.yml. +production: + primary: + <<: *default + database: storage/production.sqlite3 + cache: + <<: *default + database: storage/production_cache.sqlite3 + migrations_paths: db/cache_migrate + queue: + <<: *default + database: storage/production_queue.sqlite3 + migrations_paths: db/queue_migrate + cable: + <<: *default + database: storage/production_cable.sqlite3 + migrations_paths: db/cable_migrate diff --git a/specs_e2e/rails_8/config/deploy.yml b/specs_e2e/rails_8/config/deploy.yml new file mode 100644 index 0000000..a629d2b --- /dev/null +++ b/specs_e2e/rails_8/config/deploy.yml @@ -0,0 +1,116 @@ +# Name of your application. Used to uniquely configure containers. +service: app + +# Name of the container image. +image: your-user/app + +# Deploy to these servers. +servers: + web: + - 192.168.0.1 + # job: + # hosts: + # - 192.168.0.1 + # cmd: bin/jobs + +# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server. +# Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer. +# +# Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption. +proxy: + ssl: true + host: app.example.com + +# Credentials for your image host. +registry: + # Specify the registry server, if you're not using Docker Hub + # server: registry.digitalocean.com / ghcr.io / ... + username: your-user + + # Always use an access token rather than real password when possible. + password: + - KAMAL_REGISTRY_PASSWORD + +# Inject ENV variables into containers (secrets come from .kamal/secrets). +env: + secret: + - RAILS_MASTER_KEY + clear: + # Run the Solid Queue Supervisor inside the web server's Puma process to do jobs. + # When you start using multiple servers, you should split out job processing to a dedicated machine. + SOLID_QUEUE_IN_PUMA: true + + # Set number of processes dedicated to Solid Queue (default: 1) + # JOB_CONCURRENCY: 3 + + # Set number of cores available to the application on each server (default: 1). + # WEB_CONCURRENCY: 2 + + # Match this to any external database server to configure Active Record correctly + # Use app-db for a db accessory server on same machine via local kamal docker network. + # DB_HOST: 192.168.0.2 + + # Log everything from Rails + # RAILS_LOG_LEVEL: debug + +# Aliases are triggered with "bin/kamal ". You can overwrite arguments on invocation: +# "bin/kamal logs -r job" will tail logs from the first server in the job section. +aliases: + console: app exec --interactive --reuse "bin/rails console" + shell: app exec --interactive --reuse "bash" + logs: app logs -f + dbc: app exec --interactive --reuse "bin/rails dbconsole" + + +# Use a persistent storage volume for sqlite database files and local Active Storage files. +# Recommended to change this to a mounted volume path that is backed up off server. +volumes: + - "app_storage:/rails/storage" + + +# Bridge fingerprinted assets, like JS and CSS, between versions to avoid +# hitting 404 on in-flight requests. Combines all files from new and old +# version inside the asset_path. +asset_path: /rails/public/assets + +# Configure the image builder. +builder: + arch: amd64 + + # # Build image via remote server (useful for faster amd64 builds on arm64 computers) + # remote: ssh://docker@docker-builder-server + # + # # Pass arguments and secrets to the Docker build process + # args: + # RUBY_VERSION: 3.2.2 + # secrets: + # - GITHUB_TOKEN + # - RAILS_MASTER_KEY + +# Use a different ssh user than root +# ssh: +# user: app + +# Use accessory services (secrets come from .kamal/secrets). +# accessories: +# db: +# image: mysql:8.0 +# host: 192.168.0.2 +# # Change to 3306 to expose port to the world instead of just local network. +# port: "127.0.0.1:3306:3306" +# env: +# clear: +# MYSQL_ROOT_HOST: '%' +# secret: +# - MYSQL_ROOT_PASSWORD +# files: +# - config/mysql/production.cnf:/etc/mysql/my.cnf +# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql +# directories: +# - data:/var/lib/mysql +# redis: +# image: redis:7.0 +# host: 192.168.0.2 +# port: 6379 +# directories: +# - data:/data diff --git a/specs_e2e/rails_5_2/config/environment.rb b/specs_e2e/rails_8/config/environment.rb similarity index 75% rename from specs_e2e/rails_5_2/config/environment.rb rename to specs_e2e/rails_8/config/environment.rb index 426333b..cac5315 100644 --- a/specs_e2e/rails_5_2/config/environment.rb +++ b/specs_e2e/rails_8/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require_relative 'application' +require_relative "application" # Initialize the Rails application. Rails.application.initialize! diff --git a/specs_e2e/rails_8/config/environments/development.rb b/specs_e2e/rails_8/config/environments/development.rb new file mode 100644 index 0000000..ff8b603 --- /dev/null +++ b/specs_e2e/rails_8/config/environments/development.rb @@ -0,0 +1,57 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Make code changes take effect immediately without server restart. + config.enable_reloading = true + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing. + config.server_timing = true + + # Enable/disable Action Controller caching. By default Action Controller caching is disabled. + # Run rails dev:cache to toggle Action Controller caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } + else + config.action_controller.perform_caching = false + end + + # Change to :null_store to avoid any caching. + config.cache_store = :memory_store + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # 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 + + # Append comments with runtime information tags to SQL queries in logs. + config.active_record.query_log_tags_enabled = true + + # Annotate rendered view with file names. + config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions. + config.action_controller.raise_on_missing_callback_actions = true + + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! +end diff --git a/specs_e2e/rails_8/config/environments/production.rb b/specs_e2e/rails_8/config/environments/production.rb new file mode 100644 index 0000000..bdcd01d --- /dev/null +++ b/specs_e2e/rails_8/config/environments/production.rb @@ -0,0 +1,90 @@ +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.enable_reloading = false + + # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). + config.eager_load = true + + # Full error reports are disabled. + config.consider_all_requests_local = false + + # Turn on fragment caching in view templates. + config.action_controller.perform_caching = true + + # Cache assets for far-future expiry since they are all digest stamped. + config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + config.assume_ssl = true + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + config.force_ssl = true + + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + + # Log to STDOUT with the current request id as a default log tag. + config.log_tags = [ :request_id ] + config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) + + # Change to "debug" to log everything (including potentially personally-identifiable information!) + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # Prevent health checks from clogging up the logs. + config.silence_healthcheck_path = "/up" + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Replace the default in-process memory cache store with a durable alternative. + config.cache_store = :solid_cache_store + + # Replace the default in-process and non-durable queuing backend for Active Job. + config.active_job.queue_adapter = :solid_queue + config.solid_queue.connects_to = { database: { writing: :queue } } + + # 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 + + # Set host to be used by links generated in mailer templates. + config.action_mailer.default_url_options = { host: "example.com" } + + # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit. + # config.action_mailer.smtp_settings = { + # user_name: Rails.application.credentials.dig(:smtp, :user_name), + # password: Rails.application.credentials.dig(:smtp, :password), + # address: "smtp.example.com", + # port: 587, + # authentication: :plain + # } + + # 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 + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [ :id ] + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } +end diff --git a/specs_e2e/rails_8/config/environments/test.rb b/specs_e2e/rails_8/config/environments/test.rb new file mode 100644 index 0000000..0047e03 --- /dev/null +++ b/specs_e2e/rails_8/config/environments/test.rb @@ -0,0 +1,45 @@ +# 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. + + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false + + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with cache-control for performance. + config.public_file_server.headers = { "cache-control" => "public, max-age=3600" } + + # Show full error reports. + config.consider_all_requests_local = true + config.cache_store = :null_store + + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable + + # 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 + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # 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 + + # Raise error when a before_action's only/except options reference missing actions. + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/specs_e2e/rails_8/config/importmap.rb b/specs_e2e/rails_8/config/importmap.rb new file mode 100644 index 0000000..909dfc5 --- /dev/null +++ b/specs_e2e/rails_8/config/importmap.rb @@ -0,0 +1,7 @@ +# Pin npm packages by running ./bin/importmap + +pin "application" +pin "@hotwired/turbo-rails", to: "turbo.min.js" +pin "@hotwired/stimulus", to: "stimulus.min.js" +pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" +pin_all_from "app/javascript/controllers", under: "controllers" diff --git a/specs_e2e/rails_8/config/initializers/content_security_policy.rb b/specs_e2e/rails_8/config/initializers/content_security_policy.rb new file mode 100644 index 0000000..b3076b3 --- /dev/null +++ b/specs_e2e/rails_8/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# 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 +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src style-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..c0b717f --- /dev/null +++ b/specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc +] diff --git a/specs_e2e/rails_5_2/config/initializers/inflections.rb b/specs_e2e/rails_8/config/initializers/inflections.rb similarity index 77% rename from specs_e2e/rails_5_2/config/initializers/inflections.rb rename to specs_e2e/rails_8/config/initializers/inflections.rb index ac033bf..3860f65 100644 --- a/specs_e2e/rails_5_2/config/initializers/inflections.rb +++ b/specs_e2e/rails_8/config/initializers/inflections.rb @@ -4,13 +4,13 @@ # 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.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' +# inflect.acronym "RESTful" # end diff --git a/specs_e2e/rails_8/config/locales/en.yml b/specs_e2e/rails_8/config/locales/en.yml new file mode 100644 index 0000000..6c349ae --- /dev/null +++ b/specs_e2e/rails_8/config/locales/en.yml @@ -0,0 +1,31 @@ +# 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. +# +# To learn more about the API, please read the Rails Internationalization guide +# at https://guides.rubyonrails.org/i18n.html. +# +# Be aware that YAML interprets the following case-insensitive strings as +# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings +# must be quoted to be interpreted as strings. For example: +# +# en: +# "yes": yup +# enabled: "ON" + +en: + hello: "Hello world" diff --git a/specs_e2e/rails_8/config/master.key b/specs_e2e/rails_8/config/master.key new file mode 100644 index 0000000..c4e0feb --- /dev/null +++ b/specs_e2e/rails_8/config/master.key @@ -0,0 +1 @@ +736ebc816482b7db1bc172090daf90b1 \ No newline at end of file diff --git a/specs_e2e/rails_8/config/puma.rb b/specs_e2e/rails_8/config/puma.rb new file mode 100644 index 0000000..a248513 --- /dev/null +++ b/specs_e2e/rails_8/config/puma.rb @@ -0,0 +1,41 @@ +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. +# +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. +# +# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You +# should only set this value when you want to run 2 or more workers. The +# default is already 1. +# +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# prioritize throughput over latency. +# +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. +# +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. +# +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT", 3000) + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart + +# Run the Solid Queue supervisor inside of Puma for single-server deployments +plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/specs_e2e/rails_8/config/queue.yml b/specs_e2e/rails_8/config/queue.yml new file mode 100644 index 0000000..9eace59 --- /dev/null +++ b/specs_e2e/rails_8/config/queue.yml @@ -0,0 +1,18 @@ +default: &default + dispatchers: + - polling_interval: 1 + batch_size: 500 + workers: + - queues: "*" + threads: 3 + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> + polling_interval: 0.1 + +development: + <<: *default + +test: + <<: *default + +production: + <<: *default diff --git a/specs_e2e/rails_8/config/recurring.yml b/specs_e2e/rails_8/config/recurring.yml new file mode 100644 index 0000000..d045b19 --- /dev/null +++ b/specs_e2e/rails_8/config/recurring.yml @@ -0,0 +1,10 @@ +# production: +# periodic_cleanup: +# class: CleanSoftDeletedRecordsJob +# queue: background +# args: [ 1000, { batch_size: 500 } ] +# schedule: every hour +# periodic_command: +# command: "SoftDeletedRecord.due.delete_all" +# priority: 2 +# schedule: at 5am every day diff --git a/specs_e2e/rails_5_2/config/routes.rb b/specs_e2e/rails_8/config/routes.rb similarity index 100% rename from specs_e2e/rails_5_2/config/routes.rb rename to specs_e2e/rails_8/config/routes.rb diff --git a/specs_e2e/rails_8/config/storage.yml b/specs_e2e/rails_8/config/storage.yml new file mode 100644 index 0000000..4942ab6 --- /dev/null +++ b/specs_e2e/rails_8/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use bin/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-east-1 +# bucket: your_own_bucket-<%= Rails.env %> + +# 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-<%= Rails.env %> + +# Use bin/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-<%= Rails.env %> + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] diff --git a/specs_e2e/rails_8/db/cable_schema.rb b/specs_e2e/rails_8/db/cable_schema.rb new file mode 100644 index 0000000..2366660 --- /dev/null +++ b/specs_e2e/rails_8/db/cable_schema.rb @@ -0,0 +1,11 @@ +ActiveRecord::Schema[7.1].define(version: 1) do + create_table "solid_cable_messages", force: :cascade do |t| + t.binary "channel", limit: 1024, null: false + t.binary "payload", limit: 536870912, null: false + t.datetime "created_at", null: false + t.integer "channel_hash", limit: 8, null: false + t.index ["channel"], name: "index_solid_cable_messages_on_channel" + t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" + t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" + end +end diff --git a/specs_e2e/rails_8/db/cache_schema.rb b/specs_e2e/rails_8/db/cache_schema.rb new file mode 100644 index 0000000..6005a29 --- /dev/null +++ b/specs_e2e/rails_8/db/cache_schema.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +ActiveRecord::Schema[7.2].define(version: 1) do + create_table "solid_cache_entries", force: :cascade do |t| + t.binary "key", limit: 1024, null: false + t.binary "value", limit: 536870912, null: false + t.datetime "created_at", null: false + t.integer "key_hash", limit: 8, null: false + t.integer "byte_size", limit: 4, null: false + t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" + t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" + t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true + end +end diff --git a/specs_e2e/rails_5_2/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb similarity index 75% rename from specs_e2e/rails_5_2/db/migrate/20180621085832_create_posts.rb rename to specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb index 57ef6bb..eca677b 100644 --- a/specs_e2e/rails_5_2/db/migrate/20180621085832_create_posts.rb +++ b/specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb @@ -1,4 +1,4 @@ -class CreatePosts < ActiveRecord::Migration[5.2] +class CreatePosts < ActiveRecord::Migration[7.2] def change create_table :posts do |t| t.string :title diff --git a/specs_e2e/rails_8/db/queue_schema.rb b/specs_e2e/rails_8/db/queue_schema.rb new file mode 100644 index 0000000..85194b6 --- /dev/null +++ b/specs_e2e/rails_8/db/queue_schema.rb @@ -0,0 +1,129 @@ +ActiveRecord::Schema[7.1].define(version: 1) do + create_table "solid_queue_blocked_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.string "queue_name", null: false + t.integer "priority", default: 0, null: false + t.string "concurrency_key", null: false + t.datetime "expires_at", null: false + t.datetime "created_at", null: false + t.index [ "concurrency_key", "priority", "job_id" ], name: "index_solid_queue_blocked_executions_for_release" + t.index [ "expires_at", "concurrency_key" ], name: "index_solid_queue_blocked_executions_for_maintenance" + t.index [ "job_id" ], name: "index_solid_queue_blocked_executions_on_job_id", unique: true + end + + create_table "solid_queue_claimed_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.bigint "process_id" + t.datetime "created_at", null: false + t.index [ "job_id" ], name: "index_solid_queue_claimed_executions_on_job_id", unique: true + t.index [ "process_id", "job_id" ], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id" + end + + create_table "solid_queue_failed_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.text "error" + t.datetime "created_at", null: false + t.index [ "job_id" ], name: "index_solid_queue_failed_executions_on_job_id", unique: true + end + + create_table "solid_queue_jobs", force: :cascade do |t| + t.string "queue_name", null: false + t.string "class_name", null: false + t.text "arguments" + t.integer "priority", default: 0, null: false + t.string "active_job_id" + t.datetime "scheduled_at" + t.datetime "finished_at" + t.string "concurrency_key" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index [ "active_job_id" ], name: "index_solid_queue_jobs_on_active_job_id" + t.index [ "class_name" ], name: "index_solid_queue_jobs_on_class_name" + t.index [ "finished_at" ], name: "index_solid_queue_jobs_on_finished_at" + t.index [ "queue_name", "finished_at" ], name: "index_solid_queue_jobs_for_filtering" + t.index [ "scheduled_at", "finished_at" ], name: "index_solid_queue_jobs_for_alerting" + end + + create_table "solid_queue_pauses", force: :cascade do |t| + t.string "queue_name", null: false + t.datetime "created_at", null: false + t.index [ "queue_name" ], name: "index_solid_queue_pauses_on_queue_name", unique: true + end + + create_table "solid_queue_processes", force: :cascade do |t| + t.string "kind", null: false + t.datetime "last_heartbeat_at", null: false + t.bigint "supervisor_id" + t.integer "pid", null: false + t.string "hostname" + t.text "metadata" + t.datetime "created_at", null: false + t.string "name", null: false + t.index [ "last_heartbeat_at" ], name: "index_solid_queue_processes_on_last_heartbeat_at" + t.index [ "name", "supervisor_id" ], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true + t.index [ "supervisor_id" ], name: "index_solid_queue_processes_on_supervisor_id" + end + + create_table "solid_queue_ready_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.string "queue_name", null: false + t.integer "priority", default: 0, null: false + t.datetime "created_at", null: false + t.index [ "job_id" ], name: "index_solid_queue_ready_executions_on_job_id", unique: true + t.index [ "priority", "job_id" ], name: "index_solid_queue_poll_all" + t.index [ "queue_name", "priority", "job_id" ], name: "index_solid_queue_poll_by_queue" + end + + create_table "solid_queue_recurring_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.string "task_key", null: false + t.datetime "run_at", null: false + t.datetime "created_at", null: false + t.index [ "job_id" ], name: "index_solid_queue_recurring_executions_on_job_id", unique: true + t.index [ "task_key", "run_at" ], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true + end + + create_table "solid_queue_recurring_tasks", force: :cascade do |t| + t.string "key", null: false + t.string "schedule", null: false + t.string "command", limit: 2048 + t.string "class_name" + t.text "arguments" + t.string "queue_name" + t.integer "priority", default: 0 + t.boolean "static", default: true, null: false + t.text "description" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index [ "key" ], name: "index_solid_queue_recurring_tasks_on_key", unique: true + t.index [ "static" ], name: "index_solid_queue_recurring_tasks_on_static" + end + + create_table "solid_queue_scheduled_executions", force: :cascade do |t| + t.bigint "job_id", null: false + t.string "queue_name", null: false + t.integer "priority", default: 0, null: false + t.datetime "scheduled_at", null: false + t.datetime "created_at", null: false + t.index [ "job_id" ], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true + t.index [ "scheduled_at", "priority", "job_id" ], name: "index_solid_queue_dispatch_all" + end + + create_table "solid_queue_semaphores", force: :cascade do |t| + t.string "key", null: false + t.integer "value", default: 1, null: false + t.datetime "expires_at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index [ "expires_at" ], name: "index_solid_queue_semaphores_on_expires_at" + t.index [ "key", "value" ], name: "index_solid_queue_semaphores_on_key_and_value" + t.index [ "key" ], name: "index_solid_queue_semaphores_on_key", unique: true + end + + add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade + add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade + add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade + add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade + add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade + add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade +end diff --git a/specs_e2e/rails_8/db/seeds.rb b/specs_e2e/rails_8/db/seeds.rb new file mode 100644 index 0000000..4fbd6ed --- /dev/null +++ b/specs_e2e/rails_8/db/seeds.rb @@ -0,0 +1,9 @@ +# This file should ensure the existence of records required to run the application in every environment (production, +# development, test). The code here should be idempotent so that it can be executed at any point in every environment. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Example: +# +# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name| +# MovieGenre.find_or_create_by!(name: genre_name) +# end diff --git a/specs_e2e/rails_8/package.json b/specs_e2e/rails_8/package.json new file mode 100644 index 0000000..78ed48a --- /dev/null +++ b/specs_e2e/rails_8/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "@playwright/test": "^1.50.1", + "cypress": "^14.0.3", + "cypress-on-rails": "^0.1.0", + "playwright": "^1.50.1" + } +} diff --git a/specs_e2e/rails_8/playwright-report/index.html b/specs_e2e/rails_8/playwright-report/index.html new file mode 100644 index 0000000..9348a92 --- /dev/null +++ b/specs_e2e/rails_8/playwright-report/index.html @@ -0,0 +1,71 @@ + + + + + + + + + Playwright Test Report + + + + +
+ + + \ No newline at end of file diff --git a/specs_e2e/rails_8/public/400.html b/specs_e2e/rails_8/public/400.html new file mode 100644 index 0000000..282dbc8 --- /dev/null +++ b/specs_e2e/rails_8/public/400.html @@ -0,0 +1,114 @@ + + + + + + + The server cannot process the request due to a client error (400 Bad Request) + + + + + + + + + + + + + +
+
+ +
+
+

The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.

+
+
+ + + + diff --git a/specs_e2e/rails_8/public/404.html b/specs_e2e/rails_8/public/404.html new file mode 100644 index 0000000..c0670bc --- /dev/null +++ b/specs_e2e/rails_8/public/404.html @@ -0,0 +1,114 @@ + + + + + + + The page you were looking for doesn’t exist (404 Not found) + + + + + + + + + + + + + +
+
+ +
+
+

The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved. If you’re the application owner check the logs for more information.

+
+
+ + + + diff --git a/specs_e2e/rails_8/public/406-unsupported-browser.html b/specs_e2e/rails_8/public/406-unsupported-browser.html new file mode 100644 index 0000000..9532a9c --- /dev/null +++ b/specs_e2e/rails_8/public/406-unsupported-browser.html @@ -0,0 +1,114 @@ + + + + + + + Your browser is not supported (406 Not Acceptable) + + + + + + + + + + + + + +
+
+ +
+
+

Your browser is not supported.
Please upgrade your browser to continue.

+
+
+ + + + diff --git a/specs_e2e/rails_8/public/422.html b/specs_e2e/rails_8/public/422.html new file mode 100644 index 0000000..8bcf060 --- /dev/null +++ b/specs_e2e/rails_8/public/422.html @@ -0,0 +1,114 @@ + + + + + + + The change you wanted was rejected (422 Unprocessable Entity) + + + + + + + + + + + + + +
+
+ +
+
+

The change you wanted was rejected. Maybe you tried to change something you didn’t have access to. If you’re the application owner check the logs for more information.

+
+
+ + + + diff --git a/specs_e2e/rails_8/public/500.html b/specs_e2e/rails_8/public/500.html new file mode 100644 index 0000000..d77718c --- /dev/null +++ b/specs_e2e/rails_8/public/500.html @@ -0,0 +1,114 @@ + + + + + + + We’re sorry, but something went wrong (500 Internal Server Error) + + + + + + + + + + + + + +
+
+ +
+
+

We’re sorry, but something went wrong.
If you’re the application owner check the logs for more information.

+
+
+ + + + diff --git a/specs_e2e/rails_8/public/icon.png b/specs_e2e/rails_8/public/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c4c9dbfbbd2f7c1421ffd5727188146213abbcef GIT binary patch literal 4166 zcmd6qU;WFw?|v@m)Sk^&NvB8tcujdV-r1b=i(NJxn&7{KTb zX$3(M+3TP2o^#KAo{#tIjl&t~(8D-k004kqPglzn0HFG(Q~(I*AKsD#M*g7!XK0T7 zN6P7j>HcT8rZgKl$v!xr806dyN19Bd4C0x_R*I-a?#zsTvb_89cyhuC&T**i|Rc zq5b8M;+{8KvoJ~uj9`u~d_f6`V&3+&ZX9x5pc8s)d175;@pjm(?dapmBcm0&vl9+W zx1ZD2o^nuyUHWj|^A8r>lUorO`wFF;>9XL-Jy!P}UXC{(z!FO%SH~8k`#|9;Q|eue zqWL0^Bp(fg_+Pkm!fDKRSY;+^@BF?AJE zCUWpXPst~hi_~u)SzYBDZroR+Z4xeHIlm_3Yc_9nZ(o_gg!jDgVa=E}Y8uDgem9`b zf=mfJ_@(BXSkW53B)F2s!&?_R4ptb1fYXlF++@vPhd=marQgEGRZS@B4g1Mu?euknL= z67P~tZ?*>-Hmi7GwlisNHHJDku-dSm7g@!=a}9cSL6Pa^w^2?&?$Oi8ibrr>w)xqx zOH_EMU@m05)9kuNR>>4@H%|){U$^yvVQ(YgOlh;5oU_-vivG-p4=LrN-k7D?*?u1u zsWly%tfAzKd6Fb=`eU2un_uaTXmcT#tlOL+aRS=kZZf}A7qT8lvcTx~7j` z*b>=z)mwg7%B2_!D0!1IZ?Nq{^Y$uI4Qx*6T!E2Col&2{k?ImCO=dD~A&9f9diXy^$x{6CwkBimn|1E09 zAMSezYtiL?O6hS37KpvDM?22&d{l)7h-!F)C-d3j8Z`c@($?mfd{R82)H>Qe`h{~G z!I}(2j(|49{LR?w4Jspl_i!(4T{31|dqCOpI52r5NhxYV+cDAu(xp*4iqZ2e-$YP= zoFOPmm|u*7C?S{Fp43y+V;>~@FFR76bCl@pTtyB93vNWy5yf;HKr8^0d7&GVI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B-_&*Xgn9~3N literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_8/public/icon.svg b/specs_e2e/rails_8/public/icon.svg new file mode 100644 index 0000000..04b34bf --- /dev/null +++ b/specs_e2e/rails_8/public/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/specs_e2e/rails_8/public/robots.txt b/specs_e2e/rails_8/public/robots.txt new file mode 100644 index 0000000..c19f78a --- /dev/null +++ b/specs_e2e/rails_8/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/specs_e2e/rails_5_2/vendor/.keep b/specs_e2e/rails_8/storage/.keep similarity index 100% rename from specs_e2e/rails_5_2/vendor/.keep rename to specs_e2e/rails_8/storage/.keep diff --git a/specs_e2e/rails_8/storage/test.sqlite3 b/specs_e2e/rails_8/storage/test.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..1d7e03911475239e3b0c24783cdccfb0d8c61b39 GIT binary patch literal 28672 zcmeI)-)_=S90%~W3~;&uUKlPtDHo3HU;pr@+m+Q2w~VnlnaN@dIly5wLc6sGGB2lz z7e0`$;FXs?fG=R?8+ghXf`C`MarvIWp*?@v{yzQPoHpUr%d*26X?cE^a$-s;Nl~Py zgh-O4h;LkcZ%RaLEZppfUwLeM-ligLe9A5-zDcpAD=GOT@ja1Bd|tX*{yJ|0+93b| z2tWV=5P$##AOHaf+?K#)H5yOn^YVv1PU{^;{hH%)=DW00>oQK8l+#&lvFAr6yILYu z`&qd})LBDRvZB6Y?^V*Lexpr&QaPxS%5k|&4v%*C?V}U2S2|fEYM*v`Y&1$VG<-%m zYt|@Ni8w#wPM56|vZMK8NbfA{m_H=@A{I-($;*=CHrYjR-VtlM8trj!uwR>Xxix)O zYy2V-Pj7C@myZWLL8HyOwAOV_eaaor4W=3vCSj)fLzO=B12K6N^C+@$nXJ7KOCN8} z3t{TOHGQfnDw5=0m?(!zEWNrapIpaqtr4*E9&;OPh;y?WnYjMHI#*oUWou$+_VTqH zPp8xJ#|MLBo_PTe29+`~UmdiCF*{9_gqd~9{P8G>eOx`*t%yncrHV+8VTy=b%pKmD zNQ=7H6v@Qd1sA<%y?Vz9+Dsg^?s+0_-CIhW<5oh!}tG6az{#j5fusqAOHafKmY;|fB*y_009U<00RFM=qS<5TiYJ~Ct=X0 zdQqqOEwivyFe%NMR$XI;(P*)v)hHHp!!op%t`%6zG&Cc>t{LlwNpx%5EN*MYhHmD} z;?}$#OWTp7nMbzG+`i*`ZkM^7vw+VYZ|00S=MX))@cqA%{2?WOi3$Y*5P$##AOHaf fKmY;|fB*y_0D=EgAQ{QXV^1ZNL?p8~_T1n%waHY0 literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_8/storage/test.sqlite3-shm b/specs_e2e/rails_8/storage/test.sqlite3-shm new file mode 100644 index 0000000000000000000000000000000000000000..d657a3bddcf33d4e42a762ac6209ea9dbf4bf7aa GIT binary patch literal 32768 zcmeI)M^3^~5P4aK%>t7(;Yvbm8Kg zWHOVNm&tp-15DyMMJZN-tbpiEP-}yH$=yCYJ*LCSY^+dxEyVBdPBW2WOFr?#`@yJ> zD9wHQ5}(KAQWR{7RJ&i7bKtdg*77BqNM5!4xTGm?Og?%dE1_CRuXq zvdL) z7wjqz9u>Rxui5bQ@()k@r-Q1(CwKo!_>+wQ0RjXF5FkK+009C72oM;W0^z(sG+(go ztmSjBKjZKB59bBSl8+>U|7-*Z5FkK+009C72oNAZfWV*n+|u4rpQ_JJN!3rOPuJAtr=}aGW^%RJ#!RLm(|b#BS|fr-lowb$>Kosh`@=O4 zcFzlRC6Zl(>cn-1009C72oNAZfB*pk1PBn=Yk|>aBMzxt-qz9C5ge-EI)Xb}#!o%y zvlq_absd4cz+PiJ009C72oNAZfB*pk1PBo5V}bt53oN>KTUX`MH+~<@3&;!f@z^;W z0RjXF5FkK+009C72oM-(fgX8*sJ_6Z>%P6<#3`%m)fX7(G4lEZ2oNAZfB*pk1PBly zK%h5)C@;{wvS#Me_Kwb)GlGi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L@#2UZAlySKpY)tNQ=| literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_8/test-results/.last-run.json b/specs_e2e/rails_8/test-results/.last-run.json new file mode 100644 index 0000000..cbcc1fb --- /dev/null +++ b/specs_e2e/rails_8/test-results/.last-run.json @@ -0,0 +1,4 @@ +{ + "status": "passed", + "failedTests": [] +} \ No newline at end of file diff --git a/specs_e2e/rails_5_2/test.sh b/specs_e2e/rails_8/test.sh similarity index 98% rename from specs_e2e/rails_5_2/test.sh rename to specs_e2e/rails_8/test.sh index e91b55c..ce1b8e2 100755 --- a/specs_e2e/rails_5_2/test.sh +++ b/specs_e2e/rails_8/test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail -echo '--- testing rails 5.2' +echo '--- testing rails 7.2.2' echo '-- setting environment' export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/specs_e2e/rails_8/test/application_system_test_case.rb b/specs_e2e/rails_8/test/application_system_test_case.rb new file mode 100644 index 0000000..cee29fd --- /dev/null +++ b/specs_e2e/rails_8/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ] +end diff --git a/specs_e2e/rails_5_2/test/controllers/posts_controller_test.rb b/specs_e2e/rails_8/test/controllers/posts_controller_test.rb similarity index 100% rename from specs_e2e/rails_5_2/test/controllers/posts_controller_test.rb rename to specs_e2e/rails_8/test/controllers/posts_controller_test.rb diff --git a/specs_e2e/rails_5_2/test/cypress_fixtures/posts.yml b/specs_e2e/rails_8/test/cypress_fixtures/posts.yml similarity index 100% rename from specs_e2e/rails_5_2/test/cypress_fixtures/posts.yml rename to specs_e2e/rails_8/test/cypress_fixtures/posts.yml diff --git a/specs_e2e/rails_5_2/test/fixtures/posts.yml b/specs_e2e/rails_8/test/fixtures/posts.yml similarity index 100% rename from specs_e2e/rails_5_2/test/fixtures/posts.yml rename to specs_e2e/rails_8/test/fixtures/posts.yml diff --git a/specs_e2e/rails_5_2/test/models/post_test.rb b/specs_e2e/rails_8/test/models/post_test.rb similarity index 100% rename from specs_e2e/rails_5_2/test/models/post_test.rb rename to specs_e2e/rails_8/test/models/post_test.rb diff --git a/specs_e2e/rails_8/test/test_helper.rb b/specs_e2e/rails_8/test/test_helper.rb new file mode 100644 index 0000000..0c22470 --- /dev/null +++ b/specs_e2e/rails_8/test/test_helper.rb @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +module ActiveSupport + class 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 +end diff --git a/specs_e2e/rails_5_2/public/apple-touch-icon-precomposed.png b/specs_e2e/rails_8/vendor/.keep similarity index 100% rename from specs_e2e/rails_5_2/public/apple-touch-icon-precomposed.png rename to specs_e2e/rails_8/vendor/.keep diff --git a/specs_e2e/rails_5_2/public/apple-touch-icon.png b/specs_e2e/rails_8/vendor/javascript/.keep similarity index 100% rename from specs_e2e/rails_5_2/public/apple-touch-icon.png rename to specs_e2e/rails_8/vendor/javascript/.keep From 37acfadd8b405a756cb9d4eaaaa1596c1e195283 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 16 Mar 2025 18:08:53 +0100 Subject: [PATCH 2/2] Update version --- specs_e2e/rails_8/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs_e2e/rails_8/test.sh b/specs_e2e/rails_8/test.sh index ce1b8e2..91c70fc 100755 --- a/specs_e2e/rails_8/test.sh +++ b/specs_e2e/rails_8/test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail -echo '--- testing rails 7.2.2' +echo '--- testing rails 8' echo '-- setting environment' export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"