This commit is contained in:
r888888888
2013-07-11 15:50:51 -07:00
parent bedf1af579
commit c520c7f03c
28 changed files with 31 additions and 2796 deletions

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
Post.where(:file_ext => "swf").find_each do |post|
image_spec = ImageSpec.new(post.file_path)
post.image_width = image_spec.width
post.image_height = image_spec.height
post.update_column(:image_width, post.image_width)
post.update_column(:image_height, post.image_height)
end