From b58df61f4c9e0c8e6115414aa488d03b6b6ca632 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 12 Mar 2014 18:11:15 -0400 Subject: [PATCH] Fix configured uuid_prefix and force_ssl getting overwritten by application.rb --- services/api/config/application.default.yml | 14 +++++++++++ services/api/config/application.rb | 26 --------------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml index 11dcc54b04..ad95f0426a 100644 --- a/services/api/config/application.default.yml +++ b/services/api/config/application.default.yml @@ -85,3 +85,17 @@ common: # server, which uses openid against Google's servers, so in that case this # should be an address associated with a Google account. auto_admin_user: false + + ## Set Time.zone default to the specified zone and make Active + ## Record auto-convert to this zone. Run "rake -D time" for a list + ## of tasks for finding time zone names. Default is UTC. + #time_zone: Central Time (US & Canada) + + ## Default encoding used in templates for Ruby 1.9. + encoding: utf-8 + + # Enable the asset pipeline + assets.enabled: true + + # Version of your assets, change this if you want to expire all your assets + assets.version: "1.0" diff --git a/services/api/config/application.rb b/services/api/config/application.rb index 2f331eeffa..24648a9a58 100644 --- a/services/api/config/application.rb +++ b/services/api/config/application.rb @@ -26,37 +26,11 @@ module Server # Activate observers that should always be running. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - - config.force_ssl = true - - def config.uuid_prefix(x=nil) - if x and @uuid_prefix - raise "uuid_prefix was already set to #{@uuid_prefix}" - end - @uuid_prefix ||= Digest::MD5.hexdigest(x || `hostname`.strip).to_i(16).to_s(36)[-5..-1] - end - def config.uuid_prefix=(x) - @uuid_prefix = x - end end - end -- 2.30.2