{"action":"created","comment":{"url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/comments/57873821","id":57873821,"diff_hunk":"@@ -30,4 +36,14 @@ def altmetric_badge(document, opts={})\n   def altmetric_embed_script\n     return \"<script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script>\".html_safe\n   end\n+\n+  def recognized_identifiers?(doc)\n+    # if there is an intersection '&' here, then we have one or more of these id types\n+    (mendeley_identifiers(doc).keys & [:doi, :pmid, :arxiv]).present?\n+  end\n+\n+  def current?(document)\n+   date = document['pub_date_tis'].try(:first)","path":"app/helpers/altmetric_helper.rb","position":33,"original_position":33,"commit_id":"6f3c2c4b275068e09a63d2ff7de7cc8f4eb9da79","original_commit_id":"6f3c2c4b275068e09a63d2ff7de7cc8f4eb9da79","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use 2 (not 1) spaces for indentation.","created_at":"2016-03-30T11:35:37Z","updated_at":"2016-03-30T11:35:37Z","html_url":"https://github.com/dtulibrary/toshokan/pull/2#discussion_r57873821","pull_request_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/comments/57873821"},"html":{"href":"https://github.com/dtulibrary/toshokan/pull/2#discussion_r57873821"},"pull_request":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2","id":64612288,"html_url":"https://github.com/dtulibrary/toshokan/pull/2","diff_url":"https://github.com/dtulibrary/toshokan/pull/2.diff","patch_url":"https://github.com/dtulibrary/toshokan/pull/2.patch","issue_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/2","number":2,"state":"open","locked":false,"title":"Issue #2598 - hide altmetrics badge when empty, avoid api call for do…","user":{"login":"ronan-mch","id":1145457,"avatar_url":"https://avatars.githubusercontent.com/u/1145457?v=3","gravatar_id":"","url":"https://api.github.com/users/ronan-mch","html_url":"https://github.com/ronan-mch","followers_url":"https://api.github.com/users/ronan-mch/followers","following_url":"https://api.github.com/users/ronan-mch/following{/other_user}","gists_url":"https://api.github.com/users/ronan-mch/gists{/gist_id}","starred_url":"https://api.github.com/users/ronan-mch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronan-mch/subscriptions","organizations_url":"https://api.github.com/users/ronan-mch/orgs","repos_url":"https://api.github.com/users/ronan-mch/repos","events_url":"https://api.github.com/users/ronan-mch/events{/privacy}","received_events_url":"https://api.github.com/users/ronan-mch/received_events","type":"User","site_admin":false},"body":"…cs outside of altmetrics scope","created_at":"2016-03-30T11:35:32Z","updated_at":"2016-03-30T11:35:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08df145c768a9e33501586b1d2210aa9e51a6966","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/2/comments","statuses_url":"https://api.github.com/repos/dtulibrary/toshokan/statuses/6f3c2c4b275068e09a63d2ff7de7cc8f4eb9da79","head":{"label":"dtulibrary:hide_altmetrics","ref":"hide_altmetrics","sha":"6f3c2c4b275068e09a63d2ff7de7cc8f4eb9da79","user":{"login":"dtulibrary","id":2004467,"avatar_url":"https://avatars.githubusercontent.com/u/2004467?v=3","gravatar_id":"","url":"https://api.github.com/users/dtulibrary","html_url":"https://github.com/dtulibrary","followers_url":"https://api.github.com/users/dtulibrary/followers","following_url":"https://api.github.com/users/dtulibrary/following{/other_user}","gists_url":"https://api.github.com/users/dtulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/dtulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtulibrary/subscriptions","organizations_url":"https://api.github.com/users/dtulibrary/orgs","repos_url":"https://api.github.com/users/dtulibrary/repos","events_url":"https://api.github.com/users/dtulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/dtulibrary/received_events","type":"Organization","site_admin":false},"repo":{"id":5203368,"name":"toshokan","full_name":"dtulibrary/toshokan","owner":{"login":"dtulibrary","id":2004467,"avatar_url":"https://avatars.githubusercontent.com/u/2004467?v=3","gravatar_id":"","url":"https://api.github.com/users/dtulibrary","html_url":"https://github.com/dtulibrary","followers_url":"https://api.github.com/users/dtulibrary/followers","following_url":"https://api.github.com/users/dtulibrary/following{/other_user}","gists_url":"https://api.github.com/users/dtulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/dtulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtulibrary/subscriptions","organizations_url":"https://api.github.com/users/dtulibrary/orgs","repos_url":"https://api.github.com/users/dtulibrary/repos","events_url":"https://api.github.com/users/dtulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/dtulibrary/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dtulibrary/toshokan","description":"DTU Digital Library search interface","fork":false,"url":"https://api.github.com/repos/dtulibrary/toshokan","forks_url":"https://api.github.com/repos/dtulibrary/toshokan/forks","keys_url":"https://api.github.com/repos/dtulibrary/toshokan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtulibrary/toshokan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtulibrary/toshokan/teams","hooks_url":"https://api.github.com/repos/dtulibrary/toshokan/hooks","issue_events_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/events{/number}","events_url":"https://api.github.com/repos/dtulibrary/toshokan/events","assignees_url":"https://api.github.com/repos/dtulibrary/toshokan/assignees{/user}","branches_url":"https://api.github.com/repos/dtulibrary/toshokan/branches{/branch}","tags_url":"https://api.github.com/repos/dtulibrary/toshokan/tags","blobs_url":"https://api.github.com/repos/dtulibrary/toshokan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtulibrary/toshokan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtulibrary/toshokan/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtulibrary/toshokan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtulibrary/toshokan/statuses/{sha}","languages_url":"https://api.github.com/repos/dtulibrary/toshokan/languages","stargazers_url":"https://api.github.com/repos/dtulibrary/toshokan/stargazers","contributors_url":"https://api.github.com/repos/dtulibrary/toshokan/contributors","subscribers_url":"https://api.github.com/repos/dtulibrary/toshokan/subscribers","subscription_url":"https://api.github.com/repos/dtulibrary/toshokan/subscription","commits_url":"https://api.github.com/repos/dtulibrary/toshokan/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtulibrary/toshokan/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtulibrary/toshokan/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtulibrary/toshokan/contents/{+path}","compare_url":"https://api.github.com/repos/dtulibrary/toshokan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtulibrary/toshokan/merges","archive_url":"https://api.github.com/repos/dtulibrary/toshokan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtulibrary/toshokan/downloads","issues_url":"https://api.github.com/repos/dtulibrary/toshokan/issues{/number}","pulls_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls{/number}","milestones_url":"https://api.github.com/repos/dtulibrary/toshokan/milestones{/number}","notifications_url":"https://api.github.com/repos/dtulibrary/toshokan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtulibrary/toshokan/labels{/name}","releases_url":"https://api.github.com/repos/dtulibrary/toshokan/releases{/id}","deployments_url":"https://api.github.com/repos/dtulibrary/toshokan/deployments","created_at":"2012-07-27T10:39:21Z","updated_at":"2016-01-18T09:38:01Z","pushed_at":"2016-03-30T11:35:32Z","git_url":"git://github.com/dtulibrary/toshokan.git","ssh_url":"git@github.com:dtulibrary/toshokan.git","clone_url":"https://github.com/dtulibrary/toshokan.git","svn_url":"https://github.com/dtulibrary/toshokan","homepage":null,"size":48932,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"dtulibrary:master","ref":"master","sha":"34a5cba99b67ee46e7e9bed06ff548cb16b5fb96","user":{"login":"dtulibrary","id":2004467,"avatar_url":"https://avatars.githubusercontent.com/u/2004467?v=3","gravatar_id":"","url":"https://api.github.com/users/dtulibrary","html_url":"https://github.com/dtulibrary","followers_url":"https://api.github.com/users/dtulibrary/followers","following_url":"https://api.github.com/users/dtulibrary/following{/other_user}","gists_url":"https://api.github.com/users/dtulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/dtulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtulibrary/subscriptions","organizations_url":"https://api.github.com/users/dtulibrary/orgs","repos_url":"https://api.github.com/users/dtulibrary/repos","events_url":"https://api.github.com/users/dtulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/dtulibrary/received_events","type":"Organization","site_admin":false},"repo":{"id":5203368,"name":"toshokan","full_name":"dtulibrary/toshokan","owner":{"login":"dtulibrary","id":2004467,"avatar_url":"https://avatars.githubusercontent.com/u/2004467?v=3","gravatar_id":"","url":"https://api.github.com/users/dtulibrary","html_url":"https://github.com/dtulibrary","followers_url":"https://api.github.com/users/dtulibrary/followers","following_url":"https://api.github.com/users/dtulibrary/following{/other_user}","gists_url":"https://api.github.com/users/dtulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/dtulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtulibrary/subscriptions","organizations_url":"https://api.github.com/users/dtulibrary/orgs","repos_url":"https://api.github.com/users/dtulibrary/repos","events_url":"https://api.github.com/users/dtulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/dtulibrary/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dtulibrary/toshokan","description":"DTU Digital Library search interface","fork":false,"url":"https://api.github.com/repos/dtulibrary/toshokan","forks_url":"https://api.github.com/repos/dtulibrary/toshokan/forks","keys_url":"https://api.github.com/repos/dtulibrary/toshokan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtulibrary/toshokan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtulibrary/toshokan/teams","hooks_url":"https://api.github.com/repos/dtulibrary/toshokan/hooks","issue_events_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/events{/number}","events_url":"https://api.github.com/repos/dtulibrary/toshokan/events","assignees_url":"https://api.github.com/repos/dtulibrary/toshokan/assignees{/user}","branches_url":"https://api.github.com/repos/dtulibrary/toshokan/branches{/branch}","tags_url":"https://api.github.com/repos/dtulibrary/toshokan/tags","blobs_url":"https://api.github.com/repos/dtulibrary/toshokan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtulibrary/toshokan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtulibrary/toshokan/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtulibrary/toshokan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtulibrary/toshokan/statuses/{sha}","languages_url":"https://api.github.com/repos/dtulibrary/toshokan/languages","stargazers_url":"https://api.github.com/repos/dtulibrary/toshokan/stargazers","contributors_url":"https://api.github.com/repos/dtulibrary/toshokan/contributors","subscribers_url":"https://api.github.com/repos/dtulibrary/toshokan/subscribers","subscription_url":"https://api.github.com/repos/dtulibrary/toshokan/subscription","commits_url":"https://api.github.com/repos/dtulibrary/toshokan/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtulibrary/toshokan/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtulibrary/toshokan/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtulibrary/toshokan/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtulibrary/toshokan/contents/{+path}","compare_url":"https://api.github.com/repos/dtulibrary/toshokan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtulibrary/toshokan/merges","archive_url":"https://api.github.com/repos/dtulibrary/toshokan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtulibrary/toshokan/downloads","issues_url":"https://api.github.com/repos/dtulibrary/toshokan/issues{/number}","pulls_url":"https://api.github.com/repos/dtulibrary/toshokan/pulls{/number}","milestones_url":"https://api.github.com/repos/dtulibrary/toshokan/milestones{/number}","notifications_url":"https://api.github.com/repos/dtulibrary/toshokan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtulibrary/toshokan/labels{/name}","releases_url":"https://api.github.com/repos/dtulibrary/toshokan/releases{/id}","deployments_url":"https://api.github.com/repos/dtulibrary/toshokan/deployments","created_at":"2012-07-27T10:39:21Z","updated_at":"2016-01-18T09:38:01Z","pushed_at":"2016-03-30T11:35:32Z","git_url":"git://github.com/dtulibrary/toshokan.git","ssh_url":"git@github.com:dtulibrary/toshokan.git","clone_url":"https://github.com/dtulibrary/toshokan.git","svn_url":"https://github.com/dtulibrary/toshokan","homepage":null,"size":48932,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2"},"html":{"href":"https://github.com/dtulibrary/toshokan/pull/2"},"issue":{"href":"https://api.github.com/repos/dtulibrary/toshokan/issues/2"},"comments":{"href":"https://api.github.com/repos/dtulibrary/toshokan/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dtulibrary/toshokan/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dtulibrary/toshokan/statuses/6f3c2c4b275068e09a63d2ff7de7cc8f4eb9da79"}}}}