A lot :)
This commit is contained in:
parent
aad67af0d1
commit
63fc206c27
153 changed files with 2043 additions and 646 deletions
|
|
@ -1,4 +1,4 @@
|
|||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||
|
||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
|
||||
require "bundler/setup" # Set up gems listed in the Gemfile.
|
||||
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ default: &default
|
|||
adapter: sqlite3
|
||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
timeout: 5000
|
||||
default_transaction_mode: IMMEDIATE
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require 'active_support/core_ext/integer/time'
|
||||
require "active_support/core_ext/integer/time"
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
|
@ -14,19 +14,17 @@ Rails.application.configure do
|
|||
# Show full error reports.
|
||||
config.consider_all_requests_local = true
|
||||
|
||||
# Enable server timing
|
||||
# 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?
|
||||
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}"
|
||||
}
|
||||
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
|
||||
else
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
|
|
@ -39,8 +37,12 @@ Rails.application.configure do
|
|||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Disable caching for Action Mailer templates even if Action Controller
|
||||
# caching is enabled.
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
config.action_mailer.default_url_options = { host: "a11yist.localhost" }
|
||||
|
||||
# Print deprecation notices to the Rails logger.
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
|
|
@ -66,13 +68,16 @@ Rails.application.configure do
|
|||
# config.i18n.raise_on_missing_translations = true
|
||||
|
||||
# Annotate rendered view with file names.
|
||||
# config.action_view.annotate_rendered_view_with_filenames = true
|
||||
config.action_view.annotate_rendered_view_with_filenames = true
|
||||
|
||||
# Uncomment if you wish to allow Action Cable access from any origin.
|
||||
# config.action_cable.disable_request_forgery_protection = true
|
||||
|
||||
# Raise error when a before_action's only/except options reference missing actions
|
||||
# Raise error when a before_action's only/except options reference missing actions.
|
||||
config.action_controller.raise_on_missing_callback_actions = true
|
||||
|
||||
config.web_console.permissions = ['192.168.0.0/16', '10.10.0.0/16']
|
||||
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
|
||||
# config.generators.apply_rubocop_autocorrect_after_generate!
|
||||
#
|
||||
config.web_console.allowed_ips = ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8"]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require 'active_support/core_ext/integer/time'
|
||||
require "active_support/core_ext/integer/time"
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
|
@ -21,7 +21,7 @@ Rails.application.configure do
|
|||
# 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
|
||||
config.public_file_server.enabled = ENV.fetch("ASSETS_PATH") { nil }.nil?
|
||||
|
||||
# Compress CSS using a preprocessor.
|
||||
# config.assets.css_compressor = :sass
|
||||
|
|
@ -49,20 +49,25 @@ Rails.application.configure do
|
|||
# config.assume_ssl = true
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
config.force_ssl = true
|
||||
config.force_ssl = false
|
||||
|
||||
# Skip http-to-https redirect for the default health check endpoint.
|
||||
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
||||
|
||||
config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new("log/#{Rails.env}.log"))
|
||||
|
||||
# Log to STDOUT by default
|
||||
config.logger = ActiveSupport::Logger.new(STDOUT)
|
||||
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
||||
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
||||
# 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]
|
||||
config.log_tags = [ :request_id, :remote_ip ]
|
||||
|
||||
# "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')
|
||||
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
|
@ -71,6 +76,8 @@ Rails.application.configure do
|
|||
# config.active_job.queue_adapter = :resque
|
||||
# config.active_job.queue_name_prefix = "a11yist_production"
|
||||
|
||||
# Disable caching for Action Mailer templates even if Action Controller
|
||||
# caching is enabled.
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
|
|
@ -92,8 +99,6 @@ Rails.application.configure do
|
|||
# "example.com", # Allow requests from example.com
|
||||
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
||||
# ]
|
||||
config.hosts = ENV.fetch('APP_HOSTS', '').split(',')
|
||||
# Skip DNS rebinding protection for the default health check endpoint.
|
||||
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
||||
config.active_record.sqlite3_production_warning=false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require 'active_support/core_ext/integer/time'
|
||||
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
|
||||
|
|
@ -15,13 +15,10 @@ Rails.application.configure do
|
|||
# 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?
|
||||
config.eager_load = ENV["CI"].present?
|
||||
|
||||
# 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}"
|
||||
}
|
||||
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
|
||||
|
|
@ -37,6 +34,8 @@ Rails.application.configure do
|
|||
# Store uploaded files on the local file system in a temporary directory.
|
||||
config.active_storage.service = :test
|
||||
|
||||
# Disable caching for Action Mailer templates even if Action Controller
|
||||
# caching is enabled.
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
# Tell Action Mailer not to deliver emails to the real world.
|
||||
|
|
@ -44,6 +43,10 @@ Rails.application.configure do
|
|||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
# Unlike controllers, the mailer instance doesn't have any context about the
|
||||
# incoming request so you'll need to provide the :host parameter yourself.
|
||||
config.action_mailer.default_url_options = { host: "www.example.com" }
|
||||
|
||||
# Print deprecation notices to the stderr.
|
||||
config.active_support.deprecation = :stderr
|
||||
|
||||
|
|
@ -59,6 +62,6 @@ Rails.application.configure do
|
|||
# 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
|
||||
# Raise error when a before_action's only/except options reference missing actions.
|
||||
config.action_controller.raise_on_missing_callback_actions = true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
# 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 += %i[
|
||||
passw secret token _key crypt salt certificate otp ssn
|
||||
Rails.application.config.filter_parameters += [
|
||||
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
|
||||
|
||||
# Permitted locales available for the application
|
||||
I18n.available_locales = [:"de-CH"]
|
||||
I18n.available_locales = [:"de-CH", :en]
|
||||
|
||||
# Set default locale to something other than :en
|
||||
I18n.default_locale = :"de-CH"
|
||||
70
config/initializers/new_framework_defaults_7_2.rb
Normal file
70
config/initializers/new_framework_defaults_7_2.rb
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file eases your Rails 7.2 framework defaults upgrade.
|
||||
#
|
||||
# Uncomment each configuration one by one to switch to the new default.
|
||||
# Once your application is ready to run with all new defaults, you can remove
|
||||
# this file and set the `config.load_defaults` to `7.2`.
|
||||
#
|
||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
||||
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
|
||||
|
||||
###
|
||||
# Controls whether Active Job's `#perform_later` and similar methods automatically defer
|
||||
# the job queuing to after the current Active Record transaction is committed.
|
||||
#
|
||||
# Example:
|
||||
# Topic.transaction do
|
||||
# topic = Topic.create(...)
|
||||
# NewTopicNotificationJob.perform_later(topic)
|
||||
# end
|
||||
#
|
||||
# In this example, if the configuration is set to `:never`, the job will
|
||||
# be enqueued immediately, even though the `Topic` hasn't been committed yet.
|
||||
# Because of this, if the job is picked up almost immediately, or if the
|
||||
# transaction doesn't succeed for some reason, the job will fail to find this
|
||||
# topic in the database.
|
||||
#
|
||||
# If `enqueue_after_transaction_commit` is set to `:default`, the queue adapter
|
||||
# will define the behaviour.
|
||||
#
|
||||
# Note: Active Job backends can disable this feature. This is generally done by
|
||||
# backends that use the same database as Active Record as a queue, hence they
|
||||
# don't need this feature.
|
||||
#++
|
||||
# Rails.application.config.active_job.enqueue_after_transaction_commit = :default
|
||||
|
||||
###
|
||||
# Adds image/webp to the list of content types Active Storage considers as an image
|
||||
# Prevents automatic conversion to a fallback PNG, and assumes clients support WebP, as they support gif, jpeg, and png.
|
||||
# This is possible due to broad browser support for WebP, but older browsers and email clients may still not support
|
||||
# WebP. Requires imagemagick/libvips built with WebP support.
|
||||
#++
|
||||
Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp]
|
||||
|
||||
###
|
||||
# Enable validation of migration timestamps. When set, an ActiveRecord::InvalidMigrationTimestampError
|
||||
# will be raised if the timestamp prefix for a migration is more than a day ahead of the timestamp
|
||||
# associated with the current time. This is done to prevent forward-dating of migration files, which can
|
||||
# impact migration generation and other migration commands.
|
||||
#
|
||||
# Applications with existing timestamped migrations that do not adhere to the
|
||||
# expected format can disable validation by setting this config to `false`.
|
||||
#++
|
||||
# Rails.application.config.active_record.validate_migration_timestamps = true
|
||||
|
||||
###
|
||||
# Controls whether the PostgresqlAdapter should decode dates automatically with manual queries.
|
||||
#
|
||||
# Example:
|
||||
# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date") #=> Date
|
||||
#
|
||||
# This query used to return a `String`.
|
||||
#++
|
||||
# Rails.application.config.active_record.postgresql_adapter_decode_dates = true
|
||||
|
||||
###
|
||||
# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are
|
||||
# deploying to a memory constrained environment you may want to set this to `false`.
|
||||
#++
|
||||
Rails.application.config.yjit = true
|
||||
|
|
@ -12,9 +12,39 @@ de-CH:
|
|||
results/not_applicable: Nicht anwendbar
|
||||
check:
|
||||
id: ID
|
||||
level: Stufe
|
||||
number: Nummer
|
||||
external_number: WCAG Nummer
|
||||
conformity_level: Konformitätsstufe
|
||||
position: Position
|
||||
success_criterion_html: Erfolgskriterium
|
||||
conformity_notice_de: Konformitätserklärung (de)
|
||||
conformity_notice_en: Konformitätserklärung (eng)
|
||||
standard_ids: Standards
|
||||
name_de: Name (de)
|
||||
name_en: Name (eng)
|
||||
principle_id: Prinzip
|
||||
priority: Priorität
|
||||
quick_criterion_de: Quick Kriterium (de)
|
||||
quick_criterion_en: Quick Kriterium (eng)
|
||||
quick_fix_de: Quick Fix (de)
|
||||
quick_fix_en: Quick Fix (eng)
|
||||
quick_fail_de: Quick Fail (de)
|
||||
quick_fail_en: Quick Fail (eng)
|
||||
criterion_de: Kriterium/Grundlage (de)
|
||||
criterion_en: Kriterium/Grundlage (eng)
|
||||
criterion_details_de: Verstehen (de)
|
||||
criterion_details_en: Verstehen (eng)
|
||||
example_de: Beispiel (de)
|
||||
example_en: Beispiel (eng)
|
||||
exemption_details_de: Ausnahme (de)
|
||||
exemption_details_en: Ausnahme (eng)
|
||||
standard_text_de: WCAG-Text (de)
|
||||
standard_text_en: WCAG-Text (eng)
|
||||
test_instructions: Testanleitung
|
||||
powerpoint_text_de: Powerpoint Text (de)
|
||||
powerpoint_text_en: Powerpoint Text (eng)
|
||||
comment: Kommentar
|
||||
target_disability: Zugänglichkeit
|
||||
applicability: Anwendbarkeit
|
||||
checklist:
|
||||
id: ID
|
||||
name: Überschrift
|
||||
|
|
@ -65,3 +95,6 @@ de-CH:
|
|||
element:
|
||||
one: Element
|
||||
other: Elemente
|
||||
principle:
|
||||
one: Prinzip
|
||||
other: Prinzipien
|
||||
|
|
|
|||
|
|
@ -44,4 +44,17 @@ de-CH:
|
|||
link_show: "%{model} anzeigen"
|
||||
link_edit: "%{model} bearbeiten"
|
||||
link_destroy: "%{model} löschen"
|
||||
link_index: "%{model} Liste"
|
||||
link_index: "%{model} Liste"
|
||||
disability:
|
||||
visual: visuell
|
||||
auditory: auditiv
|
||||
physical: motorisch
|
||||
cognitive: kognitiv
|
||||
applicability:
|
||||
applicable_to_app: app
|
||||
applicable_to_web: web
|
||||
priority:
|
||||
highest: "Sehr hoch"
|
||||
high: "Hoch"
|
||||
medium: "Mittel"
|
||||
low: "Niedrig"
|
||||
|
|
@ -2,34 +2,32 @@
|
|||
# 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 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 that the worker count should equal the number of processors in production.
|
||||
if ENV['RAILS_ENV'] == 'production'
|
||||
require 'concurrent-ruby'
|
||||
worker_count = Integer(ENV.fetch('WEB_CONCURRENCY') { Concurrent.physical_processor_count })
|
||||
workers worker_count if worker_count > 1
|
||||
end
|
||||
|
||||
# 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'
|
||||
# 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 }
|
||||
|
||||
# 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' }
|
||||
port ENV.fetch("PORT", 3000)
|
||||
|
||||
# Allow puma to be restarted by `bin/rails restart` command.
|
||||
plugin :tmp_restart
|
||||
|
||||
# Only use a pidfile when requested
|
||||
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@ Rails.application.routes.draw do
|
|||
# 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
|
||||
|
||||
if Rails.env.development?
|
||||
namespace :benchmarking do
|
||||
post "read_heavy"
|
||||
post "write_heavy"
|
||||
post "balanced"
|
||||
post "link_create"
|
||||
post "comment_create"
|
||||
post "link_destroy"
|
||||
post "comment_destroy"
|
||||
post "link_show"
|
||||
post "links_index"
|
||||
post "user_show"
|
||||
end
|
||||
end
|
||||
|
||||
# Defines the root path route ("/")
|
||||
root 'home#show'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue