diff --git a/Gemfile b/Gemfile index 2e94d7e75..bac764f03 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.0.2" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem "rails", "~> 6.1.4" +gem "rails", "~> 7.0.0" # Use postgresql as the database for Active Record gem "pg", "~> 1.1" # Use Puma as the app server @@ -24,7 +24,9 @@ gem "hotwire-rails" # Soft delete ActiveRecords objects gem "discard" # Administration framework -gem "activeadmin" +gem "activeadmin", git: "https://github.com/naveed-ahmad/activeadmin.git", branch: "rails7" +gem "inherited_resources", git: "https://github.com/naveed-ahmad/inherited_resources.git", branch: "rails7" +gem "ransack", github: "activerecord-hackery/ransack" # Admin charts gem "chartkick" # Spreadsheet parsing @@ -36,8 +38,9 @@ gem "json-schema" gem "devise", github: "ghiculescu/devise", branch: "error-code-422" # UK postcode parsing and validation gem "uk_postcode" -# Use Ruby objects to build reusable markup. A React inspired evolution of the presenter pattern +# Get rich data from postcode lookups. Wraps postcodes.io gem "postcodes_io" +# Use Ruby objects to build reusable markup. A React inspired evolution of the presenter pattern gem "view_component" group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index cad5c5eb5..aa62cefe1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +GIT + remote: https://github.com/activerecord-hackery/ransack.git + revision: 25c5c9dfec216a5fafcd90b8893abcfe19460e50 + specs: + ransack (2.4.2) + activerecord (>= 5.2.4) + activesupport (>= 5.2.4) + i18n + GIT remote: https://github.com/ghiculescu/devise.git revision: 3b2d9ae3d47be5c9228c4446119b04b0e98917c1 @@ -10,9 +19,35 @@ GIT responders warden (~> 1.2.3) +GIT + remote: https://github.com/naveed-ahmad/activeadmin.git + revision: 669d808151d8a087ccdd8dad7ebac303289873de + branch: rails7 + specs: + activeadmin (2.9.0) + arbre (~> 1.2, >= 1.2.1) + formtastic (>= 3.1, < 5.0) + formtastic_i18n (~> 0.4) + inherited_resources (~> 1.7) + jquery-rails (~> 4.2) + kaminari (~> 1.0, >= 1.2.1) + railties (>= 5.2, <= 7.0.0) + ransack (~> 2.1, >= 2.1.1) + +GIT + remote: https://github.com/naveed-ahmad/inherited_resources.git + revision: 15aa6273f97cc34369a080b82e7b9e15c4308c00 + branch: rails7 + specs: + inherited_resources (1.13.0) + actionpack (>= 5.2, <= 7.0.0) + has_scope (~> 0.6) + railties (>= 5.2, <= 7.0.0) + responders (>= 2, < 4) + GIT remote: https://github.com/rspec/rspec-core.git - revision: e36aa2a9ebe68acee3ce05190fc2124947b45925 + revision: e3bda9da1e625a428fd005f0d1a633531f5da749 branch: main specs: rspec-core (3.11.0.pre) @@ -20,7 +55,7 @@ GIT GIT remote: https://github.com/rspec/rspec-expectations.git - revision: dba67987c63f551d1bf0f7877f069fa8b72d0461 + revision: d9fd9a5589e3914bcd25d66560eccadd75493727 branch: main specs: rspec-expectations (3.11.0.pre) @@ -38,7 +73,7 @@ GIT GIT remote: https://github.com/rspec/rspec-rails.git - revision: 5f54d780a3d8f21cfe4f424a7d0435be2e279356 + revision: 24631bfc78fc0bd69d66ab8eb7f81731bd789bbc branch: main specs: rspec-rails (5.1.0.pre) @@ -60,79 +95,69 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + actioncable (7.0.0) + actionpack (= 7.0.0) + activesupport (= 7.0.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailbox (7.0.0) + actionpack (= 7.0.0) + activejob (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) mail (>= 2.7.1) - actionmailer (6.1.4.1) - actionpack (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailer (7.0.0) + actionpack (= 7.0.0) + actionview (= 7.0.0) + activejob (= 7.0.0) + activesupport (= 7.0.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.1) - actionview (= 6.1.4.1) - activesupport (= 6.1.4.1) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.0) + actionview (= 7.0.0) + activesupport (= 7.0.0) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.1) - actionpack (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actiontext (7.0.0) + actionpack (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.4.1) - activesupport (= 6.1.4.1) + actionview (7.0.0) + activesupport (= 7.0.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activeadmin (2.9.0) - arbre (~> 1.2, >= 1.2.1) - formtastic (>= 3.1, < 5.0) - formtastic_i18n (~> 0.4) - inherited_resources (~> 1.7) - jquery-rails (~> 4.2) - kaminari (~> 1.0, >= 1.2.1) - railties (>= 5.2, < 6.2) - ransack (~> 2.1, >= 2.1.1) - activejob (6.1.4.1) - activesupport (= 6.1.4.1) + activejob (7.0.0) + activesupport (= 7.0.0) globalid (>= 0.3.6) - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activestorage (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activesupport (= 6.1.4.1) - marcel (~> 1.0.0) + activemodel (7.0.0) + activesupport (= 7.0.0) + activerecord (7.0.0) + activemodel (= 7.0.0) + activesupport (= 7.0.0) + activestorage (7.0.0) + actionpack (= 7.0.0) + activejob (= 7.0.0) + activerecord (= 7.0.0) + activesupport (= 7.0.0) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.1) + activesupport (7.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - arbre (1.4.0) - activesupport (>= 3.0.0, < 6.2) - ruby2_keywords (>= 0.0.2, < 1.0) + arbre (1.2.1) + activesupport (>= 3.0.0) ast (2.4.2) bcrypt (3.1.16) bindex (0.8.1) @@ -163,8 +188,8 @@ GEM crass (1.0.6) deep_merge (1.2.1) diff-lcs (1.4.4) - discard (1.2.0) - activerecord (>= 4.2, < 7) + discard (1.2.1) + activerecord (>= 4.2, < 8) docile (1.4.0) dotenv (2.7.6) dotenv-rails (2.7.6) @@ -202,11 +227,6 @@ GEM turbo-rails i18n (1.8.11) concurrent-ruby (~> 1.0) - inherited_resources (1.13.0) - actionpack (>= 5.2, < 6.2) - has_scope (~> 0.6) - railties (>= 5.2, < 6.2) - responders (>= 2, < 4) iniparse (1.5.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) @@ -229,7 +249,7 @@ GEM listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.12.0) + loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -238,7 +258,7 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) - minitest (5.14.4) + minitest (5.15.0) msgpack (1.4.2) nio4r (2.5.8) nokogiri (1.12.5-arm64-darwin) @@ -253,7 +273,7 @@ GEM iniparse (~> 1.4) rexml (~> 3.2) parallel (1.21.0) - parser (3.0.3.1) + parser (3.0.3.2) ast (~> 2.4.1) pg (1.2.3) postcodes_io (0.4.0) @@ -275,38 +295,34 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.1) - actioncable (= 6.1.4.1) - actionmailbox (= 6.1.4.1) - actionmailer (= 6.1.4.1) - actionpack (= 6.1.4.1) - actiontext (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activemodel (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + rails (7.0.0) + actioncable (= 7.0.0) + actionmailbox (= 7.0.0) + actionmailer (= 7.0.0) + actionpack (= 7.0.0) + actiontext (= 7.0.0) + actionview (= 7.0.0) + activejob (= 7.0.0) + activemodel (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) bundler (>= 1.15.0) - railties (= 6.1.4.1) - sprockets-rails (>= 2.0.0) + railties (= 7.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + railties (7.0.0) + actionpack (= 7.0.0) + activesupport (= 7.0.0) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.0.0) rake (13.0.6) - ransack (2.4.2) - activerecord (>= 5.2.4) - activesupport (>= 5.2.4) - i18n rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) @@ -369,18 +385,12 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.3) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.4.1) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) - stimulus-rails (0.7.3) - rails (>= 6.0.0) + stimulus-rails (1.0.2) + railties (>= 6.0.0) thor (1.1.0) - turbo-rails (0.9.0) - rails (>= 6.0.0) + turbo-rails (1.0.0) + actionpack (>= 6.0.0) + railties (>= 6.0.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) uk_postcode (2.1.7) @@ -418,7 +428,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - activeadmin + activeadmin! bootsnap (>= 1.4.4) byebug capybara @@ -431,6 +441,7 @@ DEPENDENCIES govuk-components govuk_design_system_formbuilder hotwire-rails + inherited_resources! json-schema listen (~> 3.3) overcommit (>= 0.37.0) @@ -439,7 +450,8 @@ DEPENDENCIES pry-byebug puma (~> 5.0) rack-mini-profiler (~> 2.0) - rails (~> 6.1.4) + rails (~> 7.0.0) + ransack! roo rspec-core! rspec-expectations! diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb deleted file mode 100644 index d67269728..000000000 --- a/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb deleted file mode 100644 index 0ff5442f4..000000000 --- a/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/bin/rails b/bin/rails index 6fb4e4051..efc037749 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/rake b/bin/rake old mode 100644 new mode 100755 diff --git a/bin/setup b/bin/setup old mode 100644 new mode 100755 index 90700ac4f..ec47b79b3 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,7 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -13,24 +13,21 @@ FileUtils.chdir APP_ROOT do # 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 "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # 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' + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/bin/webpack b/bin/webpack old mode 100644 new mode 100755 diff --git a/bin/webpack-dev-server b/bin/webpack-dev-server old mode 100644 new mode 100755 diff --git a/bin/yarn b/bin/yarn old mode 100644 new mode 100755 diff --git a/config/application.rb b/config/application.rb index 62eda1120..5ef8d6ae2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -5,13 +5,13 @@ require "rails" 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_text/engine" require "action_view/railtie" -require "action_cable/engine" +# require "action_cable/engine" # require "sprockets/railtie" # require "rails/test_unit/railtie" @@ -22,7 +22,7 @@ Bundler.require(*Rails.groups) module DataCollector class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.1 + config.load_defaults 7.0 # Configuration for the application, engines, and railties goes here. # @@ -31,8 +31,5 @@ module DataCollector # config.time_zone = "London" # config.eager_load_paths << Rails.root.join("extras") - - # Don't generate system test files. - config.generators.system_tests = nil end end diff --git a/config/environments/development.rb b/config/environments/development.rb index bf9761c3a..37b2c6d17 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,6 +14,9 @@ Rails.application.configure do # 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? @@ -75,10 +78,6 @@ Rails.application.configure do # 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/config/environments/production.rb b/config/environments/production.rb index 175c0d9a3..db1c63924 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -25,19 +25,19 @@ Rails.application.configure do 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' + # 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 + # 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.*/ ] + # 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 @@ -79,21 +79,15 @@ Rails.application.configure do # 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 = [] + # Don't log any deprecations. + config.active_support.report_deprecations = false # 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') + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new($stdout) @@ -124,4 +118,14 @@ Rails.application.configure do # 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 + + # Inserts middleware to perform automatic shard swapping. The `shard_selector` hash + # can be used to pass options to the `ShardSelector` middleware. The `lock` option is + # used to determine whether shard swapping should be prohibited for the request. + # + # The `shard_resolver` option is used by the middleware to determine which shard + # to switch to. The application must provide a mechanism for finding the shard name + # in a proc. See guides for an example. + # config.active_record.shard_selector = { lock: true } + # config.active_record.shard_resolver = ->(request) { Tenant.find_by!(host: request.host).shard } end diff --git a/config/environments/test.rb b/config/environments/test.rb index a9b68bb26..31b83e22e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,12 +8,13 @@ require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + # Turn false under Spring and add config.action_view.cache_template_loading = true 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 + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way 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.enabled = true @@ -38,12 +39,12 @@ Rails.application.configure do config.action_mailer.perform_caching = false config.action_mailer.default_url_options = { host: "localhost", port: 3000 } + config.action_mailer.default_options = { from: "test@gmail.com" } # 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 - config.action_mailer.default_options = { from: "test@gmail.com" } # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 35d0f26fc..3621f97f8 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -4,27 +4,23 @@ # 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" +# 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 and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report CSP violations to a specified URI. See: +# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# # config.content_security_policy_report_only = true # 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/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf9d..3860f659e 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -4,13 +4,13 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' +# inflect.acronym "RESTful" # end