From 0c125d2d0f542fa3cc6d5005503165a9cdac5971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 13:17:52 +0100 Subject: [PATCH 01/13] Skip fail-fast tests on Windows --- spec/integration_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 8c14c461..3b2675af 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -84,7 +84,8 @@ def self.it_fails_without_any_files(type) expect(result).to include '2 processes for 2 specs, ~ 1 spec per process' end - describe "--fail-fast" do + # Uses `Process.kill` under the hood, which on Windows doesn't work as expected. It kills all process group instead of just one process. + describe "--fail-fast", unless: Gem.win_platform? do def run_tests(test_option: nil) super( "spec", From 948df6926cf57de98e29af2ca4aa7de1fdf74459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 09:33:48 +0100 Subject: [PATCH 02/13] bundle update cuke_modeler --- Gemfile.lock | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 44b821a3..6aab9727 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,16 +7,17 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (5.2.4.3) + activesupport (6.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) ast (2.4.1) builder (3.2.4) bump (0.9.0) colorize (0.8.1) - concurrent-ruby (1.1.6) + concurrent-ruby (1.1.8) cucumber (4.0.0) builder (~> 3.2, >= 3.2.3) cucumber-core (~> 7.0, >= 7.0.0) @@ -37,19 +38,19 @@ GEM cucumber-messages (~> 12.0, >= 12.0.0) cucumber-html-formatter (6.0.2) cucumber-messages (~> 12.1, >= 12.1.1) - cucumber-messages (12.1.1) + cucumber-messages (12.4.0) protobuf-cucumber (~> 3.10, >= 3.10.8) cucumber-tag-expressions (2.0.4) cucumber-wire (3.0.0) cucumber-core (~> 7.0, >= 7.0.0) cucumber-cucumber-expressions (~> 10.1, >= 10.1.0) cucumber-messages (~> 12.1, >= 12.1.1) - cuke_modeler (3.0.0) - cucumber-gherkin (< 14.0) + cuke_modeler (3.7.0) + cucumber-gherkin (< 18.0) diff-lcs (1.3) ffi (1.13.1) gherkin-ruby (0.3.2) - i18n (1.8.3) + i18n (1.8.9) concurrent-ruby (~> 1.0) json (2.3.0) middleware (0.1.0) @@ -101,11 +102,12 @@ GEM ffi (>= 1.0.0) test-unit (3.3.6) power_assert - thor (1.0.1) + thor (1.1.0) thread_safe (0.3.6) - tzinfo (1.2.7) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) unicode-display_width (2.0.0) + zeitwerk (2.4.2) PLATFORMS ruby From 4b7bad10b8a6c447eefc62c6faa3b2ae040cdc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:14:17 +0100 Subject: [PATCH 03/13] Base rails 6.0 and 6.1 fixture apps Generated with ``` rails new spec/fixtures/rails61 --skip-listen --skip-spring --skip-bootsnap --skip-sprockets --skip-gemfile --skip-webpack-install rails _6.0.3_ new spec/fixtures/rails60 --skip-listen --skip-spring --skip-bootsnap --skip-sprockets --skip-gemfile --skip-webpack-install rm -rf spec/fixtures/rails61/.git spec/fixtures/rails60/.git git add spec/fixtures/rails6* ``` --- spec/fixtures/rails60/.gitignore | 34 ++++++ spec/fixtures/rails60/.ruby-version | 1 + spec/fixtures/rails60/README.md | 24 ++++ spec/fixtures/rails60/Rakefile | 6 + .../rails60/app/assets/config/manifest.js | 2 + spec/fixtures/rails60/app/assets/images/.keep | 0 .../app/assets/stylesheets/application.css | 15 +++ .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 2 + .../rails60/app/controllers/concerns/.keep | 0 .../rails60/app/helpers/application_helper.rb | 2 + .../app/javascript/channels/consumer.js | 6 + .../rails60/app/javascript/channels/index.js | 5 + .../app/javascript/packs/application.js | 17 +++ .../rails60/app/jobs/application_job.rb | 7 ++ .../rails60/app/mailers/application_mailer.rb | 4 + .../rails60/app/models/application_record.rb | 3 + .../rails60/app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 15 +++ .../rails60/app/views/layouts/mailer.html.erb | 13 ++ .../rails60/app/views/layouts/mailer.text.erb | 1 + spec/fixtures/rails60/bin/rails | 4 + spec/fixtures/rails60/bin/rake | 4 + spec/fixtures/rails60/bin/setup | 36 ++++++ spec/fixtures/rails60/bin/yarn | 11 ++ spec/fixtures/rails60/config.ru | 5 + spec/fixtures/rails60/config/application.rb | 32 +++++ spec/fixtures/rails60/config/boot.rb | 3 + spec/fixtures/rails60/config/cable.yml | 10 ++ .../rails60/config/credentials.yml.enc | 1 + spec/fixtures/rails60/config/database.yml | 25 ++++ spec/fixtures/rails60/config/environment.rb | 5 + .../config/environments/development.rb | 55 +++++++++ .../rails60/config/environments/production.rb | 106 ++++++++++++++++ .../rails60/config/environments/test.rb | 48 ++++++++ .../application_controller_renderer.rb | 8 ++ .../initializers/backtrace_silencers.rb | 7 ++ .../initializers/content_security_policy.rb | 30 +++++ .../config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + .../config/initializers/inflections.rb | 16 +++ .../rails60/config/initializers/mime_types.rb | 4 + .../config/initializers/wrap_parameters.rb | 14 +++ spec/fixtures/rails60/config/locales/en.yml | 33 +++++ spec/fixtures/rails60/config/puma.rb | 38 ++++++ spec/fixtures/rails60/config/routes.rb | 3 + spec/fixtures/rails60/config/storage.yml | 34 ++++++ spec/fixtures/rails60/db/seeds.rb | 7 ++ spec/fixtures/rails60/lib/assets/.keep | 0 spec/fixtures/rails60/lib/tasks/.keep | 0 spec/fixtures/rails60/log/.keep | 0 spec/fixtures/rails60/package.json | 11 ++ spec/fixtures/rails60/public/404.html | 67 ++++++++++ spec/fixtures/rails60/public/422.html | 67 ++++++++++ spec/fixtures/rails60/public/500.html | 66 ++++++++++ .../public/apple-touch-icon-precomposed.png | 0 .../rails60/public/apple-touch-icon.png | 0 spec/fixtures/rails60/public/favicon.ico | 0 spec/fixtures/rails60/public/robots.txt | 1 + spec/fixtures/rails60/storage/.keep | 0 .../test/application_system_test_case.rb | 5 + .../application_cable/connection_test.rb | 11 ++ spec/fixtures/rails60/test/controllers/.keep | 0 spec/fixtures/rails60/test/fixtures/.keep | 0 .../rails60/test/fixtures/files/.keep | 0 spec/fixtures/rails60/test/helpers/.keep | 0 spec/fixtures/rails60/test/integration/.keep | 0 spec/fixtures/rails60/test/mailers/.keep | 0 spec/fixtures/rails60/test/models/.keep | 0 spec/fixtures/rails60/test/system/.keep | 0 spec/fixtures/rails60/test/test_helper.rb | 13 ++ spec/fixtures/rails60/vendor/.keep | 0 spec/fixtures/rails61/.gitattributes | 10 ++ spec/fixtures/rails61/.gitignore | 33 +++++ spec/fixtures/rails61/.ruby-version | 1 + spec/fixtures/rails61/README.md | 24 ++++ spec/fixtures/rails61/Rakefile | 6 + .../rails61/app/assets/config/manifest.js | 2 + spec/fixtures/rails61/app/assets/images/.keep | 0 .../app/assets/stylesheets/application.css | 15 +++ .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 2 + .../rails61/app/controllers/concerns/.keep | 0 .../rails61/app/helpers/application_helper.rb | 2 + .../app/javascript/channels/consumer.js | 6 + .../rails61/app/javascript/channels/index.js | 5 + .../app/javascript/packs/application.js | 13 ++ .../rails61/app/jobs/application_job.rb | 7 ++ .../rails61/app/mailers/application_mailer.rb | 4 + .../rails61/app/models/application_record.rb | 3 + .../rails61/app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 16 +++ .../rails61/app/views/layouts/mailer.html.erb | 13 ++ .../rails61/app/views/layouts/mailer.text.erb | 1 + spec/fixtures/rails61/bin/rails | 4 + spec/fixtures/rails61/bin/rake | 4 + spec/fixtures/rails61/bin/setup | 36 ++++++ spec/fixtures/rails61/bin/yarn | 17 +++ spec/fixtures/rails61/config.ru | 6 + spec/fixtures/rails61/config/application.rb | 35 ++++++ spec/fixtures/rails61/config/boot.rb | 3 + spec/fixtures/rails61/config/cable.yml | 10 ++ .../rails61/config/credentials.yml.enc | 1 + spec/fixtures/rails61/config/database.yml | 25 ++++ spec/fixtures/rails61/config/environment.rb | 5 + .../config/environments/development.rb | 69 +++++++++++ .../rails61/config/environments/production.rb | 114 ++++++++++++++++++ .../rails61/config/environments/test.rb | 59 +++++++++ .../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 +++ .../rails61/config/initializers/mime_types.rb | 4 + .../config/initializers/permissions_policy.rb | 11 ++ .../config/initializers/wrap_parameters.rb | 14 +++ spec/fixtures/rails61/config/locales/en.yml | 33 +++++ spec/fixtures/rails61/config/puma.rb | 43 +++++++ spec/fixtures/rails61/config/routes.rb | 3 + spec/fixtures/rails61/config/storage.yml | 34 ++++++ spec/fixtures/rails61/db/seeds.rb | 7 ++ spec/fixtures/rails61/lib/assets/.keep | 0 spec/fixtures/rails61/lib/tasks/.keep | 0 spec/fixtures/rails61/log/.keep | 0 spec/fixtures/rails61/package.json | 11 ++ spec/fixtures/rails61/public/404.html | 67 ++++++++++ spec/fixtures/rails61/public/422.html | 67 ++++++++++ spec/fixtures/rails61/public/500.html | 66 ++++++++++ .../public/apple-touch-icon-precomposed.png | 0 .../rails61/public/apple-touch-icon.png | 0 spec/fixtures/rails61/public/favicon.ico | 0 spec/fixtures/rails61/public/robots.txt | 1 + spec/fixtures/rails61/storage/.keep | 0 .../test/application_system_test_case.rb | 5 + .../application_cable/connection_test.rb | 11 ++ spec/fixtures/rails61/test/controllers/.keep | 0 .../rails61/test/fixtures/files/.keep | 0 spec/fixtures/rails61/test/helpers/.keep | 0 spec/fixtures/rails61/test/integration/.keep | 0 spec/fixtures/rails61/test/mailers/.keep | 0 spec/fixtures/rails61/test/models/.keep | 0 spec/fixtures/rails61/test/system/.keep | 0 spec/fixtures/rails61/test/test_helper.rb | 13 ++ spec/fixtures/rails61/vendor/.keep | 0 147 files changed, 1976 insertions(+) create mode 100644 spec/fixtures/rails60/.gitignore create mode 100644 spec/fixtures/rails60/.ruby-version create mode 100644 spec/fixtures/rails60/README.md create mode 100644 spec/fixtures/rails60/Rakefile create mode 100644 spec/fixtures/rails60/app/assets/config/manifest.js create mode 100644 spec/fixtures/rails60/app/assets/images/.keep create mode 100644 spec/fixtures/rails60/app/assets/stylesheets/application.css create mode 100644 spec/fixtures/rails60/app/channels/application_cable/channel.rb create mode 100644 spec/fixtures/rails60/app/channels/application_cable/connection.rb create mode 100644 spec/fixtures/rails60/app/controllers/application_controller.rb create mode 100644 spec/fixtures/rails60/app/controllers/concerns/.keep create mode 100644 spec/fixtures/rails60/app/helpers/application_helper.rb create mode 100644 spec/fixtures/rails60/app/javascript/channels/consumer.js create mode 100644 spec/fixtures/rails60/app/javascript/channels/index.js create mode 100644 spec/fixtures/rails60/app/javascript/packs/application.js create mode 100644 spec/fixtures/rails60/app/jobs/application_job.rb create mode 100644 spec/fixtures/rails60/app/mailers/application_mailer.rb create mode 100644 spec/fixtures/rails60/app/models/application_record.rb create mode 100644 spec/fixtures/rails60/app/models/concerns/.keep create mode 100644 spec/fixtures/rails60/app/views/layouts/application.html.erb create mode 100644 spec/fixtures/rails60/app/views/layouts/mailer.html.erb create mode 100644 spec/fixtures/rails60/app/views/layouts/mailer.text.erb create mode 100755 spec/fixtures/rails60/bin/rails create mode 100755 spec/fixtures/rails60/bin/rake create mode 100755 spec/fixtures/rails60/bin/setup create mode 100755 spec/fixtures/rails60/bin/yarn create mode 100644 spec/fixtures/rails60/config.ru create mode 100644 spec/fixtures/rails60/config/application.rb create mode 100644 spec/fixtures/rails60/config/boot.rb create mode 100644 spec/fixtures/rails60/config/cable.yml create mode 100644 spec/fixtures/rails60/config/credentials.yml.enc create mode 100644 spec/fixtures/rails60/config/database.yml create mode 100644 spec/fixtures/rails60/config/environment.rb create mode 100644 spec/fixtures/rails60/config/environments/development.rb create mode 100644 spec/fixtures/rails60/config/environments/production.rb create mode 100644 spec/fixtures/rails60/config/environments/test.rb create mode 100644 spec/fixtures/rails60/config/initializers/application_controller_renderer.rb create mode 100644 spec/fixtures/rails60/config/initializers/backtrace_silencers.rb create mode 100644 spec/fixtures/rails60/config/initializers/content_security_policy.rb create mode 100644 spec/fixtures/rails60/config/initializers/cookies_serializer.rb create mode 100644 spec/fixtures/rails60/config/initializers/filter_parameter_logging.rb create mode 100644 spec/fixtures/rails60/config/initializers/inflections.rb create mode 100644 spec/fixtures/rails60/config/initializers/mime_types.rb create mode 100644 spec/fixtures/rails60/config/initializers/wrap_parameters.rb create mode 100644 spec/fixtures/rails60/config/locales/en.yml create mode 100644 spec/fixtures/rails60/config/puma.rb create mode 100644 spec/fixtures/rails60/config/routes.rb create mode 100644 spec/fixtures/rails60/config/storage.yml create mode 100644 spec/fixtures/rails60/db/seeds.rb create mode 100644 spec/fixtures/rails60/lib/assets/.keep create mode 100644 spec/fixtures/rails60/lib/tasks/.keep create mode 100644 spec/fixtures/rails60/log/.keep create mode 100644 spec/fixtures/rails60/package.json create mode 100644 spec/fixtures/rails60/public/404.html create mode 100644 spec/fixtures/rails60/public/422.html create mode 100644 spec/fixtures/rails60/public/500.html create mode 100644 spec/fixtures/rails60/public/apple-touch-icon-precomposed.png create mode 100644 spec/fixtures/rails60/public/apple-touch-icon.png create mode 100644 spec/fixtures/rails60/public/favicon.ico create mode 100644 spec/fixtures/rails60/public/robots.txt create mode 100644 spec/fixtures/rails60/storage/.keep create mode 100644 spec/fixtures/rails60/test/application_system_test_case.rb create mode 100644 spec/fixtures/rails60/test/channels/application_cable/connection_test.rb create mode 100644 spec/fixtures/rails60/test/controllers/.keep create mode 100644 spec/fixtures/rails60/test/fixtures/.keep create mode 100644 spec/fixtures/rails60/test/fixtures/files/.keep create mode 100644 spec/fixtures/rails60/test/helpers/.keep create mode 100644 spec/fixtures/rails60/test/integration/.keep create mode 100644 spec/fixtures/rails60/test/mailers/.keep create mode 100644 spec/fixtures/rails60/test/models/.keep create mode 100644 spec/fixtures/rails60/test/system/.keep create mode 100644 spec/fixtures/rails60/test/test_helper.rb create mode 100644 spec/fixtures/rails60/vendor/.keep create mode 100644 spec/fixtures/rails61/.gitattributes create mode 100644 spec/fixtures/rails61/.gitignore create mode 100644 spec/fixtures/rails61/.ruby-version create mode 100644 spec/fixtures/rails61/README.md create mode 100644 spec/fixtures/rails61/Rakefile create mode 100644 spec/fixtures/rails61/app/assets/config/manifest.js create mode 100644 spec/fixtures/rails61/app/assets/images/.keep create mode 100644 spec/fixtures/rails61/app/assets/stylesheets/application.css create mode 100644 spec/fixtures/rails61/app/channels/application_cable/channel.rb create mode 100644 spec/fixtures/rails61/app/channels/application_cable/connection.rb create mode 100644 spec/fixtures/rails61/app/controllers/application_controller.rb create mode 100644 spec/fixtures/rails61/app/controllers/concerns/.keep create mode 100644 spec/fixtures/rails61/app/helpers/application_helper.rb create mode 100644 spec/fixtures/rails61/app/javascript/channels/consumer.js create mode 100644 spec/fixtures/rails61/app/javascript/channels/index.js create mode 100644 spec/fixtures/rails61/app/javascript/packs/application.js create mode 100644 spec/fixtures/rails61/app/jobs/application_job.rb create mode 100644 spec/fixtures/rails61/app/mailers/application_mailer.rb create mode 100644 spec/fixtures/rails61/app/models/application_record.rb create mode 100644 spec/fixtures/rails61/app/models/concerns/.keep create mode 100644 spec/fixtures/rails61/app/views/layouts/application.html.erb create mode 100644 spec/fixtures/rails61/app/views/layouts/mailer.html.erb create mode 100644 spec/fixtures/rails61/app/views/layouts/mailer.text.erb create mode 100755 spec/fixtures/rails61/bin/rails create mode 100755 spec/fixtures/rails61/bin/rake create mode 100755 spec/fixtures/rails61/bin/setup create mode 100755 spec/fixtures/rails61/bin/yarn create mode 100644 spec/fixtures/rails61/config.ru create mode 100644 spec/fixtures/rails61/config/application.rb create mode 100644 spec/fixtures/rails61/config/boot.rb create mode 100644 spec/fixtures/rails61/config/cable.yml create mode 100644 spec/fixtures/rails61/config/credentials.yml.enc create mode 100644 spec/fixtures/rails61/config/database.yml create mode 100644 spec/fixtures/rails61/config/environment.rb create mode 100644 spec/fixtures/rails61/config/environments/development.rb create mode 100644 spec/fixtures/rails61/config/environments/production.rb create mode 100644 spec/fixtures/rails61/config/environments/test.rb create mode 100644 spec/fixtures/rails61/config/initializers/application_controller_renderer.rb create mode 100644 spec/fixtures/rails61/config/initializers/backtrace_silencers.rb create mode 100644 spec/fixtures/rails61/config/initializers/content_security_policy.rb create mode 100644 spec/fixtures/rails61/config/initializers/cookies_serializer.rb create mode 100644 spec/fixtures/rails61/config/initializers/filter_parameter_logging.rb create mode 100644 spec/fixtures/rails61/config/initializers/inflections.rb create mode 100644 spec/fixtures/rails61/config/initializers/mime_types.rb create mode 100644 spec/fixtures/rails61/config/initializers/permissions_policy.rb create mode 100644 spec/fixtures/rails61/config/initializers/wrap_parameters.rb create mode 100644 spec/fixtures/rails61/config/locales/en.yml create mode 100644 spec/fixtures/rails61/config/puma.rb create mode 100644 spec/fixtures/rails61/config/routes.rb create mode 100644 spec/fixtures/rails61/config/storage.yml create mode 100644 spec/fixtures/rails61/db/seeds.rb create mode 100644 spec/fixtures/rails61/lib/assets/.keep create mode 100644 spec/fixtures/rails61/lib/tasks/.keep create mode 100644 spec/fixtures/rails61/log/.keep create mode 100644 spec/fixtures/rails61/package.json create mode 100644 spec/fixtures/rails61/public/404.html create mode 100644 spec/fixtures/rails61/public/422.html create mode 100644 spec/fixtures/rails61/public/500.html create mode 100644 spec/fixtures/rails61/public/apple-touch-icon-precomposed.png create mode 100644 spec/fixtures/rails61/public/apple-touch-icon.png create mode 100644 spec/fixtures/rails61/public/favicon.ico create mode 100644 spec/fixtures/rails61/public/robots.txt create mode 100644 spec/fixtures/rails61/storage/.keep create mode 100644 spec/fixtures/rails61/test/application_system_test_case.rb create mode 100644 spec/fixtures/rails61/test/channels/application_cable/connection_test.rb create mode 100644 spec/fixtures/rails61/test/controllers/.keep create mode 100644 spec/fixtures/rails61/test/fixtures/files/.keep create mode 100644 spec/fixtures/rails61/test/helpers/.keep create mode 100644 spec/fixtures/rails61/test/integration/.keep create mode 100644 spec/fixtures/rails61/test/mailers/.keep create mode 100644 spec/fixtures/rails61/test/models/.keep create mode 100644 spec/fixtures/rails61/test/system/.keep create mode 100644 spec/fixtures/rails61/test/test_helper.rb create mode 100644 spec/fixtures/rails61/vendor/.keep diff --git a/spec/fixtures/rails60/.gitignore b/spec/fixtures/rails60/.gitignore new file mode 100644 index 00000000..a7c1e90f --- /dev/null +++ b/spec/fixtures/rails60/.gitignore @@ -0,0 +1,34 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal +/db/*.sqlite3-* + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + +# Ignore uploaded files in development. +/storage/* +!/storage/.keep + +/public/assets +.byebug_history + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/spec/fixtures/rails60/.ruby-version b/spec/fixtures/rails60/.ruby-version new file mode 100644 index 00000000..4a36342f --- /dev/null +++ b/spec/fixtures/rails60/.ruby-version @@ -0,0 +1 @@ +3.0.0 diff --git a/spec/fixtures/rails60/README.md b/spec/fixtures/rails60/README.md new file mode 100644 index 00000000..7db80e4c --- /dev/null +++ b/spec/fixtures/rails60/README.md @@ -0,0 +1,24 @@ +# 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 + +* ... diff --git a/spec/fixtures/rails60/Rakefile b/spec/fixtures/rails60/Rakefile new file mode 100644 index 00000000..e85f9139 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/app/assets/config/manifest.js b/spec/fixtures/rails60/app/assets/config/manifest.js new file mode 100644 index 00000000..59181933 --- /dev/null +++ b/spec/fixtures/rails60/app/assets/config/manifest.js @@ -0,0 +1,2 @@ +//= link_tree ../images +//= link_directory ../stylesheets .css diff --git a/spec/fixtures/rails60/app/assets/images/.keep b/spec/fixtures/rails60/app/assets/images/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/app/assets/stylesheets/application.css b/spec/fixtures/rails60/app/assets/stylesheets/application.css new file mode 100644 index 00000000..d05ea0f5 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/app/channels/application_cable/channel.rb b/spec/fixtures/rails60/app/channels/application_cable/channel.rb new file mode 100644 index 00000000..d6726972 --- /dev/null +++ b/spec/fixtures/rails60/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/spec/fixtures/rails60/app/channels/application_cable/connection.rb b/spec/fixtures/rails60/app/channels/application_cable/connection.rb new file mode 100644 index 00000000..0ff5442f --- /dev/null +++ b/spec/fixtures/rails60/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/spec/fixtures/rails60/app/controllers/application_controller.rb b/spec/fixtures/rails60/app/controllers/application_controller.rb new file mode 100644 index 00000000..09705d12 --- /dev/null +++ b/spec/fixtures/rails60/app/controllers/application_controller.rb @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/spec/fixtures/rails60/app/controllers/concerns/.keep b/spec/fixtures/rails60/app/controllers/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/app/helpers/application_helper.rb b/spec/fixtures/rails60/app/helpers/application_helper.rb new file mode 100644 index 00000000..de6be794 --- /dev/null +++ b/spec/fixtures/rails60/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/spec/fixtures/rails60/app/javascript/channels/consumer.js b/spec/fixtures/rails60/app/javascript/channels/consumer.js new file mode 100644 index 00000000..0eceb59b --- /dev/null +++ b/spec/fixtures/rails60/app/javascript/channels/consumer.js @@ -0,0 +1,6 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `rails generate channel` command. + +import { createConsumer } from "@rails/actioncable" + +export default createConsumer() diff --git a/spec/fixtures/rails60/app/javascript/channels/index.js b/spec/fixtures/rails60/app/javascript/channels/index.js new file mode 100644 index 00000000..0cfcf749 --- /dev/null +++ b/spec/fixtures/rails60/app/javascript/channels/index.js @@ -0,0 +1,5 @@ +// Load all the channels within this directory and all subdirectories. +// Channel files must be named *_channel.js. + +const channels = require.context('.', true, /_channel\.js$/) +channels.keys().forEach(channels) diff --git a/spec/fixtures/rails60/app/javascript/packs/application.js b/spec/fixtures/rails60/app/javascript/packs/application.js new file mode 100644 index 00000000..9cd55d4b --- /dev/null +++ b/spec/fixtures/rails60/app/javascript/packs/application.js @@ -0,0 +1,17 @@ +// This file is automatically compiled by Webpack, along with any other files +// present in this directory. You're encouraged to place your actual application logic in +// a relevant structure within app/javascript and only use these pack files to reference +// that code so it'll be compiled. + +require("@rails/ujs").start() +require("turbolinks").start() +require("@rails/activestorage").start() +require("channels") + + +// Uncomment to copy all static images under ../images to the output folder and reference +// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) +// or the `imagePath` JavaScript helper below. +// +// const images = require.context('../images', true) +// const imagePath = (name) => images(name, true) diff --git a/spec/fixtures/rails60/app/jobs/application_job.rb b/spec/fixtures/rails60/app/jobs/application_job.rb new file mode 100644 index 00000000..d394c3d1 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/app/mailers/application_mailer.rb b/spec/fixtures/rails60/app/mailers/application_mailer.rb new file mode 100644 index 00000000..286b2239 --- /dev/null +++ b/spec/fixtures/rails60/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/spec/fixtures/rails60/app/models/application_record.rb b/spec/fixtures/rails60/app/models/application_record.rb new file mode 100644 index 00000000..10a4cba8 --- /dev/null +++ b/spec/fixtures/rails60/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/spec/fixtures/rails60/app/models/concerns/.keep b/spec/fixtures/rails60/app/models/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/app/views/layouts/application.html.erb b/spec/fixtures/rails60/app/views/layouts/application.html.erb new file mode 100644 index 00000000..60ee8159 --- /dev/null +++ b/spec/fixtures/rails60/app/views/layouts/application.html.erb @@ -0,0 +1,15 @@ + + + + Rails60 + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/spec/fixtures/rails60/app/views/layouts/mailer.html.erb b/spec/fixtures/rails60/app/views/layouts/mailer.html.erb new file mode 100644 index 00000000..cbd34d2e --- /dev/null +++ b/spec/fixtures/rails60/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/spec/fixtures/rails60/app/views/layouts/mailer.text.erb b/spec/fixtures/rails60/app/views/layouts/mailer.text.erb new file mode 100644 index 00000000..37f0bddb --- /dev/null +++ b/spec/fixtures/rails60/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/spec/fixtures/rails60/bin/rails b/spec/fixtures/rails60/bin/rails new file mode 100755 index 00000000..07396602 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/bin/rake b/spec/fixtures/rails60/bin/rake new file mode 100755 index 00000000..17240489 --- /dev/null +++ b/spec/fixtures/rails60/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/spec/fixtures/rails60/bin/setup b/spec/fixtures/rails60/bin/setup new file mode 100755 index 00000000..5853b5ea --- /dev/null +++ b/spec/fixtures/rails60/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 setup or update your development environment automatically. + # This script is idempotent, so that you can run it at anytime 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/spec/fixtures/rails60/bin/yarn b/spec/fixtures/rails60/bin/yarn new file mode 100755 index 00000000..460dd565 --- /dev/null +++ b/spec/fixtures/rails60/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do + begin + exec "yarnpkg", *ARGV + rescue Errno::ENOENT + $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/spec/fixtures/rails60/config.ru b/spec/fixtures/rails60/config.ru new file mode 100644 index 00000000..f7ba0b52 --- /dev/null +++ b/spec/fixtures/rails60/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/spec/fixtures/rails60/config/application.rb b/spec/fixtures/rails60/config/application.rb new file mode 100644 index 00000000..2781dd41 --- /dev/null +++ b/spec/fixtures/rails60/config/application.rb @@ -0,0 +1,32 @@ +require_relative 'boot' + +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +require "active_job/railtie" +require "active_record/railtie" +require "active_storage/engine" +require "action_controller/railtie" +require "action_mailer/railtie" +require "action_mailbox/engine" +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 Rails60 + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 6.0 + + # Settings in config/environments/* take precedence over those specified here. + # Application configuration can go into files in config/initializers + # -- all .rb files in that directory are automatically loaded after loading + # the framework and any gems in your application. + end +end diff --git a/spec/fixtures/rails60/config/boot.rb b/spec/fixtures/rails60/config/boot.rb new file mode 100644 index 00000000..30f5120d --- /dev/null +++ b/spec/fixtures/rails60/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/fixtures/rails60/config/cable.yml b/spec/fixtures/rails60/config/cable.yml new file mode 100644 index 00000000..debdc02e --- /dev/null +++ b/spec/fixtures/rails60/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: rails60_production diff --git a/spec/fixtures/rails60/config/credentials.yml.enc b/spec/fixtures/rails60/config/credentials.yml.enc new file mode 100644 index 00000000..d7824b92 --- /dev/null +++ b/spec/fixtures/rails60/config/credentials.yml.enc @@ -0,0 +1 @@ +8Y8/F1ai6tfrAft/z0x+qNBnelef8uXXLft0kSsqh8WxI67QWJNyIqK6JBgwUpvQylLyomhY6DlPrOYzi0nj8AnjxYJGdIAKFbQq9PqJ9/0gzHs/QoyWCPLczqTYkKzvUshv+T+XbzRdI0Wz2umoaBVNyRzP7uMwtqVDecZhRgOd35gYlAAqFmfdvjKFeIIpNdTRINqq9W4fQmLuZ45Wk6QbdtU3HMFYJGv5aiFyg+kZQ2M/mGtskGCGIm+i7e8XMBNOJo+oMTRzEC0Z5tktz+epdsKBoJCJ7sJyMs3mUnt1SJc2AG4ORpRymvqSC3lkAiL/zhfynSoxMyktLmwT+vjvaemHjqT4MllkVvFutIZQMuSfYLIUGM5zKWdQvg0pahwYTADQJeCibtIQzWRhaBi79LjniupyG+RN--uZKZ0kvSJ5E4V8zX--AGm8/1XOThzOHhRVZY5jiA== \ No newline at end of file diff --git a/spec/fixtures/rails60/config/database.yml b/spec/fixtures/rails60/config/database.yml new file mode 100644 index 00000000..4a8a1b26 --- /dev/null +++ b/spec/fixtures/rails60/config/database.yml @@ -0,0 +1,25 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/spec/fixtures/rails60/config/environment.rb b/spec/fixtures/rails60/config/environment.rb new file mode 100644 index 00000000..426333bb --- /dev/null +++ b/spec/fixtures/rails60/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/spec/fixtures/rails60/config/environments/development.rb b/spec/fixtures/rails60/config/environments/development.rb new file mode 100644 index 00000000..0811a164 --- /dev/null +++ b/spec/fixtures/rails60/config/environments/development.rb @@ -0,0 +1,55 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? + config.action_controller.perform_caching = true + config.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 + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + + # Raises error for missing translations. + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + # config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/spec/fixtures/rails60/config/environments/production.rb b/spec/fixtures/rails60/config/environments/production.rb new file mode 100644 index 00000000..8ed39281 --- /dev/null +++ b/spec/fixtures/rails60/config/environments/production.rb @@ -0,0 +1,106 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # 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 + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "rails60_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 + + # 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/spec/fixtures/rails60/config/environments/test.rb b/spec/fixtures/rails60/config/environments/test.rb new file mode 100644 index 00000000..470dee4b --- /dev/null +++ b/spec/fixtures/rails60/config/environments/test.rb @@ -0,0 +1,48 @@ +# 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 = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory. + config.active_storage.service = :test + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations. + # config.action_view.raise_on_missing_translations = true +end diff --git a/spec/fixtures/rails60/config/initializers/application_controller_renderer.rb b/spec/fixtures/rails60/config/initializers/application_controller_renderer.rb new file mode 100644 index 00000000..89d2efab --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/initializers/backtrace_silencers.rb b/spec/fixtures/rails60/config/initializers/backtrace_silencers.rb new file mode 100644 index 00000000..59385cdf --- /dev/null +++ b/spec/fixtures/rails60/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# 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/spec/fixtures/rails60/config/initializers/content_security_policy.rb b/spec/fixtures/rails60/config/initializers/content_security_policy.rb new file mode 100644 index 00000000..35d0f26f --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/initializers/cookies_serializer.rb b/spec/fixtures/rails60/config/initializers/cookies_serializer.rb new file mode 100644 index 00000000..5a6a32d3 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/initializers/filter_parameter_logging.rb b/spec/fixtures/rails60/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4a994e1e --- /dev/null +++ b/spec/fixtures/rails60/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# 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/spec/fixtures/rails60/config/initializers/inflections.rb b/spec/fixtures/rails60/config/initializers/inflections.rb new file mode 100644 index 00000000..ac033bf9 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/initializers/mime_types.rb b/spec/fixtures/rails60/config/initializers/mime_types.rb new file mode 100644 index 00000000..dc189968 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/initializers/wrap_parameters.rb b/spec/fixtures/rails60/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000..bbfc3961 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/locales/en.yml b/spec/fixtures/rails60/config/locales/en.yml new file mode 100644 index 00000000..cf9b342d --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/config/puma.rb b/spec/fixtures/rails60/config/puma.rb new file mode 100644 index 00000000..5ed44377 --- /dev/null +++ b/spec/fixtures/rails60/config/puma.rb @@ -0,0 +1,38 @@ +# 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 `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/spec/fixtures/rails60/config/routes.rb b/spec/fixtures/rails60/config/routes.rb new file mode 100644 index 00000000..c06383a1 --- /dev/null +++ b/spec/fixtures/rails60/config/routes.rb @@ -0,0 +1,3 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html +end diff --git a/spec/fixtures/rails60/config/storage.yml b/spec/fixtures/rails60/config/storage.yml new file mode 100644 index 00000000..d32f76e8 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/db/seeds.rb b/spec/fixtures/rails60/db/seeds.rb new file mode 100644 index 00000000..1beea2ac --- /dev/null +++ b/spec/fixtures/rails60/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/spec/fixtures/rails60/lib/assets/.keep b/spec/fixtures/rails60/lib/assets/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/lib/tasks/.keep b/spec/fixtures/rails60/lib/tasks/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/log/.keep b/spec/fixtures/rails60/log/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/package.json b/spec/fixtures/rails60/package.json new file mode 100644 index 00000000..03a6704e --- /dev/null +++ b/spec/fixtures/rails60/package.json @@ -0,0 +1,11 @@ +{ + "name": "rails60", + "private": true, + "dependencies": { + "@rails/ujs": "^6.0.0", + "turbolinks": "^5.2.0", + "@rails/activestorage": "^6.0.0", + "@rails/actioncable": "^6.0.0" + }, + "version": "0.1.0" +} diff --git a/spec/fixtures/rails60/public/404.html b/spec/fixtures/rails60/public/404.html new file mode 100644 index 00000000..2be3af26 --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/public/422.html b/spec/fixtures/rails60/public/422.html new file mode 100644 index 00000000..c08eac0d --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/public/500.html b/spec/fixtures/rails60/public/500.html new file mode 100644 index 00000000..78a030af --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/public/apple-touch-icon-precomposed.png b/spec/fixtures/rails60/public/apple-touch-icon-precomposed.png new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/public/apple-touch-icon.png b/spec/fixtures/rails60/public/apple-touch-icon.png new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/public/favicon.ico b/spec/fixtures/rails60/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/public/robots.txt b/spec/fixtures/rails60/public/robots.txt new file mode 100644 index 00000000..c19f78ab --- /dev/null +++ b/spec/fixtures/rails60/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/spec/fixtures/rails60/storage/.keep b/spec/fixtures/rails60/storage/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/application_system_test_case.rb b/spec/fixtures/rails60/test/application_system_test_case.rb new file mode 100644 index 00000000..d19212ab --- /dev/null +++ b/spec/fixtures/rails60/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/spec/fixtures/rails60/test/channels/application_cable/connection_test.rb b/spec/fixtures/rails60/test/channels/application_cable/connection_test.rb new file mode 100644 index 00000000..800405f1 --- /dev/null +++ b/spec/fixtures/rails60/test/channels/application_cable/connection_test.rb @@ -0,0 +1,11 @@ +require "test_helper" + +class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end +end diff --git a/spec/fixtures/rails60/test/controllers/.keep b/spec/fixtures/rails60/test/controllers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/fixtures/.keep b/spec/fixtures/rails60/test/fixtures/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/fixtures/files/.keep b/spec/fixtures/rails60/test/fixtures/files/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/helpers/.keep b/spec/fixtures/rails60/test/helpers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/integration/.keep b/spec/fixtures/rails60/test/integration/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/mailers/.keep b/spec/fixtures/rails60/test/mailers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/models/.keep b/spec/fixtures/rails60/test/models/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/system/.keep b/spec/fixtures/rails60/test/system/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails60/test/test_helper.rb b/spec/fixtures/rails60/test/test_helper.rb new file mode 100644 index 00000000..d5300f88 --- /dev/null +++ b/spec/fixtures/rails60/test/test_helper.rb @@ -0,0 +1,13 @@ +ENV['RAILS_ENV'] ||= 'test' +require_relative '../config/environment' +require 'rails/test_help' + +class ActiveSupport::TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/spec/fixtures/rails60/vendor/.keep b/spec/fixtures/rails60/vendor/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/.gitattributes b/spec/fixtures/rails61/.gitattributes new file mode 100644 index 00000000..51685710 --- /dev/null +++ b/spec/fixtures/rails61/.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/spec/fixtures/rails61/.gitignore b/spec/fixtures/rails61/.gitignore new file mode 100644 index 00000000..1ac91a25 --- /dev/null +++ b/spec/fixtures/rails61/.gitignore @@ -0,0 +1,33 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-* + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + +# Ignore uploaded files in development. +/storage/* +!/storage/.keep + +/public/assets +.byebug_history + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/spec/fixtures/rails61/.ruby-version b/spec/fixtures/rails61/.ruby-version new file mode 100644 index 00000000..4a36342f --- /dev/null +++ b/spec/fixtures/rails61/.ruby-version @@ -0,0 +1 @@ +3.0.0 diff --git a/spec/fixtures/rails61/README.md b/spec/fixtures/rails61/README.md new file mode 100644 index 00000000..7db80e4c --- /dev/null +++ b/spec/fixtures/rails61/README.md @@ -0,0 +1,24 @@ +# 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 + +* ... diff --git a/spec/fixtures/rails61/Rakefile b/spec/fixtures/rails61/Rakefile new file mode 100644 index 00000000..9a5ea738 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/app/assets/config/manifest.js b/spec/fixtures/rails61/app/assets/config/manifest.js new file mode 100644 index 00000000..59181933 --- /dev/null +++ b/spec/fixtures/rails61/app/assets/config/manifest.js @@ -0,0 +1,2 @@ +//= link_tree ../images +//= link_directory ../stylesheets .css diff --git a/spec/fixtures/rails61/app/assets/images/.keep b/spec/fixtures/rails61/app/assets/images/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/app/assets/stylesheets/application.css b/spec/fixtures/rails61/app/assets/stylesheets/application.css new file mode 100644 index 00000000..d05ea0f5 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/app/channels/application_cable/channel.rb b/spec/fixtures/rails61/app/channels/application_cable/channel.rb new file mode 100644 index 00000000..d6726972 --- /dev/null +++ b/spec/fixtures/rails61/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/spec/fixtures/rails61/app/channels/application_cable/connection.rb b/spec/fixtures/rails61/app/channels/application_cable/connection.rb new file mode 100644 index 00000000..0ff5442f --- /dev/null +++ b/spec/fixtures/rails61/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/spec/fixtures/rails61/app/controllers/application_controller.rb b/spec/fixtures/rails61/app/controllers/application_controller.rb new file mode 100644 index 00000000..09705d12 --- /dev/null +++ b/spec/fixtures/rails61/app/controllers/application_controller.rb @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/spec/fixtures/rails61/app/controllers/concerns/.keep b/spec/fixtures/rails61/app/controllers/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/app/helpers/application_helper.rb b/spec/fixtures/rails61/app/helpers/application_helper.rb new file mode 100644 index 00000000..de6be794 --- /dev/null +++ b/spec/fixtures/rails61/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/spec/fixtures/rails61/app/javascript/channels/consumer.js b/spec/fixtures/rails61/app/javascript/channels/consumer.js new file mode 100644 index 00000000..8ec3aad3 --- /dev/null +++ b/spec/fixtures/rails61/app/javascript/channels/consumer.js @@ -0,0 +1,6 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `bin/rails generate channel` command. + +import { createConsumer } from "@rails/actioncable" + +export default createConsumer() diff --git a/spec/fixtures/rails61/app/javascript/channels/index.js b/spec/fixtures/rails61/app/javascript/channels/index.js new file mode 100644 index 00000000..0cfcf749 --- /dev/null +++ b/spec/fixtures/rails61/app/javascript/channels/index.js @@ -0,0 +1,5 @@ +// Load all the channels within this directory and all subdirectories. +// Channel files must be named *_channel.js. + +const channels = require.context('.', true, /_channel\.js$/) +channels.keys().forEach(channels) diff --git a/spec/fixtures/rails61/app/javascript/packs/application.js b/spec/fixtures/rails61/app/javascript/packs/application.js new file mode 100644 index 00000000..f710851a --- /dev/null +++ b/spec/fixtures/rails61/app/javascript/packs/application.js @@ -0,0 +1,13 @@ +// This file is automatically compiled by Webpack, along with any other files +// present in this directory. You're encouraged to place your actual application logic in +// a relevant structure within app/javascript and only use these pack files to reference +// that code so it'll be compiled. + +import Rails from "@rails/ujs" +import Turbolinks from "turbolinks" +import * as ActiveStorage from "@rails/activestorage" +import "channels" + +Rails.start() +Turbolinks.start() +ActiveStorage.start() diff --git a/spec/fixtures/rails61/app/jobs/application_job.rb b/spec/fixtures/rails61/app/jobs/application_job.rb new file mode 100644 index 00000000..d394c3d1 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/app/mailers/application_mailer.rb b/spec/fixtures/rails61/app/mailers/application_mailer.rb new file mode 100644 index 00000000..286b2239 --- /dev/null +++ b/spec/fixtures/rails61/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/spec/fixtures/rails61/app/models/application_record.rb b/spec/fixtures/rails61/app/models/application_record.rb new file mode 100644 index 00000000..10a4cba8 --- /dev/null +++ b/spec/fixtures/rails61/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/spec/fixtures/rails61/app/models/concerns/.keep b/spec/fixtures/rails61/app/models/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/app/views/layouts/application.html.erb b/spec/fixtures/rails61/app/views/layouts/application.html.erb new file mode 100644 index 00000000..2cd2637f --- /dev/null +++ b/spec/fixtures/rails61/app/views/layouts/application.html.erb @@ -0,0 +1,16 @@ + + + + Rails61 + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/spec/fixtures/rails61/app/views/layouts/mailer.html.erb b/spec/fixtures/rails61/app/views/layouts/mailer.html.erb new file mode 100644 index 00000000..cbd34d2e --- /dev/null +++ b/spec/fixtures/rails61/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/spec/fixtures/rails61/app/views/layouts/mailer.text.erb b/spec/fixtures/rails61/app/views/layouts/mailer.text.erb new file mode 100644 index 00000000..37f0bddb --- /dev/null +++ b/spec/fixtures/rails61/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/spec/fixtures/rails61/bin/rails b/spec/fixtures/rails61/bin/rails new file mode 100755 index 00000000..6fb4e405 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/bin/rake b/spec/fixtures/rails61/bin/rake new file mode 100755 index 00000000..4fbf10b9 --- /dev/null +++ b/spec/fixtures/rails61/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/spec/fixtures/rails61/bin/setup b/spec/fixtures/rails61/bin/setup new file mode 100755 index 00000000..90700ac4 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/bin/yarn b/spec/fixtures/rails61/bin/yarn new file mode 100755 index 00000000..9fab2c35 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config.ru b/spec/fixtures/rails61/config.ru new file mode 100644 index 00000000..4a3c09a6 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/application.rb b/spec/fixtures/rails61/config/application.rb new file mode 100644 index 00000000..66de9854 --- /dev/null +++ b/spec/fixtures/rails61/config/application.rb @@ -0,0 +1,35 @@ +require_relative "boot" + +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +require "active_job/railtie" +require "active_record/railtie" +require "active_storage/engine" +require "action_controller/railtie" +require "action_mailer/railtie" +require "action_mailbox/engine" +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 Rails61 + 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/spec/fixtures/rails61/config/boot.rb b/spec/fixtures/rails61/config/boot.rb new file mode 100644 index 00000000..d69bd27d --- /dev/null +++ b/spec/fixtures/rails61/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/spec/fixtures/rails61/config/cable.yml b/spec/fixtures/rails61/config/cable.yml new file mode 100644 index 00000000..da057133 --- /dev/null +++ b/spec/fixtures/rails61/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: rails61_production diff --git a/spec/fixtures/rails61/config/credentials.yml.enc b/spec/fixtures/rails61/config/credentials.yml.enc new file mode 100644 index 00000000..a8669465 --- /dev/null +++ b/spec/fixtures/rails61/config/credentials.yml.enc @@ -0,0 +1 @@ +aubiW8m61jDG+NneYhU9p325QDOmlICTJ5Qz4otgOiuYt7jYRtFHq6UW+5FK5Rnn6ixynhGE2B1D8mq1OLO4r3F7R/O236cseJqh+TOX0VTKRdnuCgSCTdJXFd2DTSsg4yRYM7xDFIT6qNv+Htn56vMTZMz8tvLQ+AfsN6yWJ9NruN6mQiA/8JOdAjKVj2sTPHAZB1+ktj0jFwo5Mr/Ixy6Vxd7lMlhV2p6AIzIqQEzFVpyKr9iuFF570ZkMVuRAyozTT7+4jRtk2JY63VvIqabS+kaAR/76TTZYzF4hadtWC/x5NW6vewlmbyGEpCVLkZzNHCRzsnHdE3zMf/fhfTyYVcbyrkSOP9L7FG5dQmqDtIDY0JyLeADDeHL2N4GwlbqDuV1HUtTPh2FYKB32MFth2lsL30HvQH5F--JFMR1GM9jIjoF7nq--2bcbl0NUQsk5KX9uj6zSiw== \ No newline at end of file diff --git a/spec/fixtures/rails61/config/database.yml b/spec/fixtures/rails61/config/database.yml new file mode 100644 index 00000000..4a8a1b26 --- /dev/null +++ b/spec/fixtures/rails61/config/database.yml @@ -0,0 +1,25 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/spec/fixtures/rails61/config/environment.rb b/spec/fixtures/rails61/config/environment.rb new file mode 100644 index 00000000..cac53157 --- /dev/null +++ b/spec/fixtures/rails61/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/spec/fixtures/rails61/config/environments/development.rb b/spec/fixtures/rails61/config/environments/development.rb new file mode 100644 index 00000000..3f032e80 --- /dev/null +++ b/spec/fixtures/rails61/config/environments/development.rb @@ -0,0 +1,69 @@ +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 + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + # config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/spec/fixtures/rails61/config/environments/production.rb b/spec/fixtures/rails61/config/environments/production.rb new file mode 100644 index 00000000..504e05a8 --- /dev/null +++ b/spec/fixtures/rails61/config/environments/production.rb @@ -0,0 +1,114 @@ +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? + + # 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 = "rails61_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/spec/fixtures/rails61/config/environments/test.rb b/spec/fixtures/rails61/config/environments/test.rb new file mode 100644 index 00000000..17ce39cf --- /dev/null +++ b/spec/fixtures/rails61/config/environments/test.rb @@ -0,0 +1,59 @@ +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 = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory. + config.active_storage.service = :test + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true +end diff --git a/spec/fixtures/rails61/config/initializers/application_controller_renderer.rb b/spec/fixtures/rails61/config/initializers/application_controller_renderer.rb new file mode 100644 index 00000000..89d2efab --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/backtrace_silencers.rb b/spec/fixtures/rails61/config/initializers/backtrace_silencers.rb new file mode 100644 index 00000000..33699c30 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/content_security_policy.rb b/spec/fixtures/rails61/config/initializers/content_security_policy.rb new file mode 100644 index 00000000..35d0f26f --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/cookies_serializer.rb b/spec/fixtures/rails61/config/initializers/cookies_serializer.rb new file mode 100644 index 00000000..5a6a32d3 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/filter_parameter_logging.rb b/spec/fixtures/rails61/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4b34a036 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/inflections.rb b/spec/fixtures/rails61/config/initializers/inflections.rb new file mode 100644 index 00000000..ac033bf9 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/mime_types.rb b/spec/fixtures/rails61/config/initializers/mime_types.rb new file mode 100644 index 00000000..dc189968 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/permissions_policy.rb b/spec/fixtures/rails61/config/initializers/permissions_policy.rb new file mode 100644 index 00000000..00f64d71 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/initializers/wrap_parameters.rb b/spec/fixtures/rails61/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000..bbfc3961 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/locales/en.yml b/spec/fixtures/rails61/config/locales/en.yml new file mode 100644 index 00000000..cf9b342d --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/puma.rb b/spec/fixtures/rails61/config/puma.rb new file mode 100644 index 00000000..d9b3e836 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/config/routes.rb b/spec/fixtures/rails61/config/routes.rb new file mode 100644 index 00000000..c06383a1 --- /dev/null +++ b/spec/fixtures/rails61/config/routes.rb @@ -0,0 +1,3 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html +end diff --git a/spec/fixtures/rails61/config/storage.yml b/spec/fixtures/rails61/config/storage.yml new file mode 100644 index 00000000..d32f76e8 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/db/seeds.rb b/spec/fixtures/rails61/db/seeds.rb new file mode 100644 index 00000000..f3a0480d --- /dev/null +++ b/spec/fixtures/rails61/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/spec/fixtures/rails61/lib/assets/.keep b/spec/fixtures/rails61/lib/assets/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/lib/tasks/.keep b/spec/fixtures/rails61/lib/tasks/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/log/.keep b/spec/fixtures/rails61/log/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/package.json b/spec/fixtures/rails61/package.json new file mode 100644 index 00000000..ff983b30 --- /dev/null +++ b/spec/fixtures/rails61/package.json @@ -0,0 +1,11 @@ +{ + "name": "rails61", + "private": true, + "dependencies": { + "@rails/ujs": "^6.0.0", + "turbolinks": "^5.2.0", + "@rails/activestorage": "^6.0.0", + "@rails/actioncable": "^6.0.0" + }, + "version": "0.1.0" +} diff --git a/spec/fixtures/rails61/public/404.html b/spec/fixtures/rails61/public/404.html new file mode 100644 index 00000000..2be3af26 --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/public/422.html b/spec/fixtures/rails61/public/422.html new file mode 100644 index 00000000..c08eac0d --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/public/500.html b/spec/fixtures/rails61/public/500.html new file mode 100644 index 00000000..78a030af --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/public/apple-touch-icon-precomposed.png b/spec/fixtures/rails61/public/apple-touch-icon-precomposed.png new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/public/apple-touch-icon.png b/spec/fixtures/rails61/public/apple-touch-icon.png new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/public/favicon.ico b/spec/fixtures/rails61/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/public/robots.txt b/spec/fixtures/rails61/public/robots.txt new file mode 100644 index 00000000..c19f78ab --- /dev/null +++ b/spec/fixtures/rails61/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/spec/fixtures/rails61/storage/.keep b/spec/fixtures/rails61/storage/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/application_system_test_case.rb b/spec/fixtures/rails61/test/application_system_test_case.rb new file mode 100644 index 00000000..d19212ab --- /dev/null +++ b/spec/fixtures/rails61/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/spec/fixtures/rails61/test/channels/application_cable/connection_test.rb b/spec/fixtures/rails61/test/channels/application_cable/connection_test.rb new file mode 100644 index 00000000..800405f1 --- /dev/null +++ b/spec/fixtures/rails61/test/channels/application_cable/connection_test.rb @@ -0,0 +1,11 @@ +require "test_helper" + +class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end +end diff --git a/spec/fixtures/rails61/test/controllers/.keep b/spec/fixtures/rails61/test/controllers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/fixtures/files/.keep b/spec/fixtures/rails61/test/fixtures/files/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/helpers/.keep b/spec/fixtures/rails61/test/helpers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/integration/.keep b/spec/fixtures/rails61/test/integration/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/mailers/.keep b/spec/fixtures/rails61/test/mailers/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/models/.keep b/spec/fixtures/rails61/test/models/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/system/.keep b/spec/fixtures/rails61/test/system/.keep new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/rails61/test/test_helper.rb b/spec/fixtures/rails61/test/test_helper.rb new file mode 100644 index 00000000..47b598de --- /dev/null +++ b/spec/fixtures/rails61/test/test_helper.rb @@ -0,0 +1,13 @@ +ENV['RAILS_ENV'] ||= 'test' +require_relative "../config/environment" +require "rails/test_help" + +class ActiveSupport::TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/spec/fixtures/rails61/vendor/.keep b/spec/fixtures/rails61/vendor/.keep new file mode 100644 index 00000000..e69de29b From 281da657326a765e600cd514025a80db6513e1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:18:13 +0100 Subject: [PATCH 04/13] Prepare new apps for parallel tests --- spec/fixtures/rails60/Gemfile | 7 + spec/fixtures/rails60/Gemfile.lock | 148 +++++++++++++++++ spec/fixtures/rails60/app/models/user.rb | 2 + spec/fixtures/rails60/config/database.yml | 2 +- .../db/migrate/20210325101904_create_users.rb | 9 ++ spec/fixtures/rails60/db/schema.rb | 21 +++ spec/fixtures/rails60/test/fixtures/users.yml | 7 + .../fixtures/rails60/test/models/user_test.rb | 7 + spec/fixtures/rails61/Gemfile | 7 + spec/fixtures/rails61/Gemfile.lock | 151 ++++++++++++++++++ spec/fixtures/rails61/app/models/user.rb | 2 + spec/fixtures/rails61/config/database.yml | 2 +- .../db/migrate/20210325101931_create_users.rb | 9 ++ spec/fixtures/rails61/db/schema.rb | 21 +++ spec/fixtures/rails61/test/fixtures/users.yml | 7 + .../fixtures/rails61/test/models/user_test.rb | 7 + 16 files changed, 407 insertions(+), 2 deletions(-) create mode 100644 spec/fixtures/rails60/Gemfile create mode 100644 spec/fixtures/rails60/Gemfile.lock create mode 100644 spec/fixtures/rails60/app/models/user.rb create mode 100644 spec/fixtures/rails60/db/migrate/20210325101904_create_users.rb create mode 100644 spec/fixtures/rails60/db/schema.rb create mode 100644 spec/fixtures/rails60/test/fixtures/users.yml create mode 100644 spec/fixtures/rails60/test/models/user_test.rb create mode 100644 spec/fixtures/rails61/Gemfile create mode 100644 spec/fixtures/rails61/Gemfile.lock create mode 100644 spec/fixtures/rails61/app/models/user.rb create mode 100644 spec/fixtures/rails61/db/migrate/20210325101931_create_users.rb create mode 100644 spec/fixtures/rails61/db/schema.rb create mode 100644 spec/fixtures/rails61/test/fixtures/users.yml create mode 100644 spec/fixtures/rails61/test/models/user_test.rb diff --git a/spec/fixtures/rails60/Gemfile b/spec/fixtures/rails60/Gemfile new file mode 100644 index 00000000..0ea049b2 --- /dev/null +++ b/spec/fixtures/rails60/Gemfile @@ -0,0 +1,7 @@ +# frozen_string_literal: true +source 'https://rubygems.org' + +gem 'rails', '6.0.3' +gem 'sqlite3' +gem 'tzinfo-data' +gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails60/Gemfile.lock b/spec/fixtures/rails60/Gemfile.lock new file mode 100644 index 00000000..a43d1766 --- /dev/null +++ b/spec/fixtures/rails60/Gemfile.lock @@ -0,0 +1,148 @@ +PATH + remote: ../../.. + specs: + parallel_tests (3.5.2) + parallel + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.0.3) + actionpack (= 6.0.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.0.3) + actionpack (= 6.0.3) + activejob (= 6.0.3) + activerecord (= 6.0.3) + activestorage (= 6.0.3) + activesupport (= 6.0.3) + mail (>= 2.7.1) + actionmailer (6.0.3) + actionpack (= 6.0.3) + actionview (= 6.0.3) + activejob (= 6.0.3) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.0.3) + actionview (= 6.0.3) + activesupport (= 6.0.3) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.3) + actionpack (= 6.0.3) + activerecord (= 6.0.3) + activestorage (= 6.0.3) + activesupport (= 6.0.3) + nokogiri (>= 1.8.5) + actionview (6.0.3) + activesupport (= 6.0.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.0.3) + activesupport (= 6.0.3) + globalid (>= 0.3.6) + activemodel (6.0.3) + activesupport (= 6.0.3) + activerecord (6.0.3) + activemodel (= 6.0.3) + activesupport (= 6.0.3) + activestorage (6.0.3) + actionpack (= 6.0.3) + activejob (= 6.0.3) + activerecord (= 6.0.3) + marcel (~> 0.3.1) + activesupport (6.0.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + builder (3.2.4) + concurrent-ruby (1.1.8) + crass (1.0.6) + erubi (1.10.0) + globalid (0.4.2) + activesupport (>= 4.2.0) + i18n (1.8.9) + concurrent-ruby (~> 1.0) + loofah (2.9.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (1.0.0) + mimemagic (0.3.6) + mini_mime (1.0.2) + minitest (5.14.4) + nio4r (2.5.7) + nokogiri (1.11.2-x86_64-linux) + racc (~> 1.4) + parallel (1.20.1) + racc (1.5.2) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (6.0.3) + actioncable (= 6.0.3) + actionmailbox (= 6.0.3) + actionmailer (= 6.0.3) + actionpack (= 6.0.3) + actiontext (= 6.0.3) + actionview (= 6.0.3) + activejob (= 6.0.3) + activemodel (= 6.0.3) + activerecord (= 6.0.3) + activestorage (= 6.0.3) + activesupport (= 6.0.3) + bundler (>= 1.3.0) + railties (= 6.0.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.0.3) + actionpack (= 6.0.3) + activesupport (= 6.0.3) + method_source + rake (>= 0.8.7) + thor (>= 0.20.3, < 2.0) + rake (13.0.3) + sprockets (4.0.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.2) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.4.2) + thor (1.1.0) + thread_safe (0.3.6) + tzinfo (1.2.9) + thread_safe (~> 0.1) + tzinfo-data (1.2021.1) + tzinfo (>= 1.0.0) + websocket-driver (0.7.3) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.4.2) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + parallel_tests! + rails (= 6.0.3) + sqlite3 + tzinfo-data + +BUNDLED WITH + 2.2.15 diff --git a/spec/fixtures/rails60/app/models/user.rb b/spec/fixtures/rails60/app/models/user.rb new file mode 100644 index 00000000..379658a5 --- /dev/null +++ b/spec/fixtures/rails60/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ApplicationRecord +end diff --git a/spec/fixtures/rails60/config/database.yml b/spec/fixtures/rails60/config/database.yml index 4a8a1b26..f90baf88 100644 --- a/spec/fixtures/rails60/config/database.yml +++ b/spec/fixtures/rails60/config/database.yml @@ -18,7 +18,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: db/test.sqlite3 + database: db/test<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3 production: <<: *default diff --git a/spec/fixtures/rails60/db/migrate/20210325101904_create_users.rb b/spec/fixtures/rails60/db/migrate/20210325101904_create_users.rb new file mode 100644 index 00000000..6c10d9ca --- /dev/null +++ b/spec/fixtures/rails60/db/migrate/20210325101904_create_users.rb @@ -0,0 +1,9 @@ +class CreateUsers < ActiveRecord::Migration[6.0] + def change + create_table :users do |t| + t.string :name + + t.timestamps + end + end +end diff --git a/spec/fixtures/rails60/db/schema.rb b/spec/fixtures/rails60/db/schema.rb new file mode 100644 index 00000000..a0bb87f8 --- /dev/null +++ b/spec/fixtures/rails60/db/schema.rb @@ -0,0 +1,21 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# This file is the source Rails uses to define your schema when running `rails +# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 2021_03_25_101904) do + + create_table "users", force: :cascade do |t| + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + end + +end diff --git a/spec/fixtures/rails60/test/fixtures/users.yml b/spec/fixtures/rails60/test/fixtures/users.yml new file mode 100644 index 00000000..7d412240 --- /dev/null +++ b/spec/fixtures/rails60/test/fixtures/users.yml @@ -0,0 +1,7 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + +two: + name: MyString diff --git a/spec/fixtures/rails60/test/models/user_test.rb b/spec/fixtures/rails60/test/models/user_test.rb new file mode 100644 index 00000000..82f61e01 --- /dev/null +++ b/spec/fixtures/rails60/test/models/user_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/spec/fixtures/rails61/Gemfile b/spec/fixtures/rails61/Gemfile new file mode 100644 index 00000000..5098e500 --- /dev/null +++ b/spec/fixtures/rails61/Gemfile @@ -0,0 +1,7 @@ +# frozen_string_literal: true +source 'https://rubygems.org' + +gem 'rails', '6.1.3' +gem 'sqlite3' +gem 'tzinfo-data' +gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails61/Gemfile.lock b/spec/fixtures/rails61/Gemfile.lock new file mode 100644 index 00000000..173e5bcf --- /dev/null +++ b/spec/fixtures/rails61/Gemfile.lock @@ -0,0 +1,151 @@ +PATH + remote: ../../.. + specs: + parallel_tests (3.5.2) + parallel + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.1.3) + actionpack (= 6.1.3) + activesupport (= 6.1.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.3) + actionpack (= 6.1.3) + activejob (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) + mail (>= 2.7.1) + actionmailer (6.1.3) + actionpack (= 6.1.3) + actionview (= 6.1.3) + activejob (= 6.1.3) + activesupport (= 6.1.3) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.1.3) + actionview (= 6.1.3) + activesupport (= 6.1.3) + rack (~> 2.0, >= 2.0.9) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.3) + actionpack (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) + nokogiri (>= 1.8.5) + actionview (6.1.3) + activesupport (= 6.1.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.3) + activesupport (= 6.1.3) + globalid (>= 0.3.6) + activemodel (6.1.3) + activesupport (= 6.1.3) + activerecord (6.1.3) + activemodel (= 6.1.3) + activesupport (= 6.1.3) + activestorage (6.1.3) + actionpack (= 6.1.3) + activejob (= 6.1.3) + activerecord (= 6.1.3) + activesupport (= 6.1.3) + marcel (~> 0.3.1) + mimemagic (~> 0.3.2) + activesupport (6.1.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + builder (3.2.4) + concurrent-ruby (1.1.8) + crass (1.0.6) + erubi (1.10.0) + globalid (0.4.2) + activesupport (>= 4.2.0) + i18n (1.8.9) + concurrent-ruby (~> 1.0) + loofah (2.9.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (1.0.0) + mimemagic (0.3.6) + mini_mime (1.0.2) + minitest (5.14.4) + nio4r (2.5.7) + nokogiri (1.11.2-x86_64-linux) + racc (~> 1.4) + parallel (1.20.1) + racc (1.5.2) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (6.1.3) + actioncable (= 6.1.3) + actionmailbox (= 6.1.3) + actionmailer (= 6.1.3) + actionpack (= 6.1.3) + actiontext (= 6.1.3) + actionview (= 6.1.3) + activejob (= 6.1.3) + activemodel (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) + bundler (>= 1.15.0) + railties (= 6.1.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.1.3) + actionpack (= 6.1.3) + activesupport (= 6.1.3) + method_source + rake (>= 0.8.7) + thor (~> 1.0) + rake (13.0.3) + sprockets (4.0.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.2) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.4.2) + thor (1.1.0) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + tzinfo-data (1.2021.1) + tzinfo (>= 1.0.0) + websocket-driver (0.7.3) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.4.2) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + parallel_tests! + rails (= 6.1.3) + sqlite3 + tzinfo-data + +BUNDLED WITH + 2.2.15 diff --git a/spec/fixtures/rails61/app/models/user.rb b/spec/fixtures/rails61/app/models/user.rb new file mode 100644 index 00000000..379658a5 --- /dev/null +++ b/spec/fixtures/rails61/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ApplicationRecord +end diff --git a/spec/fixtures/rails61/config/database.yml b/spec/fixtures/rails61/config/database.yml index 4a8a1b26..f90baf88 100644 --- a/spec/fixtures/rails61/config/database.yml +++ b/spec/fixtures/rails61/config/database.yml @@ -18,7 +18,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: db/test.sqlite3 + database: db/test<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3 production: <<: *default diff --git a/spec/fixtures/rails61/db/migrate/20210325101931_create_users.rb b/spec/fixtures/rails61/db/migrate/20210325101931_create_users.rb new file mode 100644 index 00000000..9f06756e --- /dev/null +++ b/spec/fixtures/rails61/db/migrate/20210325101931_create_users.rb @@ -0,0 +1,9 @@ +class CreateUsers < ActiveRecord::Migration[6.1] + def change + create_table :users do |t| + t.string :name + + t.timestamps + end + end +end diff --git a/spec/fixtures/rails61/db/schema.rb b/spec/fixtures/rails61/db/schema.rb new file mode 100644 index 00000000..64f426a4 --- /dev/null +++ b/spec/fixtures/rails61/db/schema.rb @@ -0,0 +1,21 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 2021_03_25_101931) do + + create_table "users", force: :cascade do |t| + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + end + +end diff --git a/spec/fixtures/rails61/test/fixtures/users.yml b/spec/fixtures/rails61/test/fixtures/users.yml new file mode 100644 index 00000000..7d412240 --- /dev/null +++ b/spec/fixtures/rails61/test/fixtures/users.yml @@ -0,0 +1,7 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + +two: + name: MyString diff --git a/spec/fixtures/rails61/test/models/user_test.rb b/spec/fixtures/rails61/test/models/user_test.rb new file mode 100644 index 00000000..5c07f490 --- /dev/null +++ b/spec/fixtures/rails61/test/models/user_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end From d2a89cc2aad57f899e30bba76d73b457ab1c76ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:22:15 +0100 Subject: [PATCH 05/13] Test new apps --- spec/rails_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/rails_spec.rb b/spec/rails_spec.rb index 0e43f176..ec799910 100644 --- a/spec/rails_spec.rb +++ b/spec/rails_spec.rb @@ -13,8 +13,7 @@ def sh(command, options = {}) result end - # TODO: rails 6 - ['rails51', 'rails52'].each do |rails| + ['rails51', 'rails52', 'rails60', 'rails61'].each do |rails| it "can create and run #{rails}" do skip 'rails fixtures are not set up for java' if RUBY_PLATFORM == "java" From 40b74add09dde302956242435b6ff94c8f76821b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:23:12 +0100 Subject: [PATCH 06/13] Remove old test apps --- spec/fixtures/rails51/.gitignore | 23 --- spec/fixtures/rails51/Gemfile | 7 - spec/fixtures/rails51/Gemfile.lock | 124 ---------------- spec/fixtures/rails51/README.md | 24 ---- spec/fixtures/rails51/Rakefile | 7 - .../rails51/app/assets/config/manifest.js | 3 - spec/fixtures/rails51/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 15 -- .../rails51/app/assets/javascripts/cable.js | 13 -- .../app/assets/javascripts/channels/.keep | 0 .../app/assets/stylesheets/application.css | 15 -- .../app/channels/application_cable/channel.rb | 5 - .../channels/application_cable/connection.rb | 5 - .../app/controllers/application_controller.rb | 4 - .../rails51/app/controllers/concerns/.keep | 0 .../rails51/app/helpers/application_helper.rb | 3 - .../rails51/app/jobs/application_job.rb | 3 - .../rails51/app/mailers/application_mailer.rb | 5 - .../rails51/app/models/application_record.rb | 4 - .../rails51/app/models/concerns/.keep | 0 spec/fixtures/rails51/app/models/user.rb | 3 - .../app/views/layouts/application.html.erb | 14 -- .../rails51/app/views/layouts/mailer.html.erb | 13 -- .../rails51/app/views/layouts/mailer.text.erb | 1 - spec/fixtures/rails51/bin/bundle | 4 - spec/fixtures/rails51/bin/rails | 5 - spec/fixtures/rails51/bin/rake | 5 - spec/fixtures/rails51/bin/setup | 38 ----- spec/fixtures/rails51/bin/update | 30 ---- spec/fixtures/rails51/bin/yarn | 12 -- spec/fixtures/rails51/config.ru | 6 - spec/fixtures/rails51/config/application.rb | 19 --- spec/fixtures/rails51/config/boot.rb | 4 - spec/fixtures/rails51/config/cable.yml | 10 -- spec/fixtures/rails51/config/database.yml | 25 ---- spec/fixtures/rails51/config/environment.rb | 6 - .../config/environments/development.rb | 55 -------- .../rails51/config/environments/production.rb | 92 ------------ .../rails51/config/environments/test.rb | 43 ------ .../application_controller_renderer.rb | 9 -- .../rails51/config/initializers/assets.rb | 15 -- .../initializers/backtrace_silencers.rb | 8 -- .../config/initializers/cookies_serializer.rb | 6 - .../initializers/filter_parameter_logging.rb | 5 - .../config/initializers/inflections.rb | 17 --- .../rails51/config/initializers/mime_types.rb | 5 - .../config/initializers/wrap_parameters.rb | 15 -- spec/fixtures/rails51/config/locales/en.yml | 33 ----- spec/fixtures/rails51/config/puma.rb | 57 -------- spec/fixtures/rails51/config/routes.rb | 4 - spec/fixtures/rails51/config/secrets.yml | 32 ----- .../db/migrate/20181024130108_create_users.rb | 10 -- spec/fixtures/rails51/db/schema.rb | 21 --- spec/fixtures/rails51/db/seeds.rb | 8 -- spec/fixtures/rails51/lib/assets/.keep | 0 spec/fixtures/rails51/lib/tasks/.keep | 0 spec/fixtures/rails51/log/.keep | 0 spec/fixtures/rails51/package.json | 5 - spec/fixtures/rails51/public/404.html | 67 --------- spec/fixtures/rails51/public/422.html | 67 --------- spec/fixtures/rails51/public/500.html | 66 --------- .../public/apple-touch-icon-precomposed.png | 0 .../rails51/public/apple-touch-icon.png | 0 spec/fixtures/rails51/public/favicon.ico | 0 spec/fixtures/rails51/public/robots.txt | 1 - .../test/application_system_test_case.rb | 6 - spec/fixtures/rails51/test/controllers/.keep | 0 spec/fixtures/rails51/test/fixtures/.keep | 0 .../rails51/test/fixtures/files/.keep | 0 spec/fixtures/rails51/test/fixtures/users.yml | 7 - spec/fixtures/rails51/test/helpers/.keep | 0 spec/fixtures/rails51/test/integration/.keep | 0 spec/fixtures/rails51/test/mailers/.keep | 0 spec/fixtures/rails51/test/models/.keep | 0 .../rails51/test/models/user2_test.rb | 8 -- .../fixtures/rails51/test/models/user_test.rb | 8 -- spec/fixtures/rails51/test/system/.keep | 0 spec/fixtures/rails51/test/test_helper.rb | 11 -- spec/fixtures/rails51/vendor/.keep | 0 spec/fixtures/rails52/.gitignore | 31 ---- spec/fixtures/rails52/.ruby-version | 1 - spec/fixtures/rails52/Gemfile | 7 - spec/fixtures/rails52/Gemfile.lock | 132 ------------------ spec/fixtures/rails52/README.md | 24 ---- spec/fixtures/rails52/Rakefile | 7 - .../rails52/app/assets/config/manifest.js | 3 - spec/fixtures/rails52/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 16 --- .../rails52/app/assets/javascripts/cable.js | 13 -- .../app/assets/javascripts/channels/.keep | 0 .../app/assets/stylesheets/application.css | 15 -- .../app/channels/application_cable/channel.rb | 5 - .../channels/application_cable/connection.rb | 5 - .../app/controllers/application_controller.rb | 3 - .../rails52/app/controllers/concerns/.keep | 0 .../rails52/app/helpers/application_helper.rb | 3 - .../rails52/app/jobs/application_job.rb | 3 - .../rails52/app/mailers/application_mailer.rb | 5 - .../rails52/app/models/application_record.rb | 4 - .../rails52/app/models/concerns/.keep | 0 spec/fixtures/rails52/app/models/user.rb | 3 - .../app/views/layouts/application.html.erb | 15 -- .../rails52/app/views/layouts/mailer.html.erb | 13 -- .../rails52/app/views/layouts/mailer.text.erb | 1 - spec/fixtures/rails52/bin/bundle | 4 - spec/fixtures/rails52/bin/rails | 5 - spec/fixtures/rails52/bin/rake | 5 - spec/fixtures/rails52/bin/setup | 37 ----- spec/fixtures/rails52/bin/update | 32 ----- spec/fixtures/rails52/bin/yarn | 12 -- spec/fixtures/rails52/config.ru | 6 - spec/fixtures/rails52/config/application.rb | 20 --- spec/fixtures/rails52/config/boot.rb | 4 - spec/fixtures/rails52/config/cable.yml | 10 -- .../rails52/config/credentials.yml.enc | 1 - spec/fixtures/rails52/config/database.yml | 25 ---- spec/fixtures/rails52/config/environment.rb | 6 - .../config/environments/development.rb | 62 -------- .../rails52/config/environments/production.rb | 95 ------------- .../rails52/config/environments/test.rb | 47 ------- .../application_controller_renderer.rb | 9 -- .../rails52/config/initializers/assets.rb | 15 -- .../initializers/backtrace_silencers.rb | 8 -- .../initializers/content_security_policy.rb | 26 ---- .../config/initializers/cookies_serializer.rb | 6 - .../initializers/filter_parameter_logging.rb | 5 - .../config/initializers/inflections.rb | 17 --- .../rails52/config/initializers/mime_types.rb | 5 - .../config/initializers/wrap_parameters.rb | 15 -- spec/fixtures/rails52/config/locales/en.yml | 33 ----- spec/fixtures/rails52/config/puma.rb | 35 ----- spec/fixtures/rails52/config/routes.rb | 4 - spec/fixtures/rails52/config/storage.yml | 34 ----- .../db/migrate/20181024130151_create_users.rb | 10 -- spec/fixtures/rails52/db/schema.rb | 21 --- spec/fixtures/rails52/db/seeds.rb | 8 -- spec/fixtures/rails52/lib/assets/.keep | 0 spec/fixtures/rails52/lib/tasks/.keep | 0 spec/fixtures/rails52/log/.keep | 0 spec/fixtures/rails52/package.json | 5 - spec/fixtures/rails52/public/404.html | 67 --------- spec/fixtures/rails52/public/422.html | 67 --------- spec/fixtures/rails52/public/500.html | 66 --------- .../public/apple-touch-icon-precomposed.png | 0 .../rails52/public/apple-touch-icon.png | 0 spec/fixtures/rails52/public/favicon.ico | 0 spec/fixtures/rails52/public/robots.txt | 1 - spec/fixtures/rails52/storage/.keep | 0 .../test/application_system_test_case.rb | 6 - spec/fixtures/rails52/test/controllers/.keep | 0 spec/fixtures/rails52/test/fixtures/.keep | 0 .../rails52/test/fixtures/files/.keep | 0 spec/fixtures/rails52/test/fixtures/users.yml | 7 - spec/fixtures/rails52/test/helpers/.keep | 0 spec/fixtures/rails52/test/integration/.keep | 0 spec/fixtures/rails52/test/mailers/.keep | 0 spec/fixtures/rails52/test/models/.keep | 0 .../rails52/test/models/user2_test.rb | 8 -- .../fixtures/rails52/test/models/user_test.rb | 8 -- spec/fixtures/rails52/test/system/.keep | 0 spec/fixtures/rails52/test/test_helper.rb | 11 -- spec/fixtures/rails52/vendor/.keep | 0 spec/rails_spec.rb | 2 +- 163 files changed, 1 insertion(+), 2314 deletions(-) delete mode 100644 spec/fixtures/rails51/.gitignore delete mode 100644 spec/fixtures/rails51/Gemfile delete mode 100644 spec/fixtures/rails51/Gemfile.lock delete mode 100644 spec/fixtures/rails51/README.md delete mode 100644 spec/fixtures/rails51/Rakefile delete mode 100644 spec/fixtures/rails51/app/assets/config/manifest.js delete mode 100644 spec/fixtures/rails51/app/assets/images/.keep delete mode 100644 spec/fixtures/rails51/app/assets/javascripts/application.js delete mode 100644 spec/fixtures/rails51/app/assets/javascripts/cable.js delete mode 100644 spec/fixtures/rails51/app/assets/javascripts/channels/.keep delete mode 100644 spec/fixtures/rails51/app/assets/stylesheets/application.css delete mode 100644 spec/fixtures/rails51/app/channels/application_cable/channel.rb delete mode 100644 spec/fixtures/rails51/app/channels/application_cable/connection.rb delete mode 100644 spec/fixtures/rails51/app/controllers/application_controller.rb delete mode 100644 spec/fixtures/rails51/app/controllers/concerns/.keep delete mode 100644 spec/fixtures/rails51/app/helpers/application_helper.rb delete mode 100644 spec/fixtures/rails51/app/jobs/application_job.rb delete mode 100644 spec/fixtures/rails51/app/mailers/application_mailer.rb delete mode 100644 spec/fixtures/rails51/app/models/application_record.rb delete mode 100644 spec/fixtures/rails51/app/models/concerns/.keep delete mode 100644 spec/fixtures/rails51/app/models/user.rb delete mode 100644 spec/fixtures/rails51/app/views/layouts/application.html.erb delete mode 100644 spec/fixtures/rails51/app/views/layouts/mailer.html.erb delete mode 100644 spec/fixtures/rails51/app/views/layouts/mailer.text.erb delete mode 100755 spec/fixtures/rails51/bin/bundle delete mode 100755 spec/fixtures/rails51/bin/rails delete mode 100755 spec/fixtures/rails51/bin/rake delete mode 100755 spec/fixtures/rails51/bin/setup delete mode 100755 spec/fixtures/rails51/bin/update delete mode 100755 spec/fixtures/rails51/bin/yarn delete mode 100644 spec/fixtures/rails51/config.ru delete mode 100644 spec/fixtures/rails51/config/application.rb delete mode 100644 spec/fixtures/rails51/config/boot.rb delete mode 100644 spec/fixtures/rails51/config/cable.yml delete mode 100644 spec/fixtures/rails51/config/database.yml delete mode 100644 spec/fixtures/rails51/config/environment.rb delete mode 100644 spec/fixtures/rails51/config/environments/development.rb delete mode 100644 spec/fixtures/rails51/config/environments/production.rb delete mode 100644 spec/fixtures/rails51/config/environments/test.rb delete mode 100644 spec/fixtures/rails51/config/initializers/application_controller_renderer.rb delete mode 100644 spec/fixtures/rails51/config/initializers/assets.rb delete mode 100644 spec/fixtures/rails51/config/initializers/backtrace_silencers.rb delete mode 100644 spec/fixtures/rails51/config/initializers/cookies_serializer.rb delete mode 100644 spec/fixtures/rails51/config/initializers/filter_parameter_logging.rb delete mode 100644 spec/fixtures/rails51/config/initializers/inflections.rb delete mode 100644 spec/fixtures/rails51/config/initializers/mime_types.rb delete mode 100644 spec/fixtures/rails51/config/initializers/wrap_parameters.rb delete mode 100644 spec/fixtures/rails51/config/locales/en.yml delete mode 100644 spec/fixtures/rails51/config/puma.rb delete mode 100644 spec/fixtures/rails51/config/routes.rb delete mode 100644 spec/fixtures/rails51/config/secrets.yml delete mode 100644 spec/fixtures/rails51/db/migrate/20181024130108_create_users.rb delete mode 100644 spec/fixtures/rails51/db/schema.rb delete mode 100644 spec/fixtures/rails51/db/seeds.rb delete mode 100644 spec/fixtures/rails51/lib/assets/.keep delete mode 100644 spec/fixtures/rails51/lib/tasks/.keep delete mode 100644 spec/fixtures/rails51/log/.keep delete mode 100644 spec/fixtures/rails51/package.json delete mode 100644 spec/fixtures/rails51/public/404.html delete mode 100644 spec/fixtures/rails51/public/422.html delete mode 100644 spec/fixtures/rails51/public/500.html delete mode 100644 spec/fixtures/rails51/public/apple-touch-icon-precomposed.png delete mode 100644 spec/fixtures/rails51/public/apple-touch-icon.png delete mode 100644 spec/fixtures/rails51/public/favicon.ico delete mode 100644 spec/fixtures/rails51/public/robots.txt delete mode 100644 spec/fixtures/rails51/test/application_system_test_case.rb delete mode 100644 spec/fixtures/rails51/test/controllers/.keep delete mode 100644 spec/fixtures/rails51/test/fixtures/.keep delete mode 100644 spec/fixtures/rails51/test/fixtures/files/.keep delete mode 100644 spec/fixtures/rails51/test/fixtures/users.yml delete mode 100644 spec/fixtures/rails51/test/helpers/.keep delete mode 100644 spec/fixtures/rails51/test/integration/.keep delete mode 100644 spec/fixtures/rails51/test/mailers/.keep delete mode 100644 spec/fixtures/rails51/test/models/.keep delete mode 100644 spec/fixtures/rails51/test/models/user2_test.rb delete mode 100644 spec/fixtures/rails51/test/models/user_test.rb delete mode 100644 spec/fixtures/rails51/test/system/.keep delete mode 100644 spec/fixtures/rails51/test/test_helper.rb delete mode 100644 spec/fixtures/rails51/vendor/.keep delete mode 100644 spec/fixtures/rails52/.gitignore delete mode 100644 spec/fixtures/rails52/.ruby-version delete mode 100644 spec/fixtures/rails52/Gemfile delete mode 100644 spec/fixtures/rails52/Gemfile.lock delete mode 100644 spec/fixtures/rails52/README.md delete mode 100644 spec/fixtures/rails52/Rakefile delete mode 100644 spec/fixtures/rails52/app/assets/config/manifest.js delete mode 100644 spec/fixtures/rails52/app/assets/images/.keep delete mode 100644 spec/fixtures/rails52/app/assets/javascripts/application.js delete mode 100644 spec/fixtures/rails52/app/assets/javascripts/cable.js delete mode 100644 spec/fixtures/rails52/app/assets/javascripts/channels/.keep delete mode 100644 spec/fixtures/rails52/app/assets/stylesheets/application.css delete mode 100644 spec/fixtures/rails52/app/channels/application_cable/channel.rb delete mode 100644 spec/fixtures/rails52/app/channels/application_cable/connection.rb delete mode 100644 spec/fixtures/rails52/app/controllers/application_controller.rb delete mode 100644 spec/fixtures/rails52/app/controllers/concerns/.keep delete mode 100644 spec/fixtures/rails52/app/helpers/application_helper.rb delete mode 100644 spec/fixtures/rails52/app/jobs/application_job.rb delete mode 100644 spec/fixtures/rails52/app/mailers/application_mailer.rb delete mode 100644 spec/fixtures/rails52/app/models/application_record.rb delete mode 100644 spec/fixtures/rails52/app/models/concerns/.keep delete mode 100644 spec/fixtures/rails52/app/models/user.rb delete mode 100644 spec/fixtures/rails52/app/views/layouts/application.html.erb delete mode 100644 spec/fixtures/rails52/app/views/layouts/mailer.html.erb delete mode 100644 spec/fixtures/rails52/app/views/layouts/mailer.text.erb delete mode 100755 spec/fixtures/rails52/bin/bundle delete mode 100755 spec/fixtures/rails52/bin/rails delete mode 100755 spec/fixtures/rails52/bin/rake delete mode 100755 spec/fixtures/rails52/bin/setup delete mode 100755 spec/fixtures/rails52/bin/update delete mode 100755 spec/fixtures/rails52/bin/yarn delete mode 100644 spec/fixtures/rails52/config.ru delete mode 100644 spec/fixtures/rails52/config/application.rb delete mode 100644 spec/fixtures/rails52/config/boot.rb delete mode 100644 spec/fixtures/rails52/config/cable.yml delete mode 100644 spec/fixtures/rails52/config/credentials.yml.enc delete mode 100644 spec/fixtures/rails52/config/database.yml delete mode 100644 spec/fixtures/rails52/config/environment.rb delete mode 100644 spec/fixtures/rails52/config/environments/development.rb delete mode 100644 spec/fixtures/rails52/config/environments/production.rb delete mode 100644 spec/fixtures/rails52/config/environments/test.rb delete mode 100644 spec/fixtures/rails52/config/initializers/application_controller_renderer.rb delete mode 100644 spec/fixtures/rails52/config/initializers/assets.rb delete mode 100644 spec/fixtures/rails52/config/initializers/backtrace_silencers.rb delete mode 100644 spec/fixtures/rails52/config/initializers/content_security_policy.rb delete mode 100644 spec/fixtures/rails52/config/initializers/cookies_serializer.rb delete mode 100644 spec/fixtures/rails52/config/initializers/filter_parameter_logging.rb delete mode 100644 spec/fixtures/rails52/config/initializers/inflections.rb delete mode 100644 spec/fixtures/rails52/config/initializers/mime_types.rb delete mode 100644 spec/fixtures/rails52/config/initializers/wrap_parameters.rb delete mode 100644 spec/fixtures/rails52/config/locales/en.yml delete mode 100644 spec/fixtures/rails52/config/puma.rb delete mode 100644 spec/fixtures/rails52/config/routes.rb delete mode 100644 spec/fixtures/rails52/config/storage.yml delete mode 100644 spec/fixtures/rails52/db/migrate/20181024130151_create_users.rb delete mode 100644 spec/fixtures/rails52/db/schema.rb delete mode 100644 spec/fixtures/rails52/db/seeds.rb delete mode 100644 spec/fixtures/rails52/lib/assets/.keep delete mode 100644 spec/fixtures/rails52/lib/tasks/.keep delete mode 100644 spec/fixtures/rails52/log/.keep delete mode 100644 spec/fixtures/rails52/package.json delete mode 100644 spec/fixtures/rails52/public/404.html delete mode 100644 spec/fixtures/rails52/public/422.html delete mode 100644 spec/fixtures/rails52/public/500.html delete mode 100644 spec/fixtures/rails52/public/apple-touch-icon-precomposed.png delete mode 100644 spec/fixtures/rails52/public/apple-touch-icon.png delete mode 100644 spec/fixtures/rails52/public/favicon.ico delete mode 100644 spec/fixtures/rails52/public/robots.txt delete mode 100644 spec/fixtures/rails52/storage/.keep delete mode 100644 spec/fixtures/rails52/test/application_system_test_case.rb delete mode 100644 spec/fixtures/rails52/test/controllers/.keep delete mode 100644 spec/fixtures/rails52/test/fixtures/.keep delete mode 100644 spec/fixtures/rails52/test/fixtures/files/.keep delete mode 100644 spec/fixtures/rails52/test/fixtures/users.yml delete mode 100644 spec/fixtures/rails52/test/helpers/.keep delete mode 100644 spec/fixtures/rails52/test/integration/.keep delete mode 100644 spec/fixtures/rails52/test/mailers/.keep delete mode 100644 spec/fixtures/rails52/test/models/.keep delete mode 100644 spec/fixtures/rails52/test/models/user2_test.rb delete mode 100644 spec/fixtures/rails52/test/models/user_test.rb delete mode 100644 spec/fixtures/rails52/test/system/.keep delete mode 100644 spec/fixtures/rails52/test/test_helper.rb delete mode 100644 spec/fixtures/rails52/vendor/.keep diff --git a/spec/fixtures/rails51/.gitignore b/spec/fixtures/rails51/.gitignore deleted file mode 100644 index dcc5b36f..00000000 --- a/spec/fixtures/rails51/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -/node_modules -/yarn-error.log - -.byebug_history diff --git a/spec/fixtures/rails51/Gemfile b/spec/fixtures/rails51/Gemfile deleted file mode 100644 index b55c480e..00000000 --- a/spec/fixtures/rails51/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -source 'https://rubygems.org' - -gem 'rails', '5.1.6' -gem 'sqlite3' -gem 'tzinfo-data' -gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails51/Gemfile.lock b/spec/fixtures/rails51/Gemfile.lock deleted file mode 100644 index fe7ad4b2..00000000 --- a/spec/fixtures/rails51/Gemfile.lock +++ /dev/null @@ -1,124 +0,0 @@ -PATH - remote: ../../.. - specs: - parallel_tests (3.4.0) - parallel - -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.1.6) - actionpack (= 5.1.6) - nio4r (~> 2.0) - websocket-driver (~> 0.6.1) - actionmailer (5.1.6) - actionpack (= 5.1.6) - actionview (= 5.1.6) - activejob (= 5.1.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.1.6) - actionview (= 5.1.6) - activesupport (= 5.1.6) - rack (~> 2.0) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.6) - activesupport (= 5.1.6) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.6) - activesupport (= 5.1.6) - globalid (>= 0.3.6) - activemodel (5.1.6) - activesupport (= 5.1.6) - activerecord (5.1.6) - activemodel (= 5.1.6) - activesupport (= 5.1.6) - arel (~> 8.0) - activesupport (5.1.6) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (8.0.0) - builder (3.2.3) - concurrent-ruby (1.0.5) - crass (1.0.4) - erubi (1.7.1) - globalid (0.4.1) - activesupport (>= 4.2.0) - i18n (1.1.1) - concurrent-ruby (~> 1.0) - loofah (2.2.2) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - method_source (0.9.0) - mini_mime (1.0.1) - mini_portile2 (2.3.0) - minitest (5.11.3) - nio4r (2.3.1) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) - parallel (1.20.1) - rack (2.0.5) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.1.6) - actioncable (= 5.1.6) - actionmailer (= 5.1.6) - actionpack (= 5.1.6) - actionview (= 5.1.6) - activejob (= 5.1.6) - activemodel (= 5.1.6) - activerecord (= 5.1.6) - activesupport (= 5.1.6) - bundler (>= 1.3.0) - railties (= 5.1.6) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.1.6) - actionpack (= 5.1.6) - activesupport (= 5.1.6) - method_source - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (12.3.1) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.3.13) - thor (0.20.0) - thread_safe (0.3.6) - tzinfo (1.2.5) - thread_safe (~> 0.1) - tzinfo-data (1.2019.3) - tzinfo (>= 1.0.0) - websocket-driver (0.6.5) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - -PLATFORMS - ruby - -DEPENDENCIES - parallel_tests! - rails (= 5.1.6) - sqlite3 - tzinfo-data - -BUNDLED WITH - 2.1.4 diff --git a/spec/fixtures/rails51/README.md b/spec/fixtures/rails51/README.md deleted file mode 100644 index 7db80e4c..00000000 --- a/spec/fixtures/rails51/README.md +++ /dev/null @@ -1,24 +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 - -* ... diff --git a/spec/fixtures/rails51/Rakefile b/spec/fixtures/rails51/Rakefile deleted file mode 100644 index 84f2bc39..00000000 --- a/spec/fixtures/rails51/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/app/assets/config/manifest.js b/spec/fixtures/rails51/app/assets/config/manifest.js deleted file mode 100644 index b16e53d6..00000000 --- a/spec/fixtures/rails51/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/spec/fixtures/rails51/app/assets/images/.keep b/spec/fixtures/rails51/app/assets/images/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/app/assets/javascripts/application.js b/spec/fixtures/rails51/app/assets/javascripts/application.js deleted file mode 100644 index 46b20359..00000000 --- a/spec/fixtures/rails51/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's -// vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. JavaScript code in this file should be added after the last require_* statement. -// -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require rails-ujs -//= require turbolinks -//= require_tree . diff --git a/spec/fixtures/rails51/app/assets/javascripts/cable.js b/spec/fixtures/rails51/app/assets/javascripts/cable.js deleted file mode 100644 index 739aa5f0..00000000 --- a/spec/fixtures/rails51/app/assets/javascripts/cable.js +++ /dev/null @@ -1,13 +0,0 @@ -// Action Cable provides the framework to deal with WebSockets in Rails. -// You can generate new channels where WebSocket features live using the `rails generate channel` command. -// -//= require action_cable -//= require_self -//= require_tree ./channels - -(function() { - this.App || (this.App = {}); - - App.cable = ActionCable.createConsumer(); - -}).call(this); diff --git a/spec/fixtures/rails51/app/assets/javascripts/channels/.keep b/spec/fixtures/rails51/app/assets/javascripts/channels/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/app/assets/stylesheets/application.css b/spec/fixtures/rails51/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f5..00000000 --- a/spec/fixtures/rails51/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/spec/fixtures/rails51/app/channels/application_cable/channel.rb b/spec/fixtures/rails51/app/channels/application_cable/channel.rb deleted file mode 100644 index 51e3e936..00000000 --- a/spec/fixtures/rails51/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/spec/fixtures/rails51/app/channels/application_cable/connection.rb b/spec/fixtures/rails51/app/channels/application_cable/connection.rb deleted file mode 100644 index fa70319d..00000000 --- a/spec/fixtures/rails51/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/spec/fixtures/rails51/app/controllers/application_controller.rb b/spec/fixtures/rails51/app/controllers/application_controller.rb deleted file mode 100644 index 6d369f83..00000000 --- a/spec/fixtures/rails51/app/controllers/application_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -class ApplicationController < ActionController::Base - protect_from_forgery with: :exception -end diff --git a/spec/fixtures/rails51/app/controllers/concerns/.keep b/spec/fixtures/rails51/app/controllers/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/app/helpers/application_helper.rb b/spec/fixtures/rails51/app/helpers/application_helper.rb deleted file mode 100644 index 71249b93..00000000 --- a/spec/fixtures/rails51/app/helpers/application_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -module ApplicationHelper -end diff --git a/spec/fixtures/rails51/app/jobs/application_job.rb b/spec/fixtures/rails51/app/jobs/application_job.rb deleted file mode 100644 index 32fe70b8..00000000 --- a/spec/fixtures/rails51/app/jobs/application_job.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -class ApplicationJob < ActiveJob::Base -end diff --git a/spec/fixtures/rails51/app/mailers/application_mailer.rb b/spec/fixtures/rails51/app/mailers/application_mailer.rb deleted file mode 100644 index 24289009..00000000 --- a/spec/fixtures/rails51/app/mailers/application_mailer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -class ApplicationMailer < ActionMailer::Base - default from: 'from@example.com' - layout 'mailer' -end diff --git a/spec/fixtures/rails51/app/models/application_record.rb b/spec/fixtures/rails51/app/models/application_record.rb deleted file mode 100644 index 767a072b..00000000 --- a/spec/fixtures/rails51/app/models/application_record.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true -end diff --git a/spec/fixtures/rails51/app/models/concerns/.keep b/spec/fixtures/rails51/app/models/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/app/models/user.rb b/spec/fixtures/rails51/app/models/user.rb deleted file mode 100644 index b161db0c..00000000 --- a/spec/fixtures/rails51/app/models/user.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -class User < ApplicationRecord -end diff --git a/spec/fixtures/rails51/app/views/layouts/application.html.erb b/spec/fixtures/rails51/app/views/layouts/application.html.erb deleted file mode 100644 index 3d0d5282..00000000 --- a/spec/fixtures/rails51/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Rails51 - <%= csrf_meta_tags %> - - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> - - - - <%= yield %> - - diff --git a/spec/fixtures/rails51/app/views/layouts/mailer.html.erb b/spec/fixtures/rails51/app/views/layouts/mailer.html.erb deleted file mode 100644 index cbd34d2e..00000000 --- a/spec/fixtures/rails51/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/spec/fixtures/rails51/app/views/layouts/mailer.text.erb b/spec/fixtures/rails51/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bddb..00000000 --- a/spec/fixtures/rails51/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/spec/fixtures/rails51/bin/bundle b/spec/fixtures/rails51/bin/bundle deleted file mode 100755 index 74a18868..00000000 --- a/spec/fixtures/rails51/bin/bundle +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -load Gem.bin_path('bundler', 'bundle') diff --git a/spec/fixtures/rails51/bin/rails b/spec/fixtures/rails51/bin/rails deleted file mode 100755 index dd027b40..00000000 --- a/spec/fixtures/rails51/bin/rails +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/spec/fixtures/rails51/bin/rake b/spec/fixtures/rails51/bin/rake deleted file mode 100755 index 609af747..00000000 --- a/spec/fixtures/rails51/bin/rake +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/spec/fixtures/rails51/bin/setup b/spec/fixtures/rails51/bin/setup deleted file mode 100755 index 4c1bacf0..00000000 --- a/spec/fixtures/rails51/bin/setup +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require 'pathname' -require 'fileutils' -include FileUtils # rubocop:disable Style/MixinUsage - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') - - # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' - # end - - puts "\n== Preparing database ==" - system! 'bin/rails db:setup' - - 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/spec/fixtures/rails51/bin/update b/spec/fixtures/rails51/bin/update deleted file mode 100755 index 1594fcbc..00000000 --- a/spec/fixtures/rails51/bin/update +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require 'pathname' -require 'fileutils' -include FileUtils # rubocop:disable Style/MixinUsage - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a way to update your development environment automatically. - # Add necessary update steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - puts "\n== Updating database ==" - system! 'bin/rails db:migrate' - - 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/spec/fixtures/rails51/bin/yarn b/spec/fixtures/rails51/bin/yarn deleted file mode 100755 index 0d571d11..00000000 --- a/spec/fixtures/rails51/bin/yarn +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -VENDOR_PATH = File.expand_path('..', __dir__) -Dir.chdir(VENDOR_PATH) do - begin - exec "yarnpkg #{ARGV.join(" ")}" - rescue Errno::ENOENT - warn "Yarn executable was not detected in the system." - warn "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 - end -end diff --git a/spec/fixtures/rails51/config.ru b/spec/fixtures/rails51/config.ru deleted file mode 100644 index 7eae2644..00000000 --- a/spec/fixtures/rails51/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# This file is used by Rack-based servers to start the application. - -require_relative 'config/environment' - -run Rails.application diff --git a/spec/fixtures/rails51/config/application.rb b/spec/fixtures/rails51/config/application.rb deleted file mode 100644 index 7cec4d3e..00000000 --- a/spec/fixtures/rails51/config/application.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true -require_relative 'boot' - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module Rails51 - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.1 - - # 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. - end -end diff --git a/spec/fixtures/rails51/config/boot.rb b/spec/fixtures/rails51/config/boot.rb deleted file mode 100644 index 9be337a4..00000000 --- a/spec/fixtures/rails51/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/fixtures/rails51/config/cable.yml b/spec/fixtures/rails51/config/cable.yml deleted file mode 100644 index e40eb09e..00000000 --- a/spec/fixtures/rails51/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: async - -production: - adapter: redis - url: redis://localhost:6379/1 - channel_prefix: rails51_production diff --git a/spec/fixtures/rails51/config/database.yml b/spec/fixtures/rails51/config/database.yml deleted file mode 100644 index faeb9456..00000000 --- a/spec/fixtures/rails51/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: 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<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/spec/fixtures/rails51/config/environment.rb b/spec/fixtures/rails51/config/environment.rb deleted file mode 100644 index 12ea62f8..00000000 --- a/spec/fixtures/rails51/config/environment.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# Load the Rails application. -require_relative 'application' - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/spec/fixtures/rails51/config/environments/development.rb b/spec/fixtures/rails51/config/environments/development.rb deleted file mode 100644 index 8a4e1372..00000000 --- a/spec/fixtures/rails51/config/environments/development.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable/disable caching. By default caching is disabled. - if Rails.root.join('tmp/caching-dev.txt').exist? - config.action_controller.perform_caching = true - - config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - config.action_mailer.perform_caching = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true - - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker -end diff --git a/spec/fixtures/rails51/config/environments/production.rb b/spec/fixtures/rails51/config/environments/production.rb deleted file mode 100644 index ff1eda28..00000000 --- a/spec/fixtures/rails51/config/environments/production.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true -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 - - # Attempt to read encrypted secrets from `config/secrets.yml.enc`. - # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or - # `config/secrets.yml.key`. - config.read_encrypted_secrets = 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 JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # 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 - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # Prepend all log lines with the following tags. - config.log_tags = [:request_id] - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Use a real queuing backend for Active Job (and separate queues per environment) - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "rails51_#{Rails.env}" - 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 - - # 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 -end diff --git a/spec/fixtures/rails51/config/environments/test.rb b/spec/fixtures/rails51/config/environments/test.rb deleted file mode 100644 index b0c64d7a..00000000 --- a/spec/fixtures/rails51/config/environments/test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -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 = 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.seconds.to_i}" - } - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/fixtures/rails51/config/initializers/application_controller_renderer.rb b/spec/fixtures/rails51/config/initializers/application_controller_renderer.rb deleted file mode 100644 index f4556db3..00000000 --- a/spec/fixtures/rails51/config/initializers/application_controller_renderer.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/assets.rb b/spec/fixtures/rails51/config/initializers/assets.rb deleted file mode 100644 index b6970c9e..00000000 --- a/spec/fixtures/rails51/config/initializers/assets.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/spec/fixtures/rails51/config/initializers/backtrace_silencers.rb b/spec/fixtures/rails51/config/initializers/backtrace_silencers.rb deleted file mode 100644 index d0f0d3b5..00000000 --- a/spec/fixtures/rails51/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/cookies_serializer.rb b/spec/fixtures/rails51/config/initializers/cookies_serializer.rb deleted file mode 100644 index 2a729595..00000000 --- a/spec/fixtures/rails51/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/filter_parameter_logging.rb b/spec/fixtures/rails51/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index b7fe1231..00000000 --- a/spec/fixtures/rails51/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/inflections.rb b/spec/fixtures/rails51/config/initializers/inflections.rb deleted file mode 100644 index aa7435fb..00000000 --- a/spec/fixtures/rails51/config/initializers/inflections.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/mime_types.rb b/spec/fixtures/rails51/config/initializers/mime_types.rb deleted file mode 100644 index 6e1d16f0..00000000 --- a/spec/fixtures/rails51/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/initializers/wrap_parameters.rb b/spec/fixtures/rails51/config/initializers/wrap_parameters.rb deleted file mode 100644 index 18c38252..00000000 --- a/spec/fixtures/rails51/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails51/config/locales/en.yml b/spec/fixtures/rails51/config/locales/en.yml deleted file mode 100644 index decc5a85..00000000 --- a/spec/fixtures/rails51/config/locales/en.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# The following keys must be escaped otherwise they will not be retrieved by -# the default I18n backend: -# -# true, false, on, off, yes, no -# -# Instead, surround them with single quotes. -# -# en: -# 'true': 'foo' -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/spec/fixtures/rails51/config/puma.rb b/spec/fixtures/rails51/config/puma.rb deleted file mode 100644 index 3ea935c1..00000000 --- a/spec/fixtures/rails51/config/puma.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# 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. -# -threads_count = ENV.fetch("RAILS_MAX_THREADS", 5) -threads threads_count, threads_count - -# 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 number of `workers` to boot in clustered mode. -# Workers are forked webserver 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. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. -# -# preload_app! - -# If you are preloading your application and using Active Record, it's -# recommended that you close any connections to the database before workers -# are forked to prevent connection leakage. -# -# before_fork do -# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) -# end - -# The code in the `on_worker_boot` will be called if you are using -# clustered mode by specifying a number of `workers`. After each worker -# process is booted, this block will be run. If you are using the `preload_app!` -# option, you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, as Ruby -# cannot share connections between processes. -# -# on_worker_boot do -# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -# end -# - -# Allow puma to be restarted by `rails restart` command. -plugin :tmp_restart diff --git a/spec/fixtures/rails51/config/routes.rb b/spec/fixtures/rails51/config/routes.rb deleted file mode 100644 index 6bf1218e..00000000 --- a/spec/fixtures/rails51/config/routes.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -Rails.application.routes.draw do - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html -end diff --git a/spec/fixtures/rails51/config/secrets.yml b/spec/fixtures/rails51/config/secrets.yml deleted file mode 100644 index ce38993f..00000000 --- a/spec/fixtures/rails51/config/secrets.yml +++ /dev/null @@ -1,32 +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 `rails secret` to generate a secure secret key. - -# Make sure the secrets in this file are kept private -# if you're sharing your code publicly. - -# Shared secrets are available across all environments. - -# shared: -# api_key: a1B2c3D4e5F6 - -# Environmental secrets are only available for that specific environment. - -development: - secret_key_base: af5bb48e3a90b938d2aeaf8afd214eb048a2914b0e3b6aeb01633048e29fbd36891ecdb3973a14b66544c86e460065fc0b7a5bc945cdc885c1149c7d36c8f764 - -test: - secret_key_base: 46f5f95eca19f28e3c1b8370b070c96fd1f2f62b817fad9e6b51e95944dba1171ea3c3d96e92106ed3f0e59c288ee259b05efbc44632636857aeb40ffe2ece7e - -# Do not keep production secrets in the unencrypted secrets file. -# Instead, either read values from the environment. -# Or, use `bin/rails secrets:setup` to configure encrypted secrets -# and move the `production:` environment over there. - -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/spec/fixtures/rails51/db/migrate/20181024130108_create_users.rb b/spec/fixtures/rails51/db/migrate/20181024130108_create_users.rb deleted file mode 100644 index 2b5b822b..00000000 --- a/spec/fixtures/rails51/db/migrate/20181024130108_create_users.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -class CreateUsers < ActiveRecord::Migration[5.1] - def change - create_table :users do |t| - t.string :name - - t.timestamps - end - end -end diff --git a/spec/fixtures/rails51/db/schema.rb b/spec/fixtures/rails51/db/schema.rb deleted file mode 100644 index 8bb85b8f..00000000 --- a/spec/fixtures/rails51/db/schema.rb +++ /dev/null @@ -1,21 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 20181024130108) do - - create_table "users", force: :cascade do |t| - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - -end diff --git a/spec/fixtures/rails51/db/seeds.rb b/spec/fixtures/rails51/db/seeds.rb deleted file mode 100644 index 8744e3c5..00000000 --- a/spec/fixtures/rails51/db/seeds.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). -# -# Examples: -# -# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) -# Character.create(name: 'Luke', movie: movies.first) diff --git a/spec/fixtures/rails51/lib/assets/.keep b/spec/fixtures/rails51/lib/assets/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/lib/tasks/.keep b/spec/fixtures/rails51/lib/tasks/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/log/.keep b/spec/fixtures/rails51/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/package.json b/spec/fixtures/rails51/package.json deleted file mode 100644 index 3d33606a..00000000 --- a/spec/fixtures/rails51/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "rails51", - "private": true, - "dependencies": {} -} diff --git a/spec/fixtures/rails51/public/404.html b/spec/fixtures/rails51/public/404.html deleted file mode 100644 index 2be3af26..00000000 --- a/spec/fixtures/rails51/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

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

