{"action":"created","comment":{"url":"https://api.github.com/repos/acl-services/build-acl/pulls/comments/44852826","id":44852826,"diff_hunk":"@@ -0,0 +1,25 @@\n+class MediumBlogPosts < ActiveRecord::Base\n+  validates :post_title, presence: true, uniqueness: true\n+  validates :description, presence: true\n+  validates :url, presence: true, uniqueness: true\n+  validates :creator, presence: true\n+  validates :published_date, presence: true\n+\n+  scope :most_recent, ->(limit=3) { order(published_date: :desc).limit(limit) }\n+\n+  def self.sync_medium_posts\n+    require 'rss'","path":"app/models/medium_blog_posts.rb","position":11,"original_position":11,"commit_id":"a9eb7f6cea7103acf7ce5312d7dc6f59203d1444","original_commit_id":"a9eb7f6cea7103acf7ce5312d7dc6f59203d1444","user":{"login":"leoping","id":556483,"avatar_url":"https://avatars.githubusercontent.com/u/556483?v=3","gravatar_id":"","url":"https://api.github.com/users/leoping","html_url":"https://github.com/leoping","followers_url":"https://api.github.com/users/leoping/followers","following_url":"https://api.github.com/users/leoping/following{/other_user}","gists_url":"https://api.github.com/users/leoping/gists{/gist_id}","starred_url":"https://api.github.com/users/leoping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leoping/subscriptions","organizations_url":"https://api.github.com/users/leoping/orgs","repos_url":"https://api.github.com/users/leoping/repos","events_url":"https://api.github.com/users/leoping/events{/privacy}","received_events_url":"https://api.github.com/users/leoping/received_events","type":"User","site_admin":false},"body":"require can be at the top of file","created_at":"2015-11-14T01:59:56Z","updated_at":"2015-11-14T01:59:56Z","html_url":"https://github.com/acl-services/build-acl/pull/20#discussion_r44852826","pull_request_url":"https://api.github.com/repos/acl-services/build-acl/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/comments/44852826"},"html":{"href":"https://github.com/acl-services/build-acl/pull/20#discussion_r44852826"},"pull_request":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/acl-services/build-acl/pulls/20","id":50705529,"html_url":"https://github.com/acl-services/build-acl/pull/20","diff_url":"https://github.com/acl-services/build-acl/pull/20.diff","patch_url":"https://github.com/acl-services/build-acl/pull/20.patch","issue_url":"https://api.github.com/repos/acl-services/build-acl/issues/20","number":20,"state":"open","locked":false,"title":"Bld 43 auto refresh posts","user":{"login":"alexlaj","id":4872745,"avatar_url":"https://avatars.githubusercontent.com/u/4872745?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlaj","html_url":"https://github.com/alexlaj","followers_url":"https://api.github.com/users/alexlaj/followers","following_url":"https://api.github.com/users/alexlaj/following{/other_user}","gists_url":"https://api.github.com/users/alexlaj/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlaj/subscriptions","organizations_url":"https://api.github.com/users/alexlaj/orgs","repos_url":"https://api.github.com/users/alexlaj/repos","events_url":"https://api.github.com/users/alexlaj/events{/privacy}","received_events_url":"https://api.github.com/users/alexlaj/received_events","type":"User","site_admin":false},"body":"Following the same pattern as the Instagram photos, the blog posts are now updated automatically. Only the 3 most recent posts are shown. Since medium.com does not expose an api for embedding, the rss feed for build-acl was used to create the embed link. ","created_at":"2015-11-13T23:31:25Z","updated_at":"2015-11-14T01:59:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9012a6ec396f6bbc80cbe98aebdf6044ce1eea11","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acl-services/build-acl/pulls/20/commits","review_comments_url":"https://api.github.com/repos/acl-services/build-acl/pulls/20/comments","review_comment_url":"https://api.github.com/repos/acl-services/build-acl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acl-services/build-acl/issues/20/comments","statuses_url":"https://api.github.com/repos/acl-services/build-acl/statuses/a9eb7f6cea7103acf7ce5312d7dc6f59203d1444","head":{"label":"acl-services:BLD-43_auto_refresh_posts","ref":"BLD-43_auto_refresh_posts","sha":"a9eb7f6cea7103acf7ce5312d7dc6f59203d1444","user":{"login":"acl-services","id":1388703,"avatar_url":"https://avatars.githubusercontent.com/u/1388703?v=3","gravatar_id":"","url":"https://api.github.com/users/acl-services","html_url":"https://github.com/acl-services","followers_url":"https://api.github.com/users/acl-services/followers","following_url":"https://api.github.com/users/acl-services/following{/other_user}","gists_url":"https://api.github.com/users/acl-services/gists{/gist_id}","starred_url":"https://api.github.com/users/acl-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acl-services/subscriptions","organizations_url":"https://api.github.com/users/acl-services/orgs","repos_url":"https://api.github.com/users/acl-services/repos","events_url":"https://api.github.com/users/acl-services/events{/privacy}","received_events_url":"https://api.github.com/users/acl-services/received_events","type":"Organization","site_admin":false},"repo":{"id":39047368,"name":"build-acl","full_name":"acl-services/build-acl","owner":{"login":"acl-services","id":1388703,"avatar_url":"https://avatars.githubusercontent.com/u/1388703?v=3","gravatar_id":"","url":"https://api.github.com/users/acl-services","html_url":"https://github.com/acl-services","followers_url":"https://api.github.com/users/acl-services/followers","following_url":"https://api.github.com/users/acl-services/following{/other_user}","gists_url":"https://api.github.com/users/acl-services/gists{/gist_id}","starred_url":"https://api.github.com/users/acl-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acl-services/subscriptions","organizations_url":"https://api.github.com/users/acl-services/orgs","repos_url":"https://api.github.com/users/acl-services/repos","events_url":"https://api.github.com/users/acl-services/events{/privacy}","received_events_url":"https://api.github.com/users/acl-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acl-services/build-acl","description":"","fork":false,"url":"https://api.github.com/repos/acl-services/build-acl","forks_url":"https://api.github.com/repos/acl-services/build-acl/forks","keys_url":"https://api.github.com/repos/acl-services/build-acl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acl-services/build-acl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acl-services/build-acl/teams","hooks_url":"https://api.github.com/repos/acl-services/build-acl/hooks","issue_events_url":"https://api.github.com/repos/acl-services/build-acl/issues/events{/number}","events_url":"https://api.github.com/repos/acl-services/build-acl/events","assignees_url":"https://api.github.com/repos/acl-services/build-acl/assignees{/user}","branches_url":"https://api.github.com/repos/acl-services/build-acl/branches{/branch}","tags_url":"https://api.github.com/repos/acl-services/build-acl/tags","blobs_url":"https://api.github.com/repos/acl-services/build-acl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acl-services/build-acl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acl-services/build-acl/git/refs{/sha}","trees_url":"https://api.github.com/repos/acl-services/build-acl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acl-services/build-acl/statuses/{sha}","languages_url":"https://api.github.com/repos/acl-services/build-acl/languages","stargazers_url":"https://api.github.com/repos/acl-services/build-acl/stargazers","contributors_url":"https://api.github.com/repos/acl-services/build-acl/contributors","subscribers_url":"https://api.github.com/repos/acl-services/build-acl/subscribers","subscription_url":"https://api.github.com/repos/acl-services/build-acl/subscription","commits_url":"https://api.github.com/repos/acl-services/build-acl/commits{/sha}","git_commits_url":"https://api.github.com/repos/acl-services/build-acl/git/commits{/sha}","comments_url":"https://api.github.com/repos/acl-services/build-acl/comments{/number}","issue_comment_url":"https://api.github.com/repos/acl-services/build-acl/issues/comments{/number}","contents_url":"https://api.github.com/repos/acl-services/build-acl/contents/{+path}","compare_url":"https://api.github.com/repos/acl-services/build-acl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acl-services/build-acl/merges","archive_url":"https://api.github.com/repos/acl-services/build-acl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acl-services/build-acl/downloads","issues_url":"https://api.github.com/repos/acl-services/build-acl/issues{/number}","pulls_url":"https://api.github.com/repos/acl-services/build-acl/pulls{/number}","milestones_url":"https://api.github.com/repos/acl-services/build-acl/milestones{/number}","notifications_url":"https://api.github.com/repos/acl-services/build-acl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acl-services/build-acl/labels{/name}","releases_url":"https://api.github.com/repos/acl-services/build-acl/releases{/id}","created_at":"2015-07-14T01:48:25Z","updated_at":"2015-07-17T07:25:52Z","pushed_at":"2015-11-13T23:31:26Z","git_url":"git://github.com/acl-services/build-acl.git","ssh_url":"git@github.com:acl-services/build-acl.git","clone_url":"https://github.com/acl-services/build-acl.git","svn_url":"https://github.com/acl-services/build-acl","homepage":null,"size":980,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"integration"}},"base":{"label":"acl-services:integration","ref":"integration","sha":"d680059559604f622a109f157fa17ed37d321bdf","user":{"login":"acl-services","id":1388703,"avatar_url":"https://avatars.githubusercontent.com/u/1388703?v=3","gravatar_id":"","url":"https://api.github.com/users/acl-services","html_url":"https://github.com/acl-services","followers_url":"https://api.github.com/users/acl-services/followers","following_url":"https://api.github.com/users/acl-services/following{/other_user}","gists_url":"https://api.github.com/users/acl-services/gists{/gist_id}","starred_url":"https://api.github.com/users/acl-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acl-services/subscriptions","organizations_url":"https://api.github.com/users/acl-services/orgs","repos_url":"https://api.github.com/users/acl-services/repos","events_url":"https://api.github.com/users/acl-services/events{/privacy}","received_events_url":"https://api.github.com/users/acl-services/received_events","type":"Organization","site_admin":false},"repo":{"id":39047368,"name":"build-acl","full_name":"acl-services/build-acl","owner":{"login":"acl-services","id":1388703,"avatar_url":"https://avatars.githubusercontent.com/u/1388703?v=3","gravatar_id":"","url":"https://api.github.com/users/acl-services","html_url":"https://github.com/acl-services","followers_url":"https://api.github.com/users/acl-services/followers","following_url":"https://api.github.com/users/acl-services/following{/other_user}","gists_url":"https://api.github.com/users/acl-services/gists{/gist_id}","starred_url":"https://api.github.com/users/acl-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acl-services/subscriptions","organizations_url":"https://api.github.com/users/acl-services/orgs","repos_url":"https://api.github.com/users/acl-services/repos","events_url":"https://api.github.com/users/acl-services/events{/privacy}","received_events_url":"https://api.github.com/users/acl-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acl-services/build-acl","description":"","fork":false,"url":"https://api.github.com/repos/acl-services/build-acl","forks_url":"https://api.github.com/repos/acl-services/build-acl/forks","keys_url":"https://api.github.com/repos/acl-services/build-acl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acl-services/build-acl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acl-services/build-acl/teams","hooks_url":"https://api.github.com/repos/acl-services/build-acl/hooks","issue_events_url":"https://api.github.com/repos/acl-services/build-acl/issues/events{/number}","events_url":"https://api.github.com/repos/acl-services/build-acl/events","assignees_url":"https://api.github.com/repos/acl-services/build-acl/assignees{/user}","branches_url":"https://api.github.com/repos/acl-services/build-acl/branches{/branch}","tags_url":"https://api.github.com/repos/acl-services/build-acl/tags","blobs_url":"https://api.github.com/repos/acl-services/build-acl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acl-services/build-acl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acl-services/build-acl/git/refs{/sha}","trees_url":"https://api.github.com/repos/acl-services/build-acl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acl-services/build-acl/statuses/{sha}","languages_url":"https://api.github.com/repos/acl-services/build-acl/languages","stargazers_url":"https://api.github.com/repos/acl-services/build-acl/stargazers","contributors_url":"https://api.github.com/repos/acl-services/build-acl/contributors","subscribers_url":"https://api.github.com/repos/acl-services/build-acl/subscribers","subscription_url":"https://api.github.com/repos/acl-services/build-acl/subscription","commits_url":"https://api.github.com/repos/acl-services/build-acl/commits{/sha}","git_commits_url":"https://api.github.com/repos/acl-services/build-acl/git/commits{/sha}","comments_url":"https://api.github.com/repos/acl-services/build-acl/comments{/number}","issue_comment_url":"https://api.github.com/repos/acl-services/build-acl/issues/comments{/number}","contents_url":"https://api.github.com/repos/acl-services/build-acl/contents/{+path}","compare_url":"https://api.github.com/repos/acl-services/build-acl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acl-services/build-acl/merges","archive_url":"https://api.github.com/repos/acl-services/build-acl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acl-services/build-acl/downloads","issues_url":"https://api.github.com/repos/acl-services/build-acl/issues{/number}","pulls_url":"https://api.github.com/repos/acl-services/build-acl/pulls{/number}","milestones_url":"https://api.github.com/repos/acl-services/build-acl/milestones{/number}","notifications_url":"https://api.github.com/repos/acl-services/build-acl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acl-services/build-acl/labels{/name}","releases_url":"https://api.github.com/repos/acl-services/build-acl/releases{/id}","created_at":"2015-07-14T01:48:25Z","updated_at":"2015-07-17T07:25:52Z","pushed_at":"2015-11-13T23:31:26Z","git_url":"git://github.com/acl-services/build-acl.git","ssh_url":"git@github.com:acl-services/build-acl.git","clone_url":"https://github.com/acl-services/build-acl.git","svn_url":"https://github.com/acl-services/build-acl","homepage":null,"size":980,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/20"},"html":{"href":"https://github.com/acl-services/build-acl/pull/20"},"issue":{"href":"https://api.github.com/repos/acl-services/build-acl/issues/20"},"comments":{"href":"https://api.github.com/repos/acl-services/build-acl/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acl-services/build-acl/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/acl-services/build-acl/statuses/a9eb7f6cea7103acf7ce5312d7dc6f59203d1444"}}}}