diff --git a/Rakefile b/Rakefile index 4ac5badd..b28ad941 100644 --- a/Rakefile +++ b/Rakefile @@ -216,6 +216,30 @@ task :hash_ips => [:environment] do end end +desc 'prime_site_files' +task :prime_site_files => [:environment] do + Site.where(is_banned: false).select(:id, :username).all.each do |site| + Dir.glob(File.join(site.files_path, '**/*')).each do |file| + next unless site.username == 'kyledrake' + path = file.gsub(site.base_files_path, '').sub(/^\//, '') + + site_file = site.site_files_dataset[path: path] + + if site_file.nil? + next if File.directory? file + mtime = File.mtime file + site.add_site_file( + path: path, + size: File.size(file), + sha1_hash: Digest::SHA1.file(file).hexdigest, + updated_at: mtime, + created_at: mtime + ) + end + end + end +end + =begin desc 'Update screenshots' task :update_screenshots => [:environment] do diff --git a/views/templates/email/supporter_upgrade.erb b/views/templates/email/supporter_upgrade.erb index bee094af..2d257019 100644 --- a/views/templates/email/supporter_upgrade.erb +++ b/views/templates/email/supporter_upgrade.erb @@ -1,8 +1,6 @@ Hi there! -A Neocities administrator has upgraded your account to supporter! Someone at Neocities must really like you (or your site). :) - -We won't charge you for the upgrade, so no worries on that. You can see some of the new features you can use by visiting our supporter page at https://neocities.org/plan +A Neocities administrator has upgraded your account to supporter! You can see some of the new features you can use by visiting our supporter page at https://neocities.org/plan We're looking forward to seeing the awesome things you will do with it. @@ -12,4 +10,4 @@ If you have any questions or comments, or just want to say hi, feel free to cont From Penelope (the Neocities' cat/sysadmin), everyone that's helped work on Neocities, and on behalf of all our sites, our very best wishes for you (and your awesome web site). -- The Neocities Team \ No newline at end of file +- The Neocities Team