{"action":"created","comment":{"url":"https://api.github.com/repos/odinsy/flashcards/pulls/comments/34960477","id":34960477,"diff_hunk":"@@ -0,0 +1,51 @@\n+# encoding: utf-8\n+\n+class ImageUploader < CarrierWave::Uploader::Base\n+\n+  # Include RMagick or MiniMagick support:\n+  include CarrierWave::RMagick\n+  # include CarrierWave::MiniMagick\n+\n+  # Choose what kind of storage to use for this uploader:\n+  # storage :file\n+  # storage :fog\n+\n+  # Override the directory where uploaded files will be stored.\n+  # This is a sensible default for uploaders that are meant to be mounted:\n+  def store_dir\n+    \"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}\"\n+  end\n+\n+  # Provide a default URL as a default if there hasn't been a file uploaded:\n+  # def default_url\n+  #   # For Rails 3.1+ asset pipeline compatibility:\n+  #   # ActionController::Base.helpers.asset_path(\"fallback/\" + [version_name, \"default.png\"].compact.join('_'))\n+  #\n+  #   \"/images/fallback/\" + [version_name, \"default.png\"].compact.join('_')\n+  # end\n+\n+  # Process files as they are uploaded:\n+  # process :scale => [200, 300]\n+  #\n+  # def scale(width, height)\n+  #   # do something\n+  # end\n+  process resize_to_fill: [300, 300]\n+  # Create different versions of your uploaded files:\n+  version :thumb do\n+    process resize_to_fit: [25, 25]\n+  end\n+\n+  # Add a white list of extensions which are allowed to be uploaded.\n+  # For images you might use something like this:\n+  # def extension_white_list\n+  #   %w(jpg jpeg gif png)\n+  # end\n+\n+  # Override the filename of the uploaded files:\n+  # Avoid using model.id or version_name here, see uploader/store.rb for details.\n+  # def filename\n+  #   \"something.jpg\" if original_filename\n+  # end\n+","path":"app/uploaders/image_uploader.rb","position":50,"original_position":50,"commit_id":"e53c1abde1afacf19f2385ac1057ba6129ed2779","original_commit_id":"e53c1abde1afacf19f2385ac1057ba6129ed2779","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra empty line detected at class body end.","created_at":"2015-07-19T18:12:50Z","updated_at":"2015-07-19T18:12:50Z","html_url":"https://github.com/odinsy/flashcards/pull/10#discussion_r34960477","pull_request_url":"https://api.github.com/repos/odinsy/flashcards/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/comments/34960477"},"html":{"href":"https://github.com/odinsy/flashcards/pull/10#discussion_r34960477"},"pull_request":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/odinsy/flashcards/pulls/10","id":40309049,"html_url":"https://github.com/odinsy/flashcards/pull/10","diff_url":"https://github.com/odinsy/flashcards/pull/10.diff","patch_url":"https://github.com/odinsy/flashcards/pull/10.patch","issue_url":"https://api.github.com/repos/odinsy/flashcards/issues/10","number":10,"state":"open","locked":false,"title":"Added gems  'Carrierwave', 'fog-aws' and 'Figaro'. ","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"body":"- Added the ability to attach image to card.\r\n- Images are uploaded to the AWS S3.\r\n- Environment variables are hidden.","created_at":"2015-07-19T14:25:51Z","updated_at":"2015-07-19T18:12:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"727d7af702f7a2b4ad6db520a146034e63fc57a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odinsy/flashcards/pulls/10/commits","review_comments_url":"https://api.github.com/repos/odinsy/flashcards/pulls/10/comments","review_comment_url":"https://api.github.com/repos/odinsy/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odinsy/flashcards/issues/10/comments","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/e53c1abde1afacf19f2385ac1057ba6129ed2779","head":{"label":"odinsy:tenth-task","ref":"tenth-task","sha":"e53c1abde1afacf19f2385ac1057ba6129ed2779","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"repo":{"id":36316663,"name":"flashcards","full_name":"odinsy/flashcards","owner":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odinsy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/odinsy/flashcards","forks_url":"https://api.github.com/repos/odinsy/flashcards/forks","keys_url":"https://api.github.com/repos/odinsy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odinsy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odinsy/flashcards/teams","hooks_url":"https://api.github.com/repos/odinsy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/odinsy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/odinsy/flashcards/events","assignees_url":"https://api.github.com/repos/odinsy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/odinsy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/odinsy/flashcards/tags","blobs_url":"https://api.github.com/repos/odinsy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odinsy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odinsy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/odinsy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/odinsy/flashcards/languages","stargazers_url":"https://api.github.com/repos/odinsy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/odinsy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/odinsy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/odinsy/flashcards/subscription","commits_url":"https://api.github.com/repos/odinsy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/odinsy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/odinsy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/odinsy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/odinsy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/odinsy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odinsy/flashcards/merges","archive_url":"https://api.github.com/repos/odinsy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odinsy/flashcards/downloads","issues_url":"https://api.github.com/repos/odinsy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/odinsy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/odinsy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/odinsy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odinsy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/odinsy/flashcards/releases{/id}","created_at":"2015-05-26T18:48:22Z","updated_at":"2015-05-27T11:38:00Z","pushed_at":"2015-07-19T18:12:42Z","git_url":"git://github.com/odinsy/flashcards.git","ssh_url":"git@github.com:odinsy/flashcards.git","clone_url":"https://github.com/odinsy/flashcards.git","svn_url":"https://github.com/odinsy/flashcards","homepage":null,"size":540,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"odinsy:master","ref":"master","sha":"ea5dc69a7ed3b8d5be9d3f559fc12b66bbc414a0","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"repo":{"id":36316663,"name":"flashcards","full_name":"odinsy/flashcards","owner":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odinsy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/odinsy/flashcards","forks_url":"https://api.github.com/repos/odinsy/flashcards/forks","keys_url":"https://api.github.com/repos/odinsy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odinsy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odinsy/flashcards/teams","hooks_url":"https://api.github.com/repos/odinsy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/odinsy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/odinsy/flashcards/events","assignees_url":"https://api.github.com/repos/odinsy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/odinsy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/odinsy/flashcards/tags","blobs_url":"https://api.github.com/repos/odinsy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odinsy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odinsy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/odinsy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/odinsy/flashcards/languages","stargazers_url":"https://api.github.com/repos/odinsy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/odinsy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/odinsy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/odinsy/flashcards/subscription","commits_url":"https://api.github.com/repos/odinsy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/odinsy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/odinsy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/odinsy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/odinsy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/odinsy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odinsy/flashcards/merges","archive_url":"https://api.github.com/repos/odinsy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odinsy/flashcards/downloads","issues_url":"https://api.github.com/repos/odinsy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/odinsy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/odinsy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/odinsy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odinsy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/odinsy/flashcards/releases{/id}","created_at":"2015-05-26T18:48:22Z","updated_at":"2015-05-27T11:38:00Z","pushed_at":"2015-07-19T18:12:42Z","git_url":"git://github.com/odinsy/flashcards.git","ssh_url":"git@github.com:odinsy/flashcards.git","clone_url":"https://github.com/odinsy/flashcards.git","svn_url":"https://github.com/odinsy/flashcards","homepage":null,"size":540,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/10"},"html":{"href":"https://github.com/odinsy/flashcards/pull/10"},"issue":{"href":"https://api.github.com/repos/odinsy/flashcards/issues/10"},"comments":{"href":"https://api.github.com/repos/odinsy/flashcards/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/odinsy/flashcards/statuses/e53c1abde1afacf19f2385ac1057ba6129ed2779"}}}}