move asset_sync require to the earliest point possible
This commit is contained in:
parent
dfef6ee598
commit
c6d158bd81
4 changed files with 17 additions and 4 deletions
|
|
@ -19,8 +19,9 @@
|
|||
* Fix posting to Twitter [#2758](https://github.com/diaspora/diaspora/issues/2758)
|
||||
* Don't show hovercards for current user in comments [#3999](https://github.com/diaspora/diaspora/issues/3999)
|
||||
* Replace mentions of out-of-aspect people with markdown links [#4161](https://github.com/diaspora/diaspora/pull/4161)
|
||||
* Unify hide and ignore [#3828](https://github.com/diaspora/diaspora/issues/3828)
|
||||
* Unify hide and ignore [#3827](https://github.com/diaspora/diaspora/issues/3828)
|
||||
* Remove alpha branding [#4196](https://github.com/diaspora/diaspora/issues/4196)
|
||||
* Fix dynamic loading of asset_sync
|
||||
|
||||
## Features
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ require_relative 'boot'
|
|||
require 'rails/all'
|
||||
Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler)
|
||||
|
||||
# Load asset_sync early
|
||||
require_relative 'asset_sync'
|
||||
|
||||
module Diaspora
|
||||
class Application < Rails::Application
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
|
|
|
|||
11
config/asset_sync.rb
Normal file
11
config/asset_sync.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if AppConfig.environment.assets.upload? && AppConfig.environment.s3.enable?
|
||||
# Monkey patch to make Rails.root available early
|
||||
require 'pathname'
|
||||
module Rails
|
||||
def self.root
|
||||
@@root ||= Pathname.new(__FILE__).dirname.join('..')
|
||||
end
|
||||
end
|
||||
|
||||
require 'asset_sync'
|
||||
end
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
if AppConfig.environment.assets.upload? && AppConfig.environment.s3.enable?
|
||||
require 'asset_sync'
|
||||
if defined? AssetSync
|
||||
AssetSync.configure do |config|
|
||||
config.enabled = true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue