fix pixiv tests

This commit is contained in:
r888888888
2014-10-20 20:49:17 -07:00
parent 260de869b1
commit 8d4c9d7955
95 changed files with 146368 additions and 31275 deletions

View File

@@ -0,0 +1,17 @@
class PixivUgiraProcessor
attr_accessor :post, :frame_data, :width, :height
def load_data(hash)
@frame_data = hash[:pixiv_ugoira_frame_data]
@width = hash[:pixiv_ugoira_width]
@height = hash[:pixiv_ugoira_height]
end
def process!(post)
save_pixiv_ugoira_frame_data(post)
end
def save_pixiv_ugoira_frame_data(post)
PixivUgoiraFrameData.create(:data => frame_data.to_json, :post_id => post.id)
end
end