-
-

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

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

The change you wanted was rejected.

-

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

-
-

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

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

We're sorry, but something went wrong.

-
-

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

-
- - diff --git a/spec/fixtures/rails51/public/apple-touch-icon-precomposed.png b/spec/fixtures/rails51/public/apple-touch-icon-precomposed.png deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/public/apple-touch-icon.png b/spec/fixtures/rails51/public/apple-touch-icon.png deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/public/favicon.ico b/spec/fixtures/rails51/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/public/robots.txt b/spec/fixtures/rails51/public/robots.txt deleted file mode 100644 index 37b576a4..00000000 --- a/spec/fixtures/rails51/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/spec/fixtures/rails51/test/application_system_test_case.rb b/spec/fixtures/rails51/test/application_system_test_case.rb deleted file mode 100644 index 93fada67..00000000 --- a/spec/fixtures/rails51/test/application_system_test_case.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -require "test_helper" - -class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -end diff --git a/spec/fixtures/rails51/test/controllers/.keep b/spec/fixtures/rails51/test/controllers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/fixtures/.keep b/spec/fixtures/rails51/test/fixtures/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/fixtures/files/.keep b/spec/fixtures/rails51/test/fixtures/files/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/fixtures/users.yml b/spec/fixtures/rails51/test/fixtures/users.yml deleted file mode 100644 index 56066c68..00000000 --- a/spec/fixtures/rails51/test/fixtures/users.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - name: MyString - -two: - name: MyString diff --git a/spec/fixtures/rails51/test/helpers/.keep b/spec/fixtures/rails51/test/helpers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/integration/.keep b/spec/fixtures/rails51/test/integration/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/mailers/.keep b/spec/fixtures/rails51/test/mailers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/models/.keep b/spec/fixtures/rails51/test/models/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/models/user2_test.rb b/spec/fixtures/rails51/test/models/user2_test.rb deleted file mode 100644 index bcebe28c..00000000 --- a/spec/fixtures/rails51/test/models/user2_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -require 'test_helper' - -class User2Test < ActiveSupport::TestCase - test "the truth" do - User.create - end -end diff --git a/spec/fixtures/rails51/test/models/user_test.rb b/spec/fixtures/rails51/test/models/user_test.rb deleted file mode 100644 index 045d9e14..00000000 --- a/spec/fixtures/rails51/test/models/user_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -require 'test_helper' - -class UserTest < ActiveSupport::TestCase - test "the truth" do - User.create - end -end diff --git a/spec/fixtures/rails51/test/system/.keep b/spec/fixtures/rails51/test/system/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails51/test/test_helper.rb b/spec/fixtures/rails51/test/test_helper.rb deleted file mode 100644 index 562b8c12..00000000 --- a/spec/fixtures/rails51/test/test_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../config/environment', __dir__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/spec/fixtures/rails51/vendor/.keep b/spec/fixtures/rails51/vendor/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/.gitignore b/spec/fixtures/rails52/.gitignore deleted file mode 100644 index 81452db9..00000000 --- a/spec/fixtures/rails52/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - -# Ignore uploaded files in development -/storage/* -!/storage/.keep - -/node_modules -/yarn-error.log - -/public/assets -.byebug_history - -# Ignore master key for decrypting credentials and more. -/config/master.key diff --git a/spec/fixtures/rails52/.ruby-version b/spec/fixtures/rails52/.ruby-version deleted file mode 100644 index a4db534a..00000000 --- a/spec/fixtures/rails52/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.5.3 \ No newline at end of file diff --git a/spec/fixtures/rails52/Gemfile b/spec/fixtures/rails52/Gemfile deleted file mode 100644 index 34b52d99..00000000 --- a/spec/fixtures/rails52/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -source 'https://rubygems.org' - -gem 'rails', '5.2.1' -gem 'sqlite3' -gem 'tzinfo-data' -gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails52/Gemfile.lock b/spec/fixtures/rails52/Gemfile.lock deleted file mode 100644 index 16f228f8..00000000 --- a/spec/fixtures/rails52/Gemfile.lock +++ /dev/null @@ -1,132 +0,0 @@ -PATH - remote: ../../.. - specs: - parallel_tests (3.4.0) - parallel - -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.2.1) - actionpack (= 5.2.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.1) - actionview (= 5.2.1) - activesupport (= 5.2.1) - rack (~> 2.0) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.1) - activesupport (= 5.2.1) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.1) - activesupport (= 5.2.1) - globalid (>= 0.3.6) - activemodel (5.2.1) - activesupport (= 5.2.1) - activerecord (5.2.1) - activemodel (= 5.2.1) - activesupport (= 5.2.1) - arel (>= 9.0) - activestorage (5.2.1) - actionpack (= 5.2.1) - activerecord (= 5.2.1) - marcel (~> 0.3.1) - activesupport (5.2.1) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (9.0.0) - builder (3.2.3) - concurrent-ruby (1.0.5) - crass (1.0.4) - erubi (1.7.1) - globalid (0.4.1) - activesupport (>= 4.2.0) - i18n (1.1.1) - concurrent-ruby (~> 1.0) - loofah (2.2.2) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - method_source (0.9.0) - mimemagic (0.3.2) - mini_mime (1.0.1) - mini_portile2 (2.3.0) - minitest (5.11.3) - nio4r (2.3.1) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) - parallel (1.20.1) - rack (2.0.5) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.1) - actioncable (= 5.2.1) - actionmailer (= 5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) - activemodel (= 5.2.1) - activerecord (= 5.2.1) - activestorage (= 5.2.1) - activesupport (= 5.2.1) - bundler (>= 1.3.0) - railties (= 5.2.1) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.2.1) - actionpack (= 5.2.1) - activesupport (= 5.2.1) - method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rake (12.3.1) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.3.13) - thor (0.20.0) - thread_safe (0.3.6) - tzinfo (1.2.5) - thread_safe (~> 0.1) - tzinfo-data (1.2019.3) - tzinfo (>= 1.0.0) - websocket-driver (0.7.0) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - -PLATFORMS - ruby - -DEPENDENCIES - parallel_tests! - rails (= 5.2.1) - sqlite3 - tzinfo-data - -BUNDLED WITH - 2.1.4 diff --git a/spec/fixtures/rails52/README.md b/spec/fixtures/rails52/README.md deleted file mode 100644 index 7db80e4c..00000000 --- a/spec/fixtures/rails52/README.md +++ /dev/null @@ -1,24 +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 - -* ... diff --git a/spec/fixtures/rails52/Rakefile b/spec/fixtures/rails52/Rakefile deleted file mode 100644 index 84f2bc39..00000000 --- a/spec/fixtures/rails52/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/app/assets/config/manifest.js b/spec/fixtures/rails52/app/assets/config/manifest.js deleted file mode 100644 index b16e53d6..00000000 --- a/spec/fixtures/rails52/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/spec/fixtures/rails52/app/assets/images/.keep b/spec/fixtures/rails52/app/assets/images/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/app/assets/javascripts/application.js b/spec/fixtures/rails52/app/assets/javascripts/application.js deleted file mode 100644 index 82e6f0f6..00000000 --- a/spec/fixtures/rails52/app/assets/javascripts/application.js +++ /dev/null @@ -1,16 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's -// vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. JavaScript code in this file should be added after the last require_* statement. -// -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require rails-ujs -//= require activestorage -//= require turbolinks -//= require_tree . diff --git a/spec/fixtures/rails52/app/assets/javascripts/cable.js b/spec/fixtures/rails52/app/assets/javascripts/cable.js deleted file mode 100644 index 739aa5f0..00000000 --- a/spec/fixtures/rails52/app/assets/javascripts/cable.js +++ /dev/null @@ -1,13 +0,0 @@ -// Action Cable provides the framework to deal with WebSockets in Rails. -// You can generate new channels where WebSocket features live using the `rails generate channel` command. -// -//= require action_cable -//= require_self -//= require_tree ./channels - -(function() { - this.App || (this.App = {}); - - App.cable = ActionCable.createConsumer(); - -}).call(this); diff --git a/spec/fixtures/rails52/app/assets/javascripts/channels/.keep b/spec/fixtures/rails52/app/assets/javascripts/channels/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/app/assets/stylesheets/application.css b/spec/fixtures/rails52/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f5..00000000 --- a/spec/fixtures/rails52/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/spec/fixtures/rails52/app/channels/application_cable/channel.rb b/spec/fixtures/rails52/app/channels/application_cable/channel.rb deleted file mode 100644 index 51e3e936..00000000 --- a/spec/fixtures/rails52/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/spec/fixtures/rails52/app/channels/application_cable/connection.rb b/spec/fixtures/rails52/app/channels/application_cable/connection.rb deleted file mode 100644 index fa70319d..00000000 --- a/spec/fixtures/rails52/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/spec/fixtures/rails52/app/controllers/application_controller.rb b/spec/fixtures/rails52/app/controllers/application_controller.rb deleted file mode 100644 index e0491348..00000000 --- a/spec/fixtures/rails52/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -class ApplicationController < ActionController::Base -end diff --git a/spec/fixtures/rails52/app/controllers/concerns/.keep b/spec/fixtures/rails52/app/controllers/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/app/helpers/application_helper.rb b/spec/fixtures/rails52/app/helpers/application_helper.rb deleted file mode 100644 index 71249b93..00000000 --- a/spec/fixtures/rails52/app/helpers/application_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -module ApplicationHelper -end diff --git a/spec/fixtures/rails52/app/jobs/application_job.rb b/spec/fixtures/rails52/app/jobs/application_job.rb deleted file mode 100644 index 32fe70b8..00000000 --- a/spec/fixtures/rails52/app/jobs/application_job.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -class ApplicationJob < ActiveJob::Base -end diff --git a/spec/fixtures/rails52/app/mailers/application_mailer.rb b/spec/fixtures/rails52/app/mailers/application_mailer.rb deleted file mode 100644 index 24289009..00000000 --- a/spec/fixtures/rails52/app/mailers/application_mailer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -class ApplicationMailer < ActionMailer::Base - default from: 'from@example.com' - layout 'mailer' -end diff --git a/spec/fixtures/rails52/app/models/application_record.rb b/spec/fixtures/rails52/app/models/application_record.rb deleted file mode 100644 index 767a072b..00000000 --- a/spec/fixtures/rails52/app/models/application_record.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true -end diff --git a/spec/fixtures/rails52/app/models/concerns/.keep b/spec/fixtures/rails52/app/models/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/app/models/user.rb b/spec/fixtures/rails52/app/models/user.rb deleted file mode 100644 index b161db0c..00000000 --- a/spec/fixtures/rails52/app/models/user.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true -class User < ApplicationRecord -end diff --git a/spec/fixtures/rails52/app/views/layouts/application.html.erb b/spec/fixtures/rails52/app/views/layouts/application.html.erb deleted file mode 100644 index 318a1529..00000000 --- a/spec/fixtures/rails52/app/views/layouts/application.html.erb +++ /dev/null @@ -1,15 +0,0 @@ - - - - Rails52 - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> - - - - <%= yield %> - - diff --git a/spec/fixtures/rails52/app/views/layouts/mailer.html.erb b/spec/fixtures/rails52/app/views/layouts/mailer.html.erb deleted file mode 100644 index cbd34d2e..00000000 --- a/spec/fixtures/rails52/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/spec/fixtures/rails52/app/views/layouts/mailer.text.erb b/spec/fixtures/rails52/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bddb..00000000 --- a/spec/fixtures/rails52/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/spec/fixtures/rails52/bin/bundle b/spec/fixtures/rails52/bin/bundle deleted file mode 100755 index 74a18868..00000000 --- a/spec/fixtures/rails52/bin/bundle +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -load Gem.bin_path('bundler', 'bundle') diff --git a/spec/fixtures/rails52/bin/rails b/spec/fixtures/rails52/bin/rails deleted file mode 100755 index dd027b40..00000000 --- a/spec/fixtures/rails52/bin/rails +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/spec/fixtures/rails52/bin/rake b/spec/fixtures/rails52/bin/rake deleted file mode 100755 index 609af747..00000000 --- a/spec/fixtures/rails52/bin/rake +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/spec/fixtures/rails52/bin/setup b/spec/fixtures/rails52/bin/setup deleted file mode 100755 index e876cef4..00000000 --- a/spec/fixtures/rails52/bin/setup +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require 'fileutils' -include FileUtils # rubocop:disable Style/MixinUsage - -# path to your application root. -APP_ROOT = File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') - - # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' - # end - - puts "\n== Preparing database ==" - system! 'bin/rails db:setup' - - 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/spec/fixtures/rails52/bin/update b/spec/fixtures/rails52/bin/update deleted file mode 100755 index 4cc53024..00000000 --- a/spec/fixtures/rails52/bin/update +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require 'fileutils' -include FileUtils # rubocop:disable Style/MixinUsage - -# path to your application root. -APP_ROOT = File.expand_path('..', __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a way to update your development environment automatically. - # Add necessary update steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') - - puts "\n== Updating database ==" - system! 'bin/rails db:migrate' - - 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/spec/fixtures/rails52/bin/yarn b/spec/fixtures/rails52/bin/yarn deleted file mode 100755 index d5619dbd..00000000 --- a/spec/fixtures/rails52/bin/yarn +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -APP_ROOT = File.expand_path('..', __dir__) -Dir.chdir(APP_ROOT) do - begin - exec "yarnpkg", *ARGV - rescue Errno::ENOENT - warn "Yarn executable was not detected in the system." - warn "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 - end -end diff --git a/spec/fixtures/rails52/config.ru b/spec/fixtures/rails52/config.ru deleted file mode 100644 index 7eae2644..00000000 --- a/spec/fixtures/rails52/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# This file is used by Rack-based servers to start the application. - -require_relative 'config/environment' - -run Rails.application diff --git a/spec/fixtures/rails52/config/application.rb b/spec/fixtures/rails52/config/application.rb deleted file mode 100644 index 5cccc17d..00000000 --- a/spec/fixtures/rails52/config/application.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -require_relative 'boot' - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module Rails52 - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.2 - - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers - # -- all .rb files in that directory are automatically loaded after loading - # the framework and any gems in your application. - end -end diff --git a/spec/fixtures/rails52/config/boot.rb b/spec/fixtures/rails52/config/boot.rb deleted file mode 100644 index 9be337a4..00000000 --- a/spec/fixtures/rails52/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/fixtures/rails52/config/cable.yml b/spec/fixtures/rails52/config/cable.yml deleted file mode 100644 index 71933205..00000000 --- a/spec/fixtures/rails52/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: async - -production: - adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: rails52_production diff --git a/spec/fixtures/rails52/config/credentials.yml.enc b/spec/fixtures/rails52/config/credentials.yml.enc deleted file mode 100644 index a8d1858a..00000000 --- a/spec/fixtures/rails52/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -56tStLZJJzxR8hQ5NcvwzMWuLGRc8y4/pk141nnv0DdNlD8uQRYIsm/YkpxJyoU3tyY1/IcdqmVU0JAUkvvaW1+RrwjtF7O0S2YSGxQ/HW0qzIFMt3BmkP3ECmdDGi5nXhRDMUNrQZdQs+aPhRhQB8eKklFeuC8ayKNPWgAzs2UW96TW0/kTHCIi4VNje3fjEPAF6yDXDUBr6RKUXFEJdWMMxSYr1CDEQKOQHj8HET+fRQG08qvpN7BDsv4Uvg8ijO4i1wTabfM1PRGbtw1wFeZzDvOIz58JCqA1ZbgsY4eDGZgpDVx+TT2fuFsG8utWoj7zgsNdNJoYNWsKD/Q1uEgJTDHq2FEdkesJ8gT5XhcfvkuUcwQloEGazeiTQKQ6qGmK8ieZf8HyRGicNsC3/rbHVKk2Zovipvlx--LQpkmklfLtm6EHJQ--I2YLoXnjDTX72UEv1cgHog== \ No newline at end of file diff --git a/spec/fixtures/rails52/config/database.yml b/spec/fixtures/rails52/config/database.yml deleted file mode 100644 index faeb9456..00000000 --- a/spec/fixtures/rails52/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: 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<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/spec/fixtures/rails52/config/environment.rb b/spec/fixtures/rails52/config/environment.rb deleted file mode 100644 index 12ea62f8..00000000 --- a/spec/fixtures/rails52/config/environment.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# Load the Rails application. -require_relative 'application' - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/spec/fixtures/rails52/config/environments/development.rb b/spec/fixtures/rails52/config/environments/development.rb deleted file mode 100644 index a61361fe..00000000 --- a/spec/fixtures/rails52/config/environments/development.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable/disable caching. By default caching is disabled. - # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp', 'caching-dev.txt').exist? - config.action_controller.perform_caching = true - - config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}" - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Store uploaded files on the local file system (see config/storage.yml for options) - config.active_storage.service = :local - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - config.action_mailer.perform_caching = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Highlight code that triggered database queries in logs. - config.active_record.verbose_query_logs = true - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true - - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker -end diff --git a/spec/fixtures/rails52/config/environments/production.rb b/spec/fixtures/rails52/config/environments/production.rb deleted file mode 100644 index fb40a27a..00000000 --- a/spec/fixtures/rails52/config/environments/production.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true -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 JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # 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 - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # Prepend all log lines with the following tags. - config.log_tags = [:request_id] - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Use a real queuing backend for Active Job (and separate queues per environment) - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "rails52_#{Rails.env}" - - 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 - - # 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 -end diff --git a/spec/fixtures/rails52/config/environments/test.rb b/spec/fixtures/rails52/config/environments/test.rb deleted file mode 100644 index 79de6da3..00000000 --- a/spec/fixtures/rails52/config/environments/test.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -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 = 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 - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Store uploaded files on the local file system in a temporary directory - config.active_storage.service = :test - - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/fixtures/rails52/config/initializers/application_controller_renderer.rb b/spec/fixtures/rails52/config/initializers/application_controller_renderer.rb deleted file mode 100644 index f4556db3..00000000 --- a/spec/fixtures/rails52/config/initializers/application_controller_renderer.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/assets.rb b/spec/fixtures/rails52/config/initializers/assets.rb deleted file mode 100644 index b6970c9e..00000000 --- a/spec/fixtures/rails52/config/initializers/assets.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/spec/fixtures/rails52/config/initializers/backtrace_silencers.rb b/spec/fixtures/rails52/config/initializers/backtrace_silencers.rb deleted file mode 100644 index d0f0d3b5..00000000 --- a/spec/fixtures/rails52/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/content_security_policy.rb b/spec/fixtures/rails52/config/initializers/content_security_policy.rb deleted file mode 100644 index 497f5667..00000000 --- a/spec/fixtures/rails52/config/initializers/content_security_policy.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Be sure to restart your server when you modify this file. - -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy - -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https - -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" -# end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/spec/fixtures/rails52/config/initializers/cookies_serializer.rb b/spec/fixtures/rails52/config/initializers/cookies_serializer.rb deleted file mode 100644 index 2a729595..00000000 --- a/spec/fixtures/rails52/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/filter_parameter_logging.rb b/spec/fixtures/rails52/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index b7fe1231..00000000 --- a/spec/fixtures/rails52/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/inflections.rb b/spec/fixtures/rails52/config/initializers/inflections.rb deleted file mode 100644 index aa7435fb..00000000 --- a/spec/fixtures/rails52/config/initializers/inflections.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/mime_types.rb b/spec/fixtures/rails52/config/initializers/mime_types.rb deleted file mode 100644 index 6e1d16f0..00000000 --- a/spec/fixtures/rails52/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/initializers/wrap_parameters.rb b/spec/fixtures/rails52/config/initializers/wrap_parameters.rb deleted file mode 100644 index 18c38252..00000000 --- a/spec/fixtures/rails52/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true -# 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/spec/fixtures/rails52/config/locales/en.yml b/spec/fixtures/rails52/config/locales/en.yml deleted file mode 100644 index decc5a85..00000000 --- a/spec/fixtures/rails52/config/locales/en.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# The following keys must be escaped otherwise they will not be retrieved by -# the default I18n backend: -# -# true, false, on, off, yes, no -# -# Instead, surround them with single quotes. -# -# en: -# 'true': 'foo' -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/spec/fixtures/rails52/config/puma.rb b/spec/fixtures/rails52/config/puma.rb deleted file mode 100644 index d05463a0..00000000 --- a/spec/fixtures/rails52/config/puma.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# 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. -# -threads_count = ENV.fetch("RAILS_MAX_THREADS", 5) -threads threads_count, threads_count - -# 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 number of `workers` to boot in clustered mode. -# Workers are forked webserver 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/spec/fixtures/rails52/config/routes.rb b/spec/fixtures/rails52/config/routes.rb deleted file mode 100644 index 6bf1218e..00000000 --- a/spec/fixtures/rails52/config/routes.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true -Rails.application.routes.draw do - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html -end diff --git a/spec/fixtures/rails52/config/storage.yml b/spec/fixtures/rails52/config/storage.yml deleted file mode 100644 index d32f76e8..00000000 --- a/spec/fixtures/rails52/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-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/spec/fixtures/rails52/db/migrate/20181024130151_create_users.rb b/spec/fixtures/rails52/db/migrate/20181024130151_create_users.rb deleted file mode 100644 index 55b4dfea..00000000 --- a/spec/fixtures/rails52/db/migrate/20181024130151_create_users.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -class CreateUsers < ActiveRecord::Migration[5.2] - def change - create_table :users do |t| - t.string :name - - t.timestamps - end - end -end diff --git a/spec/fixtures/rails52/db/schema.rb b/spec/fixtures/rails52/db/schema.rb deleted file mode 100644 index 73324569..00000000 --- a/spec/fixtures/rails52/db/schema.rb +++ /dev/null @@ -1,21 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 2018_10_24_130151) do - - create_table "users", force: :cascade do |t| - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - -end diff --git a/spec/fixtures/rails52/db/seeds.rb b/spec/fixtures/rails52/db/seeds.rb deleted file mode 100644 index 8744e3c5..00000000 --- a/spec/fixtures/rails52/db/seeds.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). -# -# Examples: -# -# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) -# Character.create(name: 'Luke', movie: movies.first) diff --git a/spec/fixtures/rails52/lib/assets/.keep b/spec/fixtures/rails52/lib/assets/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/lib/tasks/.keep b/spec/fixtures/rails52/lib/tasks/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/log/.keep b/spec/fixtures/rails52/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/package.json b/spec/fixtures/rails52/package.json deleted file mode 100644 index 3a0a0d7c..00000000 --- a/spec/fixtures/rails52/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "rails52", - "private": true, - "dependencies": {} -} diff --git a/spec/fixtures/rails52/public/404.html b/spec/fixtures/rails52/public/404.html deleted file mode 100644 index 2be3af26..00000000 --- a/spec/fixtures/rails52/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

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

