Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master

This commit is contained in:
Jenkins
2018-03-09 00:17:17 +00:00
206 changed files with 2401 additions and 737 deletions

View File

@ -1,10 +1,8 @@
# frozen_string_literal: true
def render_static_page(action, dest:, **opts)
I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
html = ApplicationController.render(action, opts)
File.write(dest, html)
end
html = ApplicationController.render(action, opts)
File.write(dest, html)
end
namespace :assets do

View File

@ -476,10 +476,10 @@ namespace :mastodon do
time_ago = ENV.fetch('NUM_DAYS') { 7 }.to_i.days.ago
MediaAttachment.where.not(remote_url: '').where.not(file_file_name: nil).where('created_at < ?', time_ago).find_each do |media|
if media.file.exists?
media.file.destroy
media.save
end
next unless media.file.exists?
media.file.destroy
media.save
end
end