diff --git a/Gemfile b/Gemfile index 81b57ebfe..a0b89c092 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ group :test do gem "shoulda" gem "factory_girl" gem "mocha" - gem "faker" + gem "ffaker", :git => "http://github.com/EmmanuelOga/ffaker.git" end gem "rails", "3.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index 0884d876f..4774600bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,9 @@ +GIT + remote: http://github.com/EmmanuelOga/ffaker.git + revision: cbe849d + specs: + ffaker (0.4.0) + GIT remote: http://github.com/mislav/will_paginate.git revision: b1a5bee @@ -44,17 +50,17 @@ GEM erubis (2.6.6) abstract (>= 1.0.0) factory_girl (1.3.2) - faker (0.3.1) - haml (3.0.21) - i18n (0.4.1) + haml (3.0.22) + i18n (0.4.2) imagesize (0.1.1) - mail (2.2.7) + mail (2.2.9) activesupport (>= 2.3.6) - mime-types - treetop (>= 1.4.5) + i18n (~> 0.4.1) + mime-types (~> 1.16) + treetop (~> 1.4.8) memcache-client (1.8.5) mime-types (1.16) - mocha (0.9.8) + mocha (0.9.9) rake pg (0.9.0) polyglot (0.3.1) @@ -93,7 +99,7 @@ PLATFORMS DEPENDENCIES delayed_job factory_girl - faker + ffaker! haml imagesize memcache-client diff --git a/app/logical/pixiv_proxy.rb b/app/logical/pixiv_proxy.rb index 9496776f3..25b2fa7dd 100644 --- a/app/logical/pixiv_proxy.rb +++ b/app/logical/pixiv_proxy.rb @@ -83,7 +83,7 @@ class PixivProxy mech = WWW::Mechanize.new mech.get("http://www.pixiv.net") do |page| - page.form_with(:action => "index.php") do |form| + page.form_with(:action => "login.php") do |form| form.pixiv_id = "uroobnad" form.pass = "uroobnad556" end.click_button diff --git a/app/views/comments/index.html.haml b/app/views/comments/index.html.haml index f83de3a65..487e49d10 100644 --- a/app/views/comments/index.html.haml +++ b/app/views/comments/index.html.haml @@ -1,7 +1,8 @@ %div{:class => "comments"} %div{:class => "index"} - @posts.each do |post| - %div{:class => "preview"} - = image_tag(post.medium_file_url) - = render :partial => "comments/partials/index/list", :locals => {:post => post, :comments => post.comments} - %div{:class => "clearfix"} \ No newline at end of file + %div{:class => "post"} + %div{:class => "preview"} + = image_tag(post.preview_file_url) + = render :partial => "comments/partials/index/list", :locals => {:post => post, :comments => post.comments.recent.reverse} + %div{:class => "clearfix"} \ No newline at end of file diff --git a/app/views/comments/partials/index/_header.html.haml b/app/views/comments/partials/index/_header.html.haml new file mode 100644 index 000000000..f0bda3074 --- /dev/null +++ b/app/views/comments/partials/index/_header.html.haml @@ -0,0 +1,43 @@ +%div{:class => "header"} + %div{:class => "row"} + %span{:class => "info"} + %time Date + = compact_time(post.created_at) + %span{:class => "info"} + %strong User + = link_to(post.uploader_name, user_path(post.uploader_id)) + %span{:class => "info"} + %strong Rating + = post.rating + %span{:class => "info"} + %strong Score + %span{:id => "score-for-post-#{post.id}"} + = post.score + + +