-
-

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

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

The change you wanted was rejected.

-

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

-
-

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

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

We're sorry, but something went wrong.

-
-

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

-
- - diff --git a/spec/fixtures/rails52/public/apple-touch-icon-precomposed.png b/spec/fixtures/rails52/public/apple-touch-icon-precomposed.png deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/public/apple-touch-icon.png b/spec/fixtures/rails52/public/apple-touch-icon.png deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/public/favicon.ico b/spec/fixtures/rails52/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/public/robots.txt b/spec/fixtures/rails52/public/robots.txt deleted file mode 100644 index 37b576a4..00000000 --- a/spec/fixtures/rails52/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/spec/fixtures/rails52/storage/.keep b/spec/fixtures/rails52/storage/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/application_system_test_case.rb b/spec/fixtures/rails52/test/application_system_test_case.rb deleted file mode 100644 index 93fada67..00000000 --- a/spec/fixtures/rails52/test/application_system_test_case.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -require "test_helper" - -class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -end diff --git a/spec/fixtures/rails52/test/controllers/.keep b/spec/fixtures/rails52/test/controllers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/fixtures/.keep b/spec/fixtures/rails52/test/fixtures/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/fixtures/files/.keep b/spec/fixtures/rails52/test/fixtures/files/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/fixtures/users.yml b/spec/fixtures/rails52/test/fixtures/users.yml deleted file mode 100644 index 56066c68..00000000 --- a/spec/fixtures/rails52/test/fixtures/users.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - name: MyString - -two: - name: MyString diff --git a/spec/fixtures/rails52/test/helpers/.keep b/spec/fixtures/rails52/test/helpers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/integration/.keep b/spec/fixtures/rails52/test/integration/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/mailers/.keep b/spec/fixtures/rails52/test/mailers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/models/.keep b/spec/fixtures/rails52/test/models/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/models/user2_test.rb b/spec/fixtures/rails52/test/models/user2_test.rb deleted file mode 100644 index bcebe28c..00000000 --- a/spec/fixtures/rails52/test/models/user2_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -require 'test_helper' - -class User2Test < ActiveSupport::TestCase - test "the truth" do - User.create - end -end diff --git a/spec/fixtures/rails52/test/models/user_test.rb b/spec/fixtures/rails52/test/models/user_test.rb deleted file mode 100644 index 045d9e14..00000000 --- a/spec/fixtures/rails52/test/models/user_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -require 'test_helper' - -class UserTest < ActiveSupport::TestCase - test "the truth" do - User.create - end -end diff --git a/spec/fixtures/rails52/test/system/.keep b/spec/fixtures/rails52/test/system/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails52/test/test_helper.rb b/spec/fixtures/rails52/test/test_helper.rb deleted file mode 100644 index 58af4446..00000000 --- a/spec/fixtures/rails52/test/test_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true -ENV['RAILS_ENV'] ||= 'test' -require_relative '../config/environment' -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/spec/fixtures/rails52/vendor/.keep b/spec/fixtures/rails52/vendor/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/rails_spec.rb b/spec/rails_spec.rb index ec799910..487313af 100644 --- a/spec/rails_spec.rb +++ b/spec/rails_spec.rb @@ -13,7 +13,7 @@ def sh(command, options = {}) result end - ['rails51', 'rails52', 'rails60', 'rails61'].each do |rails| + ['rails60', 'rails61'].each do |rails| it "can create and run #{rails}" do skip 'rails fixtures are not set up for java' if RUBY_PLATFORM == "java" From a141c7c5baf8418f204db9db22007fa803526926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:46:53 +0100 Subject: [PATCH 07/13] Drop ruby 2.4 support (and apply new rubocops) --- .github/workflows/test.yml | 4 ++-- .rubocop.yml | 5 ++++- lib/parallel_tests.rb | 18 +++++++-------- lib/parallel_tests/cli.rb | 22 ++++++++----------- parallel_tests.gemspec | 2 +- spec/fixtures/rails60/bin/yarn | 12 +++++----- .../config/environments/development.rb | 1 - .../rails60/config/environments/production.rb | 2 +- spec/fixtures/rails60/config/puma.rb | 4 ++-- spec/fixtures/rails61/bin/yarn | 14 ++++++------ .../config/environments/development.rb | 1 - .../rails61/config/environments/production.rb | 2 +- spec/fixtures/rails61/config/puma.rb | 4 ++-- 13 files changed, 42 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44579f9f..2da12d26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,11 +13,11 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '2.6', '2.5', '2.4', head, jruby-head] + ruby: ['2.7', '2.6', '2.5', head, jruby-head] os: [ubuntu-latest, windows-latest] task: [default] include: - - ruby: '2.4' # lowest supported version + - ruby: '2.5' # lowest supported version os: ubuntu-latest task: rubocop env: diff --git a/.rubocop.yml b/.rubocop.yml index 059edea1..67bb29d8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,11 +1,14 @@ AllCops: NewCops: enable - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 SuggestExtensions: false Exclude: - '**/vendor/bundle/**/*' - 'spec/fixtures/*/db/schema.rb' +Style/FrozenStringLiteralComment: + Enabled: false + Style/StringLiterals: Enabled: false diff --git a/lib/parallel_tests.rb b/lib/parallel_tests.rb index 997076e9..84030f86 100644 --- a/lib/parallel_tests.rb +++ b/lib/parallel_tests.rb @@ -23,16 +23,14 @@ def determine_number_of_processes(count) def with_pid_file Tempfile.open('parallel_tests-pidfile') do |f| - begin - ENV['PARALLEL_PID_FILE'] = f.path - # Pids object should be created before threads will start adding pids to it - # Otherwise we would have to use Mutex to prevent creation of several instances - @pids = pids - yield - ensure - ENV['PARALLEL_PID_FILE'] = nil - @pids = nil - end + ENV['PARALLEL_PID_FILE'] = f.path + # Pids object should be created before threads will start adding pids to it + # Otherwise we would have to use Mutex to prevent creation of several instances + @pids = pids + yield + ensure + ENV['PARALLEL_PID_FILE'] = nil + @pids = nil end end diff --git a/lib/parallel_tests/cli.rb b/lib/parallel_tests/cli.rb index 7083bdd5..25f912c9 100644 --- a/lib/parallel_tests/cli.rb +++ b/lib/parallel_tests/cli.rb @@ -105,13 +105,11 @@ def reprint_output(result, lockfile) def lock(lockfile) File.open(lockfile) do |lock| - begin - lock.flock File::LOCK_EX - yield - ensure - # This shouldn't be necessary, but appears to be - lock.flock File::LOCK_UN - end + lock.flock File::LOCK_EX + yield + ensure + # This shouldn't be necessary, but appears to be + lock.flock File::LOCK_UN end end @@ -228,12 +226,10 @@ def parse_options!(argv) opts.on("-e", "--exec [COMMAND]", "execute this code parallel and with ENV['TEST_ENV_NUMBER']") { |path| options[:execute] = path } opts.on("-o", "--test-options '[OPTIONS]'", "execute test commands with those options") { |arg| options[:test_options] = arg.lstrip } opts.on("-t", "--type [TYPE]", "test(default) / rspec / cucumber / spinach") do |type| - begin - @runner = load_runner(type) - rescue NameError, LoadError => e - puts "Runner for `#{type}` type has not been found! (#{e})" - abort - end + @runner = load_runner(type) + rescue NameError, LoadError => e + puts "Runner for `#{type}` type has not been found! (#{e})" + abort end opts.on( "--suffix [PATTERN]", diff --git a/parallel_tests.gemspec b/parallel_tests.gemspec index 4b329e94..b6d5f3f9 100644 --- a/parallel_tests.gemspec +++ b/parallel_tests.gemspec @@ -17,5 +17,5 @@ Gem::Specification.new name, ParallelTests::VERSION do |s| s.license = "MIT" s.executables = ["parallel_spinach", "parallel_cucumber", "parallel_rspec", "parallel_test"] s.add_runtime_dependency "parallel" - s.required_ruby_version = '>= 2.4.0' + s.required_ruby_version = '>= 2.5.0' end diff --git a/spec/fixtures/rails60/bin/yarn b/spec/fixtures/rails60/bin/yarn index 460dd565..b24854dc 100755 --- a/spec/fixtures/rails60/bin/yarn +++ b/spec/fixtures/rails60/bin/yarn @@ -1,11 +1,9 @@ #!/usr/bin/env ruby APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - begin - exec "yarnpkg", *ARGV - rescue Errno::ENOENT - $stderr.puts "Yarn executable was not detected in the system." - $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 - end + exec "yarnpkg", *ARGV +rescue Errno::ENOENT + warn "Yarn executable was not detected in the system." + warn "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 end diff --git a/spec/fixtures/rails60/config/environments/development.rb b/spec/fixtures/rails60/config/environments/development.rb index 0811a164..9d7a59b6 100644 --- a/spec/fixtures/rails60/config/environments/development.rb +++ b/spec/fixtures/rails60/config/environments/development.rb @@ -45,7 +45,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true diff --git a/spec/fixtures/rails60/config/environments/production.rb b/spec/fixtures/rails60/config/environments/production.rb index 8ed39281..db2f9c31 100644 --- a/spec/fixtures/rails60/config/environments/production.rb +++ b/spec/fixtures/rails60/config/environments/production.rb @@ -45,7 +45,7 @@ config.log_level = :debug # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] + config.log_tags = [:request_id] # Use a different cache store in production. # config.cache_store = :mem_cache_store diff --git a/spec/fixtures/rails60/config/puma.rb b/spec/fixtures/rails60/config/puma.rb index 5ed44377..283e163b 100644 --- a/spec/fixtures/rails60/config/puma.rb +++ b/spec/fixtures/rails60/config/puma.rb @@ -4,13 +4,13 @@ # 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 } +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 `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT", 3000) # Specifies the `environment` that Puma will run in. # diff --git a/spec/fixtures/rails61/bin/yarn b/spec/fixtures/rails61/bin/yarn index 9fab2c35..da6c479a 100755 --- a/spec/fixtures/rails61/bin/yarn +++ b/spec/fixtures/rails61/bin/yarn @@ -1,17 +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) } + yarn = ENV["PATH"].split(File::PATH_SEPARATOR) + .reject { |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" + warn "Yarn executable was not detected in the system." + warn "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 end end diff --git a/spec/fixtures/rails61/config/environments/development.rb b/spec/fixtures/rails61/config/environments/development.rb index 3f032e80..afe01ace 100644 --- a/spec/fixtures/rails61/config/environments/development.rb +++ b/spec/fixtures/rails61/config/environments/development.rb @@ -53,7 +53,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/spec/fixtures/rails61/config/environments/production.rb b/spec/fixtures/rails61/config/environments/production.rb index 504e05a8..c2a8df32 100644 --- a/spec/fixtures/rails61/config/environments/production.rb +++ b/spec/fixtures/rails61/config/environments/production.rb @@ -47,7 +47,7 @@ config.log_level = :info # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] + config.log_tags = [:request_id] # Use a different cache store in production. # config.cache_store = :mem_cache_store diff --git a/spec/fixtures/rails61/config/puma.rb b/spec/fixtures/rails61/config/puma.rb index d9b3e836..fa40ee6f 100644 --- a/spec/fixtures/rails61/config/puma.rb +++ b/spec/fixtures/rails61/config/puma.rb @@ -4,7 +4,7 @@ # 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 } +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 @@ -15,7 +15,7 @@ # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT", 3000) # Specifies the `environment` that Puma will run in. # From 5cc7997869852e74475a5ee261ef4a7bf20143a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:47:21 +0100 Subject: [PATCH 08/13] Test against ruby 3.0 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2da12d26..b68b0b66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '2.6', '2.5', head, jruby-head] + ruby: ['3.0', '2.7', '2.6', '2.5', head, jruby-head] os: [ubuntu-latest, windows-latest] task: [default] include: From 835ba2fbfa59d2e2add9fb81bc1d7dd36a366207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 11:50:26 +0100 Subject: [PATCH 09/13] Add a changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4187d54c..968097a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ - None +### Dependencies + +- Drop ruby 2.4 support. + # Changelog ## v3.5.1 - 2021-03-07 From 9cf1521f719d09a9d385df409d4546a281f910e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 12:20:45 +0100 Subject: [PATCH 10/13] bundle update cucumber --- Gemfile.lock | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6aab9727..8cf57cbd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,37 +18,41 @@ GEM bump (0.9.0) colorize (0.8.1) concurrent-ruby (1.1.8) - cucumber (4.0.0) + cucumber (4.1.0) builder (~> 3.2, >= 3.2.3) - cucumber-core (~> 7.0, >= 7.0.0) + cucumber-core (~> 7.1, >= 7.1.0) + cucumber-create-meta (~> 1.0.0, >= 1.0.0) cucumber-cucumber-expressions (~> 10.1, >= 10.1.0) - cucumber-gherkin (~> 13.0, >= 13.0.0) - cucumber-html-formatter (~> 6.0, >= 6.0.1) - cucumber-messages (~> 12.1, >= 12.1.1) - cucumber-wire (~> 3.0, >= 3.0.0) - diff-lcs (~> 1.3, >= 1.3) + cucumber-gherkin (~> 14.0, >= 14.0.1) + cucumber-html-formatter (~> 7.0, >= 7.0.0) + cucumber-messages (~> 12.2, >= 12.2.0) + cucumber-wire (~> 3.1, >= 3.1.0) + diff-lcs (~> 1.3, >= 1.3, < 1.4) multi_test (~> 0.1, >= 0.1.2) sys-uname (~> 1.0, >= 1.0.2) - cucumber-core (7.0.0) - cucumber-gherkin (~> 13.0, >= 13.0.0) - cucumber-messages (~> 12.1, >= 12.1.1) + cucumber-core (7.1.0) + cucumber-gherkin (~> 14.0, >= 14.0.1) + cucumber-messages (~> 12.2, >= 12.2.0) cucumber-tag-expressions (~> 2.0, >= 2.0.4) - cucumber-cucumber-expressions (10.2.0) - cucumber-gherkin (13.0.0) - cucumber-messages (~> 12.0, >= 12.0.0) - cucumber-html-formatter (6.0.2) - cucumber-messages (~> 12.1, >= 12.1.1) + cucumber-create-meta (1.0.0) + cucumber-messages (~> 12.2, >= 12.2.0) + sys-uname (~> 1.2, >= 1.2.1) + cucumber-cucumber-expressions (10.3.0) + cucumber-gherkin (14.2.0) + cucumber-messages (~> 12.4, >= 12.4.0) + cucumber-html-formatter (7.2.0) + cucumber-messages (~> 12.4, >= 12.4.0) cucumber-messages (12.4.0) protobuf-cucumber (~> 3.10, >= 3.10.8) cucumber-tag-expressions (2.0.4) - cucumber-wire (3.0.0) - cucumber-core (~> 7.0, >= 7.0.0) + cucumber-wire (3.1.0) + cucumber-core (~> 7.1, >= 7.1.0) cucumber-cucumber-expressions (~> 10.1, >= 10.1.0) - cucumber-messages (~> 12.1, >= 12.1.1) + cucumber-messages (~> 12.2, >= 12.2.0) cuke_modeler (3.7.0) cucumber-gherkin (< 18.0) diff-lcs (1.3) - ffi (1.13.1) + ffi (1.15.0) gherkin-ruby (0.3.2) i18n (1.8.9) concurrent-ruby (~> 1.0) @@ -98,8 +102,8 @@ GEM colorize gherkin-ruby (>= 0.3.2) json - sys-uname (1.2.1) - ffi (>= 1.0.0) + sys-uname (1.2.2) + ffi (~> 1.1) test-unit (3.3.6) power_assert thor (1.1.0) @@ -125,4 +129,4 @@ DEPENDENCIES test-unit BUNDLED WITH - 2.1.4 + 2.2.15 From 51622e28d20fdfbb9739fa370aaaf09d8753532d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 14:11:31 +0100 Subject: [PATCH 11/13] Add windows to lockfiles Through `bundle lock --add-platform x64-mingw32`. Favor that over `force_ruby_platform`. --- spec/fixtures/rails60/Gemfile.lock | 3 +++ spec/fixtures/rails61/Gemfile.lock | 3 +++ spec/rails_spec.rb | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/fixtures/rails60/Gemfile.lock b/spec/fixtures/rails60/Gemfile.lock index a43d1766..675ca2cc 100644 --- a/spec/fixtures/rails60/Gemfile.lock +++ b/spec/fixtures/rails60/Gemfile.lock @@ -82,6 +82,8 @@ GEM mini_mime (1.0.2) minitest (5.14.4) nio4r (2.5.7) + nokogiri (1.11.2-x64-mingw32) + racc (~> 1.4) nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) parallel (1.20.1) @@ -136,6 +138,7 @@ GEM zeitwerk (2.4.2) PLATFORMS + x64-mingw32 x86_64-linux DEPENDENCIES diff --git a/spec/fixtures/rails61/Gemfile.lock b/spec/fixtures/rails61/Gemfile.lock index 173e5bcf..3b21e3cf 100644 --- a/spec/fixtures/rails61/Gemfile.lock +++ b/spec/fixtures/rails61/Gemfile.lock @@ -86,6 +86,8 @@ GEM mini_mime (1.0.2) minitest (5.14.4) nio4r (2.5.7) + nokogiri (1.11.2-x64-mingw32) + racc (~> 1.4) nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) parallel (1.20.1) @@ -139,6 +141,7 @@ GEM zeitwerk (2.4.2) PLATFORMS + x64-mingw32 x86_64-linux DEPENDENCIES diff --git a/spec/rails_spec.rb b/spec/rails_spec.rb index 487313af..e7364052 100644 --- a/spec/rails_spec.rb +++ b/spec/rails_spec.rb @@ -24,7 +24,6 @@ def sh(command, options = {}) ENV.delete("RACK_ENV") sh "bundle config --local path vendor/bundle" - sh "bundle config --local force_ruby_platform true" sh "bundle install" sh "rm -rf db/*.sqlite3" sh "bundle exec rake db:setup parallel:create --trace 2>&1" From 7dffc414d24334a6a129c0404eed479853bd108c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 17:22:38 +0100 Subject: [PATCH 12/13] Don't use builtin Rails parallelization --- spec/fixtures/rails60/test/test_helper.rb | 3 --- spec/fixtures/rails61/test/test_helper.rb | 3 --- 2 files changed, 6 deletions(-) diff --git a/spec/fixtures/rails60/test/test_helper.rb b/spec/fixtures/rails60/test/test_helper.rb index d5300f88..3ab84e3d 100644 --- a/spec/fixtures/rails60/test/test_helper.rb +++ b/spec/fixtures/rails60/test/test_helper.rb @@ -3,9 +3,6 @@ require 'rails/test_help' class ActiveSupport::TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all diff --git a/spec/fixtures/rails61/test/test_helper.rb b/spec/fixtures/rails61/test/test_helper.rb index 47b598de..e9f0b367 100644 --- a/spec/fixtures/rails61/test/test_helper.rb +++ b/spec/fixtures/rails61/test/test_helper.rb @@ -3,9 +3,6 @@ require "rails/test_help" class ActiveSupport::TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all From b3e9c652ae9bdbff2834ba76b0cb08188fe58e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Mar 2021 17:27:50 +0100 Subject: [PATCH 13/13] Remove activestorage to not pull mimemagic --- spec/fixtures/rails60/.gitignore | 3 -- spec/fixtures/rails60/Gemfile | 14 +++++- spec/fixtures/rails60/Gemfile.lock | 47 ++++-------------- .../app/javascript/packs/application.js | 1 - spec/fixtures/rails60/config/application.rb | 6 +-- .../config/environments/development.rb | 3 -- .../rails60/config/environments/production.rb | 3 -- .../rails60/config/environments/test.rb | 3 -- spec/fixtures/rails60/config/storage.yml | 34 ------------- spec/fixtures/rails60/package.json | 1 - spec/fixtures/rails60/storage/.keep | 0 spec/fixtures/rails61/.gitignore | 3 -- spec/fixtures/rails61/Gemfile | 14 +++++- spec/fixtures/rails61/Gemfile.lock | 49 ++++--------------- .../app/javascript/packs/application.js | 2 - spec/fixtures/rails61/config/application.rb | 6 +-- .../config/environments/development.rb | 3 -- .../rails61/config/environments/production.rb | 3 -- .../rails61/config/environments/test.rb | 3 -- spec/fixtures/rails61/config/storage.yml | 34 ------------- spec/fixtures/rails61/package.json | 1 - spec/fixtures/rails61/storage/.keep | 0 22 files changed, 52 insertions(+), 181 deletions(-) delete mode 100644 spec/fixtures/rails60/config/storage.yml delete mode 100644 spec/fixtures/rails60/storage/.keep delete mode 100644 spec/fixtures/rails61/config/storage.yml delete mode 100644 spec/fixtures/rails61/storage/.keep diff --git a/spec/fixtures/rails60/.gitignore b/spec/fixtures/rails60/.gitignore index a7c1e90f..3fd725c8 100644 --- a/spec/fixtures/rails60/.gitignore +++ b/spec/fixtures/rails60/.gitignore @@ -23,9 +23,6 @@ !/tmp/pids/ !/tmp/pids/.keep -# Ignore uploaded files in development. -/storage/* -!/storage/.keep /public/assets .byebug_history diff --git a/spec/fixtures/rails60/Gemfile b/spec/fixtures/rails60/Gemfile index 0ea049b2..75e568a2 100644 --- a/spec/fixtures/rails60/Gemfile +++ b/spec/fixtures/rails60/Gemfile @@ -1,7 +1,19 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'rails', '6.0.3' +rails_version = '6.0.3' + +gem 'actioncable', rails_version +gem 'actionmailer', rails_version +gem 'actionpack', rails_version +gem 'actionview', rails_version +gem 'activejob', rails_version +gem 'activemodel', rails_version +gem 'activerecord', rails_version +gem 'activesupport', rails_version +gem 'railties', rails_version +gem 'sprockets-rails' + gem 'sqlite3' gem 'tzinfo-data' gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails60/Gemfile.lock b/spec/fixtures/rails60/Gemfile.lock index 675ca2cc..e27df67c 100644 --- a/spec/fixtures/rails60/Gemfile.lock +++ b/spec/fixtures/rails60/Gemfile.lock @@ -11,13 +11,6 @@ GEM actionpack (= 6.0.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) - mail (>= 2.7.1) actionmailer (6.0.3) actionpack (= 6.0.3) actionview (= 6.0.3) @@ -31,12 +24,6 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3) - actionpack (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) - nokogiri (>= 1.8.5) actionview (6.0.3) activesupport (= 6.0.3) builder (~> 3.1) @@ -51,11 +38,6 @@ GEM activerecord (6.0.3) activemodel (= 6.0.3) activesupport (= 6.0.3) - activestorage (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) - marcel (~> 0.3.1) activesupport (6.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) @@ -75,10 +57,7 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.6) mini_mime (1.0.2) minitest (5.14.4) nio4r (2.5.7) @@ -91,21 +70,6 @@ GEM rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.3) - actioncable (= 6.0.3) - actionmailbox (= 6.0.3) - actionmailer (= 6.0.3) - actionpack (= 6.0.3) - actiontext (= 6.0.3) - actionview (= 6.0.3) - activejob (= 6.0.3) - activemodel (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) - bundler (>= 1.3.0) - railties (= 6.0.3) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -142,8 +106,17 @@ PLATFORMS x86_64-linux DEPENDENCIES + actioncable (= 6.0.3) + actionmailer (= 6.0.3) + actionpack (= 6.0.3) + actionview (= 6.0.3) + activejob (= 6.0.3) + activemodel (= 6.0.3) + activerecord (= 6.0.3) + activesupport (= 6.0.3) parallel_tests! - rails (= 6.0.3) + railties (= 6.0.3) + sprockets-rails sqlite3 tzinfo-data diff --git a/spec/fixtures/rails60/app/javascript/packs/application.js b/spec/fixtures/rails60/app/javascript/packs/application.js index 9cd55d4b..28d74208 100644 --- a/spec/fixtures/rails60/app/javascript/packs/application.js +++ b/spec/fixtures/rails60/app/javascript/packs/application.js @@ -5,7 +5,6 @@ require("@rails/ujs").start() require("turbolinks").start() -require("@rails/activestorage").start() require("channels") diff --git a/spec/fixtures/rails60/config/application.rb b/spec/fixtures/rails60/config/application.rb index 2781dd41..c596e99c 100644 --- a/spec/fixtures/rails60/config/application.rb +++ b/spec/fixtures/rails60/config/application.rb @@ -5,11 +5,11 @@ require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" -require "active_storage/engine" +# require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" -require "action_mailbox/engine" -require "action_text/engine" +# require "action_mailbox/engine" +# require "action_text/engine" require "action_view/railtie" require "action_cable/engine" # require "sprockets/railtie" diff --git a/spec/fixtures/rails60/config/environments/development.rb b/spec/fixtures/rails60/config/environments/development.rb index 9d7a59b6..04bd3eeb 100644 --- a/spec/fixtures/rails60/config/environments/development.rb +++ b/spec/fixtures/rails60/config/environments/development.rb @@ -28,9 +28,6 @@ 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 - # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false diff --git a/spec/fixtures/rails60/config/environments/production.rb b/spec/fixtures/rails60/config/environments/production.rb index db2f9c31..08e99c0f 100644 --- a/spec/fixtures/rails60/config/environments/production.rb +++ b/spec/fixtures/rails60/config/environments/production.rb @@ -29,9 +29,6 @@ # 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' diff --git a/spec/fixtures/rails60/config/environments/test.rb b/spec/fixtures/rails60/config/environments/test.rb index 470dee4b..2f62f93c 100644 --- a/spec/fixtures/rails60/config/environments/test.rb +++ b/spec/fixtures/rails60/config/environments/test.rb @@ -30,9 +30,6 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. diff --git a/spec/fixtures/rails60/config/storage.yml b/spec/fixtures/rails60/config/storage.yml deleted file mode 100644 index d32f76e8..00000000 --- a/spec/fixtures/rails60/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-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/spec/fixtures/rails60/package.json b/spec/fixtures/rails60/package.json index 03a6704e..867b0a0f 100644 --- a/spec/fixtures/rails60/package.json +++ b/spec/fixtures/rails60/package.json @@ -4,7 +4,6 @@ "dependencies": { "@rails/ujs": "^6.0.0", "turbolinks": "^5.2.0", - "@rails/activestorage": "^6.0.0", "@rails/actioncable": "^6.0.0" }, "version": "0.1.0" diff --git a/spec/fixtures/rails60/storage/.keep b/spec/fixtures/rails60/storage/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/fixtures/rails61/.gitignore b/spec/fixtures/rails61/.gitignore index 1ac91a25..eb612efd 100644 --- a/spec/fixtures/rails61/.gitignore +++ b/spec/fixtures/rails61/.gitignore @@ -22,9 +22,6 @@ !/tmp/pids/ !/tmp/pids/.keep -# Ignore uploaded files in development. -/storage/* -!/storage/.keep /public/assets .byebug_history diff --git a/spec/fixtures/rails61/Gemfile b/spec/fixtures/rails61/Gemfile index 5098e500..6925c0c6 100644 --- a/spec/fixtures/rails61/Gemfile +++ b/spec/fixtures/rails61/Gemfile @@ -1,7 +1,19 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'rails', '6.1.3' +rails_version = '6.1.3' + +gem 'actioncable', rails_version +gem 'actionmailer', rails_version +gem 'actionpack', rails_version +gem 'actionview', rails_version +gem 'activejob', rails_version +gem 'activemodel', rails_version +gem 'activerecord', rails_version +gem 'activesupport', rails_version +gem 'railties', rails_version +gem 'sprockets-rails' + gem 'sqlite3' gem 'tzinfo-data' gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails61/Gemfile.lock b/spec/fixtures/rails61/Gemfile.lock index 3b21e3cf..f261b956 100644 --- a/spec/fixtures/rails61/Gemfile.lock +++ b/spec/fixtures/rails61/Gemfile.lock @@ -12,13 +12,6 @@ GEM activesupport (= 6.1.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - mail (>= 2.7.1) actionmailer (6.1.3) actionpack (= 6.1.3) actionview (= 6.1.3) @@ -33,12 +26,6 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3) - actionpack (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - nokogiri (>= 1.8.5) actionview (6.1.3) activesupport (= 6.1.3) builder (~> 3.1) @@ -53,13 +40,6 @@ GEM activerecord (6.1.3) activemodel (= 6.1.3) activesupport (= 6.1.3) - activestorage (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activesupport (= 6.1.3) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) activesupport (6.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -79,10 +59,7 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.6) mini_mime (1.0.2) minitest (5.14.4) nio4r (2.5.7) @@ -95,21 +72,6 @@ GEM rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3) - actioncable (= 6.1.3) - actionmailbox (= 6.1.3) - actionmailer (= 6.1.3) - actionpack (= 6.1.3) - actiontext (= 6.1.3) - actionview (= 6.1.3) - activejob (= 6.1.3) - activemodel (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - bundler (>= 1.15.0) - railties (= 6.1.3) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -145,8 +107,17 @@ PLATFORMS x86_64-linux DEPENDENCIES + actioncable (= 6.1.3) + actionmailer (= 6.1.3) + actionpack (= 6.1.3) + actionview (= 6.1.3) + activejob (= 6.1.3) + activemodel (= 6.1.3) + activerecord (= 6.1.3) + activesupport (= 6.1.3) parallel_tests! - rails (= 6.1.3) + railties (= 6.1.3) + sprockets-rails sqlite3 tzinfo-data diff --git a/spec/fixtures/rails61/app/javascript/packs/application.js b/spec/fixtures/rails61/app/javascript/packs/application.js index f710851a..26530c6c 100644 --- a/spec/fixtures/rails61/app/javascript/packs/application.js +++ b/spec/fixtures/rails61/app/javascript/packs/application.js @@ -5,9 +5,7 @@ import Rails from "@rails/ujs" import Turbolinks from "turbolinks" -import * as ActiveStorage from "@rails/activestorage" import "channels" Rails.start() Turbolinks.start() -ActiveStorage.start() diff --git a/spec/fixtures/rails61/config/application.rb b/spec/fixtures/rails61/config/application.rb index 66de9854..d0733391 100644 --- a/spec/fixtures/rails61/config/application.rb +++ b/spec/fixtures/rails61/config/application.rb @@ -5,11 +5,11 @@ require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" -require "active_storage/engine" +# require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" -require "action_mailbox/engine" -require "action_text/engine" +# require "action_mailbox/engine" +# require "action_text/engine" require "action_view/railtie" require "action_cable/engine" # require "sprockets/railtie" diff --git a/spec/fixtures/rails61/config/environments/development.rb b/spec/fixtures/rails61/config/environments/development.rb index afe01ace..e65bd2a7 100644 --- a/spec/fixtures/rails61/config/environments/development.rb +++ b/spec/fixtures/rails61/config/environments/development.rb @@ -30,9 +30,6 @@ 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 - # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false diff --git a/spec/fixtures/rails61/config/environments/production.rb b/spec/fixtures/rails61/config/environments/production.rb index c2a8df32..972a88e4 100644 --- a/spec/fixtures/rails61/config/environments/production.rb +++ b/spec/fixtures/rails61/config/environments/production.rb @@ -31,9 +31,6 @@ # 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' diff --git a/spec/fixtures/rails61/config/environments/test.rb b/spec/fixtures/rails61/config/environments/test.rb index 17ce39cf..d66c042f 100644 --- a/spec/fixtures/rails61/config/environments/test.rb +++ b/spec/fixtures/rails61/config/environments/test.rb @@ -32,9 +32,6 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. diff --git a/spec/fixtures/rails61/config/storage.yml b/spec/fixtures/rails61/config/storage.yml deleted file mode 100644 index d32f76e8..00000000 --- a/spec/fixtures/rails61/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-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/spec/fixtures/rails61/package.json b/spec/fixtures/rails61/package.json index ff983b30..672812ed 100644 --- a/spec/fixtures/rails61/package.json +++ b/spec/fixtures/rails61/package.json @@ -4,7 +4,6 @@ "dependencies": { "@rails/ujs": "^6.0.0", "turbolinks": "^5.2.0", - "@rails/activestorage": "^6.0.0", "@rails/actioncable": "^6.0.0" }, "version": "0.1.0" diff --git a/spec/fixtures/rails61/storage/.keep b/spec/fixtures/rails61/storage/.keep deleted file mode 100644 index e69de29b..00000000