mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Pump rails version, fix tests
This commit is contained in:
parent
1a59487724
commit
af57711dc0
13 changed files with 110 additions and 61 deletions
|
@ -16,6 +16,7 @@ end
|
|||
|
||||
module DomainNameRegistry
|
||||
class Application < Rails::Application
|
||||
#config.load_defaults 5.1
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
|
|
@ -7,3 +7,4 @@ test:
|
|||
production:
|
||||
adapter: redis
|
||||
url: redis://localhost:6379/1
|
||||
channel_prefix: domain_name_registry_production
|
||||
|
|
|
@ -66,7 +66,7 @@ Rails.application.configure do
|
|||
|
||||
# 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 = [I18n.default_locale]
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
|
|
@ -5,7 +5,7 @@ Rails.application.configure do
|
|||
config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path
|
||||
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')
|
||||
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts', 'node_modules')
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
|
@ -14,4 +14,5 @@ Rails.application.configure do
|
|||
config.assets.precompile += %w(admin-manifest.css admin-manifest.js)
|
||||
config.assets.precompile += %w(registrar-manifest.css registrar-manifest.js)
|
||||
config.assets.precompile += %w(registrant-manifest.css registrant-manifest.js)
|
||||
config.assets.precompile += %w( admin.js admin.css )
|
||||
end
|
||||
|
|
14
config/initializers/new_framework_defaults_5_1.rb
Normal file
14
config/initializers/new_framework_defaults_5_1.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains migration options to ease your Rails 5.1 upgrade.
|
||||
#
|
||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||
#
|
||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
||||
|
||||
# Make `form_with` generate non-remote forms.
|
||||
Rails.application.config.action_view.form_with_generates_remote_forms = false
|
||||
|
||||
# Unknown asset fallback will return the path passed in when the given
|
||||
# asset is not present in the asset pipeline.
|
||||
# Rails.application.config.assets.unknown_asset_fallback = false
|
|
@ -1,13 +1,13 @@
|
|||
# Puma can serve each request in a thread from an internal thread pool.
|
||||
# The `threads` method setting takes two numbers a minimum and maximum.
|
||||
# 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.
|
||||
# and maximum; this matches the default thread size of Active Record.
|
||||
#
|
||||
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
|
||||
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
||||
threads threads_count, threads_count
|
||||
|
||||
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
|
||||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
||||
#
|
||||
port ENV.fetch("PORT") { 3000 }
|
||||
|
||||
|
@ -32,16 +32,25 @@ environment ENV.fetch("RAILS_ENV") { "development" }
|
|||
#
|
||||
# preload_app!
|
||||
|
||||
# If you are preloading your application and using Active Record, it's
|
||||
# recommended that you close any connections to the database before workers
|
||||
# are forked to prevent connection leakage.
|
||||
#
|
||||
# before_fork do
|
||||
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
||||
# end
|
||||
|
||||
# The code in the `on_worker_boot` will be called if you are using
|
||||
# clustered mode by specifying a number of `workers`. After each worker
|
||||
# process is booted this block will be run, if you are using `preload_app!`
|
||||
# option you will want to use this block to reconnect to any threads
|
||||
# or connections that may have been created at application boot, Ruby
|
||||
# process is booted, this block will be run. If you are using the `preload_app!`
|
||||
# option, you will want to use this block to reconnect to any threads
|
||||
# or connections that may have been created at application boot, as Ruby
|
||||
# cannot share connections between processes.
|
||||
#
|
||||
# on_worker_boot do
|
||||
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
||||
# end
|
||||
#
|
||||
|
||||
# Allow puma to be restarted by `rails restart` command.
|
||||
plugin :tmp_restart
|
||||
|
|
6
config/spring.rb
Normal file
6
config/spring.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
%w(
|
||||
.ruby-version
|
||||
.rbenv-vars
|
||||
tmp/restart.txt
|
||||
tmp/caching-dev.txt
|
||||
).each { |path| Spring.watch(path) }
|
Loading…
Add table
Add a link
Reference in a new issue