From b0c83c29d162103e39298ef2ff012182b249ffa6 Mon Sep 17 00:00:00 2001 From: melzreal Date: Tue, 9 Mar 2021 10:27:53 +0000 Subject: [PATCH] Fix deprecation warnings - Errors no longer accept two arguments, this commit fixes this deprecation warning: You are passing a block expecting two parameters, so the old hash behavior is simulated. As this is deprecated, this will result in an ArgumentError in Rails 6.2. (called from views/planning_applications/recommendation_form.html.erb:16) .DEPRECATION WARNING: Enumerating ActiveModel::Errors as a hash has been deprecated. - Rendering actions with '.' in the name is deprecated so all partials with .html or .json now have the simplified naming convention - raise_on_missing_translations has been replaced with i18n_raise_on_missing_translations due to deprecation - host! has been deprecated with no replacement - the only place where we don't get any deprecation warnings is in the "request" setting in rails helper, where we do need it or all api requests fail. I could not find an alternative to host! that would force the GET URI to not have www and since no warnings appear it seemed ok to keep. --- Gemfile.lock | 88 ++++++++++--------- .../planning_applications/index.json.jbuilder | 2 +- .../planning_applications/show.json.jbuilder | 2 +- app/views/documents/_archive_form.html.erb | 2 +- app/views/documents/_edit_and_upload.html.erb | 6 +- .../cancel_confirmation.html.erb | 4 +- .../recommendation_form.html.erb | 4 +- .../validate_documents_form.html.erb | 4 +- config.ru | 1 + config/environments/development.rb | 2 +- config/environments/test.rb | 2 +- .../initializers/filter_parameter_logging.rb | 5 +- config/initializers/inflections.rb | 1 + .../new_framework_defaults_6_1.rb | 26 +++--- config/initializers/wrap_parameters.rb | 2 + config/puma.rb | 57 +++++------- db/schema.rb | 4 +- spec/rails_helper.rb | 4 +- 18 files changed, 102 insertions(+), 114 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4f286aa5a..b39c063b1f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -49,9 +49,9 @@ GEM activerecord (6.1.3) activemodel (= 6.1.3) activesupport (= 6.1.3) - activerecord-postgis-adapter (6.0.1) - activerecord (~> 6.0) - rgeo-activerecord (~> 6.0) + activerecord-postgis-adapter (7.0.1) + activerecord (~> 6.1) + rgeo-activerecord (~> 7.0.0) activestorage (6.1.3) actionpack (= 6.1.3) activejob (= 6.1.3) @@ -67,33 +67,33 @@ GEM zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - after_commit_everywhere (0.1.5) + after_commit_everywhere (1.0.0) activerecord (>= 4.2) - appsignal (2.11.1) + appsignal (3.0.0) rack - ast (2.4.1) - aws-eventstream (1.1.0) - aws-partitions (1.414.0) - aws-sdk-codedeploy (1.37.0) - aws-sdk-core (~> 3, >= 3.109.0) + ast (2.4.2) + aws-eventstream (1.1.1) + aws-partitions (1.431.1) + aws-sdk-codedeploy (1.38.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.110.0) + aws-sdk-core (3.112.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.40.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (1.42.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.87.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-s3 (1.90.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (1.2.3) aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.16) bindex (0.8.1) - bootsnap (1.5.1) + bootsnap (1.7.2) msgpack (~> 1.0) brakeman (5.0.0) builder (3.2.4) @@ -101,17 +101,17 @@ GEM bundler (>= 1.2.0, < 3) thor (>= 0.18, < 2) byebug (11.1.3) - capybara (3.34.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) childprocess (3.0.0) coderay (1.1.3) - commonmarker (0.21.0) + commonmarker (0.21.2) ruby-enum (~> 0.5) concurrent-ruby (1.1.8) crack (0.4.5) @@ -124,7 +124,7 @@ GEM responders warden (~> 1.2.3) diff-lcs (1.4.4) - docile (1.3.4) + docile (1.3.5) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) @@ -135,15 +135,17 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faker (2.15.1) + faker (2.16.0) i18n (>= 1.6, < 2) - faraday (1.2.0) + faraday (1.3.0) + faraday-net_http (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords - ffi (1.14.2) + faraday-net_http (1.0.1) + ffi (1.15.0) globalid (0.4.2) activesupport (>= 4.2.0) - govuk_design_system_formbuilder (2.1.5) + govuk_design_system_formbuilder (2.1.9) actionview (>= 5.2) activemodel (>= 5.2) activesupport (>= 5.2) @@ -153,7 +155,7 @@ GEM image_processing (1.12.1) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - jbuilder (2.10.1) + jbuilder (2.11.2) activesupport (>= 5.0.0) jmespath (1.4.0) jwt (2.2.2) @@ -166,8 +168,8 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - mail-notify (1.0.3) - actionmailer (>= 5.2.4.2, < 6.2) + mail-notify (1.0.4) + actionmailer (>= 5.2.4.3) actionpack (>= 5.2.4.3) actionview (>= 5.2.4.3) activesupport (>= 5.2.4.3) @@ -181,7 +183,7 @@ GEM mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.4) - msgpack (1.3.3) + msgpack (1.4.2) multipart-post (2.1.1) nio4r (2.5.7) nokogiri (1.11.1) @@ -189,14 +191,14 @@ GEM racc (~> 1.4) notifications-ruby-client (5.3.0) jwt (>= 1.5, < 3) - openapi3_parser (0.8.2) + openapi3_parser (0.9.0) commonmarker (~> 0.17) psych (~> 3.1) orm_adapter (0.5.0) parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) - pdfkit (0.8.4.3.2) + pdfkit (0.8.5) pg (1.2.3) pry (0.13.1) coderay (~> 1.1) @@ -204,7 +206,7 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - psych (3.3.0) + psych (3.3.1) public_suffix (4.0.6) puma (4.3.7) nio4r (~> 2.0) @@ -249,13 +251,13 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.8.2) + regexp_parser (2.1.1) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) rexml (3.2.4) rgeo (2.2.0) - rgeo-activerecord (6.2.2) + rgeo-activerecord (7.0.1) activerecord (>= 5.0) rgeo (>= 1.0.0) rspec-core (3.10.1) @@ -263,7 +265,7 @@ GEM rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-mocks (3.10.1) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-rails (4.0.2) @@ -274,8 +276,8 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.1) - rswag-ui (2.3.1) + rspec-support (3.10.2) + rswag-ui (2.4.0) actionpack (>= 3.1, < 7.0) railties (>= 3.1, < 7.0) rubocop (0.87.1) @@ -303,18 +305,18 @@ GEM rubocop rubocop-rspec (1.42.0) rubocop (>= 0.87.0) - ruby-enum (0.8.0) + ruby-enum (0.9.0) i18n ruby-progressbar (1.11.0) - ruby-vips (2.0.17) - ffi (~> 1.9) - ruby2_keywords (0.0.2) + ruby-vips (2.1.0) + ffi (~> 1.12) + ruby2_keywords (0.0.4) ruby_dep (1.5.0) rubyzip (2.3.0) selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) - simplecov (0.20.0) + simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) @@ -338,7 +340,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.11.0) + webmock (3.12.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/app/views/api/v1/planning_applications/index.json.jbuilder b/app/views/api/v1/planning_applications/index.json.jbuilder index e24047768f..868d93b225 100644 --- a/app/views/api/v1/planning_applications/index.json.jbuilder +++ b/app/views/api/v1/planning_applications/index.json.jbuilder @@ -1,5 +1,5 @@ # frozen_string_literal: true json.data @planning_applications.each do |planning_application| - json.partial! "show.json.jbuilder", planning_application: planning_application + json.partial! "show", planning_application: planning_application end diff --git a/app/views/api/v1/planning_applications/show.json.jbuilder b/app/views/api/v1/planning_applications/show.json.jbuilder index 3ff0941699..01d2badc80 100644 --- a/app/views/api/v1/planning_applications/show.json.jbuilder +++ b/app/views/api/v1/planning_applications/show.json.jbuilder @@ -1,3 +1,3 @@ # frozen_string_literal: true -json.partial! "show.json.jbuilder", planning_application: @planning_application +json.partial! "show", planning_application: @planning_application diff --git a/app/views/documents/_archive_form.html.erb b/app/views/documents/_archive_form.html.erb index f42d72bca4..1ed7bddd2f 100644 --- a/app/views/documents/_archive_form.html.erb +++ b/app/views/documents/_archive_form.html.erb @@ -5,7 +5,7 @@ <% if form.object.errors.any? %> <% form.object.errors.each do |error| %> - Error:<%= error %> + Error:<%= error.message %> <% end %> <% end %>

