Move custom configuration to "config/settings/"
This commit is contained in:
parent
0a4a4726f5
commit
9e91d26b14
12 changed files with 10 additions and 6 deletions
|
@ -30,6 +30,10 @@ module Partynest
|
|||
unlock_token
|
||||
].freeze
|
||||
|
||||
def settings(name)
|
||||
config_for "settings/#{name}"
|
||||
end
|
||||
|
||||
# Initialize configuration defaults for originally generated Rails version.
|
||||
config.load_defaults 5.2
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ Rails.application.configure do
|
|||
config.log_tags = [:request_id]
|
||||
|
||||
# Use a different cache store in production.
|
||||
cache_conf = Rails.application.config_for(:cache_store).deep_symbolize_keys
|
||||
cache_conf = Rails.application.settings(:cache_store).deep_symbolize_keys
|
||||
config.cache_store = :redis_cache_store, {
|
||||
host: cache_conf[:host],
|
||||
port: cache_conf[:port],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
conf = Rails.application.config_for(:smtp).deep_symbolize_keys
|
||||
conf = Rails.application.settings(:smtp).deep_symbolize_keys
|
||||
|
||||
ActionMailer::Base.smtp_settings = {
|
||||
address: conf[:address],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
conf = Rails.application.config_for(:devise).deep_symbolize_keys
|
||||
conf = Rails.application.settings(:devise).deep_symbolize_keys
|
||||
|
||||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||
# Many of these configuration options can be set straight in your model.
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
client_conf = Rails.application.config_for(:sidekiq_client).deep_symbolize_keys
|
||||
server_conf = Rails.application.config_for(:sidekiq_server).deep_symbolize_keys
|
||||
client_conf = Rails.application.settings(:sidekiq_client).deep_symbolize_keys
|
||||
server_conf = Rails.application.settings(:sidekiq_server).deep_symbolize_keys
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = {
|
||||
|
|
|
@ -10,7 +10,7 @@ country_state_names.each do |name|
|
|||
CountryState.create! name: name
|
||||
end
|
||||
|
||||
Rails.application.config_for(:superuser).deep_symbolize_keys.tap do |config|
|
||||
Rails.application.settings(:superuser).deep_symbolize_keys.tap do |config|
|
||||
User.where(email: config[:email]).first_or_create! do |new_user|
|
||||
new_user.account = Account.create!
|
||||
new_user.password = config[:password]
|
||||
|
|
Reference in a new issue