From 7280aea6b70d8b2875510418665891861f9112d9 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 12 Jan 2025 18:16:26 +0100 Subject: [PATCH 01/10] Add rails 6.1 --- .github/workflows/ruby.yml | 8 +- specs_e2e/rails_6_1_7/.gitattributes | 10 ++ specs_e2e/rails_6_1_7/.gitignore | 16 +++ specs_e2e/rails_6_1_7/Gemfile | 21 +++ specs_e2e/rails_6_1_7/Rakefile | 6 + .../app/assets/stylesheets/application.css | 15 +++ .../app/controllers/application_controller.rb | 2 + .../app/controllers/posts_controller.rb | 58 +++++++++ .../rails_6_1_7/app/helpers/posts_helper.rb | 2 + .../rails_6_1_7/app/jobs/application_job.rb | 7 + .../app/models/application_record.rb | 3 + specs_e2e/rails_6_1_7/app/models/post.rb | 2 + .../app/views/layouts/application.html.erb | 12 ++ .../app/views/posts/_form.html.erb | 32 +++++ .../rails_6_1_7/app/views/posts/edit.html.erb | 6 + .../app/views/posts/index.html.erb | 31 +++++ .../rails_6_1_7/app/views/posts/new.html.erb | 5 + .../rails_6_1_7/app/views/posts/show.html.erb | 19 +++ specs_e2e/rails_6_1_7/bin/bundle | 114 +++++++++++++++++ specs_e2e/rails_6_1_7/bin/rails | 5 + specs_e2e/rails_6_1_7/bin/rake | 5 + specs_e2e/rails_6_1_7/bin/setup | 36 ++++++ specs_e2e/rails_6_1_7/bin/spring | 14 ++ specs_e2e/rails_6_1_7/bin/yarn | 17 +++ specs_e2e/rails_6_1_7/config.ru | 6 + specs_e2e/rails_6_1_7/config/application.rb | 33 +++++ specs_e2e/rails_6_1_7/config/boot.rb | 4 + specs_e2e/rails_6_1_7/config/cable.yml | 10 ++ .../rails_6_1_7/config/credentials.yml.enc | 1 + specs_e2e/rails_6_1_7/config/database.yml | 22 ++++ specs_e2e/rails_6_1_7/config/environment.rb | 5 + .../config/environments/development.rb | 57 +++++++++ .../config/environments/production.rb | 120 ++++++++++++++++++ .../rails_6_1_7/config/environments/test.rb | 53 ++++++++ .../application_controller_renderer.rb | 8 ++ .../initializers/backtrace_silencers.rb | 8 ++ .../initializers/content_security_policy.rb | 30 +++++ .../config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 6 + .../config/initializers/inflections.rb | 16 +++ .../config/initializers/mime_types.rb | 4 + .../config/initializers/permissions_policy.rb | 11 ++ .../config/initializers/wrap_parameters.rb | 14 ++ specs_e2e/rails_6_1_7/config/locales/en.yml | 33 +++++ specs_e2e/rails_6_1_7/config/master.key | 1 + specs_e2e/rails_6_1_7/config/puma.rb | 43 +++++++ specs_e2e/rails_6_1_7/config/routes.rb | 5 + specs_e2e/rails_6_1_7/config/storage.yml | 34 +++++ .../db/migrate/20180621085832_create_posts.rb | 11 ++ specs_e2e/rails_6_1_7/package.json | 8 ++ specs_e2e/rails_6_1_7/public/404.html | 67 ++++++++++ specs_e2e/rails_6_1_7/public/422.html | 67 ++++++++++ specs_e2e/rails_6_1_7/public/500.html | 66 ++++++++++ .../public/apple-touch-icon-precomposed.png | 0 .../rails_6_1_7/public/apple-touch-icon.png | 0 specs_e2e/rails_6_1_7/public/favicon.ico | 0 specs_e2e/rails_6_1_7/public/robots.txt | 1 + specs_e2e/rails_6_1_7/test.sh | 57 +++++++++ .../test/controllers/posts_controller_test.rb | 48 +++++++ .../test/cypress_fixtures/posts.yml | 11 ++ specs_e2e/rails_6_1_7/test/fixtures/posts.yml | 11 ++ .../rails_6_1_7/test/models/post_test.rb | 7 + specs_e2e/rails_6_1_7/vendor/.keep | 0 63 files changed, 1324 insertions(+), 5 deletions(-) create mode 100644 specs_e2e/rails_6_1_7/.gitattributes create mode 100644 specs_e2e/rails_6_1_7/.gitignore create mode 100644 specs_e2e/rails_6_1_7/Gemfile create mode 100644 specs_e2e/rails_6_1_7/Rakefile create mode 100644 specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css create mode 100644 specs_e2e/rails_6_1_7/app/controllers/application_controller.rb create mode 100644 specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb create mode 100644 specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb create mode 100644 specs_e2e/rails_6_1_7/app/jobs/application_job.rb create mode 100644 specs_e2e/rails_6_1_7/app/models/application_record.rb create mode 100644 specs_e2e/rails_6_1_7/app/models/post.rb create mode 100644 specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb create mode 100644 specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb create mode 100644 specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb create mode 100644 specs_e2e/rails_6_1_7/app/views/posts/index.html.erb create mode 100644 specs_e2e/rails_6_1_7/app/views/posts/new.html.erb create mode 100644 specs_e2e/rails_6_1_7/app/views/posts/show.html.erb create mode 100755 specs_e2e/rails_6_1_7/bin/bundle create mode 100755 specs_e2e/rails_6_1_7/bin/rails create mode 100755 specs_e2e/rails_6_1_7/bin/rake create mode 100755 specs_e2e/rails_6_1_7/bin/setup create mode 100755 specs_e2e/rails_6_1_7/bin/spring create mode 100755 specs_e2e/rails_6_1_7/bin/yarn create mode 100644 specs_e2e/rails_6_1_7/config.ru create mode 100644 specs_e2e/rails_6_1_7/config/application.rb create mode 100644 specs_e2e/rails_6_1_7/config/boot.rb create mode 100644 specs_e2e/rails_6_1_7/config/cable.yml create mode 100644 specs_e2e/rails_6_1_7/config/credentials.yml.enc create mode 100644 specs_e2e/rails_6_1_7/config/database.yml create mode 100644 specs_e2e/rails_6_1_7/config/environment.rb create mode 100644 specs_e2e/rails_6_1_7/config/environments/development.rb create mode 100644 specs_e2e/rails_6_1_7/config/environments/production.rb create mode 100644 specs_e2e/rails_6_1_7/config/environments/test.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/backtrace_silencers.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/filter_parameter_logging.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/inflections.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/mime_types.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/permissions_policy.rb create mode 100644 specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb create mode 100644 specs_e2e/rails_6_1_7/config/locales/en.yml create mode 100644 specs_e2e/rails_6_1_7/config/master.key create mode 100644 specs_e2e/rails_6_1_7/config/puma.rb create mode 100644 specs_e2e/rails_6_1_7/config/routes.rb create mode 100644 specs_e2e/rails_6_1_7/config/storage.yml create mode 100644 specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb create mode 100644 specs_e2e/rails_6_1_7/package.json create mode 100644 specs_e2e/rails_6_1_7/public/404.html create mode 100644 specs_e2e/rails_6_1_7/public/422.html create mode 100644 specs_e2e/rails_6_1_7/public/500.html create mode 100644 specs_e2e/rails_6_1_7/public/apple-touch-icon-precomposed.png create mode 100644 specs_e2e/rails_6_1_7/public/apple-touch-icon.png create mode 100644 specs_e2e/rails_6_1_7/public/favicon.ico create mode 100644 specs_e2e/rails_6_1_7/public/robots.txt create mode 100755 specs_e2e/rails_6_1_7/test.sh create mode 100644 specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb create mode 100644 specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml create mode 100644 specs_e2e/rails_6_1_7/test/fixtures/posts.yml create mode 100644 specs_e2e/rails_6_1_7/test/models/post_test.rb create mode 100644 specs_e2e/rails_6_1_7/vendor/.keep diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bf58efa5..25cfe89c 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - rails_3_2: + rails_6_1_7: runs-on: ubuntu-latest steps: @@ -15,14 +15,12 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.3 + ruby-version: 2.7 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_3_2/test.sh + run: ./specs_e2e/rails_6_1_7/test.sh env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/specs_e2e/rails_6_1_7/.gitattributes b/specs_e2e/rails_6_1_7/.gitattributes new file mode 100644 index 00000000..51685710 --- /dev/null +++ b/specs_e2e/rails_6_1_7/.gitattributes @@ -0,0 +1,10 @@ +# See https://git-scm.com/docs/gitattributes for more about git attribute files. + +# Mark the database schema as having been generated. +db/schema.rb linguist-generated + +# Mark the yarn lockfile as having been generated. +yarn.lock linguist-generated + +# Mark any vendored files as having been vendored. +vendor/* linguist-vendored diff --git a/specs_e2e/rails_6_1_7/.gitignore b/specs_e2e/rails_6_1_7/.gitignore new file mode 100644 index 00000000..d62f7767 --- /dev/null +++ b/specs_e2e/rails_6_1_7/.gitignore @@ -0,0 +1,16 @@ +.bundle +test/node_modules +test/cypress.config.js +test/playwright.config.js +test/package.json +test/yarn.lock +test/cypress/ +test/playwright/ +test/playwright-report/ +config/initializers/cypress_on_rails.rb +vendor/bundle +db/*.sqlite3 +db/schema.rb +tmp/* +log/* +specs_e2e/server.pid diff --git a/specs_e2e/rails_6_1_7/Gemfile b/specs_e2e/rails_6_1_7/Gemfile new file mode 100644 index 00000000..bd5a7da0 --- /dev/null +++ b/specs_e2e/rails_6_1_7/Gemfile @@ -0,0 +1,21 @@ +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +ruby '2.7.6' + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' +gem 'rails', '~> 6.1.7', '>= 6.1.7.10' +# Use sqlite3 as the database for Active Record +gem 'sqlite3', '~> 1.4' +# Use Puma as the app server +gem 'puma', '~> 5.0' + +# Reduces boot times through caching; required in config/boot.rb +gem 'bootsnap', '>= 1.4.4', require: false +gem 'date', '~> 3.3.3' +gem 'timeout', '~> 0.3.2' + +group :development, :test do + gem 'cypress-on-rails', path: '../../' + gem 'database_cleaner' +end diff --git a/specs_e2e/rails_6_1_7/Rakefile b/specs_e2e/rails_6_1_7/Rakefile new file mode 100644 index 00000000..9a5ea738 --- /dev/null +++ b/specs_e2e/rails_6_1_7/Rakefile @@ -0,0 +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" + +Rails.application.load_tasks diff --git a/specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css b/specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css new file mode 100644 index 00000000..d05ea0f5 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/specs_e2e/rails_6_1_7/app/controllers/application_controller.rb b/specs_e2e/rails_6_1_7/app/controllers/application_controller.rb new file mode 100644 index 00000000..09705d12 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/controllers/application_controller.rb @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb b/specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb new file mode 100644 index 00000000..fed5ab9c --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb @@ -0,0 +1,58 @@ +class PostsController < ApplicationController + before_action :set_post, only: [:show, :edit, :update, :destroy] + + # GET /posts + def index + @posts = Post.all + end + + # GET /posts/1 + def show + end + + # GET /posts/new + def new + @post = Post.new + end + + # GET /posts/1/edit + def edit + end + + # POST /posts + def create + @post = Post.new(post_params) + + if @post.save + redirect_to @post, notice: 'Post was successfully created.' + else + render :new + end + end + + # PATCH/PUT /posts/1 + def update + if @post.update(post_params) + redirect_to @post, notice: 'Post was successfully updated.' + else + render :edit + end + end + + # DELETE /posts/1 + def destroy + @post.destroy + redirect_to posts_url, notice: 'Post was successfully destroyed.' + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_post + @post = Post.find(params[:id]) + end + + # Only allow a trusted parameter "white list" through. + def post_params + params.require(:post).permit(:title, :body, :published) + end +end diff --git a/specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb b/specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb new file mode 100644 index 00000000..a7b8cec8 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb @@ -0,0 +1,2 @@ +module PostsHelper +end diff --git a/specs_e2e/rails_6_1_7/app/jobs/application_job.rb b/specs_e2e/rails_6_1_7/app/jobs/application_job.rb new file mode 100644 index 00000000..d394c3d1 --- /dev/null +++ b/specs_e2e/rails_6_1_7/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_6_1_7/app/models/application_record.rb b/specs_e2e/rails_6_1_7/app/models/application_record.rb new file mode 100644 index 00000000..10a4cba8 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/specs_e2e/rails_6_1_7/app/models/post.rb b/specs_e2e/rails_6_1_7/app/models/post.rb new file mode 100644 index 00000000..b2a8b463 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/models/post.rb @@ -0,0 +1,2 @@ +class Post < ApplicationRecord +end diff --git a/specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb b/specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb new file mode 100644 index 00000000..1ca57219 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb @@ -0,0 +1,12 @@ + + + + App + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + + + <%= yield %> + + diff --git a/specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb b/specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb new file mode 100644 index 00000000..64599988 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb @@ -0,0 +1,32 @@ +<%= form_with(model: post, local: true) do |form| %> + <% if post.errors.any? %> +
+

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

+ + +
+ <% end %> + +
+ <%= form.label :title %> + <%= form.text_field :title %> +
+ +
+ <%= form.label :body %> + <%= form.text_area :body %> +
+ +
+ <%= form.label :published %> + <%= form.check_box :published %> +
+ +
+ <%= form.submit %> +
+<% end %> diff --git a/specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb b/specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb new file mode 100644 index 00000000..ded33f77 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Post

+ +<%= render 'form', post: @post %> + +<%= link_to 'Show', @post %> | +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_6_1_7/app/views/posts/index.html.erb b/specs_e2e/rails_6_1_7/app/views/posts/index.html.erb new file mode 100644 index 00000000..50cbc31b --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/posts/index.html.erb @@ -0,0 +1,31 @@ +

<%= notice %>

+ +

Posts

+ + + + + + + + + + + + + <% @posts.each do |post| %> + + + + + + + + + <% end %> + +
TitleBodyPublished
<%= post.title %><%= post.body %><%= post.published %><%= link_to 'Show', post %><%= link_to 'Edit', edit_post_path(post) %><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Post', new_post_path %> diff --git a/specs_e2e/rails_6_1_7/app/views/posts/new.html.erb b/specs_e2e/rails_6_1_7/app/views/posts/new.html.erb new file mode 100644 index 00000000..fb1e2a12 --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/posts/new.html.erb @@ -0,0 +1,5 @@ +

New Post

+ +<%= render 'form', post: @post %> + +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_6_1_7/app/views/posts/show.html.erb b/specs_e2e/rails_6_1_7/app/views/posts/show.html.erb new file mode 100644 index 00000000..85b8fe8d --- /dev/null +++ b/specs_e2e/rails_6_1_7/app/views/posts/show.html.erb @@ -0,0 +1,19 @@ +

<%= notice %>

+ +

+ Title: + <%= @post.title %> +

+ +

+ Body: + <%= @post.body %> +

+ +

+ Published: + <%= @post.published %> +

