add additional meta tags for seo
This commit is contained in:
@@ -96,15 +96,17 @@ end
|
||||
CurrentUser.as_admin
|
||||
|
||||
if Upload.count == 0
|
||||
ENV["SKIP_CLOUDFLARE_CHECK"] = "true"
|
||||
|
||||
puts "Creating uploads"
|
||||
1.upto(50) do |i|
|
||||
color1 = rand(4096).to_s(16)
|
||||
color2 = rand(4096).to_s(16)
|
||||
width = rand(2000) + 100
|
||||
height = rand(2000) + 100
|
||||
height = (width * (rand(0.5) + 1)).to_i
|
||||
url = "http://ipsumimage.appspot.com/#{width}x#{height},#{color1}"
|
||||
tags = rand(1_000_000_000).to_s.scan(/../).join(" ")
|
||||
|
||||
puts url
|
||||
service = UploadService.new(source: url, tag_string: tags, rating: "s")
|
||||
service.start!
|
||||
end
|
||||
@@ -112,18 +114,6 @@ else
|
||||
puts "Skipping uploads"
|
||||
end
|
||||
|
||||
if Post.count == 0
|
||||
puts "Creating posts"
|
||||
Upload.all.each do |upload|
|
||||
upload.process!
|
||||
end
|
||||
if Post.count == 0
|
||||
raise "Uploads failed conversion"
|
||||
end
|
||||
else
|
||||
puts "Skipping posts"
|
||||
end
|
||||
|
||||
if Comment.count == 0
|
||||
puts "Creating comments"
|
||||
Post.all.each do |post|
|
||||
|
||||
Reference in New Issue
Block a user