diff --git a/app/views/documents/_edit_and_upload.html.erb b/app/views/documents/_edit_and_upload.html.erb index c024f6e1f9..47a97163cf 100644 --- a/app/views/documents/_edit_and_upload.html.erb +++ b/app/views/documents/_edit_and_upload.html.erb @@ -1,5 +1,5 @@ <%= form_with model: [@planning_application, @document], local: true, class: "document", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |form| %> - <%= render partial: 'documents/form_partials/upload.html.erb', locals: {form: form} %> + <%= render partial: 'documents/form_partials/upload', locals: {form: form} %>

<% if @document.errors[:numbers].any? %> @@ -8,8 +8,8 @@ Error:<%= error %> <% end %> <% end %> - <%= render partial: 'documents/form_partials/tags.html.erb', locals: {form: form} %> - <%= render partial: 'documents/form_partials/privacy.html.erb', locals: {form: form} %> + <%= render partial: 'documents/form_partials/tags', locals: {form: form} %> + <%= render partial: 'documents/form_partials/privacy', locals: {form: form} %>
<%= form.submit "Save", class: "govuk-button", data: { module: "govuk-button" } %> diff --git a/app/views/planning_applications/cancel_confirmation.html.erb b/app/views/planning_applications/cancel_confirmation.html.erb index f5a64daf99..4667040bab 100644 --- a/app/views/planning_applications/cancel_confirmation.html.erb +++ b/app/views/planning_applications/cancel_confirmation.html.erb @@ -27,9 +27,9 @@

