From 0ef9eef4974bd075fd42c3e654856a5a62127e34 Mon Sep 17 00:00:00 2001 From: Szymon Fiedler Date: Thu, 2 Jan 2025 21:54:59 +0100 Subject: [PATCH] Dummy Rails 7.2 app --- rails_event_store/spec/dummy_7_2/Gemfile | 14 + rails_event_store/spec/dummy_7_2/Gemfile.lock | 253 ++++++++++++++++++ rails_event_store/spec/dummy_7_2/Rakefile | 6 + rails_event_store/spec/dummy_7_2/bin/rails | 4 + .../spec/dummy_7_2/config/application.rb | 42 +++ .../spec/dummy_7_2/config/boot.rb | 3 + .../spec/dummy_7_2/config/credentials.yml.enc | 1 + .../spec/dummy_7_2/config/environment.rb | 5 + .../config/environments/development.rb | 65 +++++ .../config/environments/production.rb | 85 ++++++ .../dummy_7_2/config/environments/test.rb | 51 ++++ .../initializers/content_security_policy.rb | 25 ++ .../initializers/filter_parameter_logging.rb | 8 + .../config/initializers/inflections.rb | 16 ++ .../config/initializers/permissions_policy.rb | 13 + .../spec/dummy_7_2/config/locales/en.yml | 31 +++ .../spec/dummy_7_2/config/master.key | 1 + .../spec/dummy_7_2/config/puma.rb | 34 +++ .../spec/dummy_7_2/config/routes.rb | 14 + .../spec/dummy_7_2/test/test_helper.rb | 15 ++ 20 files changed, 686 insertions(+) create mode 100644 rails_event_store/spec/dummy_7_2/Gemfile create mode 100644 rails_event_store/spec/dummy_7_2/Gemfile.lock create mode 100644 rails_event_store/spec/dummy_7_2/Rakefile create mode 100755 rails_event_store/spec/dummy_7_2/bin/rails create mode 100644 rails_event_store/spec/dummy_7_2/config/application.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/boot.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/credentials.yml.enc create mode 100644 rails_event_store/spec/dummy_7_2/config/environment.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/environments/development.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/environments/production.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/environments/test.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/initializers/content_security_policy.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/initializers/filter_parameter_logging.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/initializers/inflections.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/initializers/permissions_policy.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/locales/en.yml create mode 100644 rails_event_store/spec/dummy_7_2/config/master.key create mode 100644 rails_event_store/spec/dummy_7_2/config/puma.rb create mode 100644 rails_event_store/spec/dummy_7_2/config/routes.rb create mode 100644 rails_event_store/spec/dummy_7_2/test/test_helper.rb diff --git a/rails_event_store/spec/dummy_7_2/Gemfile b/rails_event_store/spec/dummy_7_2/Gemfile new file mode 100644 index 0000000000..7ec73f2c6b --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/Gemfile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rails_event_store", path: "../../" +gem "ruby_event_store", path: "../../../ruby_event_store" +gem "ruby_event_store-browser", path: "../../../ruby_event_store-browser" +gem "ruby_event_store-active_record", + path: "../../../ruby_event_store-active_record" +gem "rails_event_store_active_record", + path: "../../../ruby_event_store-active_record" +gem "aggregate_root", path: "../../../aggregate_root" + +gem "rails", "~> 7.2.2", ">= 7.2.2.1" diff --git a/rails_event_store/spec/dummy_7_2/Gemfile.lock b/rails_event_store/spec/dummy_7_2/Gemfile.lock new file mode 100644 index 0000000000..6d10ae1360 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/Gemfile.lock @@ -0,0 +1,253 @@ +PATH + remote: ../../../aggregate_root + specs: + aggregate_root (2.15.0) + ruby_event_store (= 2.15.0) + +PATH + remote: ../../../ruby_event_store-active_record + specs: + rails_event_store_active_record (2.15.0) + ruby_event_store-active_record (= 2.15.0) + ruby_event_store-active_record (2.15.0) + activerecord (>= 6.0) + ruby_event_store (= 2.15.0) + +PATH + remote: ../../../ruby_event_store-browser + specs: + ruby_event_store-browser (2.15.0) + rack + ruby_event_store (= 2.15.0) + +PATH + remote: ../../../ruby_event_store + specs: + ruby_event_store (2.15.0) + concurrent-ruby (~> 1.0, >= 1.1.6) + +PATH + remote: ../.. + specs: + rails_event_store (2.15.0) + activejob (>= 6.0) + activemodel (>= 6.0) + activesupport (>= 6.0) + aggregate_root (= 2.15.0) + arkency-command_bus (>= 0.4) + rails_event_store_active_record (= 2.15.0) + ruby_event_store (= 2.15.0) + ruby_event_store-browser (= 2.15.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + actionmailer (7.2.2.1) + actionpack (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (7.2.2.1) + actionpack (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) + globalid (>= 0.3.6) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) + timeout (>= 0.4.0) + activestorage (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activesupport (= 7.2.2.1) + marcel (~> 1.0) + activesupport (7.2.2.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + arkency-command_bus (0.4.1) + concurrent-ruby + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) + builder (3.3.0) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) + crass (1.0.6) + date (3.4.1) + drb (2.2.1) + erubi (1.13.1) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.14.3) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + logger (1.6.4) + loofah (2.24.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + mini_mime (1.1.5) + minitest (5.25.4) + net-imap (0.5.4) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.4) + nokogiri (1.18.1-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.1-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.1-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-linux-musl) + racc (~> 1.4) + psych (5.2.2) + date + stringio + racc (1.8.1) + rack (3.1.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails (7.2.2.1) + actioncable (= 7.2.2.1) + actionmailbox (= 7.2.2.1) + actionmailer (= 7.2.2.1) + actionpack (= 7.2.2.1) + actiontext (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activemodel (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + bundler (>= 1.15.0) + railties (= 7.2.2.1) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.2.1) + rdoc (6.10.0) + psych (>= 4.0.0) + reline (0.6.0) + io-console (~> 0.5) + securerandom (0.4.1) + stringio (3.1.2) + thor (1.3.2) + timeout (0.4.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + useragent (0.16.11) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.7.1) + +PLATFORMS + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + aggregate_root! + rails (~> 7.2.2, >= 7.2.2.1) + rails_event_store! + rails_event_store_active_record! + ruby_event_store! + ruby_event_store-active_record! + ruby_event_store-browser! + +BUNDLED WITH + 2.5.23 diff --git a/rails_event_store/spec/dummy_7_2/Rakefile b/rails_event_store/spec/dummy_7_2/Rakefile new file mode 100644 index 0000000000..9a5ea7383a --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/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/rails_event_store/spec/dummy_7_2/bin/rails b/rails_event_store/spec/dummy_7_2/bin/rails new file mode 100755 index 0000000000..efc0377492 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/rails_event_store/spec/dummy_7_2/config/application.rb b/rails_event_store/spec/dummy_7_2/config/application.rb new file mode 100644 index 0000000000..40407dd0af --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/application.rb @@ -0,0 +1,42 @@ +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 "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 Dummy72 + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.2 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w[assets tasks]) + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # Don't generate system test files. + config.generators.system_tests = nil + end +end diff --git a/rails_event_store/spec/dummy_7_2/config/boot.rb b/rails_event_store/spec/dummy_7_2/config/boot.rb new file mode 100644 index 0000000000..282011619d --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/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/rails_event_store/spec/dummy_7_2/config/credentials.yml.enc b/rails_event_store/spec/dummy_7_2/config/credentials.yml.enc new file mode 100644 index 0000000000..e7666bb83e --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/credentials.yml.enc @@ -0,0 +1 @@ +L8SLqv3Pudy+oahd8KxXTvrbuzfeDJ5BRjRD8GptQAeQXz1vU1VLwUlvS3Rv3Xr1nLGYEQMZNZoV1kxfA6xVCn3pUxp/4Bna6I6+xPOQJoMZCFYYnbKi5RjlHwph6iMe4tuAaBQdpG9R0xlIyEsQcuwpFYC0V9FWD9CLC+IxZt4qIh6Q+Uv/Tx5d9RXth3utOlNT11QSNbS1WdfIqCkHzX9rSZ7ADJyhH9pjj9gOS0+oi8UdnuQ0mM651XjtrL7+gqKcQBN1uVJ4QAeOIHhtOniDBrYRZcVmAJI65Od+KflGtkGdk0aaq92Y6ZcM/7Mcms+oWTHn3JUxJs9r7szne3nbYovZcsl6wipLwnHUl5SX4hoa3MpKYSrXL7039tDh/2AsZsGPOWfpnXU5JS6Y9D5I2FQZ--Jzaouos3g5gl8gS5--QvIsS/Z/i8VfXGqlWNmUww== \ No newline at end of file diff --git a/rails_event_store/spec/dummy_7_2/config/environment.rb b/rails_event_store/spec/dummy_7_2/config/environment.rb new file mode 100644 index 0000000000..cac5315775 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/rails_event_store/spec/dummy_7_2/config/environments/development.rb b/rails_event_store/spec/dummy_7_2/config/environments/development.rb new file mode 100644 index 0000000000..558afeca8c --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/environments/development.rb @@ -0,0 +1,65 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.enable_reloading = true + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing. + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # 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 + + # Suppress logger output for asset requests. + # config.assets.quiet = true + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions. + config.action_controller.raise_on_missing_callback_actions = true + + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! +end diff --git a/rails_event_store/spec/dummy_7_2/config/environments/production.rb b/rails_event_store/spec/dummy_7_2/config/environments/production.rb new file mode 100644 index 0000000000..226e4cfcf1 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/environments/production.rb @@ -0,0 +1,85 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.enable_reloading = false + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fall back to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + config.force_ssl = true + + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [ :id ] + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } +end diff --git a/rails_event_store/spec/dummy_7_2/config/environments/test.rb b/rails_event_store/spec/dummy_7_2/config/environments/test.rb new file mode 100644 index 0000000000..999db7091e --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/environments/test.rb @@ -0,0 +1,51 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false + + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # 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 + + # Raise error when a before_action's only/except options reference missing actions. + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/rails_event_store/spec/dummy_7_2/config/initializers/content_security_policy.rb b/rails_event_store/spec/dummy_7_2/config/initializers/content_security_policy.rb new file mode 100644 index 0000000000..b3076b38fe --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src style-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/rails_event_store/spec/dummy_7_2/config/initializers/filter_parameter_logging.rb b/rails_event_store/spec/dummy_7_2/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000000..c010b83ddd --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/rails_event_store/spec/dummy_7_2/config/initializers/inflections.rb b/rails_event_store/spec/dummy_7_2/config/initializers/inflections.rb new file mode 100644 index 0000000000..3860f659ea --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/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/rails_event_store/spec/dummy_7_2/config/initializers/permissions_policy.rb b/rails_event_store/spec/dummy_7_2/config/initializers/permissions_policy.rb new file mode 100644 index 0000000000..7db3b9577e --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/initializers/permissions_policy.rb @@ -0,0 +1,13 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide HTTP permissions policy. For further +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end diff --git a/rails_event_store/spec/dummy_7_2/config/locales/en.yml b/rails_event_store/spec/dummy_7_2/config/locales/en.yml new file mode 100644 index 0000000000..6c349ae5e3 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/locales/en.yml @@ -0,0 +1,31 @@ +# Files in the config/locales directory are used for internationalization and +# are automatically loaded by Rails. If you want to use locales other than +# English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more about the API, please read the Rails Internationalization guide +# at https://guides.rubyonrails.org/i18n.html. +# +# Be aware that YAML interprets the following case-insensitive strings as +# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings +# must be quoted to be interpreted as strings. For example: +# +# en: +# "yes": yup +# enabled: "ON" + +en: + hello: "Hello world" diff --git a/rails_event_store/spec/dummy_7_2/config/master.key b/rails_event_store/spec/dummy_7_2/config/master.key new file mode 100644 index 0000000000..834707770e --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/master.key @@ -0,0 +1 @@ +83aa647d62a5f5d645fe785e264ffd51 \ No newline at end of file diff --git a/rails_event_store/spec/dummy_7_2/config/puma.rb b/rails_event_store/spec/dummy_7_2/config/puma.rb new file mode 100644 index 0000000000..03c166f4cf --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/puma.rb @@ -0,0 +1,34 @@ +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. + +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. +# +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# to prioritize throughput over latency. +# +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. +# +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. +# +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT", 3000) + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/rails_event_store/spec/dummy_7_2/config/routes.rb b/rails_event_store/spec/dummy_7_2/config/routes.rb new file mode 100644 index 0000000000..33c9639036 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/config/routes.rb @@ -0,0 +1,14 @@ +Rails.application.routes.draw do + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. + # Can be used by load balancers and uptime monitors to verify that the app is live. + get "up" => "rails/health#show", as: :rails_health_check + + # Render dynamic PWA files from app/views/pwa/* + get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker + get "manifest" => "rails/pwa#manifest", as: :pwa_manifest + + # Defines the root path route ("/") + # root "posts#index" +end diff --git a/rails_event_store/spec/dummy_7_2/test/test_helper.rb b/rails_event_store/spec/dummy_7_2/test/test_helper.rb new file mode 100644 index 0000000000..0c22470ec1 --- /dev/null +++ b/rails_event_store/spec/dummy_7_2/test/test_helper.rb @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +module ActiveSupport + class TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... + end +end