+ +<%= link_to 'Edit', edit_post_path(@post) %> | +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_6_1_7/bin/bundle b/specs_e2e/rails_6_1_7/bin/bundle new file mode 100755 index 00000000..981e650b --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/bundle @@ -0,0 +1,114 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_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) + + requirement = bundler_gem_version.approximate_recommendation + + return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0") + + requirement += ".a" if bundler_gem_version.prerelease? + + requirement + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/specs_e2e/rails_6_1_7/bin/rails b/specs_e2e/rails_6_1_7/bin/rails new file mode 100755 index 00000000..21d3e02d --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/rails @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +load File.expand_path("spring", __dir__) +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/specs_e2e/rails_6_1_7/bin/rake b/specs_e2e/rails_6_1_7/bin/rake new file mode 100755 index 00000000..7327f471 --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/rake @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +load File.expand_path("spring", __dir__) +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/specs_e2e/rails_6_1_7/bin/setup b/specs_e2e/rails_6_1_7/bin/setup new file mode 100755 index 00000000..90700ac4 --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/setup @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path('..', __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies + system! 'bin/yarn' + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:prepare' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/specs_e2e/rails_6_1_7/bin/spring b/specs_e2e/rails_6_1_7/bin/spring new file mode 100755 index 00000000..b4147e84 --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/spring @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"]) + gem "bundler" + require "bundler" + + # Load Spring without loading other gems in the Gemfile, for speed. + Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring| + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem "spring", spring.version + require "spring/binstub" + rescue Gem::LoadError + # Ignore when Spring is not installed. + end +end diff --git a/specs_e2e/rails_6_1_7/bin/yarn b/specs_e2e/rails_6_1_7/bin/yarn new file mode 100755 index 00000000..9fab2c35 --- /dev/null +++ b/specs_e2e/rails_6_1_7/bin/yarn @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end diff --git a/specs_e2e/rails_6_1_7/config.ru b/specs_e2e/rails_6_1_7/config.ru new file mode 100644 index 00000000..4a3c09a6 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/specs_e2e/rails_6_1_7/config/application.rb b/specs_e2e/rails_6_1_7/config/application.rb new file mode 100644 index 00000000..60ac0c32 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/application.rb @@ -0,0 +1,33 @@ +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_text/engine' +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 App + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 6.1 + + # 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_6_1_7/config/boot.rb b/specs_e2e/rails_6_1_7/config/boot.rb new file mode 100644 index 00000000..3cda23b4 --- /dev/null +++ b/specs_e2e/rails_6_1_7/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_6_1_7/config/cable.yml b/specs_e2e/rails_6_1_7/config/cable.yml new file mode 100644 index 00000000..f39dc046 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: app_production diff --git a/specs_e2e/rails_6_1_7/config/credentials.yml.enc b/specs_e2e/rails_6_1_7/config/credentials.yml.enc new file mode 100644 index 00000000..82a72f20 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/credentials.yml.enc @@ -0,0 +1 @@ +XtTHzvHZqvH5arbcy28CkITjkhSQBOBwMZFJrrgvc3INakLJ5SBAfFeH9SdC/dQzBQ2v78cvrY7/xCsb2ELVwqp7Vhx20tPtsY1EZMz1f74m8FwYGlmq5GZI+uRVBv0rg7wNuvJPTry0L8HwpeM2gOpLlt85xe8sCMqzgugVxsysghW4FtQ3lx2zz48fsfnmnUN1iEKUvMyvBp9zTquiU2PkzoCPmckgymr8DNngKi6ArUOfzuVEgY0hKcL+ojk2kLImz1lQgMyC+691vo4AcT+X0yqt2O0SE5oOE8mx2HDZTMQ9GRjUl5Vm1CXsAiexKzyGR9J/4W82adD9TphlWJyBIM/FAndnqZDOBDCqZ0nvSNozcSccl3/LwFnkFhbHZXzpwkk5HpKzo91GZx8iha9+qITA6Yuz6k1B--j3HcmMwqzAV9IIBY--j4Il3ndJojPt4B3UvF1QWQ== \ No newline at end of file diff --git a/specs_e2e/rails_6_1_7/config/database.yml b/specs_e2e/rails_6_1_7/config/database.yml new file mode 100644 index 00000000..39e512b6 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/database.yml @@ -0,0 +1,22 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# + +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 diff --git a/specs_e2e/rails_6_1_7/config/environment.rb b/specs_e2e/rails_6_1_7/config/environment.rb new file mode 100644 index 00000000..cac53157 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/specs_e2e/rails_6_1_7/config/environments/development.rb b/specs_e2e/rails_6_1_7/config/environments/development.rb new file mode 100644 index 00000000..c17e1987 --- /dev/null +++ b/specs_e2e/rails_6_1_7/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. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/specs_e2e/rails_6_1_7/config/environments/production.rb b/specs_e2e/rails_6_1_7/config/environments/production.rb new file mode 100644 index 00000000..36dd9800 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/environments/production.rb @@ -0,0 +1,120 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). + config.log_level = :info + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "app_production" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Log disallowed deprecations. + config.active_support.disallowed_deprecation = :log + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require "syslog/logger" + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Inserts middleware to perform automatic connection switching. + # The `database_selector` hash is used to pass options to the DatabaseSelector + # middleware. The `delay` is used to determine how long to wait after a write + # to send a subsequent read to the primary. + # + # The `database_resolver` class is used by the middleware to determine which + # database is appropriate to use based on the time delay. + # + # The `database_resolver_context` class is used by the middleware to set + # timestamps for the last write to the primary. The resolver uses the context + # class timestamps to determine how long to wait before reading from the + # replica. + # + # By default Rails will store a last write timestamp in the session. The + # DatabaseSelector middleware is designed as such you can define your own + # strategy for connection switching and pass that into the middleware through + # these configuration options. + # config.active_record.database_selector = { delay: 2.seconds } + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session +end diff --git a/specs_e2e/rails_6_1_7/config/environments/test.rb b/specs_e2e/rails_6_1_7/config/environments/test.rb new file mode 100644 index 00000000..328a1eb3 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/environments/test.rb @@ -0,0 +1,53 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + config.cache_classes = false + config.action_view.cache_template_loading = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory. + config.active_storage.service = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true +end diff --git a/specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb b/specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb new file mode 100644 index 00000000..89d2efab --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# 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_6_1_7/config/initializers/backtrace_silencers.rb b/specs_e2e/rails_6_1_7/config/initializers/backtrace_silencers.rb new file mode 100644 index 00000000..33699c30 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/backtrace_silencers.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb b/specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb new file mode 100644 index 00000000..35d0f26f --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb @@ -0,0 +1,30 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy +# For further information see the following documentation +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # If you are using webpack-dev-server then specify webpack-dev-server host +# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? + +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end + +# If you are using UJS then enable automatic nonce generation +# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } + +# Set the nonce only to specific directives +# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) + +# Report CSP violations to a specified URI +# For further information see the following documentation: +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# Rails.application.config.content_security_policy_report_only = true diff --git a/specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb b/specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb new file mode 100644 index 00000000..5a6a32d3 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# 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_6_1_7/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_6_1_7/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4b34a036 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/specs_e2e/rails_6_1_7/config/initializers/inflections.rb b/specs_e2e/rails_6_1_7/config/initializers/inflections.rb new file mode 100644 index 00000000..ac033bf9 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/specs_e2e/rails_6_1_7/config/initializers/mime_types.rb b/specs_e2e/rails_6_1_7/config/initializers/mime_types.rb new file mode 100644 index 00000000..dc189968 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# 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_6_1_7/config/initializers/permissions_policy.rb b/specs_e2e/rails_6_1_7/config/initializers/permissions_policy.rb new file mode 100644 index 00000000..00f64d71 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb b/specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000..bbfc3961 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/specs_e2e/rails_6_1_7/config/locales/en.yml b/specs_e2e/rails_6_1_7/config/locales/en.yml new file mode 100644 index 00000000..cf9b342d --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# 'true': 'foo' +# +# To learn more, please read the Rails Internationalization guide +# available at https://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/specs_e2e/rails_6_1_7/config/master.key b/specs_e2e/rails_6_1_7/config/master.key new file mode 100644 index 00000000..3c318db4 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/master.key @@ -0,0 +1 @@ +d4410d4dc7e27ed1b7657c233947edd6 \ No newline at end of file diff --git a/specs_e2e/rails_6_1_7/config/puma.rb b/specs_e2e/rails_6_1_7/config/puma.rb new file mode 100644 index 00000000..d9b3e836 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/puma.rb @@ -0,0 +1,43 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +# +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked web server processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/specs_e2e/rails_6_1_7/config/routes.rb b/specs_e2e/rails_6_1_7/config/routes.rb new file mode 100644 index 00000000..a5cbafd0 --- /dev/null +++ b/specs_e2e/rails_6_1_7/config/routes.rb @@ -0,0 +1,5 @@ +Rails.application.routes.draw do + resources :posts + root 'posts#index' + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/specs_e2e/rails_6_1_7/config/storage.yml b/specs_e2e/rails_6_1_7/config/storage.yml new file mode 100644 index 00000000..d32f76e8 --- /dev/null +++ b/specs_e2e/rails_6_1_7/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 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 + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket + +# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] diff --git a/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb new file mode 100644 index 00000000..57ef6bba --- /dev/null +++ b/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb @@ -0,0 +1,11 @@ +class CreatePosts < ActiveRecord::Migration[5.2] + def change + create_table :posts do |t| + t.string :title + t.text :body + t.boolean :published + + t.timestamps + end + end +end diff --git a/specs_e2e/rails_6_1_7/package.json b/specs_e2e/rails_6_1_7/package.json new file mode 100644 index 00000000..6231077e --- /dev/null +++ b/specs_e2e/rails_6_1_7/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "@playwright/test": "^1.49.1", + "cypress": "^13.17.0", + "cypress-on-rails": "^0.1.0", + "playwright": "^1.49.1" + } +} diff --git a/specs_e2e/rails_6_1_7/public/404.html b/specs_e2e/rails_6_1_7/public/404.html new file mode 100644 index 00000000..2be3af26 --- /dev/null +++ b/specs_e2e/rails_6_1_7/public/404.html @@ -0,0 +1,67 @@ + + + + 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_6_1_7/public/422.html b/specs_e2e/rails_6_1_7/public/422.html new file mode 100644 index 00000000..c08eac0d --- /dev/null +++ b/specs_e2e/rails_6_1_7/public/422.html @@ -0,0 +1,67 @@ + + + + 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_6_1_7/public/500.html b/specs_e2e/rails_6_1_7/public/500.html new file mode 100644 index 00000000..78a030af --- /dev/null +++ b/specs_e2e/rails_6_1_7/public/500.html @@ -0,0 +1,66 @@ + + + + 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_6_1_7/public/apple-touch-icon-precomposed.png b/specs_e2e/rails_6_1_7/public/apple-touch-icon-precomposed.png new file mode 100644 index 00000000..e69de29b diff --git a/specs_e2e/rails_6_1_7/public/apple-touch-icon.png b/specs_e2e/rails_6_1_7/public/apple-touch-icon.png new file mode 100644 index 00000000..e69de29b diff --git a/specs_e2e/rails_6_1_7/public/favicon.ico b/specs_e2e/rails_6_1_7/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/specs_e2e/rails_6_1_7/public/robots.txt b/specs_e2e/rails_6_1_7/public/robots.txt new file mode 100644 index 00000000..c19f78ab --- /dev/null +++ b/specs_e2e/rails_6_1_7/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_6_1_7/test.sh b/specs_e2e/rails_6_1_7/test.sh new file mode 100755 index 00000000..6cc7a942 --- /dev/null +++ b/specs_e2e/rails_6_1_7/test.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +set -eo pipefail + +echo '--- testing rails 6.1.7' + +echo '-- setting environment' +export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +export RAILS_ENV=test +export BUNDLE_GEMFILE="$DIR/Gemfile" +cd $DIR + +echo '-- bundle install' +bundle --version +bundle config set --local path 'vendor/bundle' +bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 + +echo '-- migration' +bundle exec ./bin/rails db:drop || true +bundle exec ./bin/rails db:create db:migrate + +echo '-- cypress install' +bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework cypress --install_with=npm --force +rm -vf test/cypress/e2e/rails_examples/using_vcr.cy.js + +echo '-- start rails server' +# make sure the server is not running +(kill -9 `cat ../server.pid` || true ) + +bundle exec ./bin/rails server -p 5017 -e test -P ../server.pid & +sleep 2 # give rails a chance to start up correctly + +echo '-- cypress run' +cp -fv ../cypress.config.js test/ +cd test +npx cypress install +# if [ -z $CYPRESS_RECORD_KEY ] +# then +# npx cypress run +# else + npx cypress run # --record +# fi + +echo '-- playwright install' +cd .. +bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework playwright --install_with=npm --force +rm -vf test/playwright/e2e/rails_examples/using_vcr.cy.js + +echo '-- playwright run' +cd test +cp -fv ../../playwright.config.js . +npx playwright install-deps +npx playwright install +npx playwright test test/playwright +# npx playwright show-report + +echo '-- stop rails server' +kill -9 `cat ../../server.pid` || true diff --git a/specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb b/specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb new file mode 100644 index 00000000..14af994d --- /dev/null +++ b/specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PostsControllerTest < ActionDispatch::IntegrationTest + setup do + @post = posts(:one) + end + + test "should get index" do + get posts_url + assert_response :success + end + + test "should get new" do + get new_post_url + assert_response :success + end + + test "should create post" do + assert_difference('Post.count') do + post posts_url, params: { post: { body: @post.body, published: @post.published, title: @post.title } } + end + + assert_redirected_to post_url(Post.last) + end + + test "should show post" do + get post_url(@post) + assert_response :success + end + + test "should get edit" do + get edit_post_url(@post) + assert_response :success + end + + test "should update post" do + patch post_url(@post), params: { post: { body: @post.body, published: @post.published, title: @post.title } } + assert_redirected_to post_url(@post) + end + + test "should destroy post" do + assert_difference('Post.count', -1) do + delete post_url(@post) + end + + assert_redirected_to posts_url + end +end diff --git a/specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml b/specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml new file mode 100644 index 00000000..70580204 --- /dev/null +++ b/specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyCypressFixtures + body: MyText + published: true + +two: + title: MyCypressFixtures2 + body: MyText + published: true diff --git a/specs_e2e/rails_6_1_7/test/fixtures/posts.yml b/specs_e2e/rails_6_1_7/test/fixtures/posts.yml new file mode 100644 index 00000000..9fa2b741 --- /dev/null +++ b/specs_e2e/rails_6_1_7/test/fixtures/posts.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyRailsFixtures + body: MyText + published: false + +two: + title: MyRailsFixtures2 + body: MyText + published: false diff --git a/specs_e2e/rails_6_1_7/test/models/post_test.rb b/specs_e2e/rails_6_1_7/test/models/post_test.rb new file mode 100644 index 00000000..6d9d463a --- /dev/null +++ b/specs_e2e/rails_6_1_7/test/models/post_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PostTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/specs_e2e/rails_6_1_7/vendor/.keep b/specs_e2e/rails_6_1_7/vendor/.keep new file mode 100644 index 00000000..e69de29b From 5d94a521b135fa2657ccfb11320e5f7e0683e82e Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 12 Jan 2025 18:19:10 +0100 Subject: [PATCH 02/10] Remove ruby version --- specs_e2e/rails_6_1_7/Gemfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/specs_e2e/rails_6_1_7/Gemfile b/specs_e2e/rails_6_1_7/Gemfile index bd5a7da0..56eac9a6 100644 --- a/specs_e2e/rails_6_1_7/Gemfile +++ b/specs_e2e/rails_6_1_7/Gemfile @@ -1,8 +1,6 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.7.6' - # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' gem 'rails', '~> 6.1.7', '>= 6.1.7.10' # Use sqlite3 as the database for Active Record From a31884040d73cbba98aa6dae6e32d602d953fa66 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Fri, 17 Jan 2025 16:34:34 +0100 Subject: [PATCH 03/10] Remove 3.2 version --- specs_e2e/rails_3_2/.gitignore | 9 - specs_e2e/rails_3_2/.ruby_version | 1 - specs_e2e/rails_3_2/Gemfile | 7 - specs_e2e/rails_3_2/README.rdoc | 261 ------------------ specs_e2e/rails_3_2/Rakefile | 7 - .../app/assets/stylesheets/application.css | 13 - .../app/controllers/application_controller.rb | 3 - .../app/controllers/welcome_controller.rb | 4 - .../app/helpers/application_helper.rb | 2 - specs_e2e/rails_3_2/app/models/post.rb | 21 -- .../app/views/layouts/application.html.erb | 13 - .../app/views/welcome/index.html.erb | 24 -- specs_e2e/rails_3_2/bin/rails | 6 - specs_e2e/rails_3_2/config.ru | 4 - specs_e2e/rails_3_2/config/application.rb | 68 ----- specs_e2e/rails_3_2/config/boot.rb | 6 - specs_e2e/rails_3_2/config/environment.rb | 5 - .../config/environments/development.rb | 31 --- .../config/environments/production.rb | 64 ----- .../rails_3_2/config/environments/test.rb | 35 --- .../initializers/backtrace_silencers.rb | 7 - .../config/initializers/inflections.rb | 15 - .../config/initializers/mime_types.rb | 5 - .../config/initializers/secret_token.rb | 7 - .../config/initializers/session_store.rb | 8 - .../config/initializers/wrap_parameters.rb | 10 - specs_e2e/rails_3_2/config/locales/en.yml | 5 - specs_e2e/rails_3_2/config/routes.rb | 60 ---- specs_e2e/rails_3_2/log/.keep | 0 specs_e2e/rails_3_2/public/404.html | 26 -- specs_e2e/rails_3_2/public/422.html | 26 -- specs_e2e/rails_3_2/public/500.html | 25 -- specs_e2e/rails_3_2/public/favicon.ico | 0 specs_e2e/rails_3_2/public/robots.txt | 5 - specs_e2e/rails_3_2/test.sh | 50 ---- specs_e2e/rails_3_2/tmp/.keep | 0 specs_e2e/rails_3_2/vendor/.gitkeep | 0 .../db/migrate/20180621085832_create_posts.rb | 2 +- 38 files changed, 1 insertion(+), 834 deletions(-) delete mode 100644 specs_e2e/rails_3_2/.gitignore delete mode 100644 specs_e2e/rails_3_2/.ruby_version delete mode 100644 specs_e2e/rails_3_2/Gemfile delete mode 100644 specs_e2e/rails_3_2/README.rdoc delete mode 100644 specs_e2e/rails_3_2/Rakefile delete mode 100644 specs_e2e/rails_3_2/app/assets/stylesheets/application.css delete mode 100644 specs_e2e/rails_3_2/app/controllers/application_controller.rb delete mode 100644 specs_e2e/rails_3_2/app/controllers/welcome_controller.rb delete mode 100644 specs_e2e/rails_3_2/app/helpers/application_helper.rb delete mode 100644 specs_e2e/rails_3_2/app/models/post.rb delete mode 100644 specs_e2e/rails_3_2/app/views/layouts/application.html.erb delete mode 100644 specs_e2e/rails_3_2/app/views/welcome/index.html.erb delete mode 100755 specs_e2e/rails_3_2/bin/rails delete mode 100644 specs_e2e/rails_3_2/config.ru delete mode 100644 specs_e2e/rails_3_2/config/application.rb delete mode 100644 specs_e2e/rails_3_2/config/boot.rb delete mode 100644 specs_e2e/rails_3_2/config/environment.rb delete mode 100644 specs_e2e/rails_3_2/config/environments/development.rb delete mode 100644 specs_e2e/rails_3_2/config/environments/production.rb delete mode 100644 specs_e2e/rails_3_2/config/environments/test.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/inflections.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/mime_types.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/secret_token.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/session_store.rb delete mode 100644 specs_e2e/rails_3_2/config/initializers/wrap_parameters.rb delete mode 100644 specs_e2e/rails_3_2/config/locales/en.yml delete mode 100644 specs_e2e/rails_3_2/config/routes.rb delete mode 100644 specs_e2e/rails_3_2/log/.keep delete mode 100644 specs_e2e/rails_3_2/public/404.html delete mode 100644 specs_e2e/rails_3_2/public/422.html delete mode 100644 specs_e2e/rails_3_2/public/500.html delete mode 100644 specs_e2e/rails_3_2/public/favicon.ico delete mode 100644 specs_e2e/rails_3_2/public/robots.txt delete mode 100755 specs_e2e/rails_3_2/test.sh delete mode 100644 specs_e2e/rails_3_2/tmp/.keep delete mode 100644 specs_e2e/rails_3_2/vendor/.gitkeep diff --git a/specs_e2e/rails_3_2/.gitignore b/specs_e2e/rails_3_2/.gitignore deleted file mode 100644 index afc481a7..00000000 --- a/specs_e2e/rails_3_2/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.bundle -node_modules -cypress.config.js -package-lock.json -cypress/ -config/initializers/cypress_on_rails.rb -vendor/bundle -tmp/pids -tmp/cache diff --git a/specs_e2e/rails_3_2/.ruby_version b/specs_e2e/rails_3_2/.ruby_version deleted file mode 100644 index bc4abe86..00000000 --- a/specs_e2e/rails_3_2/.ruby_version +++ /dev/null @@ -1 +0,0 @@ -2.3.8 diff --git a/specs_e2e/rails_3_2/Gemfile b/specs_e2e/rails_3_2/Gemfile deleted file mode 100644 index c6c3c922..00000000 --- a/specs_e2e/rails_3_2/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -gem 'rails', '~> 3.2.22' - -group :development, :test do - gem 'cypress-on-rails', path: '../../' -end \ No newline at end of file diff --git a/specs_e2e/rails_3_2/README.rdoc b/specs_e2e/rails_3_2/README.rdoc deleted file mode 100644 index 3e1c15c8..00000000 --- a/specs_e2e/rails_3_2/README.rdoc +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | | |-- images - | | |-- javascripts - | | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | |-- assets - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | `-- cache - | `-- assets - `-- vendor - |-- assets - | |-- javascripts - | `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/specs_e2e/rails_3_2/Rakefile b/specs_e2e/rails_3_2/Rakefile deleted file mode 100644 index 3ecb0c43..00000000 --- a/specs_e2e/rails_3_2/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# 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 File.expand_path('../config/application', __FILE__) - -Rails32::Application.load_tasks diff --git a/specs_e2e/rails_3_2/app/assets/stylesheets/application.css b/specs_e2e/rails_3_2/app/assets/stylesheets/application.css deleted file mode 100644 index 3192ec89..00000000 --- a/specs_e2e/rails_3_2/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/specs_e2e/rails_3_2/app/controllers/application_controller.rb b/specs_e2e/rails_3_2/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/specs_e2e/rails_3_2/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/specs_e2e/rails_3_2/app/controllers/welcome_controller.rb b/specs_e2e/rails_3_2/app/controllers/welcome_controller.rb deleted file mode 100644 index f9b859b9..00000000 --- a/specs_e2e/rails_3_2/app/controllers/welcome_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class WelcomeController < ApplicationController - def index - end -end diff --git a/specs_e2e/rails_3_2/app/helpers/application_helper.rb b/specs_e2e/rails_3_2/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/specs_e2e/rails_3_2/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/specs_e2e/rails_3_2/app/models/post.rb b/specs_e2e/rails_3_2/app/models/post.rb deleted file mode 100644 index 6ea5652c..00000000 --- a/specs_e2e/rails_3_2/app/models/post.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Post < OpenStruct - def self.create!(attributes) - create(attributes) - end - - def self.create(attributes) - @all ||= [] - post = new(attributes) - @all << post - attributes['all'] = @all.index(post) - end - - def self.all - @all ||= [] - @all - end - - def self.delete_all - @all = [] - end -end diff --git a/specs_e2e/rails_3_2/app/views/layouts/application.html.erb b/specs_e2e/rails_3_2/app/views/layouts/application.html.erb deleted file mode 100644 index f3e14de6..00000000 --- a/specs_e2e/rails_3_2/app/views/layouts/application.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - Rails32 - <%= stylesheet_link_tag "application", :media => "all" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/specs_e2e/rails_3_2/app/views/welcome/index.html.erb b/specs_e2e/rails_3_2/app/views/welcome/index.html.erb deleted file mode 100644 index 8bb69472..00000000 --- a/specs_e2e/rails_3_2/app/views/welcome/index.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -

Posts

- - - - - - - - - - - - - <% Post.all.each do |post| %> - - - - - - <% end %> - -
TitleBodyPublished
<%= post.title %><%= post.body %><%= post.published %>
- -
\ No newline at end of file diff --git a/specs_e2e/rails_3_2/bin/rails b/specs_e2e/rails_3_2/bin/rails deleted file mode 100755 index f8da2cff..00000000 --- a/specs_e2e/rails_3_2/bin/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/specs_e2e/rails_3_2/config.ru b/specs_e2e/rails_3_2/config.ru deleted file mode 100644 index 0ca80f23..00000000 --- a/specs_e2e/rails_3_2/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Rails32::Application diff --git a/specs_e2e/rails_3_2/config/application.rb b/specs_e2e/rails_3_2/config/application.rb deleted file mode 100644 index 319c92c4..00000000 --- a/specs_e2e/rails_3_2/config/application.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -# Pick the frameworks you want: -# require "active_record/railtie" -require "action_controller/railtie" -require "action_mailer/railtie" -require "active_resource/railtie" -require "sprockets/railtie" -# require "rails/test_unit/railtie" - -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - Bundler.require(*Rails.groups(:assets => %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end - -module Rails32 - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable escaping HTML in JSON. - config.active_support.escape_html_entities_in_json = true - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - # config.active_record.whitelist_attributes = true - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end diff --git a/specs_e2e/rails_3_2/config/boot.rb b/specs_e2e/rails_3_2/config/boot.rb deleted file mode 100644 index 4489e586..00000000 --- a/specs_e2e/rails_3_2/config/boot.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/specs_e2e/rails_3_2/config/environment.rb b/specs_e2e/rails_3_2/config/environment.rb deleted file mode 100644 index d9d29cd7..00000000 --- a/specs_e2e/rails_3_2/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Rails32::Application.initialize! diff --git a/specs_e2e/rails_3_2/config/environments/development.rb b/specs_e2e/rails_3_2/config/environments/development.rb deleted file mode 100644 index 2740e26f..00000000 --- a/specs_e2e/rails_3_2/config/environments/development.rb +++ /dev/null @@ -1,31 +0,0 @@ -Rails32::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 - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/specs_e2e/rails_3_2/config/environments/production.rb b/specs_e2e/rails_3_2/config/environments/production.rb deleted file mode 100644 index 16285629..00000000 --- a/specs_e2e/rails_3_2/config/environments/production.rb +++ /dev/null @@ -1,64 +0,0 @@ -Rails32::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 - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - - # 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 - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - -end diff --git a/specs_e2e/rails_3_2/config/environments/test.rb b/specs_e2e/rails_3_2/config/environments/test.rb deleted file mode 100644 index 7d5f9a14..00000000 --- a/specs_e2e/rails_3_2/config/environments/test.rb +++ /dev/null @@ -1,35 +0,0 @@ -Rails32::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? - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # 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 - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb b/specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/specs_e2e/rails_3_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_3_2/config/initializers/inflections.rb b/specs_e2e/rails_3_2/config/initializers/inflections.rb deleted file mode 100644 index 5d8d9be2..00000000 --- a/specs_e2e/rails_3_2/config/initializers/inflections.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end -# -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/specs_e2e/rails_3_2/config/initializers/mime_types.rb b/specs_e2e/rails_3_2/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/specs_e2e/rails_3_2/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +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 -# Mime::Type.register_alias "text/html", :iphone diff --git a/specs_e2e/rails_3_2/config/initializers/secret_token.rb b/specs_e2e/rails_3_2/config/initializers/secret_token.rb deleted file mode 100644 index d5915672..00000000 --- a/specs_e2e/rails_3_2/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Rails32::Application.config.secret_token = '61e5f7b99b121d3cc9287bf1843d176ba0f1212f9f4788e3939fd1c82316c7e05eb2c0aca9e9e2375d459b2b56aa890c76e81619ad6c8b84d552cd812454cab6' diff --git a/specs_e2e/rails_3_2/config/initializers/session_store.rb b/specs_e2e/rails_3_2/config/initializers/session_store.rb deleted file mode 100644 index 97114fd6..00000000 --- a/specs_e2e/rails_3_2/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Rails32::Application.config.session_store :cookie_store, key: '_rails_3_2_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Rails32::Application.config.session_store :active_record_store diff --git a/specs_e2e/rails_3_2/config/initializers/wrap_parameters.rb b/specs_e2e/rails_3_2/config/initializers/wrap_parameters.rb deleted file mode 100644 index 369b465f..00000000 --- a/specs_e2e/rails_3_2/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,10 +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_3_2/config/locales/en.yml b/specs_e2e/rails_3_2/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/specs_e2e/rails_3_2/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/specs_e2e/rails_3_2/config/routes.rb b/specs_e2e/rails_3_2/config/routes.rb deleted file mode 100644 index 6a708b5e..00000000 --- a/specs_e2e/rails_3_2/config/routes.rb +++ /dev/null @@ -1,60 +0,0 @@ -Rails32::Application.routes.draw do - root :to => 'welcome#index' - - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id))(.:format)' -end diff --git a/specs_e2e/rails_3_2/log/.keep b/specs_e2e/rails_3_2/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/specs_e2e/rails_3_2/public/404.html b/specs_e2e/rails_3_2/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/specs_e2e/rails_3_2/public/404.html +++ /dev/null @@ -1,26 +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.

-
- - diff --git a/specs_e2e/rails_3_2/public/422.html b/specs_e2e/rails_3_2/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/specs_e2e/rails_3_2/public/422.html +++ /dev/null @@ -1,26 +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.

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

We're sorry, but something went wrong.