<% if form.object.errors.any? %> - <% form.object.errors.each do |attribute, error| %> + <% form.object.errors.each do |error| %> - Error:<%= error %> + Error:<%= error.message %> <% end %> <% end %>
diff --git a/app/views/planning_applications/recommendation_form.html.erb b/app/views/planning_applications/recommendation_form.html.erb index d486615400..ab617598ce 100644 --- a/app/views/planning_applications/recommendation_form.html.erb +++ b/app/views/planning_applications/recommendation_form.html.erb @@ -13,10 +13,10 @@ You need to check that the applicant's answers and proposal documents meet the permitted development requirements.

<% if form.object.errors.any? %> - <% form.object.errors.each do |attribute, error| %> + <% form.object.errors.each do |error| %> Error: - <%= error %> + <%= error.type %> <% end %> <% end %> diff --git a/app/views/planning_applications/validate_documents_form.html.erb b/app/views/planning_applications/validate_documents_form.html.erb index 4bc4a32e4e..8c5f499a23 100644 --- a/app/views/planning_applications/validate_documents_form.html.erb +++ b/app/views/planning_applications/validate_documents_form.html.erb @@ -11,9 +11,9 @@ <%= form_with model: @planning_application, url: validate_documents_planning_application_path(@planning_application), local: true, builder: GOVUKDesignSystemFormBuilder::FormBuilder do |form| %>
<% if form.object.errors.any? %> - <% form.object.errors.each do |attribute, error| %> + <% form.object.errors.each do |error| %> - Error:<%= error %> + Error:<%= error.message %> <% end %> <% end %> <%= form.govuk_radio_buttons_fieldset(:status, legend: { size: 's', text: 'Are the documents valid?' }) do %> diff --git a/config.ru b/config.ru index a97566a7d5..2e0308469b 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,5 @@ # frozen_string_literal: true + # This file is used by Rack-based servers to start the application. require_relative "config/environment" diff --git a/config/environments/development.rb b/config/environments/development.rb index 8a245dfb96..bd84d80fbd 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -60,7 +60,7 @@ config.active_record.verbose_query_logs = true # Raises error for missing translations. - config.action_view.raise_on_missing_translations = true + config.i18n.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. diff --git a/config/environments/test.rb b/config/environments/test.rb index 1d7e535100..6e6c75eb3e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -50,5 +50,5 @@ config.active_support.deprecation = :stderr # Raises error for missing translations. - config.action_view.raise_on_missing_translations = true + config.i18n.raise_on_missing_translations = true end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 8bb8d065cc..3babc73f00 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,7 +1,8 @@ # 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 += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +Rails.application.config.filter_parameters += %i[ + passw secret token _key crypt salt certificate otp ssn ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index aa7435fbc9..dc84742212 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections diff --git a/config/initializers/new_framework_defaults_6_1.rb b/config/initializers/new_framework_defaults_6_1.rb index 9526b835ab..ab86107ffe 100644 --- a/config/initializers/new_framework_defaults_6_1.rb +++ b/config/initializers/new_framework_defaults_6_1.rb @@ -7,17 +7,17 @@ # Read the Guide for Upgrading Ruby on Rails for more info on each option. # Support for inversing belongs_to -> has_many Active Record associations. -# Rails.application.config.active_record.has_many_inversing = true +Rails.application.config.active_record.has_many_inversing = true # Track Active Storage variants in the database. -# Rails.application.config.active_storage.track_variants = true +Rails.application.config.active_storage.track_variants = true # Apply random variation to the delay when retrying failed jobs. -# Rails.application.config.active_job.retry_jitter = 0.15 +Rails.application.config.active_job.retry_jitter = 0.15 # Stop executing `after_enqueue`/`after_perform` callbacks if # `before_enqueue`/`before_perform` respectively halts with `throw :abort`. -# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true +Rails.application.config.active_job.skip_after_callbacks_if_terminated = true # Specify cookies SameSite protection level: either :none, :lax, or :strict. # @@ -33,11 +33,11 @@ # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an # UTC offset or a UTC time. -# ActiveSupport.utc_to_local_returns_utc_offset_times = true +ActiveSupport.utc_to_local_returns_utc_offset_times = true # Change the default HTTP status code to `308` when redirecting non-GET/HEAD # requests to HTTPS in `ActionDispatch::SSL` middleware. -# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 +Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 # Use new connection handling API. For most applications this won't have any # effect. For applications using multiple databases, this new API provides @@ -45,23 +45,23 @@ # Rails.application.config.active_record.legacy_connection_handling = false # Make `form_with` generate non-remote forms by default. -# Rails.application.config.action_view.form_with_generates_remote_forms = false +Rails.application.config.action_view.form_with_generates_remote_forms = false # Set the default queue name for the analysis job to the queue adapter default. -# Rails.application.config.active_storage.queues.analysis = nil +Rails.application.config.active_storage.queues.analysis = nil # Set the default queue name for the purge job to the queue adapter default. -# Rails.application.config.active_storage.queues.purge = nil +Rails.application.config.active_storage.queues.purge = nil # Set the default queue name for the incineration job to the queue adapter default. -# Rails.application.config.action_mailbox.queues.incineration = nil +Rails.application.config.action_mailbox.queues.incineration = nil # Set the default queue name for the routing job to the queue adapter default. -# Rails.application.config.action_mailbox.queues.routing = nil +Rails.application.config.action_mailbox.queues.routing = nil # Set the default queue name for the mail deliver job to the queue adapter default. -# Rails.application.config.action_mailer.deliver_later_queue_name = nil +Rails.application.config.action_mailer.deliver_later_queue_name = nil # Generate a `Link` header that gives a hint to modern browsers about # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`. -# Rails.application.config.action_view.preload_links_header = true +Rails.application.config.action_view.preload_links_header = true diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index bbfc3961bf..2f3c0db471 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which diff --git a/config/puma.rb b/config/puma.rb index d9b3e836cf..acfb13714d 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,43 +1,26 @@ -# 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 +# frozen_string_literal: true -# 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" +if ENV["RAILS_ENV"] == "production" + pidfile File.expand_path("../tmp/pids/puma.pid", __dir__).to_s + bind "unix://#{File.expand_path('../tmp/sockets/puma.sock', __dir__)}" -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# -port ENV.fetch("PORT") { 3000 } + concurrency = { + workers: ENV.fetch("WEB_CONCURRENCY", 4).to_i, + min_threads: ENV.fetch("WEB_CONCURRENCY_MIN_THREADS", 8).to_i, + max_threads: ENV.fetch("WEB_CONCURRENCY_MAX_THREADS", 32).to_i, + } -# Specifies the `environment` that Puma will run in. -# -environment ENV.fetch("RAILS_ENV") { "development" } + workers(concurrency[:workers]) + threads(concurrency[:min_threads], concurrency[:max_threads]) + preload_app! -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + plugin :appsignal -# 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 } + on_worker_boot do + # Reset the connection to the cache if we can + ::Rails.cache.reset if ::Rails.cache.respond_to?(:reset) -# 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 + # Establish a connection to the database + ActiveRecord::Base.establish_connection + end +end diff --git a/db/schema.rb b/db/schema.rb index 198499076d..383fe6804e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_03_08_172514) do +ActiveRecord::Schema.define(version: 2021_03_09_133501) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -70,7 +70,7 @@ t.datetime "archived_at" t.string "archive_reason" t.jsonb "tags", default: [] - t.string "numbers", default: "" + t.string "numbers", default: "", null: false t.boolean "publishable", default: false t.boolean "referenced_in_decision_notice", default: false t.index ["planning_application_id"], name: "index_documents_on_planning_application_id" diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index fd50ae5fd9..39f98d6055 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -37,11 +37,9 @@ config.before do |example| @default_local_authority = LocalAuthority.find_or_create_by!(name: "Default Authority", subdomain: "default") - subdomain = @default_local_authority.subdomain - case example.metadata[:type] when :request - Capybara.app_host = "default.example.com" + host! "default.example.com" when :system Capybara.app_host = "http://default.example.com" end