From 4ba3ec0b42c814af4f91bbe44cf8ace0112e8b6b Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Mon, 2 Apr 2012 18:39:35 -0700 Subject: [PATCH] update initializer --- config/initializers/asset_sync.rb | 44 ++++++++++++++++--------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/config/initializers/asset_sync.rb b/config/initializers/asset_sync.rb index c4301135a..603dc9a95 100644 --- a/config/initializers/asset_sync.rb +++ b/config/initializers/asset_sync.rb @@ -1,23 +1,25 @@ -require File.join(File.dirname(__FILE__), '..', '..', 'app', 'models', 'app_config') -AssetSync.configure do |config| - config.fog_provider = 'AWS' - config.fog_directory = AppConfig[:s3_bucket] - config.aws_access_key_id = AppConfig[:s3_key] - config.aws_secret_access_key = AppConfig[:s3_secret] +if defined?(AssetSync) + require File.join(File.dirname(__FILE__), '..', '..', 'app', 'models', 'app_config') + AssetSync.configure do |config| + config.fog_provider = 'AWS' + config.fog_directory = AppConfig[:s3_bucket] + config.aws_access_key_id = AppConfig[:s3_key] + config.aws_secret_access_key = AppConfig[:s3_secret] - # Don't delete files from the store - # config.existing_remote_files = "keep" - # - # Increase upload performance by configuring your region - # config.fog_region = 'eu-west-1' - # - # Automatically replace files with their equivalent gzip compressed version - # config.gzip_compression = true - # - # Use the Rails generated 'manifest.yml' file to produce the list of files to - # upload instead of searching the assets directory. - # config.manifest = true - # - # Fail silently. Useful for environments such as Heroku - # config.fail_silently = true + # Don't delete files from the store + # config.existing_remote_files = "keep" + # + # Increase upload performance by configuring your region + # config.fog_region = 'eu-west-1' + # + # Automatically replace files with their equivalent gzip compressed version + # config.gzip_compression = true + # + # Use the Rails generated 'manifest.yml' file to produce the list of files to + # upload instead of searching the assets directory. + # config.manifest = true + # + # Fail silently. Useful for environments such as Heroku + # config.fail_silently = true + end end \ No newline at end of file