-
- - diff --git a/specs_e2e/rails_3_2/public/favicon.ico b/specs_e2e/rails_3_2/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/specs_e2e/rails_3_2/public/robots.txt b/specs_e2e/rails_3_2/public/robots.txt deleted file mode 100644 index 085187fa..00000000 --- a/specs_e2e/rails_3_2/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-Agent: * -# Disallow: / diff --git a/specs_e2e/rails_3_2/test.sh b/specs_e2e/rails_3_2/test.sh deleted file mode 100755 index 918a736a..00000000 --- a/specs_e2e/rails_3_2/test.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -echo '--- testing rails 3.2' - -echo '-- setting environment' -export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export RAILS_ENV=test -export BUNDLE_GEMFILE="$DIR/Gemfile" -cd $DIR - -echo '-- bundle install' -gem install bundler -v '1.0.22' -bundle _1.0.22_ --version -bundle _1.0.22_ install --quiet --gemfile="$DIR/Gemfile" --path vendor/bundle - -echo '-- cypress install' -bundle exec ./bin/rails g cypress_on_rails:install --install_with=npm --install_folder="." --force -rm -vf cypress/e2e/rails_examples/advance_factory_bot.cy.js -rm -vf cypress/e2e/rails_examples/using_vcr.cy.js - -echo '-- start rails server' -# make sure the server is not running -(kill -9 `cat ../server.pid` || true ) - -bundle exec ./bin/rails server -p 5017 -e test -P ../server.pid & -sleep 2 # give rails a chance to start up correctly - -echo '-- cypress run' -cp -fv ../cypress.config.js . -# if [ -z $CYPRESS_RECORD_KEY ] -# then -# node_modules/.bin/cypress run -# else - npx cypress run --record -# fi - -echo '-- playwright install' -bundle exec ./bin/rails g cypress_on_rails:install --framework playwright --install_with=npm --install_folder="." --force -rm -vf playwright/e2e/rails_examples/advance_factory_bot.cy.js -rm -vf playwright/e2e/rails_examples/using_vcr.cy.js - -echo '-- playwright run' -cp -fv ../playwright.config.js . -npx playwright install-deps -npx playwright install -npx playwright test playwright/e2e/ - -echo '-- stop rails server' -kill -9 `cat ../server.pid` || true diff --git a/specs_e2e/rails_3_2/tmp/.keep b/specs_e2e/rails_3_2/tmp/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/specs_e2e/rails_3_2/vendor/.gitkeep b/specs_e2e/rails_3_2/vendor/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb index 57ef6bba..0f48f993 100644 --- a/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb +++ b/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb @@ -1,4 +1,4 @@ -class CreatePosts < ActiveRecord::Migration[5.2] +class CreatePosts < ActiveRecord::Migration[6.1] def change create_table :posts do |t| t.string :title From 22a8e1aa48c4585b6586dae27bb94b626fbc563e Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 19 Jan 2025 19:45:38 +0100 Subject: [PATCH 04/10] Update config --- .github/workflows/ruby.yml | 2 +- specs_e2e/rails_6_1_7/config/application.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 25cfe89c..d0d73ee2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 2.7.6 bundler-cache: true - name: Run tests run: bundle exec rake diff --git a/specs_e2e/rails_6_1_7/config/application.rb b/specs_e2e/rails_6_1_7/config/application.rb index 60ac0c32..caccfe09 100644 --- a/specs_e2e/rails_6_1_7/config/application.rb +++ b/specs_e2e/rails_6_1_7/config/application.rb @@ -1,5 +1,6 @@ require_relative 'boot' +require 'logger' require 'rails' # Pick the frameworks you want: require 'active_model/railtie' From b0641def7f3a7c07760c09006dbba0964961befa Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 19 Jan 2025 19:53:38 +0100 Subject: [PATCH 05/10] Update versions --- .github/workflows/ruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d0d73ee2..e605fac4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From e0c11e494194ca7916d85c958a0cdaf327f2ed14 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 19 Jan 2025 20:10:18 +0100 Subject: [PATCH 06/10] Update dep --- specs_e2e/rails_6_1_7/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/specs_e2e/rails_6_1_7/Gemfile b/specs_e2e/rails_6_1_7/Gemfile index 56eac9a6..f7ab6816 100644 --- a/specs_e2e/rails_6_1_7/Gemfile +++ b/specs_e2e/rails_6_1_7/Gemfile @@ -10,6 +10,7 @@ gem 'puma', '~> 5.0' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.4', require: false +gem 'concurrent-ruby', '< 1.3.5' gem 'date', '~> 3.3.3' gem 'timeout', '~> 0.3.2' From 04f7f470a556c25d1a32c001184959e2a775dedc Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 19 Jan 2025 21:40:24 +0100 Subject: [PATCH 07/10] Rename folder --- .github/workflows/ruby.yml | 4 +- .../{rails_6_1_7 => rails_6_1}/.gitattributes | 0 .../{rails_6_1_7 => rails_6_1}/.gitignore | 0 specs_e2e/{rails_6_1_7 => rails_6_1}/Gemfile | 0 specs_e2e/{rails_6_1_7 => rails_6_1}/Rakefile | 0 .../app/assets/stylesheets/application.css | 0 .../app/controllers/application_controller.rb | 0 .../app/controllers/posts_controller.rb | 0 .../app/helpers/posts_helper.rb | 0 .../app/jobs/application_job.rb | 0 .../app/models/application_record.rb | 0 .../app/models/post.rb | 0 .../app/views/layouts/application.html.erb | 0 .../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 .../{rails_6_1_7 => rails_6_1}/bin/bundle | 0 .../{rails_6_1_7 => rails_6_1}/bin/rails | 0 specs_e2e/{rails_6_1_7 => rails_6_1}/bin/rake | 0 .../{rails_6_1_7 => rails_6_1}/bin/setup | 0 .../{rails_6_1_7 => rails_6_1}/bin/spring | 0 specs_e2e/{rails_6_1_7 => rails_6_1}/bin/yarn | 0 .../{rails_6_1_7 => rails_6_1}/config.ru | 0 .../config/application.rb | 0 .../{rails_6_1_7 => rails_6_1}/config/boot.rb | 0 .../config/cable.yml | 0 .../config/credentials.yml.enc | 0 .../config/database.yml | 0 .../config/environment.rb | 0 .../config/environments/development.rb | 0 .../config/environments/production.rb | 0 .../config/environments/test.rb | 0 .../application_controller_renderer.rb | 0 .../initializers/backtrace_silencers.rb | 0 .../initializers/content_security_policy.rb | 0 .../config/initializers/cookies_serializer.rb | 0 .../initializers/filter_parameter_logging.rb | 0 .../config/initializers/inflections.rb | 0 .../config/initializers/mime_types.rb | 0 .../config/initializers/permissions_policy.rb | 0 .../config/initializers/wrap_parameters.rb | 0 .../config/locales/en.yml | 0 .../config/master.key | 0 .../{rails_6_1_7 => rails_6_1}/config/puma.rb | 0 .../config/routes.rb | 0 .../config/storage.yml | 0 .../db/migrate/20180621085832_create_posts.rb | 0 .../{rails_6_1_7 => rails_6_1}/package.json | 0 .../rails_6_1/playwright-report/index.html | 71 +++++++++++++++++++ .../public/404.html | 0 .../public/422.html | 0 .../public/500.html | 0 .../public/apple-touch-icon-precomposed.png | 0 .../public/apple-touch-icon.png | 0 .../public/favicon.ico | 0 .../public/robots.txt | 0 .../rails_6_1/test-results/.last-run.json | 4 ++ specs_e2e/{rails_6_1_7 => rails_6_1}/test.sh | 0 .../test/controllers/posts_controller_test.rb | 0 .../test/cypress_fixtures/posts.yml | 0 .../test/fixtures/posts.yml | 0 .../test/models/post_test.rb | 0 .../{rails_6_1_7 => rails_6_1}/vendor/.keep | 0 65 files changed, 77 insertions(+), 2 deletions(-) rename specs_e2e/{rails_6_1_7 => rails_6_1}/.gitattributes (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/.gitignore (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/Gemfile (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/Rakefile (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/assets/stylesheets/application.css (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/controllers/application_controller.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/controllers/posts_controller.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/helpers/posts_helper.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/jobs/application_job.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/models/application_record.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/models/post.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/layouts/application.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/posts/_form.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/posts/edit.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/posts/index.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/posts/new.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/app/views/posts/show.html.erb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/bundle (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/rails (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/rake (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/setup (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/spring (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/bin/yarn (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config.ru (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/application.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/boot.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/cable.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/credentials.yml.enc (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/database.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/environment.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/environments/development.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/environments/production.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/environments/test.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/application_controller_renderer.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/backtrace_silencers.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/content_security_policy.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/cookies_serializer.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/filter_parameter_logging.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/inflections.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/mime_types.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/permissions_policy.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/initializers/wrap_parameters.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/locales/en.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/master.key (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/puma.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/routes.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/config/storage.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/db/migrate/20180621085832_create_posts.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/package.json (100%) create mode 100644 specs_e2e/rails_6_1/playwright-report/index.html rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/404.html (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/422.html (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/500.html (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/apple-touch-icon-precomposed.png (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/apple-touch-icon.png (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/favicon.ico (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/public/robots.txt (100%) create mode 100644 specs_e2e/rails_6_1/test-results/.last-run.json rename specs_e2e/{rails_6_1_7 => rails_6_1}/test.sh (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/test/controllers/posts_controller_test.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/test/cypress_fixtures/posts.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/test/fixtures/posts.yml (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/test/models/post_test.rb (100%) rename specs_e2e/{rails_6_1_7 => rails_6_1}/vendor/.keep (100%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e605fac4..93b0e711 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - rails_6_1_7: + rails_6_1: runs-on: ubuntu-latest steps: @@ -20,7 +20,7 @@ jobs: - name: Run tests run: bundle exec rake - name: Run interaction tests - run: ./specs_e2e/rails_6_1_7/test.sh + run: ./specs_e2e/rails_6_1/test.sh env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/specs_e2e/rails_6_1_7/.gitattributes b/specs_e2e/rails_6_1/.gitattributes similarity index 100% rename from specs_e2e/rails_6_1_7/.gitattributes rename to specs_e2e/rails_6_1/.gitattributes diff --git a/specs_e2e/rails_6_1_7/.gitignore b/specs_e2e/rails_6_1/.gitignore similarity index 100% rename from specs_e2e/rails_6_1_7/.gitignore rename to specs_e2e/rails_6_1/.gitignore diff --git a/specs_e2e/rails_6_1_7/Gemfile b/specs_e2e/rails_6_1/Gemfile similarity index 100% rename from specs_e2e/rails_6_1_7/Gemfile rename to specs_e2e/rails_6_1/Gemfile diff --git a/specs_e2e/rails_6_1_7/Rakefile b/specs_e2e/rails_6_1/Rakefile similarity index 100% rename from specs_e2e/rails_6_1_7/Rakefile rename to specs_e2e/rails_6_1/Rakefile diff --git a/specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css b/specs_e2e/rails_6_1/app/assets/stylesheets/application.css similarity index 100% rename from specs_e2e/rails_6_1_7/app/assets/stylesheets/application.css rename to specs_e2e/rails_6_1/app/assets/stylesheets/application.css diff --git a/specs_e2e/rails_6_1_7/app/controllers/application_controller.rb b/specs_e2e/rails_6_1/app/controllers/application_controller.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/controllers/application_controller.rb rename to specs_e2e/rails_6_1/app/controllers/application_controller.rb diff --git a/specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb b/specs_e2e/rails_6_1/app/controllers/posts_controller.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/controllers/posts_controller.rb rename to specs_e2e/rails_6_1/app/controllers/posts_controller.rb diff --git a/specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb b/specs_e2e/rails_6_1/app/helpers/posts_helper.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/helpers/posts_helper.rb rename to specs_e2e/rails_6_1/app/helpers/posts_helper.rb diff --git a/specs_e2e/rails_6_1_7/app/jobs/application_job.rb b/specs_e2e/rails_6_1/app/jobs/application_job.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/jobs/application_job.rb rename to specs_e2e/rails_6_1/app/jobs/application_job.rb diff --git a/specs_e2e/rails_6_1_7/app/models/application_record.rb b/specs_e2e/rails_6_1/app/models/application_record.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/models/application_record.rb rename to specs_e2e/rails_6_1/app/models/application_record.rb diff --git a/specs_e2e/rails_6_1_7/app/models/post.rb b/specs_e2e/rails_6_1/app/models/post.rb similarity index 100% rename from specs_e2e/rails_6_1_7/app/models/post.rb rename to specs_e2e/rails_6_1/app/models/post.rb diff --git a/specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb b/specs_e2e/rails_6_1/app/views/layouts/application.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/layouts/application.html.erb rename to specs_e2e/rails_6_1/app/views/layouts/application.html.erb diff --git a/specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb b/specs_e2e/rails_6_1/app/views/posts/_form.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/posts/_form.html.erb rename to specs_e2e/rails_6_1/app/views/posts/_form.html.erb diff --git a/specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb b/specs_e2e/rails_6_1/app/views/posts/edit.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/posts/edit.html.erb rename to specs_e2e/rails_6_1/app/views/posts/edit.html.erb diff --git a/specs_e2e/rails_6_1_7/app/views/posts/index.html.erb b/specs_e2e/rails_6_1/app/views/posts/index.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/posts/index.html.erb rename to specs_e2e/rails_6_1/app/views/posts/index.html.erb diff --git a/specs_e2e/rails_6_1_7/app/views/posts/new.html.erb b/specs_e2e/rails_6_1/app/views/posts/new.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/posts/new.html.erb rename to specs_e2e/rails_6_1/app/views/posts/new.html.erb diff --git a/specs_e2e/rails_6_1_7/app/views/posts/show.html.erb b/specs_e2e/rails_6_1/app/views/posts/show.html.erb similarity index 100% rename from specs_e2e/rails_6_1_7/app/views/posts/show.html.erb rename to specs_e2e/rails_6_1/app/views/posts/show.html.erb diff --git a/specs_e2e/rails_6_1_7/bin/bundle b/specs_e2e/rails_6_1/bin/bundle similarity index 100% rename from specs_e2e/rails_6_1_7/bin/bundle rename to specs_e2e/rails_6_1/bin/bundle diff --git a/specs_e2e/rails_6_1_7/bin/rails b/specs_e2e/rails_6_1/bin/rails similarity index 100% rename from specs_e2e/rails_6_1_7/bin/rails rename to specs_e2e/rails_6_1/bin/rails diff --git a/specs_e2e/rails_6_1_7/bin/rake b/specs_e2e/rails_6_1/bin/rake similarity index 100% rename from specs_e2e/rails_6_1_7/bin/rake rename to specs_e2e/rails_6_1/bin/rake diff --git a/specs_e2e/rails_6_1_7/bin/setup b/specs_e2e/rails_6_1/bin/setup similarity index 100% rename from specs_e2e/rails_6_1_7/bin/setup rename to specs_e2e/rails_6_1/bin/setup diff --git a/specs_e2e/rails_6_1_7/bin/spring b/specs_e2e/rails_6_1/bin/spring similarity index 100% rename from specs_e2e/rails_6_1_7/bin/spring rename to specs_e2e/rails_6_1/bin/spring diff --git a/specs_e2e/rails_6_1_7/bin/yarn b/specs_e2e/rails_6_1/bin/yarn similarity index 100% rename from specs_e2e/rails_6_1_7/bin/yarn rename to specs_e2e/rails_6_1/bin/yarn diff --git a/specs_e2e/rails_6_1_7/config.ru b/specs_e2e/rails_6_1/config.ru similarity index 100% rename from specs_e2e/rails_6_1_7/config.ru rename to specs_e2e/rails_6_1/config.ru diff --git a/specs_e2e/rails_6_1_7/config/application.rb b/specs_e2e/rails_6_1/config/application.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/application.rb rename to specs_e2e/rails_6_1/config/application.rb diff --git a/specs_e2e/rails_6_1_7/config/boot.rb b/specs_e2e/rails_6_1/config/boot.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/boot.rb rename to specs_e2e/rails_6_1/config/boot.rb diff --git a/specs_e2e/rails_6_1_7/config/cable.yml b/specs_e2e/rails_6_1/config/cable.yml similarity index 100% rename from specs_e2e/rails_6_1_7/config/cable.yml rename to specs_e2e/rails_6_1/config/cable.yml diff --git a/specs_e2e/rails_6_1_7/config/credentials.yml.enc b/specs_e2e/rails_6_1/config/credentials.yml.enc similarity index 100% rename from specs_e2e/rails_6_1_7/config/credentials.yml.enc rename to specs_e2e/rails_6_1/config/credentials.yml.enc diff --git a/specs_e2e/rails_6_1_7/config/database.yml b/specs_e2e/rails_6_1/config/database.yml similarity index 100% rename from specs_e2e/rails_6_1_7/config/database.yml rename to specs_e2e/rails_6_1/config/database.yml diff --git a/specs_e2e/rails_6_1_7/config/environment.rb b/specs_e2e/rails_6_1/config/environment.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/environment.rb rename to specs_e2e/rails_6_1/config/environment.rb diff --git a/specs_e2e/rails_6_1_7/config/environments/development.rb b/specs_e2e/rails_6_1/config/environments/development.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/environments/development.rb rename to specs_e2e/rails_6_1/config/environments/development.rb diff --git a/specs_e2e/rails_6_1_7/config/environments/production.rb b/specs_e2e/rails_6_1/config/environments/production.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/environments/production.rb rename to specs_e2e/rails_6_1/config/environments/production.rb diff --git a/specs_e2e/rails_6_1_7/config/environments/test.rb b/specs_e2e/rails_6_1/config/environments/test.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/environments/test.rb rename to specs_e2e/rails_6_1/config/environments/test.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb b/specs_e2e/rails_6_1/config/initializers/application_controller_renderer.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/application_controller_renderer.rb rename to specs_e2e/rails_6_1/config/initializers/application_controller_renderer.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/backtrace_silencers.rb b/specs_e2e/rails_6_1/config/initializers/backtrace_silencers.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/backtrace_silencers.rb rename to specs_e2e/rails_6_1/config/initializers/backtrace_silencers.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb b/specs_e2e/rails_6_1/config/initializers/content_security_policy.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/content_security_policy.rb rename to specs_e2e/rails_6_1/config/initializers/content_security_policy.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb b/specs_e2e/rails_6_1/config/initializers/cookies_serializer.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/cookies_serializer.rb rename to specs_e2e/rails_6_1/config/initializers/cookies_serializer.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_6_1/config/initializers/filter_parameter_logging.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/filter_parameter_logging.rb rename to specs_e2e/rails_6_1/config/initializers/filter_parameter_logging.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/inflections.rb b/specs_e2e/rails_6_1/config/initializers/inflections.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/inflections.rb rename to specs_e2e/rails_6_1/config/initializers/inflections.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/mime_types.rb b/specs_e2e/rails_6_1/config/initializers/mime_types.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/mime_types.rb rename to specs_e2e/rails_6_1/config/initializers/mime_types.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/permissions_policy.rb b/specs_e2e/rails_6_1/config/initializers/permissions_policy.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/permissions_policy.rb rename to specs_e2e/rails_6_1/config/initializers/permissions_policy.rb diff --git a/specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb b/specs_e2e/rails_6_1/config/initializers/wrap_parameters.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/initializers/wrap_parameters.rb rename to specs_e2e/rails_6_1/config/initializers/wrap_parameters.rb diff --git a/specs_e2e/rails_6_1_7/config/locales/en.yml b/specs_e2e/rails_6_1/config/locales/en.yml similarity index 100% rename from specs_e2e/rails_6_1_7/config/locales/en.yml rename to specs_e2e/rails_6_1/config/locales/en.yml diff --git a/specs_e2e/rails_6_1_7/config/master.key b/specs_e2e/rails_6_1/config/master.key similarity index 100% rename from specs_e2e/rails_6_1_7/config/master.key rename to specs_e2e/rails_6_1/config/master.key diff --git a/specs_e2e/rails_6_1_7/config/puma.rb b/specs_e2e/rails_6_1/config/puma.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/puma.rb rename to specs_e2e/rails_6_1/config/puma.rb diff --git a/specs_e2e/rails_6_1_7/config/routes.rb b/specs_e2e/rails_6_1/config/routes.rb similarity index 100% rename from specs_e2e/rails_6_1_7/config/routes.rb rename to specs_e2e/rails_6_1/config/routes.rb diff --git a/specs_e2e/rails_6_1_7/config/storage.yml b/specs_e2e/rails_6_1/config/storage.yml similarity index 100% rename from specs_e2e/rails_6_1_7/config/storage.yml rename to specs_e2e/rails_6_1/config/storage.yml diff --git a/specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_6_1/db/migrate/20180621085832_create_posts.rb similarity index 100% rename from specs_e2e/rails_6_1_7/db/migrate/20180621085832_create_posts.rb rename to specs_e2e/rails_6_1/db/migrate/20180621085832_create_posts.rb diff --git a/specs_e2e/rails_6_1_7/package.json b/specs_e2e/rails_6_1/package.json similarity index 100% rename from specs_e2e/rails_6_1_7/package.json rename to specs_e2e/rails_6_1/package.json diff --git a/specs_e2e/rails_6_1/playwright-report/index.html b/specs_e2e/rails_6_1/playwright-report/index.html new file mode 100644 index 00000000..2844a570 --- /dev/null +++ b/specs_e2e/rails_6_1/playwright-report/index.html @@ -0,0 +1,71 @@ + + + + + + + + + Playwright Test Report + + + + +
+ + + \ No newline at end of file diff --git a/specs_e2e/rails_6_1_7/public/404.html b/specs_e2e/rails_6_1/public/404.html similarity index 100% rename from specs_e2e/rails_6_1_7/public/404.html rename to specs_e2e/rails_6_1/public/404.html diff --git a/specs_e2e/rails_6_1_7/public/422.html b/specs_e2e/rails_6_1/public/422.html similarity index 100% rename from specs_e2e/rails_6_1_7/public/422.html rename to specs_e2e/rails_6_1/public/422.html diff --git a/specs_e2e/rails_6_1_7/public/500.html b/specs_e2e/rails_6_1/public/500.html similarity index 100% rename from specs_e2e/rails_6_1_7/public/500.html rename to specs_e2e/rails_6_1/public/500.html diff --git a/specs_e2e/rails_6_1_7/public/apple-touch-icon-precomposed.png b/specs_e2e/rails_6_1/public/apple-touch-icon-precomposed.png similarity index 100% rename from specs_e2e/rails_6_1_7/public/apple-touch-icon-precomposed.png rename to specs_e2e/rails_6_1/public/apple-touch-icon-precomposed.png diff --git a/specs_e2e/rails_6_1_7/public/apple-touch-icon.png b/specs_e2e/rails_6_1/public/apple-touch-icon.png similarity index 100% rename from specs_e2e/rails_6_1_7/public/apple-touch-icon.png rename to specs_e2e/rails_6_1/public/apple-touch-icon.png diff --git a/specs_e2e/rails_6_1_7/public/favicon.ico b/specs_e2e/rails_6_1/public/favicon.ico similarity index 100% rename from specs_e2e/rails_6_1_7/public/favicon.ico rename to specs_e2e/rails_6_1/public/favicon.ico diff --git a/specs_e2e/rails_6_1_7/public/robots.txt b/specs_e2e/rails_6_1/public/robots.txt similarity index 100% rename from specs_e2e/rails_6_1_7/public/robots.txt rename to specs_e2e/rails_6_1/public/robots.txt diff --git a/specs_e2e/rails_6_1/test-results/.last-run.json b/specs_e2e/rails_6_1/test-results/.last-run.json new file mode 100644 index 00000000..cbcc1fba --- /dev/null +++ b/specs_e2e/rails_6_1/test-results/.last-run.json @@ -0,0 +1,4 @@ +{ + "status": "passed", + "failedTests": [] +} \ No newline at end of file diff --git a/specs_e2e/rails_6_1_7/test.sh b/specs_e2e/rails_6_1/test.sh similarity index 100% rename from specs_e2e/rails_6_1_7/test.sh rename to specs_e2e/rails_6_1/test.sh diff --git a/specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb b/specs_e2e/rails_6_1/test/controllers/posts_controller_test.rb similarity index 100% rename from specs_e2e/rails_6_1_7/test/controllers/posts_controller_test.rb rename to specs_e2e/rails_6_1/test/controllers/posts_controller_test.rb diff --git a/specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml b/specs_e2e/rails_6_1/test/cypress_fixtures/posts.yml similarity index 100% rename from specs_e2e/rails_6_1_7/test/cypress_fixtures/posts.yml rename to specs_e2e/rails_6_1/test/cypress_fixtures/posts.yml diff --git a/specs_e2e/rails_6_1_7/test/fixtures/posts.yml b/specs_e2e/rails_6_1/test/fixtures/posts.yml similarity index 100% rename from specs_e2e/rails_6_1_7/test/fixtures/posts.yml rename to specs_e2e/rails_6_1/test/fixtures/posts.yml diff --git a/specs_e2e/rails_6_1_7/test/models/post_test.rb b/specs_e2e/rails_6_1/test/models/post_test.rb similarity index 100% rename from specs_e2e/rails_6_1_7/test/models/post_test.rb rename to specs_e2e/rails_6_1/test/models/post_test.rb diff --git a/specs_e2e/rails_6_1_7/vendor/.keep b/specs_e2e/rails_6_1/vendor/.keep similarity index 100% rename from specs_e2e/rails_6_1_7/vendor/.keep rename to specs_e2e/rails_6_1/vendor/.keep From 1599319d0ebc92bd7517de0ef15cdd17d52dc7e1 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 26 Jan 2025 18:35:34 +0100 Subject: [PATCH 08/10] Add Rails 7.2 --- .github/workflows/ruby.yml | 6 +- specs_e2e/rails_7_2/.gitattributes | 9 ++ specs_e2e/rails_7_2/.gitignore | 16 +++ specs_e2e/rails_7_2/.rubocop.yml | 8 ++ specs_e2e/rails_7_2/Gemfile | 11 ++ specs_e2e/{rails_4_2 => rails_7_2}/Rakefile | 2 +- .../app/assets/stylesheets/application.css | 15 +++ .../app/controllers/application_controller.rb | 4 + .../app/controllers/posts_controller.rb | 58 ++++++++++ .../rails_7_2/app/helpers/posts_helper.rb | 2 + .../rails_7_2/app/jobs/application_job.rb | 7 ++ .../app/models/application_record.rb | 3 + specs_e2e/rails_7_2/app/models/post.rb | 2 + .../app/views/layouts/application.html.erb | 22 ++++ .../rails_7_2/app/views/posts/_form.html.erb | 32 +++++ .../rails_7_2/app/views/posts/edit.html.erb | 6 + .../rails_7_2/app/views/posts/index.html.erb | 31 +++++ .../rails_7_2/app/views/posts/new.html.erb | 5 + .../rails_7_2/app/views/posts/show.html.erb | 19 +++ specs_e2e/rails_7_2/bin/brakeman | 7 ++ specs_e2e/rails_7_2/bin/bundle | 109 ++++++++++++++++++ specs_e2e/rails_7_2/bin/importmap | 4 + specs_e2e/rails_7_2/bin/rails | 4 + specs_e2e/rails_7_2/bin/rake | 4 + specs_e2e/rails_7_2/bin/setup | 37 ++++++ specs_e2e/{rails_4_2 => rails_7_2}/config.ru | 4 +- specs_e2e/rails_7_2/config/application.rb | 37 ++++++ specs_e2e/rails_7_2/config/boot.rb | 4 + specs_e2e/rails_7_2/config/cable.yml | 10 ++ .../rails_7_2/config/credentials.yml.enc | 1 + specs_e2e/rails_7_2/config/database.yml | 32 +++++ .../config/environment.rb | 2 +- .../config/environments/development.rb | 54 +++++++++ .../config/environments/production.rb | 105 +++++++++++++++++ .../rails_7_2/config/environments/test.rb | 45 ++++++++ specs_e2e/rails_7_2/config/importmap.rb | 7 ++ .../initializers/content_security_policy.rb | 25 ++++ .../initializers/filter_parameter_logging.rb | 8 ++ .../config/initializers/inflections.rb | 8 +- .../config/initializers/permissions_policy.rb | 13 +++ specs_e2e/rails_7_2/config/locales/en.yml | 31 +++++ specs_e2e/rails_7_2/config/master.key | 1 + specs_e2e/rails_7_2/config/puma.rb | 34 ++++++ specs_e2e/rails_7_2/config/routes.rb | 5 + specs_e2e/rails_7_2/config/storage.yml | 34 ++++++ .../db/migrate/20180621085832_create_posts.rb | 11 ++ specs_e2e/rails_7_2/db/seeds.rb | 9 ++ specs_e2e/rails_7_2/db/test.sqlite3-shm | Bin 0 -> 32768 bytes specs_e2e/rails_7_2/db/test.sqlite3-wal | Bin 0 -> 341992 bytes specs_e2e/rails_7_2/package.json | 8 ++ .../rails_7_2/playwright-report/index.html | 71 ++++++++++++ .../{rails_4_2 => rails_7_2}/public/404.html | 12 +- .../public/406-unsupported-browser.html | 66 +++++++++++ .../{rails_4_2 => rails_7_2}/public/422.html | 12 +- .../{rails_4_2 => rails_7_2}/public/500.html | 12 +- specs_e2e/rails_7_2/public/icon.png | Bin 0 -> 5599 bytes specs_e2e/rails_7_2/public/icon.svg | 3 + specs_e2e/rails_7_2/public/robots.txt | 1 + specs_e2e/rails_7_2/storage/test.sqlite3 | Bin 0 -> 28672 bytes .../rails_7_2/test-results/.last-run.json | 4 + specs_e2e/{rails_4_2 => rails_7_2}/test.sh | 37 +++--- .../test/controllers/posts_controller_test.rb | 48 ++++++++ .../rails_7_2/test/cypress_fixtures/posts.yml | 11 ++ specs_e2e/rails_7_2/test/fixtures/posts.yml | 11 ++ specs_e2e/rails_7_2/test/models/post_test.rb | 7 ++ .../spec => rails_7_2/vendor}/.keep | 0 .../vendor/javascript}/.keep | 0 67 files changed, 1163 insertions(+), 43 deletions(-) create mode 100644 specs_e2e/rails_7_2/.gitattributes create mode 100644 specs_e2e/rails_7_2/.gitignore create mode 100644 specs_e2e/rails_7_2/.rubocop.yml create mode 100644 specs_e2e/rails_7_2/Gemfile rename specs_e2e/{rails_4_2 => rails_7_2}/Rakefile (75%) create mode 100644 specs_e2e/rails_7_2/app/assets/stylesheets/application.css create mode 100644 specs_e2e/rails_7_2/app/controllers/application_controller.rb create mode 100644 specs_e2e/rails_7_2/app/controllers/posts_controller.rb create mode 100644 specs_e2e/rails_7_2/app/helpers/posts_helper.rb create mode 100644 specs_e2e/rails_7_2/app/jobs/application_job.rb create mode 100644 specs_e2e/rails_7_2/app/models/application_record.rb create mode 100644 specs_e2e/rails_7_2/app/models/post.rb create mode 100644 specs_e2e/rails_7_2/app/views/layouts/application.html.erb create mode 100644 specs_e2e/rails_7_2/app/views/posts/_form.html.erb create mode 100644 specs_e2e/rails_7_2/app/views/posts/edit.html.erb create mode 100644 specs_e2e/rails_7_2/app/views/posts/index.html.erb create mode 100644 specs_e2e/rails_7_2/app/views/posts/new.html.erb create mode 100644 specs_e2e/rails_7_2/app/views/posts/show.html.erb create mode 100755 specs_e2e/rails_7_2/bin/brakeman create mode 100755 specs_e2e/rails_7_2/bin/bundle create mode 100755 specs_e2e/rails_7_2/bin/importmap create mode 100755 specs_e2e/rails_7_2/bin/rails create mode 100755 specs_e2e/rails_7_2/bin/rake create mode 100755 specs_e2e/rails_7_2/bin/setup rename specs_e2e/{rails_4_2 => rails_7_2}/config.ru (56%) create mode 100644 specs_e2e/rails_7_2/config/application.rb create mode 100644 specs_e2e/rails_7_2/config/boot.rb create mode 100644 specs_e2e/rails_7_2/config/cable.yml create mode 100644 specs_e2e/rails_7_2/config/credentials.yml.enc create mode 100644 specs_e2e/rails_7_2/config/database.yml rename specs_e2e/{rails_4_2 => rails_7_2}/config/environment.rb (64%) create mode 100644 specs_e2e/rails_7_2/config/environments/development.rb create mode 100644 specs_e2e/rails_7_2/config/environments/production.rb create mode 100644 specs_e2e/rails_7_2/config/environments/test.rb create mode 100644 specs_e2e/rails_7_2/config/importmap.rb create mode 100644 specs_e2e/rails_7_2/config/initializers/content_security_policy.rb create mode 100644 specs_e2e/rails_7_2/config/initializers/filter_parameter_logging.rb rename specs_e2e/{rails_4_2 => rails_7_2}/config/initializers/inflections.rb (77%) create mode 100644 specs_e2e/rails_7_2/config/initializers/permissions_policy.rb create mode 100644 specs_e2e/rails_7_2/config/locales/en.yml create mode 100644 specs_e2e/rails_7_2/config/master.key create mode 100644 specs_e2e/rails_7_2/config/puma.rb create mode 100644 specs_e2e/rails_7_2/config/routes.rb create mode 100644 specs_e2e/rails_7_2/config/storage.yml create mode 100644 specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb create mode 100644 specs_e2e/rails_7_2/db/seeds.rb create mode 100644 specs_e2e/rails_7_2/db/test.sqlite3-shm create mode 100644 specs_e2e/rails_7_2/db/test.sqlite3-wal create mode 100644 specs_e2e/rails_7_2/package.json create mode 100644 specs_e2e/rails_7_2/playwright-report/index.html rename specs_e2e/{rails_4_2 => rails_7_2}/public/404.html (86%) create mode 100644 specs_e2e/rails_7_2/public/406-unsupported-browser.html rename specs_e2e/{rails_4_2 => rails_7_2}/public/422.html (86%) rename specs_e2e/{rails_4_2 => rails_7_2}/public/500.html (85%) create mode 100644 specs_e2e/rails_7_2/public/icon.png create mode 100644 specs_e2e/rails_7_2/public/icon.svg create mode 100644 specs_e2e/rails_7_2/public/robots.txt create mode 100644 specs_e2e/rails_7_2/storage/test.sqlite3 create mode 100644 specs_e2e/rails_7_2/test-results/.last-run.json rename specs_e2e/{rails_4_2 => rails_7_2}/test.sh (52%) create mode 100644 specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb create mode 100644 specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml create mode 100644 specs_e2e/rails_7_2/test/fixtures/posts.yml create mode 100644 specs_e2e/rails_7_2/test/models/post_test.rb rename specs_e2e/{rails_4_2/spec => rails_7_2/vendor}/.keep (100%) rename specs_e2e/{rails_4_2/vendor => rails_7_2/vendor/javascript}/.keep (100%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 93b0e711..d8b688a6 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -24,7 +24,7 @@ jobs: env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - rails_4_2: + rails_7_2: runs-on: ubuntu-latest steps: @@ -32,14 +32,14 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.5 + ruby-version: 3.1.3 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_4_2/test.sh + run: ./specs_e2e/rails_7_2/test.sh env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/specs_e2e/rails_7_2/.gitattributes b/specs_e2e/rails_7_2/.gitattributes new file mode 100644 index 00000000..8dc43234 --- /dev/null +++ b/specs_e2e/rails_7_2/.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_7_2/.gitignore b/specs_e2e/rails_7_2/.gitignore new file mode 100644 index 00000000..d62f7767 --- /dev/null +++ b/specs_e2e/rails_7_2/.gitignore @@ -0,0 +1,16 @@ +.bundle +test/node_modules +test/cypress.config.js +test/playwright.config.js +test/package.json +test/yarn.lock +test/cypress/ +test/playwright/ +test/playwright-report/ +config/initializers/cypress_on_rails.rb +vendor/bundle +db/*.sqlite3 +db/schema.rb +tmp/* +log/* +specs_e2e/server.pid diff --git a/specs_e2e/rails_7_2/.rubocop.yml b/specs_e2e/rails_7_2/.rubocop.yml new file mode 100644 index 00000000..f9d86d4a --- /dev/null +++ b/specs_e2e/rails_7_2/.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_7_2/Gemfile b/specs_e2e/rails_7_2/Gemfile new file mode 100644 index 00000000..d4c3b7aa --- /dev/null +++ b/specs_e2e/rails_7_2/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gem "rails", "~> 7.2.2" +gem "sqlite3", ">= 1.4" +gem "puma", ">= 5.0" +gem "bootsnap", require: false + +group :development, :test do + gem 'cypress-on-rails', path: '../../' + gem 'database_cleaner' +end diff --git a/specs_e2e/rails_4_2/Rakefile b/specs_e2e/rails_7_2/Rakefile similarity index 75% rename from specs_e2e/rails_4_2/Rakefile rename to specs_e2e/rails_7_2/Rakefile index ba6b733d..9a5ea738 100644 --- a/specs_e2e/rails_4_2/Rakefile +++ b/specs_e2e/rails_7_2/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 File.expand_path('../config/application', __FILE__) +require_relative "config/application" Rails.application.load_tasks diff --git a/specs_e2e/rails_7_2/app/assets/stylesheets/application.css b/specs_e2e/rails_7_2/app/assets/stylesheets/application.css new file mode 100644 index 00000000..288b9ab7 --- /dev/null +++ b/specs_e2e/rails_7_2/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/specs_e2e/rails_7_2/app/controllers/application_controller.rb b/specs_e2e/rails_7_2/app/controllers/application_controller.rb new file mode 100644 index 00000000..0d95db22 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/app/controllers/posts_controller.rb b/specs_e2e/rails_7_2/app/controllers/posts_controller.rb new file mode 100644 index 00000000..fed5ab9c --- /dev/null +++ b/specs_e2e/rails_7_2/app/controllers/posts_controller.rb @@ -0,0 +1,58 @@ +class PostsController < ApplicationController + before_action :set_post, only: [:show, :edit, :update, :destroy] + + # GET /posts + def index + @posts = Post.all + end + + # GET /posts/1 + def show + end + + # GET /posts/new + def new + @post = Post.new + end + + # GET /posts/1/edit + def edit + end + + # POST /posts + def create + @post = Post.new(post_params) + + if @post.save + redirect_to @post, notice: 'Post was successfully created.' + else + render :new + end + end + + # PATCH/PUT /posts/1 + def update + if @post.update(post_params) + redirect_to @post, notice: 'Post was successfully updated.' + else + render :edit + end + end + + # DELETE /posts/1 + def destroy + @post.destroy + redirect_to posts_url, notice: 'Post was successfully destroyed.' + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_post + @post = Post.find(params[:id]) + end + + # Only allow a trusted parameter "white list" through. + def post_params + params.require(:post).permit(:title, :body, :published) + end +end diff --git a/specs_e2e/rails_7_2/app/helpers/posts_helper.rb b/specs_e2e/rails_7_2/app/helpers/posts_helper.rb new file mode 100644 index 00000000..a7b8cec8 --- /dev/null +++ b/specs_e2e/rails_7_2/app/helpers/posts_helper.rb @@ -0,0 +1,2 @@ +module PostsHelper +end diff --git a/specs_e2e/rails_7_2/app/jobs/application_job.rb b/specs_e2e/rails_7_2/app/jobs/application_job.rb new file mode 100644 index 00000000..d394c3d1 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/app/models/application_record.rb b/specs_e2e/rails_7_2/app/models/application_record.rb new file mode 100644 index 00000000..b63caeb8 --- /dev/null +++ b/specs_e2e/rails_7_2/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + primary_abstract_class +end diff --git a/specs_e2e/rails_7_2/app/models/post.rb b/specs_e2e/rails_7_2/app/models/post.rb new file mode 100644 index 00000000..b2a8b463 --- /dev/null +++ b/specs_e2e/rails_7_2/app/models/post.rb @@ -0,0 +1,2 @@ +class Post < ApplicationRecord +end diff --git a/specs_e2e/rails_7_2/app/views/layouts/application.html.erb b/specs_e2e/rails_7_2/app/views/layouts/application.html.erb new file mode 100644 index 00000000..6db513bb --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/layouts/application.html.erb @@ -0,0 +1,22 @@ + + + + <%= content_for(:title) || "App" %> + + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= yield :head %> + + + + + + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> + + + + <%= yield %> + + diff --git a/specs_e2e/rails_7_2/app/views/posts/_form.html.erb b/specs_e2e/rails_7_2/app/views/posts/_form.html.erb new file mode 100644 index 00000000..64599988 --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/posts/_form.html.erb @@ -0,0 +1,32 @@ +<%= form_with(model: post, local: true) do |form| %> + <% if post.errors.any? %> +
+

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

+ +
    + <% post.errors.full_messages.each do |message| %> +
  • <%= message %>
  • + <% end %> +
+
+ <% end %> + +
+ <%= form.label :title %> + <%= form.text_field :title %> +
+ +
+ <%= form.label :body %> + <%= form.text_area :body %> +
+ +
+ <%= form.label :published %> + <%= form.check_box :published %> +
+ +
+ <%= form.submit %> +
+<% end %> diff --git a/specs_e2e/rails_7_2/app/views/posts/edit.html.erb b/specs_e2e/rails_7_2/app/views/posts/edit.html.erb new file mode 100644 index 00000000..ded33f77 --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/posts/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Post

+ +<%= render 'form', post: @post %> + +<%= link_to 'Show', @post %> | +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_7_2/app/views/posts/index.html.erb b/specs_e2e/rails_7_2/app/views/posts/index.html.erb new file mode 100644 index 00000000..50cbc31b --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/posts/index.html.erb @@ -0,0 +1,31 @@ +

<%= notice %>

+ +

Posts

+ + + + + + + + + + + + + <% @posts.each do |post| %> + + + + + + + + + <% end %> + +
TitleBodyPublished
<%= post.title %><%= post.body %><%= post.published %><%= link_to 'Show', post %><%= link_to 'Edit', edit_post_path(post) %><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Post', new_post_path %> diff --git a/specs_e2e/rails_7_2/app/views/posts/new.html.erb b/specs_e2e/rails_7_2/app/views/posts/new.html.erb new file mode 100644 index 00000000..fb1e2a12 --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/posts/new.html.erb @@ -0,0 +1,5 @@ +

New Post

+ +<%= render 'form', post: @post %> + +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_7_2/app/views/posts/show.html.erb b/specs_e2e/rails_7_2/app/views/posts/show.html.erb new file mode 100644 index 00000000..85b8fe8d --- /dev/null +++ b/specs_e2e/rails_7_2/app/views/posts/show.html.erb @@ -0,0 +1,19 @@ +

<%= notice %>

+ +

+ Title: + <%= @post.title %> +

+ +

+ Body: + <%= @post.body %> +

+ +

+ Published: + <%= @post.published %> +

+ +<%= link_to 'Edit', edit_post_path(@post) %> | +<%= link_to 'Back', posts_path %> diff --git a/specs_e2e/rails_7_2/bin/brakeman b/specs_e2e/rails_7_2/bin/brakeman new file mode 100755 index 00000000..ace1c9ba --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/bin/bundle b/specs_e2e/rails_7_2/bin/bundle new file mode 100755 index 00000000..42c7fd7c --- /dev/null +++ b/specs_e2e/rails_7_2/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 =~ 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_7_2/bin/importmap b/specs_e2e/rails_7_2/bin/importmap new file mode 100755 index 00000000..36502ab1 --- /dev/null +++ b/specs_e2e/rails_7_2/bin/importmap @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby + +require_relative "../config/application" +require "importmap/commands" diff --git a/specs_e2e/rails_7_2/bin/rails b/specs_e2e/rails_7_2/bin/rails new file mode 100755 index 00000000..efc03774 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/bin/rake b/specs_e2e/rails_7_2/bin/rake new file mode 100755 index 00000000..4fbf10b9 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/bin/setup b/specs_e2e/rails_7_2/bin/setup new file mode 100755 index 00000000..eb1e55ed --- /dev/null +++ b/specs_e2e/rails_7_2/bin/setup @@ -0,0 +1,37 @@ +#!/usr/bin/env ruby +require "fileutils" + +APP_ROOT = File.expand_path("..", __dir__) +APP_NAME = "app" + +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! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" + # end + + puts "\n== Preparing database ==" + system! "bin/rails db:prepare" + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" + + # puts "\n== Configuring puma-dev ==" + # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" + # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" +end diff --git a/specs_e2e/rails_4_2/config.ru b/specs_e2e/rails_7_2/config.ru similarity index 56% rename from specs_e2e/rails_4_2/config.ru rename to specs_e2e/rails_7_2/config.ru index bd83b254..4a3c09a6 100644 --- a/specs_e2e/rails_4_2/config.ru +++ b/specs_e2e/rails_7_2/config.ru @@ -1,4 +1,6 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require_relative "config/environment" + run Rails.application +Rails.application.load_server diff --git a/specs_e2e/rails_7_2/config/application.rb b/specs_e2e/rails_7_2/config/application.rb new file mode 100644 index 00000000..d138c14d --- /dev/null +++ b/specs_e2e/rails_7_2/config/application.rb @@ -0,0 +1,37 @@ +require_relative "boot" + +require 'logger' +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_text/engine' +require 'action_view/railtie' +require 'action_cable/engine' + +# 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 7.2 + + # 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_7_2/config/boot.rb b/specs_e2e/rails_7_2/config/boot.rb new file mode 100644 index 00000000..988a5ddc --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/config/cable.yml b/specs_e2e/rails_7_2/config/cable.yml new file mode 100644 index 00000000..f39dc046 --- /dev/null +++ b/specs_e2e/rails_7_2/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: app_production diff --git a/specs_e2e/rails_7_2/config/credentials.yml.enc b/specs_e2e/rails_7_2/config/credentials.yml.enc new file mode 100644 index 00000000..891c7ce5 --- /dev/null +++ b/specs_e2e/rails_7_2/config/credentials.yml.enc @@ -0,0 +1 @@ +oh98nG3RVyvWel7DHqGddaOy5TmoEiIXCIGfOzYwUIQCFsuRCjPXjhyPUpC/tk2vFxYla7+v1KjMTrPn7lf1/FCwq0iY/bHKUVuOhkBgS8rg0ovhVnUq92HYwmWKPHsQgDrRQRoGgZzsFs6tCgl8oKTJ6bwy6GnaYU/a020vqqd0TOOJViDWqo+hEy+ZmhZROJcEJ5swjTq2tZtJIkkXT0n9ug/ezKXxu2f9ABZS7UexaQuc7ILOnHv1TZ0zTwVS5vDV5zm48315jZpwq86jK1i8fsgzjf3r9W1YumNMT4W/uKef5UJGbmS/okaSgA8DF37vyUi7nlcFtXuJrMHJThBpjV1eB+A3fMzCAAAxM9/oNfUQddbPjVlIk/9lb1R/5cBe0oz7QyemzpKx0FWfVncPlJd7--lRNQXXXdHpDiWyxY--uRorsjITTUQAzA1y/d9NZA== \ No newline at end of file diff --git a/specs_e2e/rails_7_2/config/database.yml b/specs_e2e/rails_7_2/config/database.yml new file mode 100644 index 00000000..241a6083 --- /dev/null +++ b/specs_e2e/rails_7_2/config/database.yml @@ -0,0 +1,32 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem "sqlite3" +# +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + + +# SQLite3 write its data on the local filesystem, as such it requires +# persistent disks. If you are deploying to a managed service, you should +# make sure it provides disk persistence, as many don't. +# +# Similarly, if you deploy your application as a Docker container, you must +# ensure the database is located in a persisted volume. +production: + <<: *default + # database: path/to/persistent/storage/production.sqlite3 diff --git a/specs_e2e/rails_4_2/config/environment.rb b/specs_e2e/rails_7_2/config/environment.rb similarity index 64% rename from specs_e2e/rails_4_2/config/environment.rb rename to specs_e2e/rails_7_2/config/environment.rb index ee8d90dc..cac53157 100644 --- a/specs_e2e/rails_4_2/config/environment.rb +++ b/specs_e2e/rails_7_2/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require File.expand_path('../application', __FILE__) +require_relative "application" # Initialize the Rails application. Rails.application.initialize! diff --git a/specs_e2e/rails_7_2/config/environments/development.rb b/specs_e2e/rails_7_2/config/environments/development.rb new file mode 100644 index 00000000..00cfb155 --- /dev/null +++ b/specs_e2e/rails_7_2/config/environments/development.rb @@ -0,0 +1,54 @@ +require "active_support/core_ext/integer/time" + +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 any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.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 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.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true +end diff --git a/specs_e2e/rails_7_2/config/environments/production.rb b/specs_e2e/rails_7_2/config/environments/production.rb new file mode 100644 index 00000000..bfc86e4e --- /dev/null +++ b/specs_e2e/rails_7_2/config/environments/production.rb @@ -0,0 +1,105 @@ +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. 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 ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fall back to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # 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 by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # 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 = "app_production" + + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # 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_7_2/config/environments/test.rb b/specs_e2e/rails_7_2/config/environments/test.rb new file mode 100644 index 00000000..3b854876 --- /dev/null +++ b/specs_e2e/rails_7_2/config/environments/test.rb @@ -0,0 +1,45 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # 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=#{1.hour.to_i}" } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # 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 + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] +end diff --git a/specs_e2e/rails_7_2/config/importmap.rb b/specs_e2e/rails_7_2/config/importmap.rb new file mode 100644 index 00000000..909dfc54 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/config/initializers/content_security_policy.rb b/specs_e2e/rails_7_2/config/initializers/content_security_policy.rb new file mode 100644 index 00000000..b3076b38 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_7_2/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..c010b83d --- /dev/null +++ b/specs_e2e/rails_7_2/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 +] diff --git a/specs_e2e/rails_4_2/config/initializers/inflections.rb b/specs_e2e/rails_7_2/config/initializers/inflections.rb similarity index 77% rename from specs_e2e/rails_4_2/config/initializers/inflections.rb rename to specs_e2e/rails_7_2/config/initializers/inflections.rb index ac033bf9..3860f659 100644 --- a/specs_e2e/rails_4_2/config/initializers/inflections.rb +++ b/specs_e2e/rails_7_2/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_7_2/config/initializers/permissions_policy.rb b/specs_e2e/rails_7_2/config/initializers/permissions_policy.rb new file mode 100644 index 00000000..7db3b957 --- /dev/null +++ b/specs_e2e/rails_7_2/config/initializers/permissions_policy.rb @@ -0,0 +1,13 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide HTTP permissions policy. For further +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end diff --git a/specs_e2e/rails_7_2/config/locales/en.yml b/specs_e2e/rails_7_2/config/locales/en.yml new file mode 100644 index 00000000..6c349ae5 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/config/master.key b/specs_e2e/rails_7_2/config/master.key new file mode 100644 index 00000000..a5c45875 --- /dev/null +++ b/specs_e2e/rails_7_2/config/master.key @@ -0,0 +1 @@ +5b6ca964fe3f4c95d39f82330b15718d \ No newline at end of file diff --git a/specs_e2e/rails_7_2/config/puma.rb b/specs_e2e/rails_7_2/config/puma.rb new file mode 100644 index 00000000..03c166f4 --- /dev/null +++ b/specs_e2e/rails_7_2/config/puma.rb @@ -0,0 +1,34 @@ +# 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. +# +# 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 +# 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 + +# 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_7_2/config/routes.rb b/specs_e2e/rails_7_2/config/routes.rb new file mode 100644 index 00000000..a5cbafd0 --- /dev/null +++ b/specs_e2e/rails_7_2/config/routes.rb @@ -0,0 +1,5 @@ +Rails.application.routes.draw do + resources :posts + root 'posts#index' + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/specs_e2e/rails_7_2/config/storage.yml b/specs_e2e/rails_7_2/config/storage.yml new file mode 100644 index 00000000..4942ab66 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb new file mode 100644 index 00000000..0f48f993 --- /dev/null +++ b/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb @@ -0,0 +1,11 @@ +class CreatePosts < ActiveRecord::Migration[6.1] + def change + create_table :posts do |t| + t.string :title + t.text :body + t.boolean :published + + t.timestamps + end + end +end diff --git a/specs_e2e/rails_7_2/db/seeds.rb b/specs_e2e/rails_7_2/db/seeds.rb new file mode 100644 index 00000000..4fbd6ed9 --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/db/test.sqlite3-shm b/specs_e2e/rails_7_2/db/test.sqlite3-shm new file mode 100644 index 0000000000000000000000000000000000000000..0b3cb704e01652da2b1a7a6b047fb1c9f5941a92 GIT binary patch literal 32768 zcmeI)$4x^)5P;#|7>3Mim}0tzUgfC36Apnw7jD4>7>3Mim}0tzUg zfC36Apnw7jD4>7>3Mim}0tzUgfC36Apnw7jD4>7>3Mim}0tzUgfC36Apnw7jD4>7> z3Mim}0tzUgfC36Apg_R{A{0>)Y+0RIp?xqe{rw^zY{2?G}tm)Ni|Vo)X_kKW?Et5>LjeU8P(T3%6i`3`1r$&~0R*-epW~jK~=gMZiB}oSt$TB5(|M zDCbmTFp@tSb(GLjGg`4}64F>o1J&C4kD3@JRe~`_9h27hCpM{7Qm(;7)A!}dlFj~6 zV5nF=9x7AV7cs0RjXF5FkK+0D+My5X}o@ z=L^o8TKDx2);{)^(Y!!aY-009C72oNAZfB*pk1j;YzH7ffB*pk1PBlyK!5-N0)s3tba{b2Yad*E!(A8Nmz@`o7Z~KR zb2tJ72oNAZfB*pk1PBlyFx&!pd4X(wfuqMA{VzXy|M~0G7Z~m_^7;e_5FkK+009C7 z2oNAZpqM~5FEFRCe%9g@J-zj3h8G3oR}n}z#M3Q_mgeFu;Vb0S7x?Uktv`Hj;kA?1 z7bs?LKLG*+2oNAZfB*pk1PBnQbb;b|f%|TKVfC^zzI=5wFEA!{S$IE!@DCdS0t5&U zAV7cs0RjXF5Fl`{0v%(jgX5!{2!xCLXLnuPy=+m5RsKve&yVcVAIE6 zZ=ZVB%9i?@U) zk#j$S?Z0~S!M|A7`L6@>0{ua(|3FXE;|UNTK!5-N0t5&UAV7csfwC5;$-5sx_59@I zhu3VcU48C?*S2i9`@zlG>j>lp%6ceujsO7y1PBlyK!5-N0t6~Xpd#`DKUnt%scTZd zYR%3I$O}}=8%#$D5FkK+009C72oNAZfWSKv$j=L8>kFK5+nApuU%2DVf$Ipi1hFmZ z3%ny!4<*4-ld((3RMw^ zH)k@9jm2BSF6Y!2sNZnYk@FUBd_sMJ(u1j$009C72oNAZfB*pk1PD~DK#9D-rj?KE zYJ2g6v!Z!{F=13dUZ7$}S;q+wAV7cs0RjXF5FkLHyaZ;CsSajDtNe3TF6mude{%QI zaE*Ua!KM6kys0@^yk!XU0vDa|=w(cAhy;02+C>b^o0Nc0t5&UAV7cs0RjXnR$vhG0<*B`Hi zaB6q=qWX*ay6We2uIR}xNRVkrXVT5dO!1abGv|H;t0rZhSa-xj_YTYp^arv2iuKlU z0t5&UAV7cs0RjXF5FkLHkU;+Z2(tABt_r?Z`}8BLZ_QpuATLlz&^`hL2oNAZfB*pk z1PBlyaG(Mekr(*#vbyVbZn}SNc3wbU;6TUO;|UNTK!5-N0t5&UAV7dXc?;y{1+w)8 z7VW5>vF5b4FAZEruq}vfQ(vIG2UG6|5FkK+009C72oNAZph5(ODlgC$78?k+_Vz+m z1X?nQrg*A&OZdc``U2BF_tZ5{?p}4c`T`a5uF_2c1PBlyK!5-N0t5&UAaI}pCGrBt zU;p9rHvQA1Z$;e5USM|++nskFb`T&yfB*pk1PBlyK!5-N0+lRKQ#E!< z)$;D1-kvexX^f9fWqxwRDV1&QfogM)K1PBlyK!5-N0t5(*UV;62 zfpH;1PF~=yOON>6DX%{Ci)dcpu)4>yd4cd(8vz0Y2oNAZfB*pk1PBl)cY(IUN-z0m z8k-6i_D_W^@&dK1kJ)^6-)GjIdy>3Bxxdx*j{pGz1PBlyK!5-N0t5)WOM(4)fy2Th zcxy7#(2_|s#fy|hh+4wojJT`!-KX%|yFU5Gi3?AhEiW+S zZ*(s}fB*pk1PBlyK!5-N0tALfV1Hg9$_nJ<1!n%ww#zoGTYg+LFHl{#ASW*n{?kT) z009C72oNAZfB*pk1m0ett-AD*e>$Eivg9AO$P45x`6rW^cww-prLC%@_JQRErceLr zj+1}(=w^9=w||>^1OWmB2oNAZfB*pk1PBnQNP+!%foMh{Cok~ZU5^}f`74*a8qEt# zs5|oa@&e%w8vz0Y2oNAZfB*pk1PF`@fwl=H7oo#-{g%Qj*innTK;DvnsxeXID*vdZ zZA?k+Lzox1e#w009C72oNAZfB*pkl_AhpQ*seHoyrth!H!zw1@f2t zlj$O0sj#JOY)S1($qOuee)@M>PdM#zd4bCKkn1G@0t5&UAV7cs0RjXF5IA6g{ds|! z@VPm8fzvNo{hrsapEf0$7noRkdx5+_xYI^}009C72oNAZfB*pkhe)7pV#!75bSBeS z4?`_%@Ejs^=#sKfGpp?dmJHEV_ExGuv;G7by7w*GPZ> z0RjXF5FkK+009C7Dpz2CUf}TXB%-`Pc3xoYuIBgk-Eq&aqj`Z~av(1dIoJpgAV7cs z0RjXF5Fl{C0`dY8S$lhth5d9qQ@o{Ze90w$d4c-hS@KUNGx4^nl3-CPps;qKyufQU zt0%qMy=rgW!M*bWyASxy?+FA55FkK+009C72oNAZfIvA58r8 zrsj0IfB*pk z1PBlyK!5-N0t5&QhQOq%u~Wt^@9ydCXkBOEJm;$&=YMFL`T`^QJ>c935FkK+009C72oM;00eOMQSYF^j z@&e7tu(&|M`T_$j@2E7`w>h$ciY8xu3vd!_BsOf1rGfXc|`&Q2oNAZfB*pk1V(^>yg)RF z@&c8Y7x?>~8?NlTdFD^E^8)G%jDYVWr$B%J0RjXF5FkK+009C7_6Zcs3uNmH9CyWk zZA;wo@23pZ7nmEw=ElAj>xfONd%W(Jx&?Jd);?Q%d+ow~$MQD;0t5&UAV7cs0RjXF z6c&&dh+IZtUf}Fc-?(w@CDlQEYE6_CIJs~6imslXS&LWot_*)k%;}rowW>GKm`KfR zjL%Fo*T>VXP4U)Lydj-PwPcdTTjpK+#O5!qs18mnc;I(`+;Et3>I+=EdHhjtzHi&P z>I)S9WZO%C009C72oNAZfB*pk1S(sgU|t|wUtqy`?Q7;vteKa+jzC_ZvWHvm2@oJa zfB*pk1PBlqCINYY2wq;G^6~0;_7dU3d`UkK4lka_F;5vdWL2Qfq0z)whj!A$30RjXF5FkK+z(^O67l=k! zUSNpw0v%P=!SRuAM}6ng`p)_@yL)<ge`=P8vk5)nnU4>Dvh@X~ z{4(|MiJyF9efBy6d4bXN=5VeA2oNAZfB*pk1PBb8fV@CNDKAiYd4b#Bd+pR?-Z0b2Jz}@|0>eL2dO&~x z0RjXF5FkK+KqU*v3q+$QFEIRhfn;Mc)to3)Utpjm9HyN50?)@6w_fL$Wd5l4<dg$FfWj;FYw*te)G?FZu+~+veyx)FEFg5<;4jQAV7cs z0RjXF5U5lEd4Xu;!+<5pZX6m-6IJQAV7cs0RjXF5FkK+K;;M&%nR(V zFOYa}-k$m6y0h02s4q}CL#w9*2oNAZfB*pk1PGLofV@C781e#@mlyc$`Sb0%i2QqALUl5FkK+009C72oNAZ;9vy`<^{6#1unk%{`3Coo}c`i`T_^*?D+%; z5FkK+009C72#jt4d4XvBpIA dbbo_6djbRq5FkK+009C72oM;l0=apC{{t&_)bjuU literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_7_2/package.json b/specs_e2e/rails_7_2/package.json new file mode 100644 index 00000000..7ef5344c --- /dev/null +++ b/specs_e2e/rails_7_2/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "@playwright/test": "^1.50.0", + "cypress": "^14.0.0", + "cypress-on-rails": "^0.1.0", + "playwright": "^1.50.0" + } +} diff --git a/specs_e2e/rails_7_2/playwright-report/index.html b/specs_e2e/rails_7_2/playwright-report/index.html new file mode 100644 index 00000000..c5db1d77 --- /dev/null +++ b/specs_e2e/rails_7_2/playwright-report/index.html @@ -0,0 +1,71 @@ + + + + + + + + + Playwright Test Report + + + + +
+ + + \ No newline at end of file diff --git a/specs_e2e/rails_4_2/public/404.html b/specs_e2e/rails_7_2/public/404.html similarity index 86% rename from specs_e2e/rails_4_2/public/404.html rename to specs_e2e/rails_7_2/public/404.html index b612547f..2be3af26 100644 --- a/specs_e2e/rails_4_2/public/404.html +++ b/specs_e2e/rails_7_2/public/404.html @@ -4,7 +4,7 @@ The page you were looking for doesn't exist (404) - +
diff --git a/specs_e2e/rails_7_2/public/406-unsupported-browser.html b/specs_e2e/rails_7_2/public/406-unsupported-browser.html new file mode 100644 index 00000000..7cf1e168 --- /dev/null +++ b/specs_e2e/rails_7_2/public/406-unsupported-browser.html @@ -0,0 +1,66 @@ + + + + Your browser is not supported (406) + + + + + + +
+
+

Your browser is not supported.

+

Please upgrade your browser to continue.

+
+
+ + diff --git a/specs_e2e/rails_4_2/public/422.html b/specs_e2e/rails_7_2/public/422.html similarity index 86% rename from specs_e2e/rails_4_2/public/422.html rename to specs_e2e/rails_7_2/public/422.html index a21f82b3..c08eac0d 100644 --- a/specs_e2e/rails_4_2/public/422.html +++ b/specs_e2e/rails_7_2/public/422.html @@ -4,7 +4,7 @@ The change you wanted was rejected (422) - +
diff --git a/specs_e2e/rails_4_2/public/500.html b/specs_e2e/rails_7_2/public/500.html similarity index 85% rename from specs_e2e/rails_4_2/public/500.html rename to specs_e2e/rails_7_2/public/500.html index 061abc58..78a030af 100644 --- a/specs_e2e/rails_4_2/public/500.html +++ b/specs_e2e/rails_7_2/public/500.html @@ -4,7 +4,7 @@ We're sorry, but something went wrong (500) - +
diff --git a/specs_e2e/rails_7_2/public/icon.png b/specs_e2e/rails_7_2/public/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f3b5abcbde91cf6d7a6a26e514eb7e30f476f950 GIT binary patch literal 5599 zcmeHL-D}fO6hCR_taXJlzs3}~RuB=Iujyo=i*=1|1FN%E=zNfMTjru|Q<6v{J{U!C zBEE}?j6I3sz>fzN!6}L_BKjcuASk~1;Dg|U_@d{g?V8mM`~#9U+>>*Ezw>c(PjYWA z4(;!cgge6k5E&d$G5`S-0}!Ik>CV(0Y#1}s-v_gAHhja2=W1?nBAte9D2HG<(+)uj z!5=W4u*{VKMw#{V@^NNs4TClr!FAA%ID-*gc{R%CFKEzG<6gm*9s_uy)oMGW*=nJf zw{(Mau|2FHfXIv6C0@Wk5k)F=3jo1srV-C{pl&k&)4_&JjYrnbJiul}d0^NCSh(#7h=F;3{|>EU>h z6U8_p;^wK6mAB(1b92>5-HxJ~V}@3?G`&Qq-TbJ2(&~-HsH6F#8mFaAG(45eT3VPO zM|(Jd<+;UZs;w>0Qw}0>D%{~r{uo_Fl5_Bo3ABWi zWo^j^_T3dxG6J6fH8X)$a^%TJ#PU!=LxF=#Fd9EvKx_x>q<(KY%+y-08?kN9dXjXK z**Q=yt-FTU*13ouhCdqq-0&;Ke{T3sQU9IdzhV9LhQIpq*P{N)+}|Mh+a-VV=x?R} c>%+pvTcMWshj-umO}|qP?%A)*_KlqT3uEqhU;qFB literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_7_2/public/icon.svg b/specs_e2e/rails_7_2/public/icon.svg new file mode 100644 index 00000000..78307ccd --- /dev/null +++ b/specs_e2e/rails_7_2/public/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/specs_e2e/rails_7_2/public/robots.txt b/specs_e2e/rails_7_2/public/robots.txt new file mode 100644 index 00000000..c19f78ab --- /dev/null +++ b/specs_e2e/rails_7_2/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_7_2/storage/test.sqlite3 b/specs_e2e/rails_7_2/storage/test.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..52ed4434a6aebd019c391941804f6d2711ff3582 GIT binary patch literal 28672 zcmeI*J#X7a7zgm9WQ$f}iRn=*L$&gPdC4^*TQ)N5fva&OGz9WAt7y8q>8B+QBi-PtK$u0g#w6^x5 z_)+n%!X3GT4FV8=00bZa0SG_<0uX?}|17YX%jq|7Dm#MhdOUvS$&;Uc%%2T;uy=V^ zy}Q+MdL7zx?yPm_rDK-^=JQ)JvwZS+Ue$G7d47E~=Rp{Yc=V7P%P)<_N_4s84ocJw z1b@mSy1CU|ceZxugU$|hwtEk|8!~CVv(cj)4`th4Tf0R|!WAAb(L)yP?XyS@?1qEm z5*7SN$en}XuII-4T+X^1h8|~u9NddI6MWETqC^L>CtRN|*UJ}Y9Udfs>4%h0dRbMs zZRMK>qrzC!PgWfT%`g=)F>;Er__7X@CfB*y_009U<00Izz00bZa0SLTZ0{4~qrS~0&2ZwGH z20jmj;IXg_%f4-xx2-xg8>^;JEa_Ui4b5UYUz1Rwwb2tWV= z5P$##AOHafK;R7oirJ<7g})ml*Z<{B|A_WN`$_9+i^X4y-xs%w9~6Es{8)JW2G4_3 z2tWV=5P$##AOHafKmY<)Lg3zYl`IkBIQO~dh4k|<@&=c#!PZv|t5P+Ls%=b&HEL)5gga)GAh^W!F+j&m&vUfBWUzNF^)D#9c)t<>c+vrOc;{ZpwR3 z`Yf27*RIs;R?A4yK99UU|Nr|+d@xZY1Rwwb2tWV=5P$##AOHafK;Vi9EGk)jLALzp HA5#1aO&-To literal 0 HcmV?d00001 diff --git a/specs_e2e/rails_7_2/test-results/.last-run.json b/specs_e2e/rails_7_2/test-results/.last-run.json new file mode 100644 index 00000000..cbcc1fba --- /dev/null +++ b/specs_e2e/rails_7_2/test-results/.last-run.json @@ -0,0 +1,4 @@ +{ + "status": "passed", + "failedTests": [] +} \ No newline at end of file diff --git a/specs_e2e/rails_4_2/test.sh b/specs_e2e/rails_7_2/test.sh similarity index 52% rename from specs_e2e/rails_4_2/test.sh rename to specs_e2e/rails_7_2/test.sh index 24cfba21..ce1b8e27 100755 --- a/specs_e2e/rails_4_2/test.sh +++ b/specs_e2e/rails_7_2/test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail -echo '--- testing rails 4.2' +echo '--- testing rails 7.2.2' echo '-- setting environment' export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -10,41 +10,48 @@ export BUNDLE_GEMFILE="$DIR/Gemfile" cd $DIR echo '-- bundle install' -gem install bundler -v "~> 1.0" --conservative bundle --version -bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 --path vendor/bundle +bundle config set --local path 'vendor/bundle' +bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 + +echo '-- migration' +bundle exec ./bin/rails db:drop || true +bundle exec ./bin/rails db:create db:migrate echo '-- cypress install' -bundle exec ./bin/rails g cypress_on_rails:install --install_folder=spec --framework cypress --experimental --install_with=npm --force -rm -vf spec/cypress/e2e/rails_examples/advance_factory_bot.cy.js +bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework cypress --install_with=npm --force +rm -vf test/cypress/e2e/rails_examples/using_vcr.cy.js echo '-- start rails server' # make sure the server is not running (kill -9 `cat ../server.pid` || true ) bundle exec ./bin/rails server -p 5017 -e test -P ../server.pid & -sleep 5 # give rails a chance to start up correctly +sleep 2 # give rails a chance to start up correctly echo '-- cypress run' -cp -fv ../cypress.config.js spec/ +cp -fv ../cypress.config.js test/ +cd test +npx cypress install # if [ -z $CYPRESS_RECORD_KEY ] # then -# npx cypress run -P ./spec +# npx cypress run # else - npx cypress install - npx cypress run -P ./spec # --record + npx cypress run # --record # fi echo '-- playwright install' -bundle exec ./bin/rails g cypress_on_rails:install --install_folder=spec --framework playwright --experimental --install_with=npm --force -rm -vf spec/playwright/e2e/rails_examples/advance_factory_bot.cy.js +cd .. +bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework playwright --install_with=npm --force +rm -vf test/playwright/e2e/rails_examples/using_vcr.cy.js echo '-- playwright run' -cp -fv ../playwright.config.js spec/ -cd spec +cd test +cp -fv ../../playwright.config.js . npx playwright install-deps npx playwright install -npx playwright test spec/playwright/e2e +npx playwright test test/playwright +# npx playwright show-report echo '-- stop rails server' kill -9 `cat ../../server.pid` || true diff --git a/specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb b/specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb new file mode 100644 index 00000000..14af994d --- /dev/null +++ b/specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class PostsControllerTest < ActionDispatch::IntegrationTest + setup do + @post = posts(:one) + end + + test "should get index" do + get posts_url + assert_response :success + end + + test "should get new" do + get new_post_url + assert_response :success + end + + test "should create post" do + assert_difference('Post.count') do + post posts_url, params: { post: { body: @post.body, published: @post.published, title: @post.title } } + end + + assert_redirected_to post_url(Post.last) + end + + test "should show post" do + get post_url(@post) + assert_response :success + end + + test "should get edit" do + get edit_post_url(@post) + assert_response :success + end + + test "should update post" do + patch post_url(@post), params: { post: { body: @post.body, published: @post.published, title: @post.title } } + assert_redirected_to post_url(@post) + end + + test "should destroy post" do + assert_difference('Post.count', -1) do + delete post_url(@post) + end + + assert_redirected_to posts_url + end +end diff --git a/specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml b/specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml new file mode 100644 index 00000000..70580204 --- /dev/null +++ b/specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyCypressFixtures + body: MyText + published: true + +two: + title: MyCypressFixtures2 + body: MyText + published: true diff --git a/specs_e2e/rails_7_2/test/fixtures/posts.yml b/specs_e2e/rails_7_2/test/fixtures/posts.yml new file mode 100644 index 00000000..9fa2b741 --- /dev/null +++ b/specs_e2e/rails_7_2/test/fixtures/posts.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyRailsFixtures + body: MyText + published: false + +two: + title: MyRailsFixtures2 + body: MyText + published: false diff --git a/specs_e2e/rails_7_2/test/models/post_test.rb b/specs_e2e/rails_7_2/test/models/post_test.rb new file mode 100644 index 00000000..6d9d463a --- /dev/null +++ b/specs_e2e/rails_7_2/test/models/post_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PostTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/specs_e2e/rails_4_2/spec/.keep b/specs_e2e/rails_7_2/vendor/.keep similarity index 100% rename from specs_e2e/rails_4_2/spec/.keep rename to specs_e2e/rails_7_2/vendor/.keep diff --git a/specs_e2e/rails_4_2/vendor/.keep b/specs_e2e/rails_7_2/vendor/javascript/.keep similarity index 100% rename from specs_e2e/rails_4_2/vendor/.keep rename to specs_e2e/rails_7_2/vendor/javascript/.keep From c96a995d2ec178212a14a6bd001522905e23966d Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 26 Jan 2025 18:35:47 +0100 Subject: [PATCH 09/10] Remove Rails 4.2 --- specs_e2e/rails_4_2/.gitignore | 12 ---- specs_e2e/rails_4_2/Gemfile | 11 ---- specs_e2e/rails_4_2/README.rdoc | 28 -------- .../app/assets/javascripts/using_vcr.js | 2 - .../app/assets/stylesheets/using_vcr.css | 4 -- .../app/controllers/application_controller.rb | 5 -- .../app/controllers/using_vcr_controller.rb | 10 --- .../app/controllers/welcome_controller.rb | 4 -- specs_e2e/rails_4_2/app/models/post.rb | 23 ------- .../app/views/layouts/application.html.erb | 12 ---- .../app/views/using_vcr/index.html.erb | 6 -- .../app/views/using_vcr/record_cats.html.erb | 7 -- .../app/views/welcome/index.html.erb | 24 ------- specs_e2e/rails_4_2/bin/bundle | 3 - specs_e2e/rails_4_2/bin/rails | 4 -- specs_e2e/rails_4_2/bin/rake | 4 -- specs_e2e/rails_4_2/bin/setup | 29 --------- specs_e2e/rails_4_2/config/application.rb | 32 ---------- specs_e2e/rails_4_2/config/boot.rb | 3 - .../config/environments/development.rb | 25 -------- .../config/environments/production.rb | 64 ------------------- .../rails_4_2/config/environments/test.rb | 42 ------------ .../initializers/backtrace_silencers.rb | 7 -- .../config/initializers/cookies_serializer.rb | 3 - .../initializers/filter_parameter_logging.rb | 4 -- .../config/initializers/mime_types.rb | 4 -- .../config/initializers/session_store.rb | 3 - .../to_time_preserves_timezone.rb | 10 --- .../config/initializers/wrap_parameters.rb | 9 --- specs_e2e/rails_4_2/config/locales/en.yml | 23 ------- specs_e2e/rails_4_2/config/routes.rb | 61 ------------------ specs_e2e/rails_4_2/config/secrets.yml | 22 ------- specs_e2e/rails_4_2/package.json | 12 ---- .../rails_4_2/playwright-report/index.html | 62 ------------------ specs_e2e/rails_4_2/public/favicon.ico | 0 specs_e2e/rails_4_2/public/robots.txt | 5 -- .../spec/fixtures/vcr_cassettes/cats.yml | 63 ------------------ 37 files changed, 642 deletions(-) delete mode 100644 specs_e2e/rails_4_2/.gitignore delete mode 100644 specs_e2e/rails_4_2/Gemfile delete mode 100644 specs_e2e/rails_4_2/README.rdoc delete mode 100644 specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js delete mode 100644 specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css delete mode 100644 specs_e2e/rails_4_2/app/controllers/application_controller.rb delete mode 100644 specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb delete mode 100644 specs_e2e/rails_4_2/app/controllers/welcome_controller.rb delete mode 100644 specs_e2e/rails_4_2/app/models/post.rb delete mode 100644 specs_e2e/rails_4_2/app/views/layouts/application.html.erb delete mode 100644 specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb delete mode 100644 specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb delete mode 100644 specs_e2e/rails_4_2/app/views/welcome/index.html.erb delete mode 100755 specs_e2e/rails_4_2/bin/bundle delete mode 100755 specs_e2e/rails_4_2/bin/rails delete mode 100755 specs_e2e/rails_4_2/bin/rake delete mode 100755 specs_e2e/rails_4_2/bin/setup delete mode 100644 specs_e2e/rails_4_2/config/application.rb delete mode 100644 specs_e2e/rails_4_2/config/boot.rb delete mode 100644 specs_e2e/rails_4_2/config/environments/development.rb delete mode 100644 specs_e2e/rails_4_2/config/environments/production.rb delete mode 100644 specs_e2e/rails_4_2/config/environments/test.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/backtrace_silencers.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/filter_parameter_logging.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/mime_types.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/session_store.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb delete mode 100644 specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb delete mode 100644 specs_e2e/rails_4_2/config/locales/en.yml delete mode 100644 specs_e2e/rails_4_2/config/routes.rb delete mode 100644 specs_e2e/rails_4_2/config/secrets.yml delete mode 100644 specs_e2e/rails_4_2/package.json delete mode 100644 specs_e2e/rails_4_2/playwright-report/index.html delete mode 100644 specs_e2e/rails_4_2/public/favicon.ico delete mode 100644 specs_e2e/rails_4_2/public/robots.txt delete mode 100644 specs_e2e/rails_4_2/spec/fixtures/vcr_cassettes/cats.yml diff --git a/specs_e2e/rails_4_2/.gitignore b/specs_e2e/rails_4_2/.gitignore deleted file mode 100644 index e30f11ca..00000000 --- a/specs_e2e/rails_4_2/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.bundle -spec/node_modules -spec/cypress.config.js -spec/package.json -spec/yarn.lock -spec/cypress -spec/app_commands -config/initializers/cypress_on_rails.rb -vendor/bundle -tmp/pids -tmp/cache -log/*.* \ No newline at end of file diff --git a/specs_e2e/rails_4_2/Gemfile b/specs_e2e/rails_4_2/Gemfile deleted file mode 100644 index 835f8b59..00000000 --- a/specs_e2e/rails_4_2/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source 'https://rubygems.org' - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 4.2.10' -gem 'sprockets', '~> 3.7.2' - -group :development, :test do - gem 'vcr' - gem 'webmock' - gem 'cypress-on-rails', path: '../../' -end diff --git a/specs_e2e/rails_4_2/README.rdoc b/specs_e2e/rails_4_2/README.rdoc deleted file mode 100644 index dd4e97e2..00000000 --- a/specs_e2e/rails_4_2/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js b/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js deleted file mode 100644 index dee720fa..00000000 --- a/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.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_4_2/app/assets/stylesheets/using_vcr.css b/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css deleted file mode 100644 index afad32db..00000000 --- a/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.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_4_2/app/controllers/application_controller.rb b/specs_e2e/rails_4_2/app/controllers/application_controller.rb deleted file mode 100644 index d83690e1..00000000 --- a/specs_e2e/rails_4_2/app/controllers/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ApplicationController < ActionController::Base - # Prevent CSRF attacks by raising an exception. - # For APIs, you may want to use :null_session instead. - protect_from_forgery with: :exception -end diff --git a/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb b/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb deleted file mode 100644 index c12d0c54..00000000 --- a/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class UsingVcrController < ApplicationController - def index - end - - def record_cats - uri = URI('https://cat-fact.herokuapp.com/facts') - res = Net::HTTP.get_response(uri) - @cat_facts = JSON.parse(res.body) - end -end diff --git a/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb b/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb deleted file mode 100644 index f9b859b9..00000000 --- a/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class WelcomeController < ApplicationController - def index - end -end diff --git a/specs_e2e/rails_4_2/app/models/post.rb b/specs_e2e/rails_4_2/app/models/post.rb deleted file mode 100644 index 39d49dd4..00000000 --- a/specs_e2e/rails_4_2/app/models/post.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Post < OpenStruct - def self.create!(attributes) - create(attributes) - end - - def self.create(attributes) - @all ||= [] - post = new(attributes) - @all << post - post.id = @all.index(post) - attributes['id'] = @all.index(post) - attributes - end - - def self.all - @all ||= [] - @all - end - - def self.delete_all - @all = [] - end -end diff --git a/specs_e2e/rails_4_2/app/views/layouts/application.html.erb b/specs_e2e/rails_4_2/app/views/layouts/application.html.erb deleted file mode 100644 index fa24141a..00000000 --- a/specs_e2e/rails_4_2/app/views/layouts/application.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - Rails42X - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb b/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb deleted file mode 100644 index 956c65fc..00000000 --- a/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Using VCR

-
-  <%= JSON.pretty_generate VCR.configuration.as_json['default_cassette_options'] %>
-
- -<%= link_to 'Record Cats', { action: :record_cats } %> \ No newline at end of file diff --git a/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb b/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb deleted file mode 100644 index b1f9f4a2..00000000 --- a/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -

Record from Cats API

- -
    - <% @cat_facts.each do |fact| %> -
  • <%= fact['text'] %>
  • - <% end %> -
      diff --git a/specs_e2e/rails_4_2/app/views/welcome/index.html.erb b/specs_e2e/rails_4_2/app/views/welcome/index.html.erb deleted file mode 100644 index 8bb69472..00000000 --- a/specs_e2e/rails_4_2/app/views/welcome/index.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -

      Posts

      - - - - - - - - - - - - - <% Post.all.each do |post| %> - - - - - - <% end %> - -
      TitleBodyPublished
      <%= post.title %><%= post.body %><%= post.published %>
      - -
      \ No newline at end of file diff --git a/specs_e2e/rails_4_2/bin/bundle b/specs_e2e/rails_4_2/bin/bundle deleted file mode 100755 index 66e9889e..00000000 --- a/specs_e2e/rails_4_2/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') diff --git a/specs_e2e/rails_4_2/bin/rails b/specs_e2e/rails_4_2/bin/rails deleted file mode 100755 index 5191e692..00000000 --- a/specs_e2e/rails_4_2/bin/rails +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/specs_e2e/rails_4_2/bin/rake b/specs_e2e/rails_4_2/bin/rake deleted file mode 100755 index 17240489..00000000 --- a/specs_e2e/rails_4_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_4_2/bin/setup b/specs_e2e/rails_4_2/bin/setup deleted file mode 100755 index acdb2c13..00000000 --- a/specs_e2e/rails_4_2/bin/setup +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) - -Dir.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 || bundle install" - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" - # end - - puts "\n== Preparing database ==" - system "bin/rake db:setup" - - puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" - - puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" -end diff --git a/specs_e2e/rails_4_2/config/application.rb b/specs_e2e/rails_4_2/config/application.rb deleted file mode 100644 index e6e9c556..00000000 --- a/specs_e2e/rails_4_2/config/application.rb +++ /dev/null @@ -1,32 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require "rails" -# Pick the frameworks you want: -require "active_model/railtie" -require "active_job/railtie" -# require "active_record/railtie" -require "action_controller/railtie" -require "action_mailer/railtie" -require "action_view/railtie" -# 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 Rails42X - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - end -end diff --git a/specs_e2e/rails_4_2/config/boot.rb b/specs_e2e/rails_4_2/config/boot.rb deleted file mode 100644 index 6b750f00..00000000 --- a/specs_e2e/rails_4_2/config/boot.rb +++ /dev/null @@ -1,3 +0,0 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/specs_e2e/rails_4_2/config/environments/development.rb b/specs_e2e/rails_4_2/config/environments/development.rb deleted file mode 100644 index 61a2a705..00000000 --- a/specs_e2e/rails_4_2/config/environments/development.rb +++ /dev/null @@ -1,25 +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 and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - # 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 -end diff --git a/specs_e2e/rails_4_2/config/environments/production.rb b/specs_e2e/rails_4_2/config/environments/production.rb deleted file mode 100644 index 2babca38..00000000 --- a/specs_e2e/rails_4_2/config/environments/production.rb +++ /dev/null @@ -1,64 +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 - - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like - # NGINX, varnish or squid. - # config.action_dispatch.rack_cache = true - - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? - - - # 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 = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new -end diff --git a/specs_e2e/rails_4_2/config/environments/test.rb b/specs_e2e/rails_4_2/config/environments/test.rb deleted file mode 100644 index 6aa0bd06..00000000 --- a/specs_e2e/rails_4_2/config/environments/test.rb +++ /dev/null @@ -1,42 +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 static file server for tests with Cache-Control for performance. - config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' - - # 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 - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Randomize the order test cases are executed. - config.active_support.test_order = :random - - # 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_4_2/config/initializers/backtrace_silencers.rb b/specs_e2e/rails_4_2/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/specs_e2e/rails_4_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_4_2/config/initializers/cookies_serializer.rb b/specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb deleted file mode 100644 index 7f70458d..00000000 --- a/specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,3 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/specs_e2e/rails_4_2/config/initializers/filter_parameter_logging.rb b/specs_e2e/rails_4_2/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4a994e1e..00000000 --- a/specs_e2e/rails_4_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_4_2/config/initializers/mime_types.rb b/specs_e2e/rails_4_2/config/initializers/mime_types.rb deleted file mode 100644 index dc189968..00000000 --- a/specs_e2e/rails_4_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_4_2/config/initializers/session_store.rb b/specs_e2e/rails_4_2/config/initializers/session_store.rb deleted file mode 100644 index cabe8091..00000000 --- a/specs_e2e/rails_4_2/config/initializers/session_store.rb +++ /dev/null @@ -1,3 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Rails.application.config.session_store :cookie_store, key: '_rails_4_2_session' diff --git a/specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb b/specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb deleted file mode 100644 index 8674be32..00000000 --- a/specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Preserve the timezone of the receiver when calling to `to_time`. -# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone -# when converting to an instance of `Time` instead of the previous behavior -# of converting to the local system timezone. -# -# Rails 5.0 introduced this config option so that apps made with earlier -# versions of Rails are not affected when upgrading. -ActiveSupport.to_time_preserves_timezone = true diff --git a/specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb b/specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb deleted file mode 100644 index b81ea74b..00000000 --- a/specs_e2e/rails_4_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] if respond_to?(:wrap_parameters) -end diff --git a/specs_e2e/rails_4_2/config/locales/en.yml b/specs_e2e/rails_4_2/config/locales/en.yml deleted file mode 100644 index 06539571..00000000 --- a/specs_e2e/rails_4_2/config/locales/en.yml +++ /dev/null @@ -1,23 +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. -# -# 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_4_2/config/routes.rb b/specs_e2e/rails_4_2/config/routes.rb deleted file mode 100644 index b6bf0c5f..00000000 --- a/specs_e2e/rails_4_2/config/routes.rb +++ /dev/null @@ -1,61 +0,0 @@ -Rails.application.routes.draw do - get 'using_vcr/index' - - # The priority is based upon order of creation: first created -> highest priority. - # See how all your routes lay out with "rake routes". - - # You can have the root of your site routed with "root" - root 'welcome#index' - - get 'using_vcr/:action', to: 'using_vcr#:action' - - - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end -end diff --git a/specs_e2e/rails_4_2/config/secrets.yml b/specs_e2e/rails_4_2/config/secrets.yml deleted file mode 100644 index ae725768..00000000 --- a/specs_e2e/rails_4_2/config/secrets.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key is used for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! - -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -# You can use `rake secret` to generate a secure secret key. - -# Make sure the secrets in this file are kept private -# if you're sharing your code publicly. - -development: - secret_key_base: adfe5a1fe4a9da0cd84475395507664689b981c8059a1e3dabc7ad159a89a31d41e54811832c5a70bce77529ad3d601fd4f4051c7448349d52b2becd84d07d17 - -test: - secret_key_base: 546b4b752cc98c06016597d26714a81e705e8c18de9a1f94166a042bc170da21a4a905205c67b82de423b6648b779980ee161a61f820e172b88dc2dafc0abbeb - -# Do not keep production secrets in the repository, -# instead read values from the environment. -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/specs_e2e/rails_4_2/package.json b/specs_e2e/rails_4_2/package.json deleted file mode 100644 index 612aba8b..00000000 --- a/specs_e2e/rails_4_2/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "rails_4_2", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "devDependencies": { - "@playwright/test": "^1.40.1", - "cypress": "^10.11.0", - "cypress-on-rails": "file:../../plugin", - "playwright": "^1.40.1" - } -} diff --git a/specs_e2e/rails_4_2/playwright-report/index.html b/specs_e2e/rails_4_2/playwright-report/index.html deleted file mode 100644 index d0694529..00000000 --- a/specs_e2e/rails_4_2/playwright-report/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - Playwright Test Report - - - - -
      - - - - \ No newline at end of file diff --git a/specs_e2e/rails_4_2/public/favicon.ico b/specs_e2e/rails_4_2/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/specs_e2e/rails_4_2/public/robots.txt b/specs_e2e/rails_4_2/public/robots.txt deleted file mode 100644 index 3c9c7c01..00000000 --- a/specs_e2e/rails_4_2/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-agent: * -# Disallow: / diff --git a/specs_e2e/rails_4_2/spec/fixtures/vcr_cassettes/cats.yml b/specs_e2e/rails_4_2/spec/fixtures/vcr_cassettes/cats.yml deleted file mode 100644 index 8626b3f7..00000000 --- a/specs_e2e/rails_4_2/spec/fixtures/vcr_cassettes/cats.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://cat-fact.herokuapp.com/facts - body: - encoding: US-ASCII - string: '' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Host: - - cat-fact.herokuapp.com - response: - status: - code: 200 - message: OK - headers: - Server: - - Cowboy - Report-To: - - '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1704261545&sid=929419e7-33ea-4e2f-85f0-7d8b7cd5cbd6&s=OabIZbJae2naQpkmA6oM8tyC0dn4yWUtvOVjuyytaRg%3D"}]}' - Reporting-Endpoints: - - heroku-nel=https://nel.heroku.com/reports?ts=1704261545&sid=929419e7-33ea-4e2f-85f0-7d8b7cd5cbd6&s=OabIZbJae2naQpkmA6oM8tyC0dn4yWUtvOVjuyytaRg%3D - Nel: - - '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}' - Connection: - - keep-alive - X-Powered-By: - - Express - Access-Control-Allow-Origin: - - "*" - Content-Type: - - application/json; charset=utf-8 - Content-Length: - - '1877' - Etag: - - W/"755-h8iGk8b461dj2B2tvSoMjrc8cAA" - Set-Cookie: - - connect.sid=s%3ASQfrvsPQGDLjbr1QrsrgV8BwZQptae4i.6BlC7zySZLgqSg%2BRmO6edW%2FxM6WR%2FJ9Xz2lD16D4nWo; - Path=/; HttpOnly - Date: - - Wed, 03 Jan 2024 05:59:05 GMT - Via: - - 1.1 vegur - body: - encoding: UTF-8 - string: '[{"status":{"verified":true,"sentCount":1},"_id":"58e00b5f0aac31001185ed24","user":"58e007480aac31001185ecef","text":"When - asked if her husband had any hobbies, Mary Todd Lincoln is said to have replied - \"cats.\"","__v":0,"source":"user","updatedAt":"2020-08-23T20:20:01.611Z","type":"cat","createdAt":"2018-02-19T21:20:03.434Z","deleted":false,"used":false},{"status":{"verified":true,"feedback":"","sentCount":1},"_id":"5887e1d85c873e0011036889","user":"5a9ac18c7478810ea6c06381","text":"Cats - make about 100 different sounds. Dogs make only about 10.","__v":0,"source":"user","updatedAt":"2020-09-03T16:39:39.578Z","type":"cat","createdAt":"2018-01-15T21:20:00.003Z","deleted":false,"used":true},{"status":{"verified":true,"sentCount":1},"_id":"58e008780aac31001185ed05","user":"58e007480aac31001185ecef","text":"Owning - a cat can reduce the risk of stroke and heart attack by a third.","__v":0,"source":"user","updatedAt":"2020-08-23T20:20:01.611Z","type":"cat","createdAt":"2018-03-29T20:20:03.844Z","deleted":false,"used":false},{"status":{"verified":true,"sentCount":1},"_id":"58e009390aac31001185ed10","user":"58e007480aac31001185ecef","text":"Most - cats are lactose intolerant, and milk can cause painful stomach cramps and - diarrhea. It''s best to forego the milk and just give your cat the standard: - clean, cool drinking water.","__v":0,"source":"user","updatedAt":"2020-08-23T20:20:01.611Z","type":"cat","createdAt":"2018-03-04T21:20:02.979Z","deleted":false,"used":false},{"status":{"verified":true,"sentCount":1},"_id":"58e00af60aac31001185ed1d","user":"58e007480aac31001185ecef","text":"It - was illegal to slay cats in ancient Egypt, in large part because they provided - the great service of controlling the rat population.","__v":0,"source":"user","updatedAt":"2020-09-16T20:20:04.164Z","type":"cat","createdAt":"2018-01-15T21:20:02.945Z","deleted":false,"used":true}]' - recorded_at: Wed, 03 Jan 2024 05:59:06 GMT -recorded_with: VCR 6.0.0 From e6856bfa87ff414726843ba8f1c4d62041fc45b2 Mon Sep 17 00:00:00 2001 From: MUTOgen Date: Sun, 16 Feb 2025 19:01:32 +0100 Subject: [PATCH 10/10] Fix typo --- specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb b/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb index 0f48f993..eca677b4 100644 --- a/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb +++ b/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb @@ -1,4 +1,4 @@ -class CreatePosts < ActiveRecord::Migration[6.1] +class CreatePosts < ActiveRecord::Migration[7.2] def change create_table :posts do |t| t.string :title