diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d4a0a3dcc..cb9b9d871 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,8 +12,8 @@ %meta{:name => "description", :content => "Diaspora*"} %meta{:name => "author", :content => "Diaspora, Inc."} - %link{:rel => 'shortcut icon', :href => '/favicon.png'} - %link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'} + %link{:rel => 'shortcut icon', :href => "#{image_tag('favicon.png')}" } + %link{:rel => 'apple-touch-icon', :href => "#{image_tag('apple-touch-icon.png')}"} %title = page_title yield(:page_title) diff --git a/config/initializers/asset_sync.rb b/config/initializers/asset_sync.rb deleted file mode 100644 index 603dc9a95..000000000 --- a/config/initializers/asset_sync.rb +++ /dev/null @@ -1,25 +0,0 @@ -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 - end -end \ No newline at end of file diff --git a/lib/tasks/heroku.rake b/lib/tasks/heroku.rake index 32ca1a781..9030ec12e 100644 --- a/lib/tasks/heroku.rake +++ b/lib/tasks/heroku.rake @@ -20,4 +20,17 @@ namespace :heroku do system 'heroku addons:add logging:expanded' system 'heroku addons:add redistogo:nano' end -end + + task :set_up_s3_sync => [:environment] do + fog_provider = "FOG_PROVIDER=AWS" + aws_access_key_id = "AWS_ACCESS_KEY_ID=#{AppConfig[:s3_key]}" + aws_secret_access_key = "AWS_SECRET_ACCESS_KEY=#{AppConfig[:s3_secret]}" + fog = "FOG_DIRECTORY=#{AppConfig[:s3_bucket]}" + asset_host = "ASSET_HOST=https://#{AppConfig[:s3_bucket]}.s3.amazonaws.com" + + each_heroku_app do |stage| + system("heroku labs:enable user_env_compile -a #{stage.app}") + stage.run('config:add', "#{fog} #{fog_provider} #{fog} #{aws_secret_access_key} #{aws_access_key_id} ASSET_HOST=#{asset_host}") + end + end +end \ No newline at end of file diff --git a/public/500.html b/public/500.html index b919aa9d2..1e0706125 100644 --- a/public/500.html +++ b/public/500.html @@ -34,7 +34,7 @@
- +