* Get rid of early pathname requirement * Use require_relative where approciate * Drop unused files * Imported new application.rb, environment.rb and environments/* from fresh Rails app * Cleaned up boot.rb * Load config in boot.rb * Deduplicate environments/integration*.rb * Move username blacklist into defaults.yml * Ruby 1.9 Hash syntax everywhere * Reorganize lib/diaspora/markdownify to match conventions * Get rid of full path requires where possible * Add dummy content to production section diaspora.yml.example to prevent warning * Drop sqlite? method * Move postgres? method into ConfigurationMethods * Drop token authentication from User
19 lines
768 B
Ruby
19 lines
768 B
Ruby
# Copyright (c) 2012, Diaspora Inc. This file is
|
|
# licensed under the Affero General Public License version 3 or later. See
|
|
# the COPYRIGHT file.
|
|
#hack to allow us to access app config, rather than putting in environments/production.rb
|
|
|
|
if Rails.env == 'production'
|
|
Diaspora::Application.configure do
|
|
if AppConfig.privacy.google_analytics_key.present?
|
|
require 'rack/google-analytics'
|
|
config.middleware.use Rack::GoogleAnalytics, tracker: AppConfig.privacy.google_analytics_key.get
|
|
end
|
|
|
|
if AppConfig.privacy.piwik.enable?
|
|
require 'rack/piwik'
|
|
config.middleware.use Rack::Piwik, piwik_url: AppConfig.privacy.piwik.host.get,
|
|
piwik_id: AppConfig.privacy.piwik.site_id.get
|
|
end
|
|
end
|
|
end
|